/* ============================================================
   AllInOneDL  —  Premium Design
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --bg:       #05050f;
    --bg2:      #0c0c1e;
    --bg3:      #111128;
    --card:     rgba(255,255,255,.03);
    --card-h:   rgba(255,255,255,.06);
    --border:   rgba(255,255,255,.07);
    --border-h: rgba(255,255,255,.14);
    --p1:       #8b5cf6;
    --p2:       #6366f1;
    --p3:       #38bdf8;
    --green:    #34d399;
    --gold:     #f59e0b;
    --red:      #f43f5e;
    --text:     #f1f5f9;
    --muted:    #64748b;
    --muted2:   #94a3b8;
    --r:        16px;
    --shadow:   0 24px 64px rgba(0,0,0,.6);
}


/* ── Custom Scrollbar — tüm sayfalar ────────────────────────── */
* { scrollbar-width: thin; scrollbar-color: rgba(139,92,246,.5) transparent; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(139,92,246,.45);
    border-radius: 99px;
    transition: background .2s;
}
::-webkit-scrollbar-thumb:hover { background: rgba(139,92,246,.8); }
::-webkit-scrollbar-corner { background: transparent; }

/* ── View Transition: tema dalga animasyonu ── */
::view-transition            { pointer-events: none; }
::view-transition-old(root)  { animation: none; }
::view-transition-new(root)  { animation: none; }

/* ── Premium: reklamsız deneyim ── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; max-width: 100%; }

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100vw;
    -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════════════
   LIGHT THEME OVERRIDES
══════════════════════════════════════════ */
[data-theme="light"] {
    --bg:       #f4f6fb;
    --bg2:      #eef0f7;
    --bg3:      #e2e6f0;
    --card:     rgba(0,0,0,.03);
    --card-h:   rgba(0,0,0,.06);
    --border:   rgba(0,0,0,.08);
    --border-h: rgba(0,0,0,.15);
    --text:     #0f172a;
    --muted:    #64748b;
    --muted2:   #475569;
    --shadow:   0 24px 64px rgba(0,0,0,.12);
}
[data-theme="light"] body::before {
    background:
        radial-gradient(ellipse 80% 50% at 10% 0%,   rgba(139,92,246,.06) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 90% 100%,  rgba(56,189,248,.05) 0%, transparent 60%);
}
[data-theme="light"] header {
    background: rgba(244,246,251,.88);
    box-shadow: 0 1px 0 rgba(0,0,0,.06), 0 4px 20px rgba(0,0,0,.06);
}
[data-theme="light"] .url-input { color: var(--text); }
[data-theme="light"] .url-box::before { opacity: .25; }
[data-theme="light"] .qdl-panel { background: #fff; }
[data-theme="light"] .qdl-option:hover { background: rgba(139,92,246,.06); }
[data-theme="light"] .result-card { background: rgba(0,0,0,.02); }
[data-theme="light"] .result-info h3 { color: #0f172a; }
[data-theme="light"] .result-meta span { background: rgba(0,0,0,.05); border-color: rgba(0,0,0,.1); color: #475569; }
[data-theme="light"] .qdl-title { color: #0f172a; }
[data-theme="light"] .qdl-sub { color: #64748b; }
[data-theme="light"] .qdl-panel { background: #fff; border-color: rgba(0,0,0,.1); box-shadow: 0 20px 60px rgba(0,0,0,.15); }
[data-theme="light"] .qdl-panel-title { color: #64748b; border-color: rgba(0,0,0,.08); }
[data-theme="light"] .qdl-option { border-color: rgba(0,0,0,.05); }
[data-theme="light"] .qopt-res { color: #0f172a; }
[data-theme="light"] .qopt-tag { color: #64748b; background: rgba(0,0,0,.06); }
[data-theme="light"] .stats-bar { background: rgba(0,0,0,.02); }
[data-theme="light"] .hmenu-panel {
    background: #fff;
    box-shadow: 0 16px 48px rgba(0,0,0,.15);
}
[data-theme="light"] .modal { background: #fff; color: #0f172a; }
[data-theme="light"] footer { background: #eaecf5; color: #475569; }
[data-theme="light"] .hero h1 { color: #0f172a; }
[data-theme="light"] .hero h1 .grad { color: transparent; }
[data-theme="light"] .url-box { background: rgba(255,255,255,.8); border-color: rgba(0,0,0,.12); }
[data-theme="light"] .url-input { background: #fff; border-color: rgba(0,0,0,.12); color: #0f172a; }
[data-theme="light"] .btn-paste { background: rgba(0,0,0,.04); color: #475569; border-color: rgba(0,0,0,.12); }
[data-theme="light"] .btn-paste:hover { background: rgba(0,0,0,.08); color: #0f172a; }
[data-theme="light"] .feat-card { background: #fff; border-color: rgba(0,0,0,.08); }
[data-theme="light"] .plat { background: rgba(0,0,0,.04); color: #475569; }
[data-theme="light"] .user-dropdown { background: #fff; border-color: rgba(139,92,246,.2); }
[data-theme="light"] .user-dd-pname { color: #0f172a; }
[data-theme="light"] .user-dd-sep { background: rgba(0,0,0,.08); }
[data-theme="light"] .user-dd-item { color: #0f172a; }
[data-theme="light"] .lang-dropdown { background: #fff; }
[data-theme="light"] .theme-toggle { background: rgba(0,0,0,.05); border-color: rgba(0,0,0,.1); color: #0f172a; }
[data-theme="light"] .modal-overlay { background: rgba(0,0,0,.4); }
[data-theme="light"] .auth-modal-inner { background: #fff; }
[data-theme="light"] .auth-field input { background: #f4f6fb; border-color: rgba(0,0,0,.12); color: #0f172a; }
[data-theme="light"] .stat-num { color: #0f172a; }
[data-theme="light"] .section-title { color: #0f172a; }

/* ── Ambient background ── */
body::before {
    content: '';
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background:
        radial-gradient(ellipse 80% 50% at 10% 0%,   rgba(139,92,246,.1) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 90% 100%,  rgba(56,189,248,.08) 0%, transparent 60%),
        radial-gradient(ellipse 40% 60% at 50% 50%,   rgba(99,102,241,.04) 0%, transparent 70%);
}

/* ── Layout ── */
.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative; z-index: 1;
    width: 100%;
}
main { padding: 0 28px 80px; max-width: 900px; margin: 0 auto; width: 100%; }

/* ═══════════════════════════════════════════
   HEADER
═══════════════════════════════════════════ */
header {
    height: 72px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 40px;
    position: sticky; top: 0; z-index: 200;
    background: rgba(5, 5, 15, 0.8);
    backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
    border-bottom: 1px solid var(--border);
}
header::after {
    content: '';
    position: absolute; bottom: -1px; left: 10%; right: 10%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--p1), var(--p3), transparent);
    opacity: .4;
}

.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-icon {
    width: 40px; height: 40px; border-radius: 12px;
    background: linear-gradient(135deg, var(--p1), var(--p3));
    display: flex; align-items: center; justify-content: center; color: #fff;
    box-shadow: 0 0 24px rgba(139,92,246,.4);
    flex-shrink: 0;
}
.logo-text {
    font-size: 20px; font-weight: 900; letter-spacing: -.5px;
    background: linear-gradient(135deg, var(--p1), var(--p3));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

nav { display: flex; gap: 8px; align-items: center; }
.nav-link {
    color: var(--muted2); text-decoration: none; font-size: 14px; font-weight: 500;
    padding: 7px 16px; border-radius: 10px; transition: all .2s;
}
.nav-link:hover { color: #fff; background: var(--card-h); }

.btn-premium {
    display: flex; align-items: center; gap: 7px;
    padding: 9px 20px; border-radius: 24px; font-size: 13px; font-weight: 700;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #1a0a00 !important; text-decoration: none;
    box-shadow: 0 4px 20px rgba(245,158,11,.3);
    transition: all .2s;
}
.btn-premium:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 8px 28px rgba(245,158,11,.45); }
.premium-star { font-size: 15px; }

/* ═══════════════════════════════════════════
   HERO
═══════════════════════════════════════════ */
.hero { padding: 64px 0 40px; text-align: center; }

.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(139,92,246,.12); border: 1px solid rgba(139,92,246,.25);
    border-radius: 24px; padding: 6px 16px; font-size: 13px; font-weight: 600;
    color: #a78bfa; margin-bottom: 24px; letter-spacing: .2px;
}
.hero-eyebrow span { width: 6px; height: 6px; background: var(--p1); border-radius: 50%;
    animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(.8)} }

.hero h1 {
    font-size: clamp(32px, 5.5vw, 54px);
    font-weight: 900; line-height: 1.1; letter-spacing: -1.5px;
    color: #fff; margin-bottom: 20px;
}
.hero h1 .grad {
    background: linear-gradient(135deg, var(--p1) 0%, var(--p3) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p {
    color: var(--muted2); font-size: 16px; line-height: 1.7;
    max-width: 500px; margin: 0 auto 40px; font-weight: 400;
}

/* ── URL Input Box ── */
.url-box {
    background: rgba(255,255,255,.025);
    border: 1px solid var(--border-h);
    border-radius: 20px; padding: 20px;
    box-shadow: 0 0 0 1px rgba(139,92,246,.1), var(--shadow);
    position: relative;
}
.url-box::before {
    content: '';
    position: absolute; inset: -1px; border-radius: 21px;
    background: linear-gradient(135deg, rgba(139,92,246,.3), rgba(56,189,248,.2));
    z-index: -1;
}

.input-row { display: flex; gap: 10px; }
.url-input {
    flex: 1; background: rgba(255,255,255,.05);
    border: 1px solid var(--border); border-radius: 12px;
    padding: 15px 20px; font-size: 15px; color: #fff;
    font-family: inherit; outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.url-input:focus { border-color: var(--p1); box-shadow: 0 0 0 3px rgba(139,92,246,.15); }
.url-input::placeholder { color: var(--muted); }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 24px;
    border-radius: 12px; font-size: 15px; font-weight: 700; cursor: pointer;
    border: none; font-family: inherit; transition: all .2s; text-decoration: none; white-space: nowrap; }

.btn-primary {
    background: linear-gradient(135deg, var(--p1), var(--p2));
    color: #fff; box-shadow: 0 4px 20px rgba(139,92,246,.4);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(139,92,246,.55); }
.btn-primary:active { transform: translateY(0); }

.btn-paste {
    background: rgba(255,255,255,.05); color: var(--muted2);
    border: 1px solid var(--border); padding: 0 18px; font-size: 14px;
}
.btn-paste:hover { background: rgba(255,255,255,.09); color: #fff; border-color: var(--border-h); }

/* ── Platform chips ── */
.platforms { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 32px; }
.plat {
    display: flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,.03); border: 1px solid var(--border);
    border-radius: 22px; padding: 6px 14px; font-size: 12px; font-weight: 500; color: var(--muted2);
    transition: all .2s; cursor: default;
}
.plat:hover { background: rgba(139,92,246,.1); border-color: rgba(139,92,246,.3); color: #c4b5fd; }
.plat .ico { font-size: 14px; }

/* ═══════════════════════════════════════════
   RESULT CARD
═══════════════════════════════════════════ */
#result-section { display: none; margin-top: 32px; }

.result-card {
    background: rgba(255,255,255,.02);
    border: 1px solid var(--border-h);
    border-radius: 20px; padding: 24px;
    box-shadow: var(--shadow);
}

.result-top {
    display: flex; gap: 18px; align-items: flex-start; margin-bottom: 24px;
    padding-bottom: 24px; border-bottom: 1px solid var(--border);
}
.result-thumb {
    width: 148px; height: 92px; object-fit: cover;
    border-radius: 10px; flex-shrink: 0;
    background: var(--bg3); box-shadow: 0 4px 16px rgba(0,0,0,.4);
}
.result-info { flex: 1; min-width: 0; }
.result-info h3 {
    font-size: 16px; font-weight: 700; color: #fff; line-height: 1.4;
    margin-bottom: 10px; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.result-meta { display: flex; flex-wrap: wrap; gap: 12px; }
.result-meta span {
    display: flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: 500; color: var(--muted2);
    background: rgba(255,255,255,.04); border: 1px solid var(--border);
    border-radius: 8px; padding: 4px 10px;
}

/* ═══════════════════════════════════════════
   QUALITY DROPDOWN
═══════════════════════════════════════════ */
.qdl-wrap {
    display: flex; gap: 12px; flex-wrap: wrap;
}
.qdl-col { position: relative; flex: 1; min-width: 140px; }

.qdl-main-btn {
    width: 100%; display: flex; align-items: center; gap: 14px;
    padding: 18px 22px; border-radius: 14px; border: 1px solid transparent;
    cursor: pointer; font-family: inherit; transition: all .2s; text-align: left;
}
.qdl-main-btn:disabled { opacity: .45; cursor: not-allowed; }

.qdl-video {
    background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(139,92,246,.12));
    border-color: rgba(139,92,246,.25);
}
.qdl-video:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(99,102,241,.2), rgba(139,92,246,.2));
    border-color: var(--p1); box-shadow: 0 8px 28px rgba(139,92,246,.15);
    transform: translateY(-2px);
}

.qdl-audio {
    background: linear-gradient(135deg, rgba(52,211,153,.08), rgba(56,189,248,.08));
    border-color: rgba(52,211,153,.25);
}
.qdl-audio:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(52,211,153,.16), rgba(56,189,248,.16));
    border-color: var(--green); box-shadow: 0 8px 28px rgba(52,211,153,.12);
    transform: translateY(-2px);
}

.qdl-icon { font-size: 28px; flex-shrink: 0; }
.qdl-text { display: flex; flex-direction: column; gap: 3px; }
.qdl-title { font-size: 16px; font-weight: 700; color: #fff; }
.qdl-sub   { font-size: 12px; color: var(--muted2); font-weight: 500; }

/* Dropdown panel */
.qdl-panel {
    display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: #0f0f23; border: 1px solid var(--border-h);
    border-radius: 16px; overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.7); z-index: 50;
    animation: dropIn .18s ease;
}
.qdl-panel.open { display: block; }
@keyframes dropIn {
    from { opacity:0; transform:translateY(-8px); }
    to   { opacity:1; transform:translateY(0); }
}
.qdl-panel-title {
    font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
    color: var(--muted); font-weight: 700; padding: 14px 18px 10px;
    border-bottom: 1px solid var(--border);
}

.qdl-option {
    display: flex; align-items: center; gap: 10px;
    padding: 13px 18px; cursor: pointer;
    transition: background .15s; border-bottom: 1px solid rgba(255,255,255,.03);
}
.qdl-option:last-child { border-bottom: none; }
.qdl-option:hover { background: rgba(139,92,246,.1); }
.qdl-option-locked { opacity: .65; cursor: default; }
.qdl-option-locked:hover { background: rgba(245,158,11,.05); }

.qopt-res  { font-size: 15px; font-weight: 800; color: #fff; min-width: 55px; }
.qopt-tag  {
    font-size: 11px; color: var(--muted2); font-weight: 600;
    background: rgba(255,255,255,.06); padding: 2px 8px; border-radius: 6px;
}
.qopt-size { font-size: 12px; color: var(--muted); margin-left: auto; }
.qopt-free {
    font-size: 10px; font-weight: 700;
    background: rgba(52,211,153,.15); color: var(--green);
    padding: 2px 9px; border-radius: 6px; margin-left: 6px;
}
.qopt-prem {
    font-size: 10px; font-weight: 700;
    background: rgba(245,158,11,.15); color: var(--gold);
    padding: 2px 9px; border-radius: 6px; margin-left: 6px;
}
.qopt-prem-unlocked {
    font-size: 10px; font-weight: 700;
    background: linear-gradient(135deg,rgba(245,158,11,.25),rgba(249,115,22,.25)); color: var(--gold);
    padding: 2px 9px; border-radius: 6px; margin-left: 6px;
    box-shadow: 0 0 6px rgba(245,158,11,.3);
}
.qopt-auto-badge {
    font-size: 11px; font-weight: 700;
    background: rgba(99,102,241,.2); color: #818cf8;
    padding: 2px 10px; border-radius: 6px; margin-left: auto;
}
.qdl-option-auto { border-top: 1px solid rgba(255,255,255,.06); margin-top: 2px; }
.qopt-fps {
    font-size: 10px; font-weight: 700; color: #34d399;
    background: rgba(52,211,153,.12); padding: 2px 7px; border-radius: 5px;
}

/* ═══════════════════════════════════════════
   PROGRESS BAR
═══════════════════════════════════════════ */
.progress-wrap { margin-top: 20px; display: none; }
.progress-label { font-size: 13px; color: var(--muted2); margin-bottom: 8px; font-weight: 500; }
.progress-bar-bg {
    background: rgba(255,255,255,.06); border-radius: 99px;
    height: 6px; overflow: hidden;
}
.progress-bar-fill {
    height: 100%; border-radius: 99px;
    background: linear-gradient(90deg, var(--p1), var(--p3));
    width: 0%; transition: width .4s ease;
}

/* ═══════════════════════════════════════════
   PREMIUM UPSELL
═══════════════════════════════════════════ */
.premium-box {
    margin-top: 20px;
    background: linear-gradient(135deg, rgba(245,158,11,.06), rgba(251,191,36,.06));
    border: 1px solid rgba(245,158,11,.2);
    border-radius: 16px; padding: 20px 24px;
    display: flex; gap: 18px; align-items: center;
}
.premium-box .ico { font-size: 34px; flex-shrink: 0; }
.premium-box h4 { font-size: 15px; font-weight: 700; color: #fcd34d; margin-bottom: 5px; }
.premium-box p  { font-size: 13px; color: var(--muted2); line-height: 1.5; }
.btn-gold {
    background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #1a0a00;
    font-weight: 800; padding: 11px 22px; border-radius: 12px; font-size: 14px;
    flex-shrink: 0; border: none; cursor: pointer; font-family: inherit;
    transition: all .2s;
}
.btn-gold:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* ═══════════════════════════════════════════
   STATS BAR
═══════════════════════════════════════════ */
.stats-bar {
    display: flex; justify-content: center; gap: 0;
    margin: 48px 0; border: 1px solid var(--border);
    border-radius: 18px; background: rgba(255,255,255,.02); overflow: hidden;
}
.stat {
    flex: 1; text-align: center; padding: 28px 20px;
    border-right: 1px solid var(--border);
}
.stat:last-child { border-right: none; }
.stat-num {
    font-size: 28px; font-weight: 900; letter-spacing: -1px;
    background: linear-gradient(135deg, var(--p1), var(--p3));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-lbl { font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 500; }

/* ═══════════════════════════════════════════
   FEATURES
═══════════════════════════════════════════ */
.section-title {
    font-size: 24px; font-weight: 800; text-align: center;
    margin-bottom: 28px; color: #fff; letter-spacing: -.5px;
}
.section-title span {
    background: linear-gradient(135deg, var(--p1), var(--p3));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.features-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 14px; margin-bottom: 48px;
}
.feat-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: 16px; padding: 22px;
    transition: all .22s;
}
.feat-card:hover {
    background: var(--card-h); border-color: var(--border-h);
    transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,.3);
}
.feat-icon { font-size: 26px; margin-bottom: 12px; }
.feat-card h4 { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 7px; }
.feat-card p  { font-size: 13px; color: var(--muted2); line-height: 1.55; }


/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
footer {
    background: rgba(5,5,15,.9); border-top: 1px solid var(--border);
    padding: 32px 48px;
    display: flex; gap: 20px; flex-wrap: wrap;
    justify-content: space-between; align-items: center;
}
footer p { color: var(--muted); font-size: 13px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 500; transition: color .2s; }
.footer-links a:hover { color: #fff; }

/* ═══════════════════════════════════════════
   TOAST
═══════════════════════════════════════════ */
.toast {
    position: fixed; bottom: 28px; right: 28px; z-index: 9999;
    background: #12122a; border: 1px solid var(--border-h);
    border-radius: 14px; padding: 14px 20px; font-size: 14px; font-weight: 500;
    box-shadow: 0 16px 48px rgba(0,0,0,.5);
    display: none; align-items: center; gap: 10px; max-width: 320px;
    animation: slideUp .25s ease;
}
.toast.show { display: flex; }
.toast.error   { border-color: rgba(244,63,94,.4); }
.toast.success { border-color: rgba(52,211,153,.4); }
@keyframes slideUp {
    from { transform:translateY(16px); opacity:0; }
    to   { transform:translateY(0);    opacity:1; }
}

/* ═══════════════════════════════════════════
   SPINNER
═══════════════════════════════════════════ */
.spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.15);
    border-top-color: #fff; border-radius: 50%;
    animation: spin .65s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════
   MODAL
═══════════════════════════════════════════ */
.modal-overlay {
    position: fixed; inset: 0; z-index: 300;
    background: rgba(0,0,0,.75); backdrop-filter: blur(12px);
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal {
    background: #0f0f22; border: 1px solid var(--border-h);
    border-radius: 22px; padding: 40px; max-width: 480px; width: 100%;
    box-shadow: 0 32px 96px rgba(0,0,0,.7);
    animation: fadeIn .2s ease;
}
@keyframes fadeIn { from{opacity:0;transform:scale(.96)} to{opacity:1;transform:scale(1)} }
.modal h2 { font-size: 22px; font-weight: 900; margin-bottom: 18px; color: #fff; letter-spacing: -.4px; }
.modal p  { color: var(--muted2); font-size: 14px; line-height: 1.65; margin-bottom: 12px; }
.modal ul { color: var(--muted2); font-size: 14px; padding-left: 20px; line-height: 2.2; margin-bottom: 16px; }
.modal ul li { list-style: none; padding-left: 4px; }
.dl-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 20px; }

/* ═══════════════════════════════════════════
   SETUP OVERLAY (auto-install)
═══════════════════════════════════════════ */
#setup-overlay {
    font-family: 'Inter', system-ui, sans-serif;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 960px) {
    .wrapper { width: 100%; }
    footer { padding: 24px 20px; }
    header { width: 100%; max-width: 100vw; }
    main { max-width: 100%; padding: 0 16px 60px; }
}
/* ── Header right group ── */
.header-right { display: flex; align-items: center; gap: 8px; }

/* ── Language selector ── */
.lang-selector { position: relative; }

.lang-trigger {
    display: flex; align-items: center; gap: 6px;
    background: var(--card); border: 1px solid var(--border);
    border-radius: 10px; padding: 7px 12px; cursor: pointer;
    font-family: inherit; font-size: 13px; font-weight: 700;
    color: var(--muted2); transition: all .2s;
}
.lang-trigger:hover { background: var(--card-h); border-color: var(--border-h); color: var(--text); }
#hdr-flag { font-size: 16px; line-height: 1; }
#hdr-code { font-size: 12px; letter-spacing: .5px; }
.lang-trigger svg { opacity: .5; transition: transform .2s; }
.lang-trigger.open svg { transform: rotate(180deg); }

.lang-dropdown {
    display: none;
    position: absolute; top: calc(100% + 8px); right: 0;
    width: 260px;
    max-width: calc(100vw - 24px);
    background: #0f0f22; border: 1px solid var(--border-h);
    border-radius: 14px; padding: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,.65); z-index: 300;
    animation: dropIn .18s ease;
    display: none;
}
.lang-dropdown.open { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }

[data-theme="light"] .lang-dropdown { background: #fff; }

.lang-opt {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 12px; border-radius: 9px; cursor: pointer;
    font-size: 13px; font-weight: 500; color: var(--muted2);
    border: none; background: transparent; font-family: inherit;
    transition: all .15s; text-align: left; width: 100%;
}
.lang-opt:hover { background: rgba(139,92,246,.1); color: var(--text); }
.lang-opt.active { background: rgba(139,92,246,.15); color: #c4b5fd; font-weight: 700; }
.lang-opt-flag { font-size: 18px; flex-shrink: 0; }
.lang-opt-name { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Theme toggle ── */
.theme-toggle {
    width: 36px; height: 36px; border-radius: 10px;
    background: var(--card); border: 1px solid var(--border);
    cursor: pointer; font-size: 17px; display: flex;
    align-items: center; justify-content: center;
    transition: all .2s;
}
.theme-toggle:hover { background: var(--card-h); border-color: var(--border-h); }

/* ── Hero eyebrow fix ── */
.hero-eyebrow {
    display: inline-block;
    background: rgba(139,92,246,.12); border: 1px solid rgba(139,92,246,.25);
    border-radius: 24px; padding: 6px 18px;
    font-size: 13px; font-weight: 600; color: #a78bfa;
    margin-bottom: 22px; white-space: nowrap;
}

/* ══════════════════════════════════════════
   HAMBURGER & MOBILE DRAWER
══════════════════════════════════════════ */
.hamburger-btn {
    display: none;
    background: var(--card); border: 1px solid var(--border);
    border-radius: 10px; width: 40px; height: 40px;
    align-items: center; justify-content: center;
    color: var(--text); font-size: 18px; cursor: pointer;
    transition: background .2s;
}
.hamburger-btn:hover { background: var(--card-h); }

.mobile-drawer-overlay {
    display: none; position: fixed; inset: 0; z-index: 400;
    background: rgba(0,0,0,.5); backdrop-filter: blur(4px);
}
.mobile-drawer-overlay.open { display: block; }

.mobile-drawer {
    position: fixed; top: 0; right: -320px; bottom: 0;
    width: 300px; z-index: 401;
    background: var(--bg2); border-left: 1px solid var(--border);
    transition: right .3s cubic-bezier(.4,0,.2,1);
    display: flex; flex-direction: column;
}
.mobile-drawer.open { right: 0; }

.drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px; border-bottom: 1px solid var(--border);
}
.drawer-title { font-weight: 700; font-size: 16px; }
.drawer-close {
    background: var(--card); border: 1px solid var(--border);
    border-radius: 8px; width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    color: var(--muted2); cursor: pointer; font-size: 16px;
}

.drawer-body { padding: 16px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }

.drawer-user { display: flex; flex-direction: column; gap: 10px; }
.drawer-btn {
    width: 100%; padding: 12px; border-radius: 10px;
    font-size: 15px; font-weight: 600; cursor: pointer;
    font-family: inherit; border: none;
}
.drawer-btn-outline {
    background: transparent; border: 1px solid var(--border-h); color: var(--text);
}
.drawer-btn-fill {
    background: linear-gradient(135deg, var(--p1), var(--p2)); color: #fff;
}

.drawer-profile {
    display: flex; align-items: center; gap: 12px;
    padding: 12px; background: var(--card); border-radius: 12px;
    margin-bottom: 4px;
}
.drawer-avatar { font-size: 36px; color: var(--muted2); }
.drawer-username { font-weight: 700; font-size: 15px; }
.drawer-premium-badge {
    font-size: 11px; font-weight: 700;
    background: linear-gradient(135deg,#f59e0b,#f97316);
    color: #fff; padding: 2px 8px; border-radius: 99px;
    display: inline-block; margin-top: 4px;
}

.drawer-item {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; border-radius: 10px;
    color: var(--muted2); text-decoration: none; font-size: 14px;
    font-weight: 500; transition: all .2s; cursor: pointer;
    background: transparent; border: none; font-family: inherit;
    width: 100%; text-align: left;
}
.drawer-item:hover { background: var(--card-h); color: var(--text); }
.drawer-item i { width: 18px; text-align: center; }

.drawer-divider { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

.drawer-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 14px;
}

[data-theme="light"] .mobile-drawer { background: #fff; }

@media (max-width: 768px) {
    .desktop-nav { display: none !important; }
    .hamburger-btn { display: flex; }
}

/* ── Step numbers ── */
.feat-icon.step-num {
    width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(135deg, var(--p1), var(--p2));
    color: #fff; font-size: 20px; font-weight: 900;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 12px;
}

/* ── FA icon sizing in feat cards ── */
.feat-icon i { font-size: inherit; }

@media (max-width: 620px) {
    .input-row { flex-direction: column; }
    .input-row .btn { width: 100%; justify-content: center; padding: 14px; }
    .result-top { flex-direction: column; }
    .result-thumb { width: 100%; height: auto; aspect-ratio: 16/9; }
    .stats-bar { flex-direction: column; gap: 0; }
    .stat { border-right: none; border-bottom: 1px solid var(--border); }
    .stat:last-child { border-bottom: none; }
    .premium-box { flex-direction: column; }
    .hero { padding: 40px 0 28px; }
    .hero h1 { font-size: 26px; letter-spacing: -0.5px; }
    .hero p { font-size: 14px; }
    header { padding: 0 16px; gap: 8px; }
    .auth-btns { display: none; }
    .btn-auth-outline, .btn-auth-fill { font-size: 11px; padding: 5px 10px; }
    .btn-premium { padding: 7px 12px; font-size: 12px; }
    .lang-trigger { padding: 6px 8px; }
    #hdr-code { display: none; }
    .features-grid { grid-template-columns: 1fr; }
    .modal { padding: 24px 16px; margin: 16px; }
    .platforms { gap: 6px; }
    .plat { font-size: 11px; padding: 5px 10px; }
    main { padding: 0 16px 60px; }
    .url-box { padding: 14px; border-radius: 16px; }
    .qdl-wrap { gap: 8px; }
    .qdl-col { min-width: calc(50% - 4px); }
    .qdl-main-btn { padding: 14px 16px; gap: 10px; }
    .result-card { padding: 16px; border-radius: 16px; }
    .result-top { margin-bottom: 16px; padding-bottom: 16px; }
}

/* ══════════════════════════════════════════
   AUTH HEADER BUTTONS
══════════════════════════════════════════ */
.auth-btns {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-auth-outline {
    background: transparent;
    border: 1px solid var(--border-h);
    color: var(--text);
    padding: 7px 16px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    white-space: nowrap;
}
.btn-auth-outline:hover {
    border-color: var(--p1);
    background: rgba(139,92,246,.08);
}

.btn-auth-fill {
    background: linear-gradient(135deg, var(--p1), var(--p2));
    border: none;
    color: #fff;
    padding: 7px 16px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .2s;
    white-space: nowrap;
}
.btn-auth-fill:hover { opacity: .88; }

/* ══════════════════════════════════════════
   USER MENU (logged-in)
══════════════════════════════════════════ */
.user-menu {
    position: relative;
}

.user-trigger {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 7px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    white-space: nowrap;
}
.user-trigger:hover {
    border-color: var(--p1);
    background: var(--card-h);
}
.user-trigger svg { transition: transform .2s; }
.user-trigger.open svg { transform: rotate(180deg); }

.user-avatar { font-size: 16px; width:28px; height:28px; display:flex; align-items:center; justify-content:center; border-radius:50%; overflow:hidden; flex-shrink:0; }

/* Default avatar — smooth circle clipping via parent overflow:hidden */
img[src="/assets/img/default-avatar.svg"] {
    border-radius: 0 !important;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--bg2);
    border: 1px solid rgba(139,92,246,.25);
    border-radius: 16px;
    padding: 6px;
    min-width: 220px;
    box-shadow: 0 24px 60px rgba(0,0,0,.7), 0 0 0 1px rgba(139,92,246,.08), inset 0 1px 0 rgba(255,255,255,.04);
    z-index: 200;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px) scale(.97);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}
.user-dropdown::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, var(--p1), var(--p3));
    opacity: .6;
}
.user-dropdown.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Profile header */
.user-dd-profile {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 12px 10px;
}
.user-dd-avatar-lg {
    width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, var(--p1), var(--p3));
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 900; color: #fff; overflow: hidden;
    box-shadow: 0 0 0 2px rgba(139,92,246,.3);
}
.user-dd-avatar-lg img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.user-dd-profile-info { min-width: 0; }
.user-dd-pname {
    font-size: 13px; font-weight: 700; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-dd-prole {
    font-size: 11px; font-weight: 600; color: var(--muted2); margin-top: 1px;
}
.user-dd-prole.is-premium {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* Back to home button */
.user-dd-home-btn {
    display: flex; align-items: center; gap: 7px;
    padding: 8px 12px; font-size: 12px; font-weight: 600;
    color: var(--muted2); text-decoration: none; border-radius: 9px;
    transition: background .15s, color .15s;
}
.user-dd-home-btn:hover { background: var(--card-h); color: var(--p1); }
.user-dd-home-btn i { font-size: 11px; }

/* Premium advantages link item */
.user-dd-prem-adv-link {
    background: linear-gradient(135deg, rgba(245,158,11,.08), rgba(249,115,22,.05)) !important;
    border: 1px solid rgba(245,158,11,.2); border-radius: 10px; margin: 2px 0 4px;
}
.user-dd-prem-adv-link:hover { background: linear-gradient(135deg, rgba(245,158,11,.18), rgba(249,115,22,.12)) !important; border-color: rgba(245,158,11,.4); }

/* Premium CTA */
.user-dd-prem-cta {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; background: linear-gradient(135deg, rgba(245,158,11,.15), rgba(249,115,22,.1));
    border: 1px solid rgba(245,158,11,.3); border-radius: 10px;
    padding: 9px 12px; margin: 2px 0 6px; cursor: pointer;
    transition: background .2s, border-color .2s;
    color: #f59e0b; font-size: 12px; font-weight: 700;
}
.user-dd-prem-cta:hover {
    background: linear-gradient(135deg, rgba(245,158,11,.25), rgba(249,115,22,.2));
    border-color: rgba(245,158,11,.5);
}
.dd-prem-left { display: flex; align-items: center; gap: 7px; }
.dd-prem-arrow { opacity: .7; font-size: 10px; }

/* Separator */
.user-dd-sep {
    height: 1px; background: var(--border); margin: 4px 4px;
}

/* Menu items */
.user-dd-item {
    display: flex; align-items: center; gap: 9px;
    width: 100%; text-align: left; text-decoration: none;
    background: transparent; border: none;
    color: var(--text); padding: 9px 12px;
    border-radius: 9px; font-size: 13px; font-weight: 600;
    cursor: pointer; transition: background .15s, color .15s;
}
.user-dd-item i { width: 14px; text-align: center; color: var(--muted2); font-size: 12px; flex-shrink: 0; }
.user-dd-item:hover { background: var(--card-h); }
.user-dd-item:hover i { color: var(--p1); }
.user-dd-logout { color: var(--muted2); margin-top: 2px; }
.user-dd-logout:hover { background: rgba(244,63,94,.08); color: #f43f5e; }
.user-dd-logout:hover i { color: #f43f5e; }

/* ══════════════════════════════════════════
   AUTH MODAL
══════════════════════════════════════════ */
.auth-modal-inner {
    max-width: 420px;
    width: 90%;
    padding: 36px 32px 32px;
    position: relative;
}

.auth-modal-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
    font-size: 18px;
    font-weight: 900;
}
.auth-logo-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--p1), var(--p3));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
}

.auth-tabs {
    display: flex;
    background: var(--bg3);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 24px;
}

.auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--muted2);
    padding: 9px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, color .2s;
}
.auth-tab.active {
    background: linear-gradient(135deg, var(--p1), var(--p2));
    color: #fff;
}

.auth-form { display: flex; flex-direction: column; gap: 16px; }

.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted2);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.auth-field { min-width: 0; }
.auth-field input {
    width: 100%;
    box-sizing: border-box;
    background: var(--bg3);
    border: 1px solid var(--border-h);
    color: var(--text);
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color .2s;
    outline: none;
}
.auth-field input:focus { border-color: var(--p1); }
.auth-field input::placeholder { color: var(--muted); }

.auth-error {
    font-size: 13px;
    color: var(--red);
    font-weight: 500;
}
.auth-error:empty { display: none; }
@keyframes authSlideRight { from { opacity:0; transform:translateX(20px) } to { opacity:1; transform:translateX(0) } }
@keyframes authSlideLeft  { from { opacity:0; transform:translateX(-20px) } to { opacity:1; transform:translateX(0) } }
.auth-form.anim-right { animation: authSlideRight .22s ease forwards; }
.auth-form.anim-left  { animation: authSlideLeft  .22s ease forwards; }

.auth-submit {
    margin-top: 4px;
    width: 100%;
    padding: 13px;
    font-size: 15px;
    font-weight: 700;
}

.auth-switch {
    text-align: center;
    font-size: 13px;
    color: var(--muted2);
    margin-top: 4px;
}
.auth-switch button {
    background: none;
    border: none;
    color: var(--p1);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}
.auth-switch button:hover { text-decoration: underline; }

.auth-or {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0 10px;
    color: var(--muted);
    font-size: 12px;
}
.auth-or::before,
.auth-or::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 10px 24px;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 99px;
    color: #1f1f1f;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Roboto', 'Inter', Arial, sans-serif;
    letter-spacing: .25px;
    text-decoration: none;
    cursor: pointer;
    transition: box-shadow .15s, background .15s;
    margin-bottom: 2px;
    box-shadow: 0 1px 3px rgba(60,64,67,.15), 0 1px 2px rgba(60,64,67,.1);
}
.btn-google:hover {
    background: #f7f8f8;
    box-shadow: 0 2px 8px rgba(60,64,67,.25);
    color: #1f1f1f;
}
.btn-google:active {
    background: #f1f3f4;
    box-shadow: 0 1px 2px rgba(60,64,67,.1);
}
.btn-google .google-g {
    flex-shrink: 0;
}


.modal-close-x {
    position: absolute;
    top: 12px;
    right: 14px;
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    line-height: 1;
    transition: color .2s;
}
.modal-close-x:hover { color: var(--text); }

/* ══════════════════════════════════════════
   PREMIUM MODAL – Pricing Cards
══════════════════════════════════════════ */
.premium-modal-inner {
    max-width: 520px;
    padding: 36px 32px 28px;
    position: relative;
}
.pm-header { text-align: center; margin-bottom: 20px; }
.pm-star {
    font-size: 36px;
    color: var(--gold);
    filter: drop-shadow(0 0 12px #f59e0b88);
    display: block;
    margin-bottom: 8px;
}
.pm-header h2 { font-size: 22px; font-weight: 900; }
.pm-sub { color: var(--muted2); font-size: 14px; margin-top: 4px; }

.pm-features {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    margin-bottom: 24px;
}
.pm-features li {
    font-size: 13px;
    color: var(--muted2);
    display: flex;
    align-items: center;
    gap: 7px;
}
.pm-features li i { color: var(--p1); width: 14px; text-align: center; }

.pm-plans {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 18px;
}
.pm-plan {
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 20px 16px 16px;
    text-align: center;
    position: relative;
    transition: border-color .2s, transform .2s;
}
.pm-plan:hover { transform: translateY(-2px); }

.pm-plan-yearly {
    border-color: var(--gold);
    background: linear-gradient(135deg, rgba(245,158,11,.08), rgba(249,115,22,.04));
}
.pm-plan-monthly {
    background: var(--card);
}
.pm-badge-top {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 99px;
    white-space: nowrap;
    letter-spacing: .4px;
}
.pm-plan-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted2);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 8px;
}
.pm-price {
    font-size: 32px;
    font-weight: 900;
    color: var(--text);
    line-height: 1;
    margin-bottom: 4px;
}
.pm-price span {
    font-size: 14px;
    font-weight: 600;
    color: var(--muted2);
}
.pm-price-note {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 14px;
    min-height: 28px;
    line-height: 1.5;
}
.pm-price-note s { color: var(--muted); }

.pm-btn-yearly {
    display: block;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    padding: 9px 14px;
    border-radius: 10px;
    text-decoration: none;
    transition: opacity .2s;
}
.pm-btn-yearly:hover { opacity: .88; }

.pm-btn-monthly {
    display: block;
    background: linear-gradient(135deg, var(--p1), var(--p2));
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    padding: 9px 14px;
    border-radius: 10px;
    text-decoration: none;
    transition: opacity .2s;
}
.pm-btn-monthly:hover { opacity: .88; }

.pm-note {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    line-height: 1.6;
    padding: 10px 12px;
    background: var(--card);
    border-radius: 10px;
    border: 1px solid var(--border);
}
.pm-note i { color: var(--p3); margin-right: 4px; }
.pm-note strong { color: var(--text); }

@media (max-width: 480px) {
    .pm-plans { grid-template-columns: 1fr; }
    .pm-features { grid-template-columns: 1fr; }
    .premium-modal-inner { padding: 28px 18px 22px; }
    .auth-pass-row { flex-direction: column !important; }
    .auth-modal-inner { padding: 28px 18px 22px; max-height: 90vh; overflow-y: auto; }
}

/* ═══════════════════════════════════════════
   VIDEO EDITOR
═══════════════════════════════════════════ */
.editor-wrap {
    margin-top: 20px;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255,255,255,.015);
}
.editor-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 15px 20px; cursor: pointer; user-select: none;
    transition: background .15s;
}
.editor-header:hover { background: rgba(255,255,255,.03); }
.editor-header h4 {
    font-size: 14px; font-weight: 700; color: #fff; margin: 0;
    display: flex; align-items: center; gap: 9px;
}
.editor-chevron { transition: transform .2s; flex-shrink: 0; color: var(--muted); }
.editor-chevron.rotated { transform: rotate(180deg); }

.editor-body { padding: 20px; display: none; }
.editor-body.open { display: block; }

.editor-preview {
    width: 100%; border-radius: 12px; overflow: hidden;
    background: #000; margin-bottom: 20px;
}
.editor-preview video {
    width: 100%; display: block; max-height: 420px;
    border-radius: 12px; background: #000;
}
.editor-no-preview {
    display: flex; align-items: center; justify-content: center;
    flex-direction: column; gap: 10px;
    color: var(--muted); font-size: 13px; background: var(--bg3);
    border-radius: 12px; padding: 30px 20px; text-align: center;
}

.editor-section { margin-bottom: 20px; }
.editor-lbl {
    display: block; font-size: 11px; font-weight: 700; letter-spacing: 1px;
    text-transform: uppercase; color: var(--muted); margin-bottom: 10px;
}

/* Speed buttons */
.speed-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.speed-btn {
    padding: 8px 18px; border-radius: 10px; cursor: pointer;
    border: 1px solid var(--border); background: rgba(255,255,255,.04);
    color: var(--muted2); font-size: 13px; font-weight: 700;
    font-family: inherit; transition: all .15s;
}
.speed-btn:hover { border-color: rgba(139,92,246,.5); color: #fff; }
.speed-btn.active {
    background: rgba(139,92,246,.18); border-color: var(--p1);
    color: #fff; box-shadow: 0 0 12px rgba(139,92,246,.2);
}

/* Trim */
.trim-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.trim-field { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 110px; }
.trim-field span {
    font-size: 11px; font-weight: 700; letter-spacing: .8px;
    text-transform: uppercase; color: var(--muted);
}
.trim-input {
    background: rgba(255,255,255,.06); border: 1px solid var(--border);
    border-radius: 10px; padding: 10px 14px;
    color: #fff; font-size: 15px; font-weight: 700;
    font-family: 'Courier New', monospace; text-align: center;
    width: 100%; outline: none; transition: border .15s;
}
.trim-input:focus { border-color: var(--p1); box-shadow: 0 0 0 3px rgba(139,92,246,.1); }
.trim-sep { color: var(--muted); font-size: 22px; padding-bottom: 8px; }

.trim-slider-wrap { margin-top: 14px; }
.trim-slider-track {
    position: relative; height: 6px;
    background: rgba(255,255,255,.08); border-radius: 99px; margin: 14px 0;
}
.trim-slider-fill {
    position: absolute; height: 100%; border-radius: 99px;
    background: linear-gradient(90deg, var(--p1), var(--p3));
    pointer-events: none;
}
input[type="range"].trim-range {
    -webkit-appearance: none; appearance: none;
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 100%; margin: 0; height: 20px;
    background: transparent; pointer-events: none; outline: none;
}
input[type="range"].trim-range::-webkit-slider-thumb {
    -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
    background: var(--p1); border: 3px solid #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,.4); cursor: grab; pointer-events: all;
    transition: transform .1s;
}
input[type="range"].trim-range::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.15); }
input[type="range"].trim-range::-moz-range-thumb {
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--p1); border: 3px solid #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,.4); cursor: grab; pointer-events: all;
}
.trim-times {
    display: flex; justify-content: space-between;
    font-size: 11px; color: var(--muted); margin-top: 2px;
}

/* Editör kalite seçici */
.edit-qual-wrap {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 12px; flex-wrap: wrap;
}
.edit-qual-videos {
    display: flex; gap: 6px; flex-wrap: wrap; flex: 1;
}
.edit-qual-btn {
    padding: 7px 14px; border-radius: 9px; cursor: pointer;
    border: 1px solid var(--border); background: rgba(255,255,255,.04);
    color: var(--muted2); font-size: 12px; font-weight: 700;
    font-family: inherit; transition: all .15s; white-space: nowrap;
}
.edit-qual-btn:hover { border-color: rgba(139,92,246,.4); color: #fff; }
.edit-qual-btn.active {
    background: rgba(139,92,246,.15); border-color: var(--p1); color: #fff;
}

/* Kilitli premium buton */
.eq-locked {
    opacity: .6; cursor: pointer !important;
    border-color: rgba(245,158,11,.2) !important;
}
.eq-locked:hover {
    opacity: .85; border-color: rgba(245,158,11,.5) !important;
    color: #f59e0b !important;
}
.eq-lock-star {
    font-size: 9px; color: #f59e0b; vertical-align: middle; margin-left: 1px;
}

/* Premium kullanıcının açık premium kalitesi */
.eq-prem-ok { border-color: rgba(245,158,11,.3); }
.eq-prem-ok.active { background: rgba(245,158,11,.15); border-color: #f59e0b; }
.eq-prem-ok:hover { border-color: #f59e0b; color: #fff; }

/* MP3 ayrı sağ buton */
.eq-mp3-sep {
    background: linear-gradient(135deg, rgba(52,211,153,.08), rgba(56,189,248,.08)) !important;
    border-color: rgba(52,211,153,.3) !important;
    color: var(--green) !important;
    padding: 7px 18px;
}
.eq-mp3-sep:hover { border-color: var(--green) !important; color: #fff !important; }
.eq-mp3-sep.active {
    background: rgba(52,211,153,.18) !important;
    border-color: var(--green) !important; color: #fff !important;
}

/* Edit download button */
.editor-dl-wrap { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
.btn-edit-dl {
    width: 100%; padding: 15px 20px; border-radius: 13px;
    background: linear-gradient(135deg, var(--p1), var(--p2));
    color: #fff; font-size: 14px; font-weight: 700; border: none;
    cursor: pointer; font-family: inherit;
    display: flex; align-items: center; justify-content: center; gap: 9px;
    transition: all .2s; box-shadow: 0 8px 24px rgba(139,92,246,.25);
}
.btn-edit-dl:hover:not(:disabled) { opacity: .9; transform: translateY(-2px); }
.btn-edit-dl:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.edit-progress-wrap { margin-top: 14px; display: none; }

/* ── Editör — Aydınlık tema ── */
[data-theme="light"] .editor-wrap {
    background: #fff;
    border-color: rgba(0,0,0,.1);
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
[data-theme="light"] .editor-header { border-bottom: 1px solid rgba(0,0,0,.08); }
[data-theme="light"] .editor-header h4 { color: #0f172a; }
[data-theme="light"] .editor-header:hover { background: rgba(0,0,0,.03); }
[data-theme="light"] .editor-chevron { color: #64748b; }
[data-theme="light"] .editor-body { background: #fff; }
[data-theme="light"] .editor-lbl { color: #64748b; }
[data-theme="light"] .editor-no-preview { background: #f1f5f9; color: #64748b; }

[data-theme="light"] .speed-btn {
    background: #f1f5f9;
    border-color: rgba(0,0,0,.12);
    color: #475569;
}
[data-theme="light"] .speed-btn:hover { border-color: var(--p1); color: #0f172a; background: #e8eaf6; }
[data-theme="light"] .speed-btn.active {
    background: rgba(139,92,246,.12);
    border-color: var(--p1); color: var(--p1);
}

[data-theme="light"] .trim-field span { color: #64748b; }
[data-theme="light"] .trim-input {
    background: #f1f5f9;
    border-color: rgba(0,0,0,.12);
    color: #0f172a;
}
[data-theme="light"] .trim-input:focus { background: #fff; border-color: var(--p1); }
[data-theme="light"] .trim-sep { color: #94a3b8; }
[data-theme="light"] .trim-slider-track { background: rgba(0,0,0,.1); }
[data-theme="light"] .trim-times { color: #94a3b8; }

[data-theme="light"] .edit-qual-btn {
    background: #f1f5f9;
    border-color: rgba(0,0,0,.12);
    color: #475569;
}
[data-theme="light"] .edit-qual-btn:hover { border-color: var(--p1); color: #0f172a; }
[data-theme="light"] .edit-qual-btn.active {
    background: rgba(139,92,246,.1);
    border-color: var(--p1); color: var(--p1);
}
[data-theme="light"] .eq-locked { background: #fafafa !important; border-color: rgba(245,158,11,.25) !important; color: #94a3b8 !important; }
[data-theme="light"] .eq-locked:hover { border-color: rgba(245,158,11,.5) !important; color: #f59e0b !important; }
[data-theme="light"] .eq-prem-ok { border-color: rgba(245,158,11,.35) !important; }
[data-theme="light"] .eq-prem-ok.active { background: rgba(245,158,11,.1) !important; border-color: #f59e0b !important; color: #b45309 !important; }
[data-theme="light"] .eq-mp3-sep { background: rgba(52,211,153,.08) !important; border-color: rgba(52,211,153,.4) !important; color: #059669 !important; }
[data-theme="light"] .eq-mp3-sep.active { background: rgba(52,211,153,.15) !important; }
[data-theme="light"] .editor-dl-wrap { border-top-color: rgba(0,0,0,.08); }

/* ══════════════════════════════════════════
   DRAWER LANGUAGE SELECTOR
══════════════════════════════════════════ */
.drawer-lang-section { padding: 4px 14px 8px; }
.drawer-lang-label {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .08em; color: var(--muted); margin-bottom: 10px;
}
.drawer-lang-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.drawer-lang-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; border-radius: 9px; cursor: pointer;
    background: transparent; border: 1px solid var(--border);
    color: var(--muted2); font-family: inherit; transition: all .15s;
    text-align: left; width: 100%;
}
.drawer-lang-btn:hover { background: var(--card-h); color: var(--text); border-color: var(--border-h); }
.drawer-lang-btn.active {
    background: rgba(139,92,246,.12); border-color: var(--p1); color: #c4b5fd;
}
[data-theme="light"] .drawer-lang-btn { border-color: rgba(0,0,0,.1); color: #475569; }
[data-theme="light"] .drawer-lang-btn:hover { background: #f1f5f9; color: #0f172a; }
[data-theme="light"] .drawer-lang-btn.active { background: rgba(139,92,246,.08); color: var(--p1); }

/* ══════════════════════════════════════════
   EDITOR — MOBILE RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 620px) {
    .editor-body { padding: 14px; }
    .editor-preview video { max-height: 240px; }
    .speed-btns { gap: 6px; }
    .speed-btn { padding: 7px 12px; font-size: 12px; }
    .trim-row { flex-direction: column; gap: 10px; }
    .trim-field { min-width: 0; width: 100%; }
    .trim-sep { display: none; }
    .edit-qual-wrap { flex-direction: column; align-items: flex-start; }
    .edit-qual-videos { width: 100%; }
    .edit-qual-btn { padding: 7px 10px; font-size: 11px; }
    .eq-mp3-sep { margin-top: 0; }
}
@media (max-width: 480px) {
    .editor-header { padding: 12px 14px; }
    .editor-header h4 { font-size: 13px; }
    .speed-btn { padding: 7px 10px; font-size: 11px; }
    input[type="range"].trim-range::-webkit-slider-thumb { width: 26px; height: 26px; }
    input[type="range"].trim-range::-moz-range-thumb { width: 26px; height: 26px; }
    .btn-edit-dl { padding: 13px; font-size: 13px; }
}

/* ══════════════════════════════════════════
   HEADER LOGO — responsive
══════════════════════════════════════════ */
.header-logo-link {
    display: inline-block;
    overflow: hidden;
    width: 220px;
    height: 55px;
    flex-shrink: 0;
}
.header-logo-img {
    height: 180px;
    width: auto;
    margin-top: -62px;
    margin-left: -30px;
}
@media (max-width: 480px) {
    .header-logo-link { width: 160px; height: 40px; }
    .header-logo-img  { height: 130px; margin-top: -45px; margin-left: -22px; }
}
@media (max-width: 380px) {
    .header-logo-link { width: 130px; height: 34px; }
    .header-logo-img  { height: 108px; margin-top: -38px; margin-left: -18px; }
}

/* ══════════════════════════════════════════
   EXTRA SMALL (≤ 380px) BREAKPOINT
══════════════════════════════════════════ */
@media (max-width: 380px) {
    header { padding: 0 10px; gap: 6px; }
    .hero h1 { font-size: 22px; }
    .hero p  { font-size: 13px; }
    main { padding: 0 10px 60px; }
    .url-box { padding: 12px; }
    .modal { padding: 20px 12px; margin: 10px; }
    .auth-modal-inner { padding: 24px 14px 18px; }
    .result-card { padding: 14px; }
    .qdl-col { min-width: 110px; }
    .btn { font-size: 13px; padding: 12px 14px; }
    .lang-trigger { padding: 5px 7px; }
    .theme-toggle { width: 32px; height: 32px; font-size: 15px; }
    .hamburger-btn { width: 36px; height: 36px; font-size: 16px; }
}

/* ══════════════════════════════════════════
   TERMS PAGE HEADER MOBILE
══════════════════════════════════════════ */
@media (max-width: 620px) {
    body > header { padding: 0 16px !important; }
}
@media (max-width: 380px) {
    body > header { padding: 0 10px !important; }
}

/* ══════════════════════════════════════════════════════
   MOBILE OPTIMIZATION — Touch, Spacing, UX
══════════════════════════════════════════════════════ */

/* Remove default tap highlight on touch devices */
* { -webkit-tap-highlight-color: transparent; }

/* Restore accessible focus ring for keyboard/pointer */
:focus-visible { outline: 2px solid var(--p1); outline-offset: 2px; }

/* Fast tap — eliminates 300ms click delay on all interactive elements */
button, a, [role="button"], input, select, textarea,
.qdl-option, .qdl-main-btn, .plat, .drawer-item,
.lang-opt, .speed-btn, .edit-qual-btn {
    touch-action: manipulation;
}

/* Overscroll containment — prevents body scroll bleeding */
.modal-overlay, .mobile-drawer, .qdl-panel, .lang-dropdown, .user-dropdown {
    overscroll-behavior: contain;
}
/* Smooth scrolling inside drawers/modals on iOS */
.mobile-drawer, .auth-modal-inner, .premium-modal-inner {
    -webkit-overflow-scrolling: touch;
}

/* ── iOS auto-zoom prevention ──────────────────────────
   Safari zooms the viewport if a focused input has font-size < 16px.
   Apply ≥ 16px on all mobile inputs. */
@media (max-width: 768px) {
    .url-input       { font-size: 16px; }
    .trim-input      { font-size: 16px; }
    .auth-field input { font-size: 16px; }
}

/* ── Touch targets ─────────────────────────────────────
   Apple HIG: 44×44pt minimum. Google Material: 48dp minimum. */
@media (max-width: 768px) {
    .theme-toggle   { width: 44px; height: 44px; font-size: 18px; }
    .hamburger-btn  { width: 44px; height: 44px; font-size: 18px; }
    .lang-trigger   { min-height: 44px; padding: 8px 12px; }
    .drawer-close   { width: 44px; height: 44px; }
    .drawer-item    { padding: 14px 16px; min-height: 48px; }
    .drawer-btn     { min-height: 52px; padding: 14px; font-size: 16px; }
    .qdl-option     { min-height: 52px; padding: 14px 18px; }
    .speed-btn      { min-height: 44px; padding: 10px 18px; }
    .edit-qual-btn  { min-height: 44px; padding: 10px 14px; }
    .btn-edit-dl    { min-height: 52px; font-size: 15px; }
    /* Paste button: give proper vertical padding when stacked */
    .btn-paste      { min-height: 48px; }
}

/* ── Header ───────────────────────────────────────────── */
@media (max-width: 620px) {
    header { height: 60px; }
}

/* ── Hero section ──────────────────────────────────────── */
@media (max-width: 480px) {
    .hero { padding: 28px 0 20px; }
    .hero-eyebrow { font-size: 12px; padding: 5px 14px; margin-bottom: 16px; }
    .hero p { font-size: 14px; margin-bottom: 24px; }
}

/* ── Analyze button — full-width, easy to tap ──────────── */
@media (max-width: 620px) {
    .btn-primary { min-height: 52px; font-size: 16px; }
    .btn-paste   { min-height: 48px; font-size: 15px; }
}

/* ── Quality download section ──────────────────────────── */
/* Single column on very narrow phones (< 360px) */
@media (max-width: 360px) {
    .qdl-wrap { flex-direction: column; gap: 8px; }
    .qdl-col  { min-width: 0 !important; width: 100%; flex: none; }
}
/* Quality dropdown panel — constrain to viewport width */
@media (max-width: 480px) {
    .qdl-panel {
        left: 0;
        right: 0;
        max-width: calc(100vw - 32px);
        border-radius: 14px;
    }
    .qopt-res  { font-size: 14px; min-width: 46px; }
    .qopt-tag  { font-size: 10px; padding: 2px 6px; }
    .qopt-size { font-size: 11px; }
}

/* ── Result metadata ───────────────────────────────────── */
@media (max-width: 420px) {
    .result-meta { gap: 6px; }
    .result-meta span { font-size: 11px; padding: 3px 8px; }
}

/* ── Premium upsell box ────────────────────────────────── */
@media (max-width: 620px) {
    .premium-box .btn-gold { width: 100%; text-align: center; justify-content: center; }
}

/* ── Stats bar ─────────────────────────────────────────── */
@media (max-width: 480px) {
    .stat { padding: 18px 12px; }
    .stat-num { font-size: 22px; }
    .stat-lbl { font-size: 11px; }
    .stats-bar { margin: 32px 0; }
}

/* ── Features grid ─────────────────────────────────────── */
@media (max-width: 480px) {
    .features-grid { gap: 10px; }
    .feat-card { padding: 16px; }
    .feat-icon { font-size: 22px; margin-bottom: 10px; }
    .section-title { font-size: 20px; margin-bottom: 20px; }
}

/* ── Toast notification ────────────────────────────────── */
@media (max-width: 480px) {
    .toast {
        left: 12px;
        right: 12px;
        bottom: 16px;
        max-width: none;
        width: auto;
        font-size: 13px;
    }
}

/* ── Modal bottom-sheet feel on mobile ─────────────────── */
@media (max-width: 480px) {
    .modal-overlay { padding: 0; align-items: flex-end; }
    .modal {
        border-radius: 24px 24px 16px 16px;
        max-height: 92vh;
        overflow-y: auto;
        padding: 24px 16px 20px;
        margin: 0;
        width: 100%;
        max-width: 100%;
    }
    .modal h2 { font-size: 18px; }
    .auth-modal-inner {
        border-radius: 24px 24px 16px 16px;
        max-height: 92vh;
        overflow-y: auto;
        width: 100%;
        max-width: 100%;
    }
    .premium-modal-inner {
        border-radius: 24px 24px 16px 16px;
        max-height: 92vh;
        overflow-y: auto;
        width: 100%;
        max-width: 100%;
        padding: 24px 16px 20px;
    }
    .pm-plans { gap: 10px; }
    .pm-plan { padding: 16px 12px 12px; }
    .pm-price { font-size: 26px; }
}

/* ── Footer ────────────────────────────────────────────── */
@media (max-width: 480px) {
    footer { flex-direction: column; gap: 12px; text-align: center; padding: 20px 16px; }
    .footer-links { justify-content: center; flex-wrap: wrap; gap: 16px; }
}

/* ── Safe area insets (iOS notch / home bar) ───────────── */
@supports (padding: env(safe-area-inset-bottom)) {
    footer {
        padding-bottom: max(24px, calc(20px + env(safe-area-inset-bottom)));
    }
    .toast {
        bottom: calc(28px + env(safe-area-inset-bottom));
    }
    header {
        padding-left:  max(40px, calc(16px + env(safe-area-inset-left)));
        padding-right: max(40px, calc(16px + env(safe-area-inset-right)));
    }
    @media (max-width: 480px) {
        .toast {
            bottom: calc(16px + env(safe-area-inset-bottom));
        }
    }
    @media (max-width: 960px) {
        header {
            padding-left:  max(20px, calc(12px + env(safe-area-inset-left)));
            padding-right: max(20px, calc(12px + env(safe-area-inset-right)));
        }
    }
}

/* ── Disable hover transforms on touch-only devices ───── */
@media (hover: none) {
    .feat-card:hover              { transform: none; box-shadow: none; }
    .btn-primary:hover            { transform: none; box-shadow: 0 4px 20px rgba(139,92,246,.4); }
    .qdl-video:hover:not(:disabled)  { transform: none; box-shadow: none; }
    .qdl-audio:hover:not(:disabled)  { transform: none; box-shadow: none; }
    .btn-gold:hover               { transform: none; filter: none; }
    .btn-edit-dl:hover:not(:disabled) { transform: none; opacity: 1; }
    .btn-premium:hover            { transform: none; box-shadow: 0 4px 20px rgba(245,158,11,.3); }
    .plat:hover                   { background: rgba(255,255,255,.03); border-color: var(--border); color: var(--muted2); }
}

/* ── Platform chips ────────────────────────────────────── */
@media (max-width: 480px) {
    .platforms { gap: 5px; margin-top: 20px; }
    .plat { font-size: 11px; padding: 5px 10px; }
}

/* ── Result card tweaks on small screens ───────────────── */
@media (max-width: 380px) {
    .result-top { gap: 12px; }
    .qdl-main-btn { gap: 8px; }
    .qdl-icon { font-size: 22px; }
    .qdl-title { font-size: 14px; }
    .qdl-sub   { font-size: 11px; }
}

/* ── Drawer language grid — 1 col on very small screens ── */
@media (max-width: 360px) {
    .drawer-lang-grid { grid-template-columns: 1fr; }
}

