:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-light: #ecfdf5;
    --bg: #f8fafc;
    --surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Plus Jakarta Sans', sans-serif; -webkit-tap-highlight-color: transparent; }
body { background-color: var(--bg); color: var(--text-main); min-height: 100vh; display: flex; justify-content: center; align-items: flex-start; padding: 20px 12px; }
.app-container { width: 100%; max-width: 440px; background: var(--surface); border-radius: var(--radius); padding: 24px 20px 16px 20px; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05); border: 1px solid var(--border); position: relative; }
.brand-header { text-align: center; margin-bottom: 24px; }
.brand-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--primary-light); color: var(--primary-dark); padding: 6px 14px; border-radius: 50px; font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.brand-title { font-size: 24px; font-weight: 800; color: var(--text-main); letter-spacing: -0.5px; }
.brand-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

.toast-notification {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-100px);
    background: var(--text-main); color: white; padding: 12px 20px; border-radius: 50px;
    font-size: 13px; font-weight: 600; box-shadow: 0 10px 25px rgba(0,0,0,0.2); z-index: 1000;
    opacity: 0; transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55); display: flex; align-items: center; gap: 8px;
}
.toast-notification.active { transform: translateX(-50%) translateY(0); opacity: 1; }

.scan-hero {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white; border: none; width: 100%; padding: 18px; border-radius: 16px;
    font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center;
    gap: 10px; cursor: pointer; box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3); margin-bottom: 15px;
    transition: transform 0.15s ease;
}
.scan-hero:active { transform: scale(0.97); }

#interactive-camera {
    width: 100%; height: 320px; border-radius: 16px; object-fit: cover; display: none;
    border: 3px solid var(--primary); margin-bottom: 10px; background: #000; cursor: pointer;
}

.camera-hint { font-size: 12px; color: var(--primary-dark); text-align: center; margin-bottom: 15px; font-weight: 600; display: none; }
.divider { display: flex; align-items: center; text-align: center; color: var(--text-muted); font-size: 12px; font-weight: 600; margin: 20px 0; }
.divider::before, .divider::after { content: ''; flex: 1; border-bottom: 1px solid var(--border); }
.divider span { padding: 0 10px; text-transform: uppercase; }

.input-group { margin-bottom: 16px; }
.input-label { font-size: 13px; font-weight: 600; color: var(--text-main); margin-bottom: 8px; display: block; }
.custom-input { width: 100%; padding: 14px 16px; border: 1.5px solid var(--border); border-radius: 12px; font-size: 14px; background: #f8fafc; color: var(--text-main); outline: none; }
.custom-input:focus { border-color: var(--primary); background: #fff; }

.file-upload-wrapper { position: relative; width: 100%; }
.file-upload-btn { width: 100%; padding: 14px; border: 1.5px dashed var(--border); border-radius: 12px; text-align: center; color: var(--text-muted); font-size: 13px; font-weight: 600; background: #f8fafc; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
.file-upload-wrapper input[type="file"] { position: absolute; top: 0; left: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; z-index: 5; }

.btn-analyze { width: 100%; background: var(--text-main); color: white; border: none; padding: 16px; border-radius: 14px; font-size: 15px; font-weight: 700; cursor: pointer; margin-top: 8px; transition: transform 0.15s ease; }
.btn-analyze:active { transform: scale(0.97); }

#result { margin-top: 24px; padding: 20px; border-radius: 16px; font-size: 14px; line-height: 1.6; display: none; white-space: pre-wrap; }
.loading { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; display: block !important; text-align: center; }
.safe { background: #ecfdf5; color: #065f46; border: 1.5px solid #10b981; display: block !important; }
.danger { background: #fef2f2; color: #991b1b; border: 1.5px solid #ef4444; display: block !important; }
.warning { background: #fffbeb; color: #92400e; border: 1.5px solid #f59e0b; display: block !important; }

.legal-notice { margin-top: 20px; text-align: center; font-size: 11px; color: var(--text-muted); opacity: 0.75; line-height: 1.4; }

.app-footer { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); text-align: center; }
.footer-contact { font-size: 11px; color: var(--text-muted); opacity: 0.55; text-decoration: none; letter-spacing: 0.2px; transition: opacity 0.2s ease, color 0.2s ease; }
.footer-contact:hover, .footer-contact:focus { opacity: 1; color: var(--primary-dark); }

/* ---- Dino Yükleme Animasyonu ---- */
.dino-loading-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
#dinoCanvas { width: 100%; max-width: 320px; height: 80px; display: block; background: linear-gradient(180deg, #f0fdf4 0%, #e6faf0 100%); border-radius: 12px; image-rendering: pixelated; image-rendering: crisp-edges; }
.dino-progress-track { width: 100%; max-width: 320px; height: 8px; background: #bbf7d0; border-radius: 50px; overflow: hidden; }
.dino-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--primary), var(--primary-dark)); border-radius: 50px; transition: width 0.25s ease-out; }
.dino-loading-caption { font-size: 13px; font-weight: 600; text-align: center; color: #166534; margin: 0; line-height: 1.5; }

/* ---- Responsive: küçük telefonlar (<= 360px) ---- */
@media (max-width: 360px) {
    body { padding: 12px 8px; }
    .app-container { padding: 18px 14px 14px 14px; }
    .brand-title { font-size: 21px; }
    .brand-subtitle { font-size: 12px; }
    #interactive-camera { height: 220px; }
    .scan-hero, .btn-analyze { padding: 15px; font-size: 14px; }
}

/* ---- Responsive: tablet ve üzeri (>= 600px) ---- */
@media (min-width: 600px) {
    .app-container { max-width: 480px; padding: 32px 32px 22px 32px; }
    .brand-title { font-size: 27px; }
    .brand-subtitle { font-size: 14px; }
    #interactive-camera { height: 360px; }
    .scan-hero, .btn-analyze { padding: 18px; font-size: 16px; }
    .custom-input, .file-upload-btn { padding: 15px 16px; font-size: 15px; }
}

/* ---- Responsive: masaüstü (>= 1024px) ---- */
@media (min-width: 1024px) {
    body {
        align-items: center;
        background: linear-gradient(160deg, #f8fafc 0%, #ecfdf5 100%);
        min-height: 100vh;
    }
    .app-container {
        max-width: 460px;
        box-shadow: 0 30px 60px -12px rgba(15, 23, 42, 0.12);
    }
    .app-container:hover { box-shadow: 0 35px 70px -12px rgba(15, 23, 42, 0.16); }
}
