/* =========================================================
   SFile — Premium SaaS Design System (2026)
   Palette: #070B14 bg · #FF3B30 / #FF5E57 accent
   ========================================================= */
:root {
    --bg: #070B14;
    --bg-elev: #0a0f1c;
    --card: rgba(255, 255, 255, 0.06);
    --card-2: rgba(255, 255, 255, 0.09);
    --card-solid: #0e1424;
    --border: rgba(255, 255, 255, 0.12);
    --border-soft: rgba(255, 255, 255, 0.07);
    --primary: #FF3B30;
    --secondary: #FF5E57;
    --primary-soft: rgba(255, 59, 48, 0.14);
    --text: #F8FAFC;
    --muted: #94A3B8;
    --muted-2: #64748B;
    --success: #34d399;
    --warning: #fbbf24;
    --danger: #FF5E57;

    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius: 16px;
    --radius-sm: 12px;

    --shadow-sm: 0 4px 16px -4px rgba(0,0,0,.4);
    --shadow: 0 24px 64px -20px rgba(0,0,0,.65);
    --shadow-glow: 0 20px 60px -16px rgba(255,59,48,.45);
    --ring: 0 0 0 1px var(--border);

    --ease: cubic-bezier(.16, 1, .3, 1);
    --maxw: 1180px;
    --font-head: 'Geist', 'Plus Jakarta Sans', 'Inter', sans-serif;
    --font-body: 'Inter', 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
}

/* Floating gradient field */
body::before {
    content: '';
    position: fixed;
    inset: -30% -10% auto -10%;
    height: 90vh;
    z-index: -2;
    background:
        radial-gradient(38% 50% at 20% 8%, rgba(255,59,48,.22), transparent 62%),
        radial-gradient(34% 44% at 82% 0%, rgba(255,94,87,.16), transparent 60%),
        radial-gradient(40% 50% at 60% 26%, rgba(120,40,200,.10), transparent 62%);
    filter: blur(24px);
    animation: float-field 22s ease-in-out infinite alternate;
    pointer-events: none;
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
}
body::after {
    content: '';
    position: fixed;
    inset: 0; z-index: -3;
    background:
        radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,.18), transparent),
        radial-gradient(1px 1px at 70% 60%, rgba(255,255,255,.12), transparent),
        radial-gradient(1px 1px at 40% 80%, rgba(255,255,255,.1), transparent);
    background-size: 420px 420px;
    opacity: .5;
}
@keyframes float-field {
    0% { transform: translate3d(0,0,0) scale(1); }
    100% { transform: translate3d(0,40px,0) scale(1.1); }
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: rgba(255,59,48,.35); color: #fff; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

h1,h2,h3,h4 { font-family: var(--font-head); font-weight: 700; letter-spacing: -0.03em; }

/* Glass primitive */
.glass {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
}

/* =========================================================
   Button system — premium glassmorphism (unified)
   ========================================================= */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    min-height: 48px; padding: 0 24px; border-radius: 16px;
    font-weight: 600; font-size: .95rem; letter-spacing: -0.01em; line-height: 1;
    font-family: var(--font-body); cursor: pointer; white-space: nowrap;
    position: relative; isolation: isolate; overflow: hidden; color: #fff;
    border: 1px solid rgba(255,255,255,.14);
    backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
    background-size: 200% 200%; background-position: 0% 0%;
    transition: transform .3s cubic-bezier(.4,0,.2,1), box-shadow .3s ease,
                background-position .5s ease, background-color .3s ease, border-color .3s ease, filter .3s ease;
}
.btn svg { width: 18px; height: 18px; }
/* glass sheen overlay */
.btn::before {
    content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,.20), rgba(255,255,255,0) 55%);
    opacity: .75; pointer-events: none;
}
.btn:hover { transform: scale(1.03); }
.btn:active { transform: scale(.97); transition-duration: .08s; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(255,255,255,.25), 0 0 0 5px rgba(255,59,48,.35); }
.btn.disabled, .btn:disabled { opacity: .55; pointer-events: none; filter: grayscale(.2); }

/* ---- Unified glass style (like the header "Sign in" button) ---- */
.btn-primary, .btn-secondary, .btn-glass, .btn-success,
.btn-warning, .btn-telegram, .btn-download {
    background-color: var(--card-2); background-image: none; color: var(--text);
    border-color: var(--border);
    box-shadow: 0 6px 18px -10px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.08);
}
.btn-primary:hover, .btn-secondary:hover, .btn-glass:hover, .btn-success:hover,
.btn-warning:hover, .btn-telegram:hover, .btn-download:hover {
    background-color: var(--card); border-color: var(--border-strong);
    box-shadow: 0 12px 28px -10px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.12);
}
/* accent icon tints so action buttons stay distinguishable, same surface */
.btn-primary svg, .btn-download svg { color: var(--secondary); }
.btn-success svg  { color: var(--success); }
.btn-telegram svg { color: #38b6ff; }
.btn-warning svg  { color: var(--warning); }

/* ---- Ghost (low-emphasis) ---- */
.btn-ghost { background: transparent; backdrop-filter: none; color: var(--muted); border-color: var(--border); box-shadow: none; }
.btn-ghost::before { display: none; }
.btn-ghost:hover { color: var(--text); background: var(--card); border-color: var(--border-strong); }

/* ---- Light theme: all buttons turn clean white glass ---- */
:root[data-theme="light"] .btn-primary, :root[data-theme="light"] .btn-secondary,
:root[data-theme="light"] .btn-glass, :root[data-theme="light"] .btn-success,
:root[data-theme="light"] .btn-warning, :root[data-theme="light"] .btn-telegram,
:root[data-theme="light"] .btn-download {
    background-color: #fff; border-color: rgba(15,23,42,.12); color: var(--text);
    box-shadow: 0 2px 8px -2px rgba(15,23,42,.12), inset 0 1px 0 rgba(255,255,255,.7);
}
:root[data-theme="light"] .btn-primary:hover, :root[data-theme="light"] .btn-secondary:hover,
:root[data-theme="light"] .btn-glass:hover, :root[data-theme="light"] .btn-success:hover,
:root[data-theme="light"] .btn-warning:hover, :root[data-theme="light"] .btn-telegram:hover,
:root[data-theme="light"] .btn-download:hover {
    background-color: #f8fafc; border-color: rgba(15,23,42,.2);
}
:root[data-theme="light"] .btn-ghost:hover { background: #f1f5f9; color: var(--text); }

/* ---- Sizes / modifiers ---- */
.btn-lg { min-height: 56px; padding: 0 34px; border-radius: 18px; font-size: 1.05rem; font-weight: 700; }
.btn-sm { min-height: 38px; padding: 0 16px; border-radius: 12px; font-size: .85rem; gap: 7px; }
.btn-sm svg { width: 15px; height: 15px; }
.btn-pill { min-height: 42px; padding: 0 18px; border-radius: 14px; font-size: .9rem; }
.btn-block { width: 100%; }

.btn-icon { padding: 0; width: 48px; }
.btn-sm.btn-icon { width: 38px; }

/* ---- Light theme button surfaces ---- */
:root[data-theme="light"] .btn-secondary, :root[data-theme="light"] .btn-glass {
    background-color: #fff; border-color: rgba(15,23,42,.12); color: var(--text);
    box-shadow: 0 2px 6px -2px rgba(15,23,42,.12), inset 0 1px 0 rgba(255,255,255,.6);
}
:root[data-theme="light"] .btn-secondary:hover, :root[data-theme="light"] .btn-glass:hover { background-color: #f8fafc; border-color: rgba(15,23,42,.2); }
:root[data-theme="light"] .btn-ghost { color: var(--muted); }
:root[data-theme="light"] .btn-ghost:hover { background: #f1f5f9; color: var(--text); }

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    .btn { transition: background-color .2s ease, border-color .2s ease; }
    .btn:hover, .btn:active { transform: none; }
    .btn-download { animation: none; }
}

/* ---------- Floating pill navbar ---------- */
.nav-host {
    position: sticky; top: 0; z-index: 200;
    padding: 18px 20px 0;
    animation: navDrop .8s var(--ease) both;
}
@keyframes navDrop { from { opacity: 0; transform: translateY(-26px); } to { opacity: 1; transform: none; } }
.navbar {
    position: relative; max-width: 1080px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    height: 64px; padding: 0 12px 0 18px; border-radius: 20px;
    background: rgba(11,15,26,.72);
    border: 1px solid var(--border-soft);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 10px 40px -18px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.05);
    transition: height .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease), max-width .35s var(--ease);
    transform: translateZ(0);
    will-change: max-width, height;
    backface-visibility: hidden;
}
/* gradient glow border */
.navbar::before {
    content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
    background: linear-gradient(120deg, rgba(255,59,48,.55), rgba(255,255,255,.04) 32%, rgba(255,255,255,.04) 68%, rgba(255,94,87,.45));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    opacity: .7; transition: opacity .4s var(--ease);
}
.nav-host.scrolled { padding-top: 12px; }
.nav-host.scrolled .navbar {
    max-width: 980px; height: 58px;
    background: rgba(9,13,22,.85);
    box-shadow: 0 18px 50px -20px rgba(0,0,0,.8), 0 0 0 1px rgba(255,59,48,.06), inset 0 1px 0 rgba(255,255,255,.06);
}
.nav-host.scrolled .navbar::before { opacity: 1; }

.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-head); font-size: 1.18rem; font-weight: 700; letter-spacing: -.04em; }
.brand-logo {
    width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px;
    background: linear-gradient(140deg, var(--secondary), var(--primary) 55%, #c81e16);
    color: #fff; box-shadow: 0 8px 22px -8px rgba(255,59,48,.7), inset 0 1px 0 rgba(255,255,255,.45), inset 0 -2px 6px rgba(0,0,0,.25); position: relative; overflow: hidden;
    transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.brand-logo::before {
    content: ''; position: absolute; inset: -50%;
    background: conic-gradient(from 0deg, transparent 0 62%, rgba(255,255,255,.55) 76%, transparent 86%);
    animation: spinSheen 6s linear infinite; opacity: .65;
}
.brand-logo::after { content:''; position:absolute; inset:0; border-radius:inherit; background:linear-gradient(140deg,rgba(255,255,255,.45),transparent 52%); }
@keyframes spinSheen { to { transform: rotate(360deg); } }
.brand:hover .brand-logo { transform: rotate(-8deg) scale(1.1); box-shadow: 0 14px 32px -6px rgba(255,59,48,.9), inset 0 1px 0 rgba(255,255,255,.5); }
.brand-mark { overflow: visible; }
.brand-mark .bm-echo { opacity: .26; transform: translate(1.3px, 1.6px); }
.brand-mark .bm-arrow { opacity: .9; transition: transform .45s var(--ease); }
.brand:hover .brand-mark .bm-arrow { transform: translateY(-1.6px); }
.brand-logo svg { width: 24px; height: 24px; position: relative; z-index: 1; }
.brand-name { color: var(--text); transition: .3s; }
.brand:hover .brand-name { background: linear-gradient(90deg, var(--secondary), var(--primary)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* center nav */
.nav-center { flex: 1; display: flex; justify-content: center; }
.nav-pill { display: flex; align-items: center; gap: 2px; position: relative; }
.nav-link {
    position: relative; padding: 8px 16px; border-radius: 11px; color: var(--muted);
    font-weight: 500; font-size: .9rem; transition: color .25s var(--ease); white-space: nowrap; z-index: 1;
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--text); }
/* sliding indicator */
.nav-indicator {
    position: absolute; top: 0; left: 0; height: 100%; border-radius: 11px; z-index: 0;
    background: linear-gradient(135deg, rgba(255,59,48,.2), rgba(255,94,87,.08));
    box-shadow: inset 0 0 0 1px rgba(255,59,48,.32);
    opacity: 0; transition: transform .35s var(--ease), width .35s var(--ease), opacity .25s var(--ease);
    pointer-events: none;
}
.nav-pill.has-indicator .nav-indicator { opacity: 1; }

.nav-right { display: flex; align-items: center; gap: 9px; }
.btn-pill { border-radius: 12px; padding: 9px 16px; font-size: .87rem; }

/* search trigger */
.nav-search {
    display: flex; align-items: center; gap: 9px; padding: 8px 10px 8px 13px; min-width: 190px;
    border-radius: 12px; background: var(--card); border: 1px solid var(--border-soft);
    color: var(--muted-2); font-size: .86rem; font-family: var(--font-body); cursor: pointer;
    transition: .25s var(--ease);
}
.nav-search:hover { border-color: rgba(255,59,48,.4); color: var(--muted); background: var(--card-2); box-shadow: 0 0 0 3px rgba(255,59,48,.1); }
.nav-search svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.nav-search:hover svg { transform: scale(1.12); color: var(--secondary); }
.nav-search span { flex: 1; text-align: left; }
.nav-search kbd { font-family: var(--font-body); font-size: .68rem; padding: 2px 6px; border-radius: 6px; background: var(--bg-elev); border: 1px solid var(--border-soft); color: var(--muted-2); }

/* animated hamburger */
.nav-burger {
    display: none; width: 42px; height: 42px; border-radius: 12px; cursor: pointer;
    background: var(--card); border: 1px solid var(--border-soft);
    flex-direction: column; align-items: center; justify-content: center; gap: 5px; transition: .25s var(--ease);
}
.nav-burger span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--text); transition: .3s var(--ease); }
.nav-burger:hover { background: var(--card-2); }
.nav-burger:active { transform: scale(.92); }
body.drawer-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.drawer-open .nav-burger span:nth-child(2) { opacity: 0; }
body.drawer-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Mobile drawer (premium) ---------- */
.drawer-backdrop {
    position: fixed; inset: 0; z-index: 290; background: rgba(3,6,12,.65);
    backdrop-filter: blur(8px); opacity: 0; visibility: hidden; transition: .4s var(--ease);
}
.drawer-backdrop.open { opacity: 1; visibility: visible; }
.drawer {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 300; width: 340px; max-width: 90vw;
    background: linear-gradient(180deg, rgba(13,18,32,.98), rgba(8,12,22,.98));
    backdrop-filter: blur(26px) saturate(170%);
    border-left: 1px solid var(--border); padding: 22px; display: flex; flex-direction: column;
    transform: translateX(106%); transition: transform .45s var(--ease);
    box-shadow: -30px 0 80px -30px rgba(0,0,0,.8); overflow-y: auto; overflow-x: hidden;
}
.drawer::before {
    content: ''; position: absolute; top: -20%; right: -30%; width: 80%; height: 50%;
    background: radial-gradient(circle, rgba(255,59,48,.22), transparent 70%); filter: blur(30px); pointer-events: none;
}
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 20px; border-bottom: 1px solid var(--border-soft); margin-bottom: 18px; position: relative; flex-shrink: 0; }
.drawer-close { width: 40px; height: 40px; border-radius: 11px; cursor: pointer; background: var(--card); border: 1px solid var(--border-soft); color: var(--text); display: grid; place-items: center; transition: .25s var(--ease); }
.drawer-close:hover { background: var(--card-2); transform: rotate(90deg); }
.drawer-close svg { width: 19px; height: 19px; }

.drawer-search {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 14px; margin-bottom: 22px; flex-shrink: 0;
    border-radius: 14px; background: var(--card); border: 1px solid var(--border-soft);
    color: var(--muted); font-size: .96rem; font-family: var(--font-body); cursor: pointer; transition: .25s var(--ease);
    position: relative;
}
.drawer-search:hover { border-color: rgba(255,59,48,.4); background: var(--card-2); }
.drawer-search .ds-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--secondary); flex-shrink: 0; }
.drawer-search .ds-ic svg { width: 17px; height: 17px; }
.drawer-search .ds-text { flex: 1; text-align: left; }
.drawer-search kbd { font-size: .7rem; padding: 3px 7px; border-radius: 6px; background: var(--bg-elev); border: 1px solid var(--border-soft); color: var(--muted-2); }

.drawer-links { display: flex; flex-direction: column; gap: 6px; flex: 1; position: relative; }
.drawer-links a {
    display: flex; align-items: center; gap: 13px; padding: 13px 14px; border-radius: 14px;
    color: var(--muted); font-weight: 500; font-size: 1rem; transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
    opacity: 0; transform: translateX(24px);
}
.drawer.open .drawer-links a { opacity: 1; transform: none; }
.drawer.open .drawer-links a:nth-child(1) { transition-delay: .12s; }
.drawer.open .drawer-links a:nth-child(2) { transition-delay: .17s; }
.drawer.open .drawer-links a:nth-child(3) { transition-delay: .22s; }
.drawer.open .drawer-links a:nth-child(4) { transition-delay: .27s; }
.drawer.open .drawer-links a:nth-child(5) { transition-delay: .32s; }
.drawer.open .drawer-links a:nth-child(6) { transition-delay: .37s; }
.drawer-links a .dl-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--border-soft); color: var(--muted); flex-shrink: 0; transition: .25s var(--ease); }
.drawer-links a .dl-ic svg { width: 18px; height: 18px; }
.drawer-links a .dl-arrow { margin-left: auto; width: 17px; height: 17px; opacity: 0; transform: translateX(-6px); transition: .25s var(--ease); }
.drawer-links a:hover { background: var(--card); color: var(--text); transform: translateX(2px); }
.drawer-links a:hover .dl-ic { color: var(--secondary); border-color: rgba(255,59,48,.3); }
.drawer-links a:hover .dl-arrow { opacity: 1; transform: none; }
.drawer-links a.active { background: linear-gradient(135deg, rgba(255,59,48,.16), rgba(255,94,87,.05)); color: var(--text); box-shadow: inset 0 0 0 1px rgba(255,59,48,.25); }
.drawer-links a.active .dl-ic { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; border-color: transparent; }

.drawer-foot { padding-top: 18px; border-top: 1px solid var(--border-soft); flex-shrink: 0; }
.drawer-copy { text-align: center; color: var(--muted-2); font-size: .78rem; margin-top: 14px; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 90px 0 24px; position: relative; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 9px; margin-bottom: 26px;
    padding: 8px 16px; border-radius: 30px; font-size: .82rem; font-weight: 500;
    background: var(--card); border: 1px solid var(--border); color: var(--muted);
    backdrop-filter: blur(10px);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 12px var(--success); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }
.hero h1 { font-size: clamp(2.6rem, 6.5vw, 4.6rem); line-height: 1.02; margin-bottom: 22px; letter-spacing: -0.045em; }
.hero h1 .grad { background: linear-gradient(110deg, var(--secondary), var(--primary) 60%, #ff8a80); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 1.18rem; color: var(--muted); max-width: 580px; margin: 0 auto; font-weight: 400; }

/* ---------- Upload widget ---------- */
.upload-hero { max-width: 720px; margin: 42px auto 0; }
.upload-shell { position: relative; padding: 1.5px; border-radius: var(--radius-xl);
    background: linear-gradient(140deg, rgba(255,59,48,.55), rgba(255,94,87,.2) 50%, rgba(255,255,255,.08));
    box-shadow: var(--shadow); }
.dropzone {
    border-radius: calc(var(--radius-xl) - 2px); background: rgba(10,15,28,.92);
    padding: 48px 32px; text-align: center; transition: .3s var(--ease); cursor: pointer; position: relative;
}
.dropzone:hover { background: rgba(14,20,36,.92); }
.dropzone.dragover { background: rgba(255,59,48,.07); }
.dropzone .ic-wrap {
    width: 78px; height: 78px; margin: 0 auto 20px; border-radius: 22px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--primary-soft), rgba(255,94,87,.08));
    color: var(--secondary); border: 1px solid var(--border); transition: .3s var(--ease);
}
.dropzone:hover .ic-wrap { transform: translateY(-3px) scale(1.04); }
.dropzone .ic-wrap svg { width: 34px; height: 34px; }
.dropzone h3 { font-size: 1.32rem; margin-bottom: 7px; }
.dropzone p { color: var(--muted-2); font-size: .94rem; }
.dropzone .browse { color: var(--secondary); font-weight: 600; }

.upload-fields { margin-top: 16px; display: none; }
.upload-fields.show { display: block; animation: fadeUp .4s var(--ease); }
@keyframes fadeUp { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:none} }
.upload-meta-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin-top: 24px; }
.chip { font-size: .8rem; color: var(--muted); padding: 7px 14px; border-radius: 30px; background: var(--card); border: 1px solid var(--border-soft); display: flex; align-items: center; gap: 7px; }
.chip svg { width: 14px; height: 14px; color: var(--secondary); }

/* ---------- Search bar / palette ---------- */
.search-box { max-width: 540px; margin: 30px auto 0; display: flex; gap: 8px; padding: 8px 8px 8px 18px; border-radius: 16px; align-items: center; }
.search-box svg.lead { width: 19px; height: 19px; color: var(--muted-2); flex-shrink: 0; }
.search-box input { flex: 1; background: transparent; border: none; outline: none; color: var(--text); font-size: 1rem; font-family: var(--font-body); min-width: 0; }
.search-box input::placeholder { color: var(--muted-2); }
.search-box .btn { flex-shrink: 0; width: 48px; min-width: 48px; padding: 0; border-radius: 13px; }
.search-box .btn svg { margin: 0; }

/* command palette overlay */
.cmdk-overlay {
    position: fixed; inset: 0; z-index: 500; display: none;
    background: rgba(3,6,12,.6); backdrop-filter: blur(8px);
    align-items: flex-start; justify-content: center; padding: 14vh 20px 20px;
}
.cmdk-overlay.open { display: flex; animation: fadeUp .25s var(--ease); }
.cmdk { width: 100%; max-width: 600px; background: var(--card-solid); border: 1px solid var(--border);
    border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.cmdk-input { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border-soft); }
.cmdk-input svg { width: 20px; height: 20px; color: var(--muted-2); }
.cmdk-input input { flex: 1; background: transparent; border: none; outline: none; color: var(--text); font-size: 1.05rem; font-family: var(--font-body); }
.cmdk-results { max-height: 46vh; overflow-y: auto; padding: 8px; }
.cmdk-item { display: flex; align-items: center; gap: 13px; padding: 12px 14px; border-radius: 12px; cursor: pointer; transition: .12s; }
.cmdk-item:hover, .cmdk-item.active { background: var(--card-2); }
.cmdk-item .ci { width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center; background: var(--primary-soft); color: var(--secondary); }
.cmdk-item .ci svg { width: 17px; height: 17px; }
.cmdk-item h5 { font-size: .94rem; font-weight: 600; font-family: var(--font-body); }
.cmdk-item small { color: var(--muted-2); font-size: .8rem; }
.cmdk-empty { padding: 30px; text-align: center; color: var(--muted-2); font-size: .9rem; }
.cmdk-foot { padding: 11px 18px; border-top: 1px solid var(--border-soft); display: flex; gap: 16px; color: var(--muted-2); font-size: .76rem; }
.cmdk-foot kbd { padding: 2px 6px; border-radius: 5px; background: var(--card-2); border: 1px solid var(--border-soft); }

/* ---------- Stat strip ---------- */
.stat-strip { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 44px; }
.stat-pill { padding: 18px 28px; border-radius: var(--radius); text-align: center; min-width: 132px; }
.stat-pill strong { display: block; font-family: var(--font-head); font-size: 1.7rem; font-weight: 700; letter-spacing: -.04em; }
.stat-pill small { color: var(--muted-2); font-size: .8rem; }

/* ---------- Sections ---------- */
.section { padding: 60px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 30px; gap: 16px; }
.section-head h2 { font-size: 1.75rem; }
.section-head p { color: var(--muted-2); font-size: .92rem; margin-top: 4px; }
.section-head a { color: var(--secondary); font-weight: 500; font-size: .9rem; display: flex; align-items: center; gap: 5px; }
.section-head a svg { width: 15px; height: 15px; transition: transform .25s var(--ease); }
.section-head a:hover svg { transform: translateX(3px); }

/* ---------- Categories ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.cat-card { padding: 26px 18px; text-align: center; transition: .3s var(--ease); }
.cat-card:hover { transform: translateY(-6px); border-color: var(--border); box-shadow: var(--shadow-sm); }
.cat-card .ci { width: 56px; height: 56px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 16px; background: var(--primary-soft); color: var(--secondary); border: 1px solid var(--border-soft); transition: .3s var(--ease); }
.cat-card:hover .ci { transform: scale(1.08); }
.cat-card .ci svg { width: 24px; height: 24px; }
.cat-card h4 { font-size: 1rem; }
.cat-card small { color: var(--muted-2); font-size: .8rem; }

/* ---------- File cards ---------- */
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.file-card { padding: 22px; transition: .3s var(--ease); display: flex; flex-direction: column; gap: 16px; position: relative; overflow: hidden; }
.file-card::before { content:''; position:absolute; inset:-1px; border-radius:inherit; padding:1px;
    background: linear-gradient(135deg, rgba(255,59,48,.5), transparent 40%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity:0; transition:.3s var(--ease); }
.file-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-glow); }
.file-card:hover::before { opacity: 1; }
.file-card .top { display: flex; gap: 15px; align-items: flex-start; }
.file-card .fic { width: 54px; height: 54px; flex-shrink: 0; display: grid; place-items: center; border-radius: 15px; background: linear-gradient(135deg, var(--primary-soft), rgba(255,94,87,.06)); color: var(--secondary); border: 1px solid var(--border-soft); }
.file-card .fic svg { width: 24px; height: 24px; }
.file-card .meta { min-width: 0; }
.file-card .meta h3 { font-size: 1.05rem; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--font-body); font-weight: 600; }
.file-card .meta span { color: var(--muted-2); font-size: .82rem; }
.file-card .desc { color: var(--muted); font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.file-card .stats { display: flex; gap: 16px; font-size: .8rem; color: var(--muted-2); padding-top: 14px; border-top: 1px solid var(--border-soft); }
.file-card .stats span { display: flex; align-items: center; gap: 6px; }
.file-card .stats svg { width: 14px; height: 14px; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 20px; font-size: .72rem; font-weight: 600; background: var(--primary-soft); color: var(--secondary); border: 1px solid var(--border-soft); letter-spacing: .02em; }
.badge-success { background: rgba(52,211,153,.14); color: var(--success); }
.badge-warning { background: rgba(251,191,36,.14); color: var(--warning); }

/* ---------- Download / detail page ---------- */
.detail-wrap { max-width: 760px; margin: 48px auto; }
.detail-card { padding: 44px; }
.detail-head { display: flex; gap: 26px; align-items: center; margin-bottom: 30px; }
.detail-head .fic { width: 92px; height: 92px; flex-shrink: 0; display: grid; place-items: center; border-radius: 24px;
    background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; box-shadow: var(--shadow-glow); position: relative; overflow: hidden; }
.detail-head .fic::after { content:''; position:absolute; inset:0; background:linear-gradient(140deg,rgba(255,255,255,.35),transparent 55%); }
.detail-head .fic svg { width: 40px; height: 40px; position: relative; }
.detail-head h1 { font-size: 1.85rem; word-break: break-word; }
.detail-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 13px; margin: 28px 0; }
.detail-meta .item { background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 16px 18px; }
.detail-meta .item small { color: var(--muted-2); font-size: .74rem; display: block; margin-bottom: 5px; text-transform: uppercase; letter-spacing: .06em; }
.detail-meta .item strong { font-size: 1.1rem; font-family: var(--font-head); }
.detail-desc { background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 20px; color: var(--muted); margin-bottom: 24px; word-break: break-word; }
.secure-row { display: flex; align-items: center; gap: 8px; justify-content: center; margin-top: 16px; color: var(--muted-2); font-size: .82rem; }
.secure-row svg { width: 15px; height: 15px; color: var(--success); }

.copy-row { display: flex; gap: 10px; margin-top: 14px; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; text-align: left; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; font-size: .9rem; color: var(--text); }
.form-control { width: 100%; background: rgba(7,11,20,.6); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 13px 16px; color: var(--text); font-size: .96rem; font-family: var(--font-body); transition: .2s; }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255,59,48,.18); }
.form-control::placeholder { color: var(--muted-2); }
textarea.form-control { resize: vertical; min-height: 90px; }
select.form-control { cursor: pointer; }

/* ---------- Alerts ---------- */
.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: .92rem; border: 1px solid transparent; display: flex; align-items: center; gap: 9px; }
.alert svg { width: 17px; height: 17px; flex-shrink: 0; }
.alert-success { background: rgba(52,211,153,.1); border-color: rgba(52,211,153,.35); color: var(--success); }
.alert-danger { background: rgba(255,94,87,.1); border-color: rgba(255,94,87,.35); color: var(--danger); }
.alert-info { background: var(--primary-soft); border-color: rgba(255,59,48,.3); color: var(--secondary); }

/* ---------- Auth (split panel) ---------- */
.auth-page { display: grid; place-items: center; padding: 48px 20px; min-height: calc(100vh - 74px); }
.auth-shell {
    width: 100%; max-width: 960px; display: grid; grid-template-columns: 1fr 1fr;
    border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); min-height: 560px;
}
.auth-form-pane { display: flex; align-items: center; justify-content: center; padding: 48px 44px; }
.auth-form-inner { width: 100%; max-width: 360px; }
.auth-eyebrow { display: inline-block; font-size: .76rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 12px; }
.auth-form-inner h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); letter-spacing: -1px; line-height: 1.05; }
.auth-form-inner h1 .dot { color: var(--primary); }
.auth-switch { color: var(--muted); font-size: .92rem; margin: 10px 0 26px; }
.auth-switch a { color: var(--secondary); font-weight: 600; }
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.auth-field { position: relative; margin-bottom: 15px; }
.auth-field label { display: block; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted-2); margin-bottom: 7px; padding-left: 2px; }
.auth-field input {
    width: 100%; height: 54px; border-radius: 14px; border: 1px solid var(--border);
    background: var(--card-2); color: var(--text); padding: 0 46px 0 16px;
    font-size: .95rem; font-family: var(--font-body); transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.auth-field input::placeholder { color: var(--muted-2); }
.auth-field input:focus { outline: none; border-color: var(--primary); background: var(--bg-elev); box-shadow: 0 0 0 3px rgba(255,59,48,.18); }
.auth-field > i, .auth-field > svg { position: absolute; right: 16px; bottom: 18px; width: 18px; height: 18px; color: var(--muted-2); pointer-events: none; }
.auth-form-pane .btn-lg { min-height: 54px; margin-top: 6px; }
.auth-hint {
    display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; padding: 13px 15px;
    border-radius: 13px; background: var(--card); border: 1px solid var(--border-soft);
    color: var(--muted-2); font-size: .8rem; line-height: 1.55;
}
.auth-hint svg { width: 15px; height: 15px; color: var(--secondary); flex-shrink: 0; margin-top: 1px; }
.auth-hint a { color: var(--secondary); font-weight: 600; }

/* right visual panel */
.auth-visual {
    position: relative; overflow: hidden; color: #fff;
    background:
        radial-gradient(120% 90% at 80% 10%, rgba(255,94,87,.5), transparent 55%),
        linear-gradient(150deg, #c4271f 0%, #7a1812 60%, #2a0d0b 100%);
    display: flex; flex-direction: column; justify-content: flex-end; padding: 44px;
}
.auth-divider { position: absolute; top: 0; left: -1px; height: 100%; width: 90px; }
.auth-visual-glow { position: absolute; top: -20%; right: -10%; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%); filter: blur(20px); }
.auth-visual-content { position: relative; z-index: 1; }
.auth-mark { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25); margin-bottom: 18px; backdrop-filter: blur(6px); }
.auth-mark svg { width: 26px; height: 26px; }
.auth-visual-content h2 { font-size: 1.6rem; letter-spacing: -.5px; line-height: 1.15; margin-bottom: 10px; }
.auth-visual-content p { color: rgba(255,255,255,.8); font-size: .92rem; line-height: 1.6; max-width: 30ch; }
.auth-watermark { position: absolute; right: 28px; bottom: 14px; font-family: var(--font-head); font-size: 7rem; font-weight: 800; line-height: 1; color: rgba(255,255,255,.08); z-index: 0; }

@media (max-width: 860px) {
    .auth-shell { grid-template-columns: 1fr; max-width: 460px; min-height: 0; }
    .auth-visual { display: none; }
    .auth-form-pane { padding: 40px 30px; }
}
@media (max-width: 480px) {
    .auth-page { padding: 24px 14px; }
    .auth-form-pane { padding: 32px 22px; }
    .auth-row { grid-template-columns: 1fr; gap: 0; }
}

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border-soft); margin-top: 80px; padding: 48px 0 40px; color: var(--muted-2); font-size: .9rem; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 22px; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; color: var(--text); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { transition: .2s; }
.footer-links a:hover { color: var(--text); }

/* ---------- Empty states ---------- */
.empty { text-align: center; padding: 70px 24px; color: var(--muted-2); }
.empty .icon { width: 72px; height: 72px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 20px; background: var(--card); border: 1px solid var(--border-soft); color: var(--muted-2); }
.empty .icon svg { width: 32px; height: 32px; }
.empty h3 { color: var(--text); font-size: 1.2rem; margin-bottom: 6px; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 44px; }
.pagination a, .pagination span { min-width: 42px; padding: 10px 14px; border-radius: 11px; background: var(--card); border: 1px solid var(--border-soft); font-size: .9rem; font-weight: 600; text-align: center; transition: .2s; }
.pagination a:hover { background: var(--card-2); border-color: var(--border); }
.pagination .active { background: linear-gradient(135deg, var(--primary), var(--secondary)); border-color: transparent; color: #fff; }

/* ---------- Progress ---------- */
.progress { height: 10px; background: rgba(7,11,20,.7); border-radius: 20px; overflow: hidden; margin-top: 18px; display: none; border: 1px solid var(--border-soft); }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--secondary)); transition: width .2s; border-radius: 20px; }

/* ---------- Skeleton loaders ---------- */
.skeleton { position: relative; overflow: hidden; background: var(--card); border-radius: 8px; }
.skeleton::after { content:''; position:absolute; inset:0; transform:translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.07), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
.sk-card { padding: 22px; border-radius: var(--radius); border: 1px solid var(--border-soft); background: var(--card); display: flex; flex-direction: column; gap: 14px; }
.sk-line { height: 12px; border-radius: 6px; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 404 ---------- */
.err-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 40px 20px; }
.err-code { font-family: var(--font-head); font-size: clamp(5rem, 18vw, 11rem); font-weight: 800; line-height: 1; letter-spacing: -.05em;
    background: linear-gradient(135deg, var(--primary), var(--secondary)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ---------- Breadcrumbs ---------- */
.breadcrumb { margin: 0 0 6px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0; }
.breadcrumb li { display: flex; align-items: center; gap: 6px; font-size: .85rem; }
.breadcrumb a { color: var(--muted-2); transition: .2s; }
.breadcrumb a:hover { color: var(--secondary); }
.breadcrumb span { color: var(--muted); }
.breadcrumb svg { width: 14px; height: 14px; color: var(--muted-2); opacity: .6; }

/* ---------- FAQ (premium two-column) ---------- */
.faq-layout { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 48px; align-items: start; }
.faq-intro { position: sticky; top: 100px; }
.faq-eyebrow {
    display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 30px;
    background: var(--primary-soft); border: 1px solid var(--border-soft); color: var(--secondary);
    font-size: .8rem; font-weight: 600; letter-spacing: .04em; margin-bottom: 18px;
}
.faq-eyebrow svg { width: 15px; height: 15px; }
.faq-intro h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); margin-bottom: 14px; line-height: 1.1; }
.faq-intro > p { color: var(--muted); font-size: 1rem; margin-bottom: 26px; max-width: 38ch; }
.faq-support {
    display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--radius);
}
.faq-support .fs-ic {
    width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff;
    box-shadow: 0 8px 20px -8px rgba(255,59,48,.7);
}
.faq-support .fs-ic svg { width: 22px; height: 22px; }
.faq-support strong { display: block; font-size: .96rem; }
.faq-support small { color: var(--muted-2); font-size: .82rem; }
.faq-support .btn { margin-left: auto; flex-shrink: 0; }

.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
    border-radius: var(--radius); overflow: hidden; position: relative;
    transition: border-color .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
}
/* gradient accent bar on the left when open */
.faq-item::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    transform: scaleY(0); transform-origin: top; transition: transform .35s var(--ease);
}
.faq-item[open] { box-shadow: var(--shadow-sm); border-color: var(--border-strong); }
.faq-item[open]::before { transform: scaleY(1); }
.faq-item summary {
    list-style: none; cursor: pointer; padding: 20px 22px; display: flex; align-items: center;
    justify-content: space-between; gap: 18px; font-weight: 600; font-size: 1.02rem; color: var(--text);
    transition: color .2s var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item:hover summary { color: var(--secondary); }
.faq-toggle {
    width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center;
    background: var(--card-2); border: 1px solid var(--border-soft); color: var(--secondary);
    transition: transform .35s var(--ease), background .3s var(--ease);
}
.faq-toggle svg { width: 18px; height: 18px; }
.faq-item[open] .faq-toggle { transform: rotate(135deg); background: var(--primary-soft); }
/* smooth height reveal via grid-rows trick */
.faq-answer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
.faq-item[open] .faq-answer { grid-template-rows: 1fr; }
.faq-answer > p { overflow: hidden; margin: 0; padding: 0 22px; color: var(--muted); font-size: .94rem; line-height: 1.75; }
.faq-item[open] .faq-answer > p { padding-bottom: 22px; }

@media (max-width: 900px) {
    .faq-layout { grid-template-columns: 1fr; gap: 28px; }
    .faq-intro { position: static; }
    .faq-intro > p { max-width: none; }
}

/* ---------- CMS page content ---------- */
.page-content { line-height: 1.8; color: var(--muted); }
.page-content h1, .page-content h2, .page-content h3 { color: var(--text); margin: 1.2em 0 .5em; }
.page-content h2 { font-size: 1.5rem; }
.page-content h3 { font-size: 1.2rem; }
.page-content p { margin-bottom: 1em; }
.page-content a { color: var(--secondary); }
.page-content a:hover { text-decoration: underline; }
.page-content ul, .page-content ol { margin: 0 0 1em 1.4em; }
.page-content li { margin-bottom: .4em; }
.page-content img { border-radius: var(--radius-sm); margin: 1em 0; }
.page-content blockquote { border-left: 3px solid var(--primary); padding-left: 16px; margin: 1em 0; color: var(--muted-2); }
.page-content code { background: var(--card); padding: 2px 7px; border-radius: 6px; font-size: .9em; }

/* ---------- Mobile bottom nav (removed) ---------- */
@media (max-width: 860px) {
    .nav-center, .nav-right .nav-search, .nav-right .btn-pill { display: none; }
    .nav-burger { display: flex; }
}
@media (max-width: 768px) {
    .hero { padding: 58px 0 16px; }
    .detail-head { flex-direction: column; text-align: center; }
    .detail-card { padding: 28px; }
    .upload-meta-row { grid-template-columns: 1fr; }
    .section { padding: 44px 0; }
    .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* =========================================================
   Journey (connected flow) + Bento sections
   ========================================================= */
.section-head.center { flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.section-head.center h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
.section-head.center p { color: var(--muted); max-width: 560px; font-size: 1rem; }

.journey-wrap { position: relative; margin-top: 10px; }

/* decorative connector */
.journey-flow {
    position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0;
    pointer-events: none; opacity: 0; transition: opacity .8s var(--ease);
}
.journey.in .journey-flow { opacity: 1; }
.flow-line { stroke-dashoffset: 0; }
.journey.in .flow-line { animation: flowDash 2.4s linear infinite; }
@keyframes flowDash { to { stroke-dashoffset: -56; } }
.flow-dot { opacity: 0; }
.journey.in .flow-dot { opacity: 1; }

/* grid of connected cards */
.journey-grid {
    position: relative; z-index: 1;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.journey-card {
    padding: 26px 22px; border-radius: var(--radius-lg); position: relative; overflow: hidden;
    transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.journey-card::before {
    content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
    background: linear-gradient(140deg, rgba(255,59,48,.55), transparent 45%, transparent 60%, rgba(255,94,87,.35));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .35s var(--ease);
}
.journey-card:hover { transform: translateY(-7px); box-shadow: var(--shadow-glow); }
.journey-card:hover::before { opacity: 1; }
.jc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.jc-icon {
    width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--primary-soft), rgba(255,94,87,.08));
    color: var(--secondary); border: 1px solid var(--border-soft); transition: transform .35s var(--ease);
}
.journey-card:hover .jc-icon { transform: scale(1.08) rotate(-4deg); }
.jc-icon svg { width: 24px; height: 24px; }
.jc-step {
    font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; letter-spacing: -.04em;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; opacity: .55;
}
.journey-card h3 { font-family: var(--font-body); font-size: 1.08rem; font-weight: 700; margin-bottom: 8px; }
.journey-card p { color: var(--muted); font-size: .9rem; line-height: 1.6; }

/* =========================================================
   Bento grid
   ========================================================= */
.bento-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; gap: 18px;
}
.bento-card {
    position: relative; overflow: hidden; padding: 26px; border-radius: var(--radius-lg);
    display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
    transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.bento-card.b-lg   { grid-column: span 2; grid-row: span 2; }
.bento-card.b-tall { grid-row: span 2; }
.bento-card.b-wide { grid-column: span 2; }
.bento-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--border); }
.bento-icon {
    width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; flex-shrink: 0;
    background: var(--primary-soft); color: var(--secondary); border: 1px solid var(--border-soft);
    transition: transform .35s var(--ease); position: relative; z-index: 1;
}
.bento-icon svg { width: 23px; height: 23px; }
.bento-card:hover .bento-icon { transform: scale(1.08) rotate(5deg); }
.bento-body { position: relative; z-index: 1; }
.bento-card h3 { font-family: var(--font-body); font-size: 1.12rem; font-weight: 700; margin-bottom: 8px; }
.bento-card.b-lg h3 { font-size: 1.4rem; }
.bento-card p { color: var(--muted); font-size: .9rem; line-height: 1.6; }
.bento-card.b-lg p { font-size: 1rem; }
/* soft gradient highlight glow */
.bento-glow {
    position: absolute; width: 280px; height: 280px; right: -90px; top: -130px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,59,48,.2), transparent 70%);
    filter: blur(20px); opacity: 0; transition: opacity .4s var(--ease); pointer-events: none; z-index: 0;
}
.bento-card:hover .bento-glow { opacity: 1; }

/* =========================================================
   Responsive — journey + bento
   ========================================================= */
@media (max-width: 980px) {
    .journey-grid { grid-template-columns: repeat(2, 1fr); }
    .journey-flow { display: none; }
    .bento-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: auto; }
    .bento-card { min-height: 190px; }
    .bento-card.b-lg, .bento-card.b-wide { grid-column: span 2; }
    .bento-card.b-lg, .bento-card.b-tall { grid-row: span 1; }
}
@media (max-width: 600px) {
    .journey-grid { grid-template-columns: 1fr; }
    .bento-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
    .bento-card { min-height: auto; }
    .bento-card.b-lg, .bento-card.b-wide, .bento-card.b-tall { grid-column: span 1; grid-row: span 1; }
}

/* =========================================================
   Auth pages + account menu + dashboard
   ========================================================= */
.auth-hint {
    display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; padding: 14px 16px;
    border-radius: var(--radius-sm); background: var(--card); border: 1px solid var(--border-soft);
    color: var(--muted-2); font-size: .82rem; line-height: 1.6;
}
.auth-hint svg { width: 16px; height: 16px; color: var(--secondary); flex-shrink: 0; margin-top: 1px; }
.auth-hint a { color: var(--secondary); font-weight: 600; }

/* account dropdown */
.account-menu { position: relative; }
.account-btn {
    display: flex; align-items: center; gap: 6px; padding: 5px 9px 5px 5px; border-radius: 30px; cursor: pointer;
    background: var(--card); border: 1px solid var(--border-soft); color: var(--muted); transition: .2s var(--ease);
}
.account-btn:hover { background: var(--card-2); border-color: var(--border); }
.account-btn svg { width: 15px; height: 15px; transition: transform .25s var(--ease); }
.account-menu.open .account-btn svg { transform: rotate(180deg); }
.account-avatar {
    width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; font-weight: 700; font-size: .9rem;
}
.account-drop {
    position: absolute; right: 0; top: calc(100% + 10px); width: 240px; padding: 8px;
    background: var(--card-solid); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: .25s var(--ease); z-index: 250;
}
.account-menu.open .account-drop { opacity: 1; visibility: visible; transform: none; }
.account-info { padding: 12px 14px 14px; border-bottom: 1px solid var(--border-soft); margin-bottom: 6px; }
.account-info strong { display: block; font-size: .95rem; }
.account-info small { color: var(--muted-2); font-size: .8rem; word-break: break-all; }
.account-drop a { display: flex; align-items: center; gap: 11px; padding: 11px 14px; border-radius: 11px; color: var(--muted); font-size: .92rem; font-weight: 500; transition: .15s; }
.account-drop a svg { width: 17px; height: 17px; }
.account-drop a:hover { background: var(--card-2); color: var(--text); }
.account-drop a.danger:hover { color: var(--danger); background: rgba(255,94,87,.1); }

.drawer-account { display: flex; align-items: center; gap: 12px; padding: 14px; margin-bottom: 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--border-soft); }
.drawer-account strong { display: block; font-size: .95rem; }
.drawer-account small { color: var(--muted-2); font-size: .8rem; word-break: break-all; }

@media (max-width: 860px) {
    .nav-right .nav-signin, .nav-right .account-menu, .nav-right .btn-pill { display: none; }
}

/* dashboard */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 26px; flex-wrap: wrap; }
.dash-head h1 { font-size: clamp(1.6rem, 3.2vw, 2.1rem); margin-bottom: 6px; }
.dash-head p { color: var(--muted); font-size: .95rem; }

.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }
.dash-stat { display: flex; align-items: center; gap: 14px; padding: 20px; border-radius: var(--radius); }
.dash-stat .ds-ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--primary-soft); color: var(--secondary); border: 1px solid var(--border-soft); flex-shrink: 0; }
.dash-stat .ds-ic svg { width: 21px; height: 21px; }
.dash-stat strong { display: block; font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; letter-spacing: -.03em; }
.dash-stat small { color: var(--muted-2); font-size: .82rem; }

.dash-panel { border-radius: var(--radius-lg); overflow: hidden; }
.dash-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border-soft); }
.dash-panel-head h2 { font-size: 1.1rem; display: flex; align-items: center; gap: 9px; }
.dash-panel-head h2 svg { width: 18px; height: 18px; color: var(--secondary); }

.dash-files { display: flex; flex-direction: column; }
.dash-file { display: flex; align-items: center; gap: 16px; padding: 16px 22px; border-bottom: 1px solid var(--border-soft); transition: background .2s; }
.dash-file:last-child { border-bottom: none; }
.dash-file:hover { background: var(--card); }
.df-icon { width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary-soft), rgba(255,94,87,.06)); color: var(--secondary); border: 1px solid var(--border-soft); }
.df-icon svg { width: 21px; height: 21px; }
.df-main { flex: 1; min-width: 0; }
.df-title { display: block; font-weight: 600; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.df-title:hover { color: var(--secondary); }
.df-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 5px; color: var(--muted-2); font-size: .82rem; }
.df-meta span { display: flex; align-items: center; gap: 5px; }
.df-meta svg { width: 13px; height: 13px; }
.df-actions { display: flex; gap: 6px; flex-shrink: 0; }
.df-actions .btn-sm { padding: 8px; }
.df-actions .btn-sm svg { width: 15px; height: 15px; }

@media (max-width: 860px) {
    .dash-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .dash-file { flex-wrap: wrap; }
    .df-main { flex-basis: calc(100% - 62px); }
    .df-actions { margin-left: 62px; }
}

/* =========================================================
   File preview (before download)
   ========================================================= */
.preview-wrap { margin: 22px 0 26px; }
.preview-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.preview-label span { display: flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 600; color: var(--muted); }
.preview-label span svg { width: 16px; height: 16px; color: var(--secondary); }
.preview-label small { color: var(--muted-2); font-size: .74rem; font-weight: 600; letter-spacing: .06em; padding: 3px 10px; border-radius: 20px; background: var(--card); border: 1px solid var(--border-soft); }

.preview-stage {
    border-radius: var(--radius); border: 1px solid var(--border-soft);
    background: rgba(0,0,0,.25); overflow: hidden; position: relative;
}

/* click-to-load placeholder (saves bandwidth) */
.preview-hold { padding: 0; }
.preview-loader {
    width: 100%; border: none; cursor: pointer; background: transparent; color: var(--text);
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 46px 24px; font-family: var(--font-body); transition: background .25s var(--ease);
    background:
        radial-gradient(60% 80% at 50% 0%, rgba(255,59,48,.10), transparent 70%),
        repeating-linear-gradient(45deg, rgba(255,255,255,.02) 0 12px, transparent 12px 24px);
}
.preview-loader:hover { background: rgba(255,59,48,.06); }
.preview-loader .pl-ic {
    width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--primary-soft), rgba(255,94,87,.08));
    color: var(--secondary); border: 1px solid var(--border-soft); transition: transform .3s var(--ease);
}
.preview-loader:hover .pl-ic { transform: scale(1.08); }
.preview-loader .pl-ic svg { width: 28px; height: 28px; }
.preview-loader strong { font-size: 1.02rem; font-weight: 700; }
.preview-loader small { color: var(--muted-2); font-size: .82rem; }
.preview-stage.loading .preview-loader { opacity: .6; pointer-events: none; }
.preview-stage.is-loaded { background: rgba(0,0,0,.25); }
.preview-stage.is-loaded.preview-audio { display: flex; align-items: center; gap: 18px; padding: 22px; }

/* image */
.preview-image { display: grid; place-items: center; min-height: 220px;
    background:
        linear-gradient(45deg, rgba(255,255,255,.03) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.03) 75%) 0 0/24px 24px,
        rgba(0,0,0,.3); }
.preview-image img { max-width: 100%; max-height: 520px; object-fit: contain; display: block; }

/* video */
.preview-video video { width: 100%; max-height: 540px; display: block; background: #000; }

/* audio */
.preview-audio { display: flex; align-items: center; gap: 18px; padding: 22px; }
.audio-art { width: 70px; height: 70px; flex-shrink: 0; border-radius: 16px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; box-shadow: var(--shadow-glow); }
.audio-art svg { width: 32px; height: 32px; }
.audio-body { flex: 1; min-width: 0; }
.audio-body strong { font-size: 1rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
audio { filter: saturate(1.1); }

/* pdf */
.preview-pdf iframe { width: 100%; height: 560px; border: 0; display: block; background: #fff; }

/* text */
.preview-text { max-height: 360px; overflow: auto; }
.preview-text pre { margin: 0; padding: 20px; font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
    font-size: .82rem; line-height: 1.6; color: var(--muted); white-space: pre-wrap; word-break: break-word; }

/* apk */
.preview-apk { padding: 22px; }
.apk-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.apk-logo { width: 60px; height: 60px; flex-shrink: 0; border-radius: 16px; display: grid; place-items: center;
    background: linear-gradient(135deg, #3ddc84, #1f9e5f); color: #062; box-shadow: 0 10px 26px -10px rgba(61,220,132,.6); }
.apk-logo svg { width: 28px; height: 28px; color: #04210f; }
.apk-head strong { display: block; font-size: 1.02rem; word-break: break-all; }
.apk-head small { color: var(--muted-2); font-size: .84rem; }
.apk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.apk-item { background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 13px 15px; }
.apk-item small { display: block; color: var(--muted-2); font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.apk-item strong { font-size: .98rem; }
.apk-note { display: flex; align-items: center; gap: 8px; margin-top: 16px; color: var(--muted-2); font-size: .85rem; }
.apk-note svg { width: 16px; height: 16px; color: var(--success); flex-shrink: 0; }

@media (max-width: 600px) {
    .preview-pdf iframe { height: 420px; }
    .preview-audio { flex-direction: column; text-align: center; }
}

/* =========================================================
   Trust badges + checksum box
   ========================================================= */
.trust-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.trust-badge {
    display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 30px;
    font-size: .84rem; font-weight: 600; letter-spacing: .01em;
}
.trust-badge svg { width: 15px; height: 15px; }
.trust-badge.ok {
    color: var(--success); background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.3);
}
.trust-badge.danger {
    color: var(--danger); background: rgba(255,94,87,.1); border: 1px solid rgba(255,94,87,.35);
}

.hash-box {
    margin-top: 14px; border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
    background: var(--card); overflow: hidden;
}
.hash-box summary {
    list-style: none; cursor: pointer; padding: 13px 16px; display: flex; align-items: center; gap: 9px;
    font-size: .88rem; font-weight: 600; color: var(--muted);
}
.hash-box summary::-webkit-details-marker { display: none; }
.hash-box summary svg { width: 16px; height: 16px; color: var(--secondary); }
.hash-when { margin-left: auto; font-weight: 500; color: var(--muted-2); font-size: .8rem; }
.hash-row { display: flex; align-items: center; gap: 10px; padding: 0 16px 6px; }
.hash-row code {
    flex: 1; min-width: 0; font-family: ui-monospace, monospace; font-size: .78rem; color: var(--text);
    background: var(--bg-elev); border: 1px solid var(--border-soft); border-radius: 9px; padding: 10px 12px;
    word-break: break-all; line-height: 1.5;
}
.hash-row .btn-sm { padding: 9px; flex-shrink: 0; }
.hash-note { padding: 0 16px 14px; color: var(--muted-2); font-size: .8rem; }

/* storage quota bar */
.quota-track { height: 10px; border-radius: 20px; background: var(--bg-elev); border: 1px solid var(--border-soft); overflow: hidden; margin-bottom: 8px; }
.quota-fill { height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--primary), var(--secondary)); transition: width .5s var(--ease); }
.quota-fill.danger { background: linear-gradient(90deg, #f59e0b, var(--danger)); }

/* =========================================================
   App modal (upgrade / limit prompts)
   ========================================================= */
.app-modal {
    position: fixed; inset: 0; z-index: 600; display: none;
    align-items: center; justify-content: center; padding: 20px;
    background: rgba(3,6,12,.66); backdrop-filter: blur(10px);
}
.app-modal.open { display: flex; animation: fadeUp .25s var(--ease); }
.app-modal-card {
    position: relative; width: 100%; max-width: 440px; padding: 36px 30px 30px;
    border-radius: var(--radius-lg); text-align: center; box-shadow: var(--shadow);
    background: var(--card-solid);
}
.app-modal-x {
    position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 10px;
    background: var(--card); border: 1px solid var(--border-soft); color: var(--muted); cursor: pointer;
    display: grid; place-items: center; transition: .2s var(--ease);
}
.app-modal-x:hover { background: var(--card-2); color: var(--text); transform: rotate(90deg); }
.app-modal-x svg { width: 18px; height: 18px; }
.app-modal-ic {
    width: 66px; height: 66px; margin: 0 auto 18px; border-radius: 20px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; box-shadow: var(--shadow-glow);
}
.app-modal-ic svg { width: 30px; height: 30px; }
.app-modal-card h3 { font-size: 1.4rem; margin-bottom: 10px; }
.app-modal-card p { color: var(--muted); font-size: .96rem; margin-bottom: 18px; }
.app-modal-card p strong { color: var(--text); }
.app-modal-hl {
    display: flex; align-items: flex-start; gap: 10px; text-align: left;
    background: var(--primary-soft); border: 1px solid rgba(255,59,48,.25); border-radius: var(--radius-sm);
    padding: 14px 16px; color: var(--text); font-size: .9rem; line-height: 1.5; margin-bottom: 22px;
}
.app-modal-hl svg { width: 18px; height: 18px; color: var(--secondary); flex-shrink: 0; margin-top: 1px; }
.app-modal-actions { display: flex; flex-direction: column; gap: 10px; }
.app-modal-actions .btn { width: 100%; }
.app-modal-alt {
    margin-top: 16px; background: none; border: none; cursor: pointer;
    color: var(--muted-2); font-size: .88rem; font-family: var(--font-body); text-decoration: underline;
}
.app-modal-alt:hover { color: var(--text); }

/* =========================================================
   Official / verified uploader
   ========================================================= */
.badge-official {
    background: linear-gradient(135deg, #3b82f6, #22d3ee); color: #fff; border: none;
    box-shadow: 0 6px 16px -6px rgba(59,130,246,.6);
}
.badge-official svg { width: 13px; height: 13px; }

/* verified tick after a name */
.verified-tick {
    display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #22d3ee); color: #fff; flex-shrink: 0;
    box-shadow: 0 3px 8px -2px rgba(59,130,246,.6);
}
.verified-tick svg { width: 12px; height: 12px; }
.verified-text {
    font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
    background: linear-gradient(135deg, #60a5fa, #22d3ee); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* special highlight for official files */
.detail-card.official { position: relative; border-color: rgba(59,130,246,.35); }
.detail-card.official::after {
    content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
    background: linear-gradient(135deg, rgba(59,130,246,.5), transparent 40%, transparent 60%, rgba(34,211,238,.4));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
}

/* verified tick on file cards */
.file-card .meta h3 .verified-tick { width: 15px; height: 15px; vertical-align: -2px; margin-left: 2px; }
.file-card .meta h3 .verified-tick svg { width: 10px; height: 10px; }

/* =========================================================
   Download page (premium)
   ========================================================= */
.dl-page { max-width: 1080px; margin: 0 auto; padding-top: 12px; }
.dl-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(330px, 1fr); gap: 24px; align-items: start; margin-top: 8px; }
.dl-hero { grid-column: 1; grid-row: 1; }
.dl-main { grid-column: 1; grid-row: 2; display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* hero */
.dl-hero { padding: 30px; position: relative; overflow: hidden; }
.dl-hero-top { display: flex; gap: 22px; align-items: center; }
.dl-fic {
    width: 88px; height: 88px; flex-shrink: 0; border-radius: 22px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 3px; position: relative; overflow: hidden;
    background: linear-gradient(140deg, var(--primary), var(--secondary)); color: #fff;
    box-shadow: var(--shadow-glow);
}
.dl-fic::after { content:''; position:absolute; inset:0; background:linear-gradient(140deg,rgba(255,255,255,.32),transparent 55%); }
.dl-fic svg { width: 34px; height: 34px; position: relative; }
.dl-fic span { font-size: .64rem; font-weight: 800; letter-spacing: .08em; position: relative; opacity: .95; }
.dl-hero-info { min-width: 0; }
.dl-hero-info h1 { font-size: clamp(1.4rem, 3vw, 1.95rem); line-height: 1.15; word-break: break-word; }
.dl-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.dl-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 26px; }
.dl-stat { display: flex; align-items: center; gap: 11px; min-height: 66px; background: var(--card); border: 1px solid var(--border-soft); border-radius: 14px; padding: 12px 14px; }
.dl-stat .ds-i { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; background: var(--primary-soft); color: var(--secondary); }
.dl-stat .ds-i svg { width: 18px; height: 18px; }
.dl-stat > div { min-width: 0; }
.dl-stat strong { display: block; font-family: var(--font-head); font-size: 1rem; letter-spacing: -.02em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-stat small { display: block; color: var(--muted-2); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dl-block { padding: 24px 26px; }
.dl-block h3 { display: flex; align-items: center; gap: 9px; font-size: 1.08rem; margin-bottom: 12px; font-family: var(--font-body); font-weight: 700; }
.dl-block h3 svg { width: 18px; height: 18px; color: var(--secondary); }
.dl-block p { color: var(--muted); font-size: .94rem; line-height: 1.7; word-break: break-word; }

/* sticky CTA */
.dl-side { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 92px; }
.dl-cta { padding: 30px 26px; text-align: center; position: relative; overflow: hidden; }
.cta-glow { position: absolute; top: -90px; left: 50%; transform: translateX(-50%); width: 320px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255,59,48,.28), transparent 70%); filter: blur(30px); pointer-events: none; }
.dl-cta.official .cta-glow { background: radial-gradient(circle, rgba(59,130,246,.3), transparent 70%); }
.cta-tag {
    position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border-radius: 30px;
    font-size: .76rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 20px;
    background: var(--primary-soft); color: var(--secondary); border: 1px solid var(--border-soft);
}
.cta-tag svg { width: 14px; height: 14px; }
.cta-tag.official { background: rgba(59,130,246,.14); color: #60a5fa; }
.cta-icon {
    position: relative; width: 96px; height: 96px; margin: 0 auto 16px; border-radius: 26px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    background: linear-gradient(140deg, var(--primary), var(--secondary)); color: #fff; box-shadow: var(--shadow-glow); overflow: hidden;
}
.dl-cta.official .cta-icon { background: linear-gradient(140deg, #3b82f6, #22d3ee); box-shadow: 0 18px 50px -16px rgba(59,130,246,.6); }
.cta-icon::after { content:''; position:absolute; inset:0; background:linear-gradient(140deg,rgba(255,255,255,.32),transparent 55%); }
.cta-icon svg { width: 38px; height: 38px; position: relative; }
.cta-icon span { font-size: .68rem; font-weight: 800; letter-spacing: .1em; position: relative; }
.cta-name { font-weight: 600; font-size: .98rem; word-break: break-word; line-height: 1.4; }
.cta-size { color: var(--muted-2); font-size: .86rem; margin-top: 3px; margin-bottom: 22px; }
.cta-form { display: flex; flex-direction: column; gap: 10px; }
.cta-btn { font-size: 1.05rem; }
.cta-btn svg { width: 19px; height: 19px; }

.cta-trust { list-style: none; padding: 0; margin: 20px 0 0; text-align: left; display: flex; flex-direction: column; gap: 11px; }
.cta-trust li { display: flex; align-items: center; gap: 10px; font-size: .88rem; color: var(--muted); }
.cta-trust li svg { width: 17px; height: 17px; color: var(--success); flex-shrink: 0; }
.cta-trust li.danger { color: var(--danger); } .cta-trust li.danger svg { color: var(--danger); }

.cta-share { display: flex; gap: 8px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border-soft); }
.cta-share input { flex: 1; min-width: 0; background: var(--bg-elev); border: 1px solid var(--border-soft); border-radius: 11px; padding: 10px 12px; color: var(--muted); font-size: .8rem; font-family: var(--font-body); }
.cta-share .btn-sm { padding: 10px; flex-shrink: 0; }

.cta-uploader { display: flex; align-items: center; gap: 9px; justify-content: center; margin-top: 18px; color: var(--muted-2); font-size: .84rem; }
.cta-uploader strong { color: var(--muted); }
.cta-av { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--primary), var(--secondary)); }
.cta-av.guest { background: var(--card-2); color: var(--muted); border: 1px solid var(--border-soft); }
.cta-av.guest svg { width: 14px; height: 14px; }

.dl-related { margin-top: 48px; }

/* official accent ring on hero/cta */
.dl-hero.official, .dl-cta.official { border-color: rgba(59,130,246,.35); }

@media (max-width: 980px) {
    .dl-layout { display: flex; flex-direction: column; }
    .dl-hero { order: 1; }
    .dl-side { order: 2; position: static; }
    .dl-main { order: 3; }
}
@media (max-width: 600px) {
    .dl-hero { padding: 22px; }
    .dl-hero-top { flex-direction: column; text-align: center; }
    .dl-badges { justify-content: center; }
    .dl-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .dl-stat { justify-content: flex-start; gap: 9px; padding: 11px 12px; }
    .dl-stat .ds-i { width: 34px; height: 34px; }
    .dl-stat .ds-i svg { width: 16px; height: 16px; }
    .dl-stat strong { font-size: .92rem; white-space: normal; }
    .dl-stat small { font-size: .72rem; white-space: normal; }
}

/* =========================================================
   Header categories dropdown
   ========================================================= */
.nav-dd { position: relative; display: flex; align-items: center; }
.nav-dd-trigger { background: none; border: none; cursor: pointer; font-family: var(--font-body); display: inline-flex; align-items: center; gap: 5px; }
.nav-dd-trigger svg { width: 14px; height: 14px; transition: transform .25s var(--ease); }
.nav-dd:hover .nav-dd-trigger svg, .nav-dd:focus-within .nav-dd-trigger svg { transform: rotate(180deg); }
.nav-dd-panel {
    position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%) translateY(-8px);
    width: 320px; padding: 10px; border-radius: 16px; background: var(--card-solid); border: 1px solid var(--border);
    box-shadow: var(--shadow); display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
    opacity: 0; visibility: hidden; transition: .22s var(--ease); z-index: 250;
}
.nav-dd:hover .nav-dd-panel, .nav-dd:focus-within .nav-dd-panel { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav-dd-panel::before { content: ''; position: absolute; top: -14px; left: 0; right: 0; height: 14px; }
.nav-dd-panel a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px; color: var(--muted); font-size: .9rem; font-weight: 500; transition: .15s; }
.nav-dd-panel a:hover { background: var(--card-2); color: var(--text); }
.ndd-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; background: var(--primary-soft); color: var(--secondary); }
.ndd-ic svg { width: 16px; height: 16px; }

/* drawer categories */
.drawer-cats { padding: 14px 0 4px; border-top: 1px solid var(--border-soft); margin-top: 6px; flex-shrink: 0; }
.drawer-cats-label { display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); padding: 0 4px 10px; }
.drawer-cats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.drawer-cats-grid a { display: flex; align-items: center; gap: 8px; padding: 10px 11px; border-radius: 11px; background: var(--card); border: 1px solid var(--border-soft); color: var(--muted); font-size: .86rem; transition: .2s; }
.drawer-cats-grid a:hover { color: var(--text); border-color: rgba(255,59,48,.3); }
.drawer-cats-grid a svg { width: 16px; height: 16px; color: var(--secondary); flex-shrink: 0; }

/* =========================================================
   Footer (multi-column)
   ========================================================= */
.footer { border-top: 1px solid var(--border-soft); margin-top: 80px; padding: 56px 0 30px; color: var(--muted-2); font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer-about .footer-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; color: var(--text); margin-bottom: 14px; }
.footer-about p { color: var(--muted-2); font-size: .9rem; line-height: 1.7; max-width: 36ch; }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--border-soft); color: var(--muted); transition: .2s var(--ease); }
.footer-social a:hover { color: #fff; background: linear-gradient(135deg, var(--primary), var(--secondary)); border-color: transparent; transform: translateY(-3px); }
.footer-social a svg { width: 18px; height: 18px; }
.footer-col h4 { color: var(--text); font-size: .95rem; font-family: var(--font-body); font-weight: 700; margin-bottom: 16px; }
.footer-col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.footer-col ul a { color: var(--muted-2); transition: .18s; }
.footer-col ul a:hover { color: var(--secondary); padding-left: 3px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--border-soft); font-size: .84rem; }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a:hover { color: var(--text); }

@media (max-width: 860px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
    .footer-about { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* =========================================================
   Dashboard earnings panel
   ========================================================= */
.earn-panel { overflow: hidden; }
.earn-head { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; padding: 24px; background: linear-gradient(135deg, rgba(255,59,48,.12), rgba(255,94,87,.04)); border-bottom: 1px solid var(--border-soft); }
.earn-bal small { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .85rem; }
.earn-bal small svg { width: 15px; height: 15px; color: var(--secondary); }
.earn-bal strong { display: block; font-family: var(--font-head); font-size: 2.2rem; letter-spacing: -.04em; margin: 4px 0 2px; background: linear-gradient(135deg, var(--primary), var(--secondary)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.earn-bal span { color: var(--muted-2); font-size: .82rem; }
.earn-rate { display: flex; gap: 26px; }
.earn-rate div { text-align: right; }
.earn-rate strong { display: block; font-family: var(--font-head); font-size: 1.2rem; }
.earn-rate small { color: var(--muted-2); font-size: .76rem; }
.earn-body { padding: 22px 24px; }
.withdraw-form { margin-top: 18px; display: flex; flex-direction: column; gap: 14px; padding: 18px; background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--radius); }
.withdraw-history { margin-top: 22px; }
.withdraw-history h4 { font-size: .9rem; font-weight: 700; margin-bottom: 12px; color: var(--muted); }
.wh-row { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--border-soft); font-size: .88rem; }
.wh-row:last-child { border-bottom: none; }
.wh-amt { font-weight: 700; min-width: 80px; }
.wh-method { color: var(--muted); flex: 1; }
.wh-date { color: var(--muted-2); font-size: .8rem; }
@media (max-width: 600px) { .earn-head { flex-direction: column; align-items: flex-start; } .earn-rate { gap: 18px; } .earn-rate div { text-align: left; } }

/* =========================================================
   Toasts
   ========================================================= */
.toast-wrap { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 700; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast {
    display: flex; align-items: center; gap: 10px; padding: 13px 20px; border-radius: 30px;
    background: var(--card-solid); border: 1px solid var(--border); box-shadow: var(--shadow);
    color: var(--text); font-size: .9rem; font-weight: 500; backdrop-filter: blur(12px);
    transform: translateY(20px); opacity: 0; transition: .3s var(--ease); pointer-events: auto;
}
.toast.show { transform: none; opacity: 1; }
.toast svg { width: 17px; height: 17px; }
.toast.success svg { color: var(--success); }
.toast.error svg { color: var(--danger); }

/* =========================================================
   Download success overlay (confetti + checkmark)
   ========================================================= */
.dl-success { position: fixed; inset: 0; z-index: 650; display: none; align-items: center; justify-content: center; pointer-events: none; }
.dl-success.show { display: flex; }
.dl-success-card { display: flex; flex-direction: column; align-items: center; gap: 14px; animation: popIn .4s var(--ease); }
@keyframes popIn { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.dl-check { width: 96px; height: 96px; border-radius: 50%; background: linear-gradient(135deg, var(--success), #10b981); display: grid; place-items: center; box-shadow: 0 0 50px rgba(52,211,153,.6); }
.dl-check svg { width: 48px; height: 48px; color: #fff; stroke-width: 3; }
.dl-success-card span { color: #fff; font-weight: 700; font-size: 1.1rem; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.confetti-piece { position: fixed; top: -12px; width: 9px; height: 14px; z-index: 649; pointer-events: none; will-change: transform, opacity; }
@keyframes confetti-fall { to { transform: translateY(105vh) rotate(720deg); opacity: .2; } }

/* =========================================================
   Theme toggle button
   ========================================================= */
.theme-toggle { width: 40px; height: 40px; border-radius: 12px; cursor: pointer; background: var(--card); border: 1px solid var(--border-soft); color: var(--muted); display: grid; place-items: center; transition: .25s var(--ease); }
.theme-toggle:hover { background: var(--card-2); color: var(--text); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .ic-sun { display: none; }
:root[data-theme="light"] .theme-toggle .ic-sun { display: block; }
:root[data-theme="light"] .theme-toggle .ic-moon { display: none; }

/* =========================================================
   Light theme
   ========================================================= */
:root[data-theme="light"] {
    --bg: #f4f6fb;
    --bg-elev: #ffffff;
    --card: rgba(255,255,255,0.85);
    --card-2: rgba(15,23,42,0.05);
    --card-solid: #ffffff;
    --border: rgba(15,23,42,0.12);
    --border-soft: rgba(15,23,42,0.08);
    --border-strong: rgba(15,23,42,0.18);
    --text: #0f172a;
    --muted: #475569;
    --muted-2: #94a3b8;
}
:root[data-theme="light"] body { background: #f4f6fb; }
:root[data-theme="light"] body::before {
    background:
        radial-gradient(38% 50% at 20% 8%, rgba(255,59,48,.10), transparent 62%),
        radial-gradient(34% 44% at 82% 0%, rgba(255,94,87,.08), transparent 60%);
}
:root[data-theme="light"] body::after { opacity: .25; }
:root[data-theme="light"] .navbar { background: rgba(255,255,255,.78); }
:root[data-theme="light"] .nav-host.scrolled .navbar { background: rgba(255,255,255,.92); }
:root[data-theme="light"] .glass { background: rgba(255,255,255,0.78); }
:root[data-theme="light"] .form-control { background: #fff; }
:root[data-theme="light"] .preview-stage { background: rgba(15,23,42,.04); }
:root[data-theme="light"] .preview-text pre,
:root[data-theme="light"] .hash-row code,
:root[data-theme="light"] .cta-share input { background: #f1f5f9; }
:root[data-theme="light"] .toast { background: #fff; }
:root[data-theme="light"] .cmdk, :root[data-theme="light"] .account-drop,
:root[data-theme="light"] .nav-dd-panel, :root[data-theme="light"] .app-modal-card,
:root[data-theme="light"] .drawer { background: #fff; }
:root[data-theme="light"] .dropzone { background: #ffffff; }
:root[data-theme="light"] .dropzone:hover { background: #f8fafc; }
:root[data-theme="light"] .dropzone.dragover { background: rgba(255,59,48,.06); }
:root[data-theme="light"] .progress, :root[data-theme="light"] .quota-track { background: #e2e8f0; }
:root[data-theme="light"] .search-box input, :root[data-theme="light"] .cmdk-input input { color: var(--text); }
:root[data-theme="light"] .nav-search kbd, :root[data-theme="light"] .cmdk-foot kbd { background: #f1f5f9; }
:root[data-theme="light"] .dl-fic, :root[data-theme="light"] .cta-icon { color: #fff; }
:root[data-theme="light"] .preview-image { background: repeating-conic-gradient(#eef2f7 0% 25%, #f8fafc 0% 50%) 50% / 22px 22px; }

/* =========================================================
   Report file
   ========================================================= */
.report-trigger {
    display: inline-flex; align-items: center; gap: 7px; margin-top: 16px;
    background: none; border: none; cursor: pointer; font-family: var(--font-body);
    color: var(--muted-2); font-size: .84rem; transition: color .2s ease;
}
.report-trigger:hover { color: var(--danger); }
.report-trigger svg { width: 15px; height: 15px; }

.report-overlay {
    position: fixed; inset: 0; z-index: 600; display: none;
    align-items: center; justify-content: center; padding: 20px;
    background: rgba(3,6,12,.66); backdrop-filter: blur(10px);
}
.report-overlay.open { display: flex; animation: fadeUp .25s var(--ease); }
.report-card { position: relative; width: 100%; max-width: 480px; padding: 28px; border-radius: var(--radius-lg); background: var(--card-solid); box-shadow: var(--shadow); }
.report-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 10px; background: var(--card); border: 1px solid var(--border-soft); color: var(--muted); cursor: pointer; display: grid; place-items: center; transition: .2s var(--ease); }
.report-x:hover { background: var(--card-2); color: var(--text); transform: rotate(90deg); }
.report-x svg { width: 17px; height: 17px; }
.report-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.report-ic { width: 46px; height: 46px; flex-shrink: 0; border-radius: 13px; display: grid; place-items: center; background: rgba(255,94,87,.14); color: var(--danger); border: 1px solid rgba(255,94,87,.3); }
.report-ic svg { width: 22px; height: 22px; }
.report-head h3 { font-size: 1.2rem; margin-bottom: 4px; }
.report-head p { color: var(--muted-2); font-size: .84rem; line-height: 1.5; }
.report-file { display: flex; align-items: center; gap: 9px; padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--border-soft); color: var(--muted); font-size: .86rem; margin-bottom: 18px; word-break: break-all; }
.report-file svg { width: 16px; height: 16px; color: var(--secondary); flex-shrink: 0; }
.report-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

@media (max-width: 480px) {
    .report-card { padding: 22px; }
    .report-actions { flex-direction: column-reverse; }
    .report-actions .btn { width: 100%; }
}

/* =========================================================
   Upload progress card
   ========================================================= */
.dropzone.has-file .ic-wrap { background: rgba(52,211,153,.14); color: var(--success); border-color: rgba(52,211,153,.3); }
.dropzone.has-file h3 { color: var(--success); }

.up-card {
    background: var(--card); border: 1px solid var(--border); border-radius: 22px;
    padding: 22px 24px; backdrop-filter: blur(14px) saturate(140%);
    animation: fadeUp .3s var(--ease);
}
.up-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.up-fic { width: 48px; height: 48px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--primary-soft), rgba(255,94,87,.08)); color: var(--secondary); border: 1px solid var(--border-soft); }
.up-fic svg { width: 22px; height: 22px; }
.up-info { flex: 1; min-width: 0; }
.up-info strong { display: block; font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-sub { color: var(--muted-2); font-size: .82rem; }
.up-pct { font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; letter-spacing: -.04em;
    background: linear-gradient(135deg, var(--primary), var(--secondary)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.up-bar { height: 10px; border-radius: 20px; background: var(--bg-elev); border: 1px solid var(--border-soft); overflow: hidden; position: relative; }
.up-bar-fill { height: 100%; width: 0; border-radius: 20px; background: linear-gradient(90deg, var(--primary), var(--secondary)); transition: width .25s ease; position: relative; overflow: hidden; }
.up-bar-fill::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: upShine 1.3s linear infinite; }
@keyframes upShine { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.up-done .up-bar-fill::after { animation: none; }

.up-stats { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: .82rem; color: var(--muted); flex-wrap: wrap; gap: 6px; }
.up-stat-r { color: var(--muted-2); }
.up-cancel { margin-top: 16px; }

@media (max-width: 480px) {
    .up-card { padding: 18px; }
    .up-pct { font-size: 1.25rem; }
}

/* =========================================================
   Premium upload card (upbox)
   ========================================================= */
.upbox {
    text-align: left; padding: 26px; border-radius: var(--radius-xl);
    background: var(--card); border: 1px solid var(--border);
    backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
    box-shadow: 0 10px 30px -18px rgba(0,0,0,.45);
}
.upbox-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.upbox-ic { width: 50px; height: 50px; flex-shrink: 0; border-radius: 15px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--primary-soft), rgba(255,94,87,.08)); color: var(--secondary); border: 1px solid var(--border-soft); }
.upbox-ic svg { width: 24px; height: 24px; }
.upbox-head h3 { font-size: 1.25rem; letter-spacing: -.4px; }
.upbox-head p { color: var(--muted-2); font-size: .86rem; }

/* dropzone with layered "stacked cards" depth */
.dropzone {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px; padding: 42px 24px; border-radius: 20px; cursor: pointer; text-align: center;
    border: 1.6px dashed var(--border-strong); background: var(--bg-elev);
    transition: border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease);
}
.dropzone::before, .dropzone::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
    border: 1.6px dashed var(--border-soft); background: var(--card);
    transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.dropzone::before { transform: translate(7px, -7px) rotate(2.2deg); opacity: .6; }
.dropzone::after  { transform: translate(-7px, 7px) rotate(-2.2deg); opacity: .4; }
.dropzone:hover { border-color: var(--secondary); }
.dropzone:hover::before { transform: translate(10px, -10px) rotate(3deg); }
.dropzone:hover::after  { transform: translate(-10px, 10px) rotate(-3deg); }
.dropzone.dragover { border-color: var(--secondary); background: rgba(255,59,48,.06); transform: scale(1.01); }
.dz-cloud { width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 6px;
    background: var(--card-2); border: 1px solid var(--border-soft); color: var(--muted); transition: .25s var(--ease); }
.dz-cloud svg { width: 30px; height: 30px; }
.dropzone:hover .dz-cloud { color: var(--secondary); transform: translateY(-3px); }
.dz-title { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; color: var(--text); }
.dz-sub { color: var(--muted-2); font-size: .88rem; }
.dz-sub .browse { color: var(--secondary); font-weight: 600; }
.dropzone.has-file { border-style: solid; border-color: rgba(52,211,153,.4); background: rgba(52,211,153,.06); }
.dropzone.has-file .dz-cloud { background: rgba(52,211,153,.16); color: var(--success); border-color: rgba(52,211,153,.3); }
.dropzone.has-file .dz-title { color: var(--success); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

.upbox-info { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 18px 2px 0; }
.upbox-info > div { display: flex; flex-direction: column; gap: 2px; }
.ui-lbl { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-2); }
.ui-val { font-size: .9rem; font-weight: 600; color: var(--secondary); }

.upbox .upload-fields { margin-top: 18px; }
.upbox-actions { display: flex; gap: 12px; margin-top: 20px; }
.upbox-actions .btn { flex: 1; min-height: 50px; }
.upbox-actions #upReset { flex: 0 0 auto; min-width: 120px; }

@media (max-width: 520px) {
    .upbox { padding: 20px; }
    .dropzone { padding: 34px 18px; }
    .upbox-actions { flex-direction: column-reverse; }
    .upbox-actions #upReset { width: 100%; }
}

/* =========================================================
   Hero + floating decorations (premium)
   ========================================================= */
.hero { position: relative; overflow: hidden; }
.hero .container { position: relative; z-index: 2; }
.hero::after {
    content: ''; position: absolute; left: 50%; top: 32%; transform: translate(-50%, -50%);
    width: 720px; height: 480px; max-width: 120vw; border-radius: 50%; z-index: 0; pointer-events: none;
    background: radial-gradient(circle, rgba(255,59,48,.14), rgba(255,94,87,.05) 45%, transparent 70%);
    filter: blur(50px);
}

.hero-floaters { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.floater {
    position: absolute; display: inline-flex; align-items: center; gap: 11px;
    padding: 10px 16px 10px 10px; border-radius: 18px; font-size: .85rem; font-weight: 600; color: var(--text);
    background: var(--card); border: 1px solid var(--border);
    box-shadow: 0 16px 40px -20px rgba(0,0,0,.55), 0 2px 6px -2px rgba(0,0,0,.2);
    backdrop-filter: blur(14px) saturate(150%); -webkit-backdrop-filter: blur(14px) saturate(150%);
    animation: floatY 7s ease-in-out infinite;
}
.floater.solo { padding: 9px; }
.fl-ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0; }
.fl-ic svg { width: 20px; height: 20px; }
.floater b { letter-spacing: 3px; color: var(--secondary); }
/* soft tinted icon chips */
.ic-pink   { background: rgba(255,99,132,.16);  color: #ff6384; }
.ic-red    { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; }
.ic-green  { background: rgba(52,211,153,.16);   color: #34d399; }
.ic-teal   { background: rgba(34,211,238,.16);   color: #22d3ee; }
.ic-amber  { background: rgba(251,191,36,.16);   color: #fbbf24; }
.ic-violet { background: rgba(168,85,247,.16);   color: #a855f7; }

.floater.f1 { top: 19%; left: 5%;   animation-delay: 0s; }
.floater.f2 { top: 47%; left: 8%;   animation-delay: 1s; }
.floater.f5 { top: 73%; left: 15%;  animation-delay: 2s; }
.floater.f3 { top: 21%; right: 6%;  animation-delay: .5s; }
.floater.f4 { top: 49%; right: 5%;  animation-delay: 1.5s; }
.floater.f6 { top: 74%; right: 13%; animation-delay: 2.4s; }

@keyframes floatY {
    0%, 100% { transform: translateY(0) rotate(-1.5deg); }
    50%      { transform: translateY(-16px) rotate(1.5deg); }
}

@media (max-width: 1240px) { .floater.f5, .floater.f6 { display: none; } }
@media (max-width: 1040px) { .hero-floaters { display: none; } }
@media (prefers-reduced-motion: reduce) { .floater { animation: none; } }

/* =========================================================
   Trending leaderboard (distinct from file grid)
   ========================================================= */
.trend-flame { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; vertical-align: -7px; margin-right: 4px;
    background: linear-gradient(135deg, #ff8a3d, var(--primary)); color: #fff; box-shadow: 0 8px 18px -8px rgba(255,59,48,.6); }
.trend-flame svg { width: 18px; height: 18px; }

.trend-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.trend-card {
    display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 18px;
    position: relative; overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.trend-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.trend-rank {
    font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; letter-spacing: -.04em; width: 40px; flex-shrink: 0; text-align: center;
    color: transparent; background: linear-gradient(135deg, var(--muted-2), var(--muted)); -webkit-background-clip: text; background-clip: text;
}
.trend-ic { width: 46px; height: 46px; flex-shrink: 0; border-radius: 13px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--primary-soft), rgba(255,94,87,.06)); color: var(--secondary); border: 1px solid var(--border-soft); }
.trend-ic svg { width: 22px; height: 22px; }
.trend-meta { flex: 1; min-width: 0; }
.trend-meta h3 { font-size: .98rem; font-weight: 600; font-family: var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trend-meta span { color: var(--muted-2); font-size: .8rem; }
.trend-dl { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; padding: 7px 12px; border-radius: 30px;
    background: rgba(52,211,153,.12); color: var(--success); border: 1px solid rgba(52,211,153,.25); font-size: .82rem; font-weight: 700; }
.trend-dl svg { width: 14px; height: 14px; }

/* #1 highlighted */
.trend-card.top { border-color: rgba(255,59,48,.4); background: linear-gradient(135deg, rgba(255,59,48,.1), var(--card)); }
.trend-card.top .trend-rank { background: linear-gradient(135deg, #ffb13d, var(--primary)); -webkit-background-clip: text; background-clip: text; }
.trend-card.top .trend-ic { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; border-color: transparent; box-shadow: var(--shadow-glow); }

@media (max-width: 760px) { .trend-grid { grid-template-columns: 1fr; } }

/* =========================================================
   Trending page (dedicated leaderboard)
   ========================================================= */
.trend-hero { padding: 40px 0 10px; text-align: center; position: relative; }
.trend-hero-inner { max-width: 620px; margin: 0 auto; }
.trend-hero-badge { width: 64px; height: 64px; margin: 14px auto 16px; border-radius: 20px; display: grid; place-items: center;
    background: linear-gradient(135deg, #ff8a3d, var(--primary)); color: #fff; box-shadow: 0 16px 40px -12px rgba(255,59,48,.7); }
.trend-hero-badge svg { width: 30px; height: 30px; }
.trend-hero h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -1px; }
.trend-hero h1 .grad { background: linear-gradient(110deg, #ff8a3d, var(--primary)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.trend-hero p { color: var(--muted); margin: 10px auto 0; max-width: 46ch; }
.trend-hero-stats { display: inline-flex; align-items: center; gap: 14px; margin-top: 18px; color: var(--muted-2); font-size: .9rem; padding: 10px 20px; border-radius: 30px; background: var(--card); border: 1px solid var(--border-soft); }
.trend-hero-stats strong { color: var(--text); font-family: var(--font-head); }
.dotsep { width: 4px; height: 4px; border-radius: 50%; background: var(--muted-2); }

.trend-board { display: flex; flex-direction: column; gap: 10px; max-width: 760px; margin: 0 auto; }
.trend-row {
    display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 16px;
    background: var(--card); border: 1px solid var(--border-soft);
    transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.trend-row:hover { transform: translateX(4px); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.trend-row .trend-rank { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-head); font-size: 1.4rem; font-weight: 800; width: 52px; flex-shrink: 0;
    color: transparent; background: linear-gradient(135deg, var(--muted-2), var(--muted)); -webkit-background-clip: text; background-clip: text; }
.trend-row .trend-rank svg { width: 15px; height: 15px; -webkit-text-fill-color: initial; }
.trend-row .trend-ic { width: 48px; height: 48px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--primary-soft), rgba(255,94,87,.06)); color: var(--secondary); border: 1px solid var(--border-soft); }
.trend-row .trend-ic svg { width: 22px; height: 22px; }
.trend-row .trend-meta { flex: 1; min-width: 0; }
.trend-row .trend-meta h3 { font-size: 1rem; font-weight: 600; font-family: var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trend-row .trend-meta span { color: var(--muted-2); font-size: .82rem; }
.trend-row .trend-dl { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; padding: 8px 13px; border-radius: 30px;
    background: rgba(52,211,153,.12); color: var(--success); border: 1px solid rgba(52,211,153,.25); font-size: .84rem; font-weight: 700; }
.trend-row .trend-dl svg { width: 14px; height: 14px; }

/* podium top 3 */
.trend-row.podium .trend-rank { color: #ffb13d; -webkit-text-fill-color: #ffb13d; }
.trend-row.r1 { border-color: rgba(255,179,61,.5); background: linear-gradient(100deg, rgba(255,179,61,.12), var(--card)); }
.trend-row.r1 .trend-rank svg { color: #ffb13d; }
.trend-row.r2 { border-color: rgba(203,213,225,.4); }
.trend-row.r2 .trend-rank { color: #cbd5e1; -webkit-text-fill-color: #cbd5e1; }
.trend-row.r3 { border-color: rgba(217,138,90,.4); }
.trend-row.r3 .trend-rank { color: #d98a5a; -webkit-text-fill-color: #d98a5a; }
.trend-row.r1 .trend-ic { background: linear-gradient(135deg, #ffb13d, var(--primary)); color: #fff; border-color: transparent; box-shadow: 0 10px 26px -10px rgba(255,140,40,.7); }

@media (max-width: 560px) {
    .trend-row { gap: 12px; padding: 12px 14px; }
    .trend-row .trend-rank { width: 40px; font-size: 1.2rem; }
    .trend-row .trend-dl span { display: none; }
}
