
/* ================================================================
   SECUREUPLOAD — FUTURISTIC PREMIUM UI
   ---------------------------------------------------------------
   Art direction:
   • Premium cybersecurity / cloud-storage aesthetic
   • Dark cinematic background
   • Frosted-glass surfaces
   • Electric blue / cyan accents
   • Soft neon illumination
   • Deep layered depth
   • High readability
   • Mobile-first, touch-safe
   • Existing HTML/JS selectors preserved
   ================================================================ */


/* ================================================================
   01. DESIGN SYSTEM
   ================================================================ */

:root {
    /* ---------- Brand ---------- */

    --primary: #6ea8ff;
    --primary-light: #9bc3ff;
    --primary-dark: #3d7cff;

    --accent: #5ee7ff;
    --accent-strong: #28d8ff;

    --violet: #8b7cff;

    /* ---------- Semantic ---------- */

    --success: #45e6a5;
    --success-dark: #19c982;
    --danger: #ff6b81;
    --warning: #ffd166;
    --info: #62c8ff;

    /* ---------- Background ---------- */

    --bg-0: #040711;
    --bg-1: #070b16;
    --bg-2: #0b1120;
    --bg-3: #0e1628;

    /* ---------- Surfaces ---------- */

    --surface: rgba(15, 23, 42, 0.72);
    --surface-solid: #0f172a;
    --surface-raised: rgba(20, 31, 54, 0.82);
    --surface-hover: rgba(27, 42, 70, 0.9);

    --glass: rgba(13, 20, 35, 0.58);
    --glass-strong: rgba(17, 26, 44, 0.76);

    /* ---------- Text ---------- */

    --text: #f8fbff;
    --text-secondary: #d8e1ef;
    --text-muted: #8e9bb2;
    --text-subtle: #59667d;

    /* ---------- Borders ---------- */

    --border: rgba(147, 170, 209, 0.13);
    --border-light: rgba(170, 195, 235, 0.22);
    --border-strong: rgba(110, 168, 255, 0.38);

    /* ---------- Glow ---------- */

    --glow-blue:
        0 0 0 1px rgba(110, 168, 255, 0.05),
        0 0 30px rgba(61, 124, 255, 0.12);

    --glow-cyan:
        0 0 0 1px rgba(94, 231, 255, 0.08),
        0 0 35px rgba(40, 216, 255, 0.12);

    --glow-success:
        0 0 0 1px rgba(69, 230, 165, 0.08),
        0 0 30px rgba(69, 230, 165, 0.12);

    /* ---------- Shadows ---------- */

    --shadow-xs:
        0 2px 8px rgba(0, 0, 0, 0.18);

    --shadow-sm:
        0 8px 24px rgba(0, 0, 0, 0.22);

    --shadow:
        0 16px 45px rgba(0, 0, 0, 0.28);

    --shadow-lg:
        0 26px 70px rgba(0, 0, 0, 0.4);

    --shadow-xl:
        0 40px 110px rgba(0, 0, 0, 0.52);

    /* ---------- Radius ---------- */

    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius: 18px;
    --radius-lg: 24px;
    --radius-xl: 30px;
    --pill: 999px;

    /* ---------- Animation ---------- */

    --ease:
        cubic-bezier(0.22, 1, 0.36, 1);

    --ease-spring:
        cubic-bezier(0.34, 1.56, 0.64, 1);

    --transition-fast:
        0.16s var(--ease);

    --transition:
        0.26s var(--ease);

    --transition-slow:
        0.45s var(--ease);

    /* ---------- Layout ---------- */

    --content-width: 980px;
    --header-height: 72px;

    /* ---------- Typography ---------- */

    --font:
        Inter,
        "SF Pro Display",
        "SF Pro Text",
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    /* ---------- Z ---------- */

    --z-bg: 0;
    --z-content: 10;
    --z-header: 100;
    --z-modal: 200;
    --z-toast: 300;
}


/* ================================================================
   02. RESET
   ================================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    color-scheme: dark;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100dvh;

    font-family: var(--font);
    line-height: 1.5;

    color: var(--text);

    background:
        radial-gradient(
            circle at 15% -5%,
            rgba(64, 121, 255, 0.16),
            transparent 27rem
        ),
        radial-gradient(
            circle at 90% 5%,
            rgba(70, 229, 255, 0.10),
            transparent 24rem
        ),
        radial-gradient(
            circle at 50% 100%,
            rgba(112, 87, 255, 0.07),
            transparent 30rem
        ),
        linear-gradient(
            180deg,
            var(--bg-0),
            var(--bg-1) 30%,
            var(--bg-2) 100%
        );

    overflow-x: hidden;

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* ================================================================
   03. ATMOSPHERE
   Added: futuristic global background lighting/grid
   ================================================================ */

body::before {
    content: "";

    position: fixed;
    inset: 0;

    z-index: var(--z-bg);

    pointer-events: none;

    opacity: 0.3;

    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.022) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.022) 1px,
            transparent 1px
        );

    background-size:
        48px 48px,
        48px 48px;

    mask-image:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.7),
            transparent 80%
        );
}

body::after {
    content: "";

    position: fixed;
    inset: 0;

    z-index: var(--z-bg);

    pointer-events: none;

    background:
        radial-gradient(
            circle at 50% 30%,
            transparent 0,
            rgba(3, 7, 17, 0.15) 45%,
            rgba(3, 7, 17, 0.45) 100%
        );
}


/* ================================================================
   04. SELECTION / SCROLLBARS
   ================================================================ */

::selection {
    background: rgba(94, 231, 255, 0.24);
    color: white;
}

* {
    scrollbar-width: thin;
    scrollbar-color:
        rgba(120, 150, 200, 0.26)
        transparent;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: rgba(120, 150, 200, 0.22);
    border-radius: var(--pill);
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(120, 150, 200, 0.38);
}


/* ================================================================
   05. BASE ELEMENTS
   ================================================================ */

button,
input,
textarea,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

img,
svg,
video,
iframe {
    display: block;
    max-width: 100%;
}


/* ================================================================
   06. APP WRAPPER
   ================================================================ */

.app-wrapper {
    position: relative;
    z-index: var(--z-content);

    display: flex;
    flex-direction: column;

    min-height: 100dvh;
}


/* ================================================================
   07. HEADER — PREMIUM GLASS BAR
   ================================================================ */

.header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);

    display: flex;
    align-items: center;
    justify-content: space-between;

    min-height: var(--header-height);

    gap: 1rem;

    padding:
        0.8rem
        max(1rem, env(safe-area-inset-right))
        0.8rem
        max(1rem, env(safe-area-inset-left));

    background:
        linear-gradient(
            180deg,
            rgba(7, 11, 22, 0.92),
            rgba(7, 11, 22, 0.72)
        );

    border-bottom: 1px solid var(--border);

    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.025);

    backdrop-filter:
        blur(22px)
        saturate(145%);

    -webkit-backdrop-filter:
        blur(22px)
        saturate(145%);
}

.header::after {
    content: "";

    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;

    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(94, 231, 255, 0.18),
            rgba(110, 168, 255, 0.18),
            transparent
        );

    pointer-events: none;
}

.logo {
    display: inline-flex;
    align-items: center;

    gap: 0.7rem;

    min-width: 0;

    color: var(--text);

    font-size: 1.04rem;
    font-weight: 800;

    letter-spacing: -0.025em;

    white-space: nowrap;
}

.logo i {
    display: grid;
    place-items: center;

    width: 38px;
    height: 38px;

    border: 1px solid rgba(110, 168, 255, 0.2);
    border-radius: 12px;

    color: var(--primary-light);

    background:
        linear-gradient(
            145deg,
            rgba(83, 135, 255, 0.24),
            rgba(40, 216, 255, 0.07)
        );

    box-shadow:
        0 0 22px rgba(61, 124, 255, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);

    font-size: 1rem;
}

.nav {
    display: flex;
    align-items: center;

    gap: 0.35rem;

    min-width: 0;
}

.nav-link {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 0.45rem;

    min-height: 42px;

    padding:
        0.55rem
        0.82rem;

    border: 1px solid transparent;
    border-radius: var(--pill);

    color: var(--text-muted);

    text-decoration: none;

    font-size: 0.84rem;
    font-weight: 650;

    transition:
        color var(--transition),
        background var(--transition),
        border-color var(--transition),
        transform var(--transition),
        box-shadow var(--transition);
}

.nav-link::after {
    content: "";

    position: absolute;

    left: 22%;
    right: 22%;
    bottom: 4px;

    height: 2px;

    border-radius: var(--pill);

    background:
        linear-gradient(
            90deg,
            var(--primary),
            var(--accent)
        );

    opacity: 0;

    transform: scaleX(0.4);

    transition:
        opacity var(--transition),
        transform var(--transition);
}

.nav-link:hover,
.nav-link:focus-visible {
    color: var(--text);

    background:
        rgba(255, 255, 255, 0.035);

    border-color:
        rgba(153, 183, 229, 0.1);
}

.nav-link.active {
    color: #edf6ff;

    background:
        linear-gradient(
            145deg,
            rgba(83, 135, 255, 0.16),
            rgba(40, 216, 255, 0.07)
        );

    border-color:
        rgba(110, 168, 255, 0.2);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 6px 20px rgba(32, 96, 190, 0.1);
}

.nav-link.active::after {
    opacity: 1;
    transform: scaleX(1);
}


/* ================================================================
   08. MAIN
   ================================================================ */

.main {
    position: relative;

    width: 100%;
    max-width: var(--content-width);

    margin: 0 auto;

    padding:
        2.3rem
        max(1rem, env(safe-area-inset-right))
        4rem
        max(1rem, env(safe-area-inset-left));
}


/* ================================================================
   09. HERO
   ================================================================ */

.hero {
    position: relative;

    text-align: center;

    margin-bottom: 2rem;
}

.hero::before {
    content: "";

    position: absolute;

    left: 50%;
    top: -90px;

    width: min(520px, 90vw);
    height: 260px;

    transform: translateX(-50%);

    background:
        radial-gradient(
            ellipse,
            rgba(78, 135, 255, 0.13),
            transparent 68%
        );

    filter: blur(20px);

    pointer-events: none;
}

.hero h1 {
    position: relative;

    margin-bottom: 0.65rem;

    color: var(--text);

    font-size:
        clamp(
            1.8rem,
            4.8vw,
            2.75rem
        );

    font-weight: 850;

    line-height: 1.08;

    letter-spacing: -0.045em;

    text-shadow:
        0 10px 40px rgba(0, 0, 0, 0.28);
}

.hero h1::after {
    content: "";

    display: block;

    width: 72px;
    height: 2px;

    margin:
        0.8rem
        auto
        0;

    border-radius: var(--pill);

    background:
        linear-gradient(
            90deg,
            var(--primary),
            var(--accent)
        );

    box-shadow:
        0 0 18px rgba(94, 231, 255, 0.32);
}

.hero-sm h1 {
    font-size:
        clamp(
            1.45rem,
            4vw,
            1.95rem
        );
}

.subtitle {
    position: relative;

    max-width: 640px;

    margin: 0 auto;

    color: var(--text-muted);

    font-size: 0.96rem;

    line-height: 1.72;
}


/* ================================================================
   10. DROP ZONE — HERO PRODUCT COMPONENT
   ================================================================ */

.drop-zone {
    position: relative;

    overflow: hidden;

    min-height: 320px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding:
        clamp(2.5rem, 8vw, 4.8rem)
        1.4rem;

    text-align: center;

    cursor: pointer;

    border:
        1px
        dashed
        rgba(127, 157, 203, 0.26);

    border-radius: var(--radius-xl);

    background:
        linear-gradient(
            145deg,
            rgba(18, 28, 48, 0.7),
            rgba(8, 14, 28, 0.8)
        );

    box-shadow:
        var(--shadow),
        inset 0 1px 0
            rgba(255, 255, 255, 0.035);

    backdrop-filter:
        blur(18px)
        saturate(125%);

    -webkit-backdrop-filter:
        blur(18px)
        saturate(125%);

    transition:
        transform var(--transition-slow),
        border-color var(--transition),
        box-shadow var(--transition-slow),
        background var(--transition-slow);
}


/* Corner decoration */

.drop-zone::before {
    content: "";

    position: absolute;
    inset: 0;

    pointer-events: none;

    background:
        radial-gradient(
            circle at 50% 35%,
            rgba(90, 142, 255, 0.12),
            transparent 34%
        ),
        radial-gradient(
            circle at 0% 100%,
            rgba(94, 231, 255, 0.06),
            transparent 28%
        );

    opacity: 0.9;
}


/* Animated perimeter glow */

.drop-zone::after {
    content: "";

    position: absolute;

    inset: -1px;

    border-radius: inherit;

    padding: 1px;

    background:
        conic-gradient(
            from 180deg,
            transparent 0deg,
            rgba(110, 168, 255, 0.0) 55deg,
            rgba(110, 168, 255, 0.2) 90deg,
            rgba(94, 231, 255, 0.28) 130deg,
            transparent 190deg,
            transparent 360deg
        );

    opacity: 0;

    -webkit-mask:
        linear-gradient(#000 0 0)
        content-box,
        linear-gradient(#000 0 0);

    -webkit-mask-composite: xor;

    mask-composite: exclude;

    transition: opacity var(--transition);
    pointer-events: none;
}

.drop-zone:hover,
.drop-zone:focus-visible {
    border-color:
        rgba(110, 168, 255, 0.54);

    background:
        linear-gradient(
            145deg,
            rgba(21, 34, 58, 0.76),
            rgba(8, 16, 32, 0.86)
        );

    transform:
        translateY(-3px);

    box-shadow:
        0 26px 70px rgba(0, 0, 0, 0.34),
        0 0 38px rgba(61, 124, 255, 0.1),
        inset 0 1px 0
            rgba(255, 255, 255, 0.04);

    outline: none;
}

.drop-zone:hover::after,
.drop-zone:focus-visible::after,
.drop-zone.drag-over::after {
    opacity: 1;
}

.drop-zone.drag-over {
    border-style: solid;
    border-color:
        rgba(94, 231, 255, 0.68);

    background:
        linear-gradient(
            145deg,
            rgba(29, 65, 108, 0.5),
            rgba(8, 24, 40, 0.92)
        );

    transform:
        translateY(-5px)
        scale(1.008);

    box-shadow:
        0 0 0 5px
            rgba(94, 231, 255, 0.055),
        0 26px 70px
            rgba(0, 0, 0, 0.38),
        0 0 50px
            rgba(40, 216, 255, 0.15);
}


/* Upload icon */

.icon-wrap {
    position: relative;
    z-index: 1;

    display: grid;
    place-items: center;

    width: 88px;
    height: 88px;

    margin-bottom: 1.25rem;

    border:
        1px
        solid
        rgba(110, 168, 255, 0.18);

    border-radius: 25px;

    background:
        linear-gradient(
            145deg,
            rgba(74, 124, 255, 0.2),
            rgba(46, 215, 255, 0.06)
        );

    box-shadow:
        0 10px 40px rgba(59, 124, 255, 0.1),
        inset 0 1px 0
            rgba(255, 255, 255, 0.07);

    transition:
        transform var(--transition-spring),
        box-shadow var(--transition);
}

.icon-wrap::before {
    content: "";

    position: absolute;
    inset: -10px;

    border-radius: 30px;

    border:
        1px
        solid
        rgba(110, 168, 255, 0.08);

    opacity: 0.55;
}

#drop-icon {
    color: var(--primary-light);

    font-size: 2.8rem;

    filter:
        drop-shadow(
            0 0 15px
            rgba(110, 168, 255, 0.25)
        );

    transition:
        transform var(--transition-slow),
        color var(--transition),
        filter var(--transition);
}

.drop-zone:hover #drop-icon {
    color: var(--accent);

    transform:
        translateY(-4px)
        scale(1.08);

    filter:
        drop-shadow(
            0 0 22px
            rgba(94, 231, 255, 0.4)
        );
}

.drop-zone.drag-over #drop-icon {
    color: var(--accent);

    transform:
        translateY(-8px)
        scale(1.16);
}

.drop-text {
    position: relative;
    z-index: 1;

    margin-bottom: 0.45rem;

    color: var(--text);

    font-size:
        clamp(
            1.08rem,
            3vw,
            1.35rem
        );

    font-weight: 750;

    letter-spacing: -0.02em;
}

.drop-or {
    position: relative;
    z-index: 1;

    margin:
        0.7rem
        0;

    color: var(--text-subtle);

    font-size: 0.83rem;

    text-transform: uppercase;

    letter-spacing: 0.12em;
}

.hint {
    position: relative;
    z-index: 1;

    max-width: 410px;

    margin-top: 1.1rem;
    margin-inline: auto;

    color: var(--text-muted);

    font-size: 0.78rem;

    line-height: 1.65;
}


/* ================================================================
   11. BUTTON SYSTEM
   ================================================================ */

.btn {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 0.48rem;

    min-height: 46px;

    padding:
        0.72rem
        1.15rem;

    border:
        1px
        solid
        transparent;

    border-radius: var(--pill);

    color: var(--text);

    font-weight: 720;
    font-size: 0.9rem;

    line-height: 1.2;

    cursor: pointer;
    text-decoration: none;

    overflow: hidden;

    transition:
        transform var(--transition-fast),
        color var(--transition),
        background var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);
}

.btn::before {
    content: "";

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            120deg,
            transparent 15%,
            rgba(255, 255, 255, 0.12) 50%,
            transparent 85%
        );

    transform:
        translateX(-130%);

    transition:
        transform 0.65s var(--ease);

    pointer-events: none;
}

.btn:hover::before {
    transform:
        translateX(130%);
}

.btn:active {
    transform: scale(0.975);
}

.btn:focus-visible {
    outline: none;

    box-shadow:
        0 0 0 3px
            rgba(94, 231, 255, 0.13),
        0 0 0 1px
            rgba(110, 168, 255, 0.5);
}

.btn-primary {
    color: #06101e;

    background:
        linear-gradient(
            135deg,
            #9ac7ff,
            #64a6ff 52%,
            #4a8dff
        );

    border-color:
        rgba(191, 220, 255, 0.36);

    box-shadow:
        0 10px 28px
            rgba(61, 124, 255, 0.26),
        inset 0 1px 0
            rgba(255, 255, 255, 0.42);
}

.btn-primary:hover {
    color: #030b15;

    transform:
        translateY(-1px);

    box-shadow:
        0 16px 34px
            rgba(61, 124, 255, 0.34),
        0 0 22px
            rgba(94, 231, 255, 0.09),
        inset 0 1px 0
            rgba(255, 255, 255, 0.48);
}

.btn-secondary {
    color: var(--primary-light);

    background:
        rgba(90, 135, 255, 0.09);

    border-color:
        rgba(110, 168, 255, 0.2);
}

.btn-secondary:hover {
    color: #eef6ff;

    background:
        rgba(90, 135, 255, 0.16);

    border-color:
        rgba(110, 168, 255, 0.34);

    box-shadow:
        0 8px 24px rgba(61, 124, 255, 0.1);
}

.btn-ghost {
    color: var(--text-muted);

    background:
        rgba(255, 255, 255, 0.025);

    border-color:
        rgba(150, 175, 216, 0.08);
}

.btn-ghost:hover {
    color: var(--text);

    background:
        rgba(255, 255, 255, 0.06);

    border-color:
        rgba(150, 175, 216, 0.14);
}

.btn-sm {
    min-height: 38px;

    padding:
        0.48rem
        0.78rem;

    font-size: 0.8rem;
}


/* ================================================================
   12. UPLOAD PANEL
   ================================================================ */

.upload-panel {
    position: relative;

    margin-top: 1.3rem;

    padding: 1.25rem;

    border:
        1px
        solid
        var(--border);

    border-radius: var(--radius);

    background:
        linear-gradient(
            145deg,
            rgba(17, 27, 47, 0.78),
            rgba(10, 17, 31, 0.82)
        );

    box-shadow:
        var(--shadow-sm),
        inset 0 1px 0
            rgba(255, 255, 255, 0.035);

    backdrop-filter:
        blur(18px);

    -webkit-backdrop-filter:
        blur(18px);

    animation:
        slideUp 0.4s var(--ease);
}

.file-info {
    display: flex;
    align-items: center;

    gap: 0.9rem;

    margin-bottom: 1rem;
}

#file-icon {
    display: grid;
    place-items: center;

    flex: 0 0 auto;

    width: 46px;
    height: 46px;

    border:
        1px
        solid
        rgba(110, 168, 255, 0.15);

    border-radius: 13px;

    color: var(--primary-light);

    background:
        linear-gradient(
            145deg,
            rgba(85, 131, 255, 0.16),
            rgba(46, 215, 255, 0.04)
        );

    box-shadow:
        inset 0 1px 0
            rgba(255, 255, 255, 0.06);
}

.file-meta {
    flex: 1;

    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 0.12rem;
}

#file-name {
    color: var(--text);

    font-size: 0.92rem;
    font-weight: 700;

    white-space: nowrap;

    overflow: hidden;
    text-overflow: ellipsis;
}

#file-size {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.progress-wrap {
    margin-bottom: 0.75rem;
}

.progress-bar {
    position: relative;

    height: 9px;

    overflow: hidden;

    border:
        1px
        solid
        rgba(130, 158, 202, 0.12);

    border-radius: var(--pill);

    background:
        rgba(124, 151, 194, 0.08);
}

.progress-fill {
    position: relative;

    width: 0%;
    height: 100%;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            #3978ff,
            #5fb8ff 52%,
            #62eaff
        );

    box-shadow:
        0 0 18px
            rgba(79, 172, 255, 0.32);

    transition:
        width 0.22s var(--ease);
}

.progress-fill::after {
    content: "";

    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;

    width: 80px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.42)
        );

    opacity: 0.6;
}

.progress-stats {
    display: flex;
    justify-content: space-between;

    gap: 1rem;

    margin-top: 0.45rem;

    color: var(--text-muted);

    font-size: 0.76rem;
}

.status-msg {
    min-height: 1.5rem;

    padding:
        0.55rem
        0;

    color: var(--text-secondary);

    font-size: 0.86rem;

    transition:
        color var(--transition);
}

.status-msg.info {
    color: var(--info);
}

.status-msg.success {
    color: var(--success);
}

.status-msg.error {
    color: var(--danger);
}


/* ================================================================
   13. SUCCESS CARD — PREMIUM COMPLETION STATE
   ================================================================ */

.success-card {
    position: relative;

    overflow: hidden;

    margin-top: 1.5rem;

    padding:
        2.2rem
        1.5rem;

    border:
        1px
        solid
        rgba(69, 230, 165, 0.15);

    border-radius: var(--radius-xl);

    text-align: center;

    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(69, 230, 165, 0.08),
            transparent 45%
        ),
        linear-gradient(
            145deg,
            rgba(15, 31, 36, 0.84),
            rgba(9, 18, 29, 0.9)
        );

    box-shadow:
        var(--shadow-lg),
        0 0 40px
            rgba(69, 230, 165, 0.045),
        inset 0 1px 0
            rgba(255, 255, 255, 0.03);

    animation:
        popIn 0.5s var(--ease-spring);
}

.success-card::before {
    content: "";

    position: absolute;

    top: 0;
    left: 20%;
    right: 20%;

    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(69, 230, 165, 0.6),
            transparent
        );

    box-shadow:
        0 0 20px
            rgba(69, 230, 165, 0.3);
}

.success-icon {
    position: relative;

    display: grid;
    place-items: center;

    width: 78px;
    height: 78px;

    margin:
        0
        auto
        1rem;

    border:
        1px
        solid
        rgba(69, 230, 165, 0.2);

    border-radius: 50%;

    color: var(--success);

    background:
        radial-gradient(
            circle,
            rgba(69, 230, 165, 0.15),
            rgba(69, 230, 165, 0.045)
        );

    box-shadow:
        0 0 32px
            rgba(69, 230, 165, 0.12),
        inset 0 1px 0
            rgba(255, 255, 255, 0.06);

    font-size: 2rem;

    animation:
        bounceIn 0.65s var(--ease-spring);
}

.success-icon::after {
    content: "";

    position: absolute;
    inset: -9px;

    border:
        1px
        solid
        rgba(69, 230, 165, 0.08);

    border-radius: 50%;
}

.success-card h2 {
    margin-bottom: 0.45rem;

    color: var(--text);

    font-size: 1.45rem;
    font-weight: 800;

    letter-spacing: -0.025em;
}

#success-detail {
    max-width: 560px;

    margin:
        0
        auto
        1.35rem;

    color: var(--text-muted);

    font-size: 0.9rem;

    line-height: 1.7;
}

.success-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    gap: 0.65rem;
}


/* ================================================================
   14. BROWSE PAGE
   ================================================================ */

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    gap: 0.22rem;

    margin-bottom: 1.35rem;

    color: var(--text-muted);

    font-size: 0.82rem;
}

.crumb {
    padding:
        0.3rem
        0.5rem;

    color: var(--primary-light);

    border-radius: 7px;

    text-decoration: none;

    transition:
        background var(--transition),
        color var(--transition);
}

.crumb:hover {
    color: white;
    background: rgba(110, 168, 255, 0.08);
}

.crumb.current {
    color: var(--text-muted);
    font-weight: 700;

    pointer-events: none;
}

.crumb + .crumb::before {
    content: "›";

    margin-right: 0.35rem;

    color: var(--text-subtle);
}

.file-grid {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 0.8rem;
}

.file-card {
    position: relative;

    display: flex;
    align-items: center;

    min-width: 0;

    gap: 0.9rem;

    min-height: 78px;

    padding:
        0.95rem
        1rem;

    overflow: hidden;

    border:
        1px
        solid
        var(--border);

    border-radius: var(--radius);

    background:
        linear-gradient(
            145deg,
            rgba(18, 27, 47, 0.74),
            rgba(10, 17, 30, 0.78)
        );

    box-shadow:
        var(--shadow-xs),
        inset 0 1px 0
            rgba(255, 255, 255, 0.025);

    backdrop-filter:
        blur(16px);

    -webkit-backdrop-filter:
        blur(16px);

    transition:
        transform var(--transition),
        background var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);
}

.file-card::after {
    content: "";

    position: absolute;

    left: 0;
    top: 16%;
    bottom: 16%;

    width: 2px;

    border-radius: var(--pill);

    background:
        linear-gradient(
            180deg,
            transparent,
            var(--primary),
            transparent
        );

    opacity: 0;

    transition:
        opacity var(--transition);
}

.file-card:hover {
    transform:
        translateY(-3px);

    border-color:
        rgba(110, 168, 255, 0.2);

    background:
        linear-gradient(
            145deg,
            rgba(25, 38, 65, 0.84),
            rgba(12, 22, 39, 0.84)
        );

    box-shadow:
        var(--shadow-sm),
        0 0 26px
            rgba(61, 124, 255, 0.05);
}

.file-card:hover::after {
    opacity: 1;
}

.card-icon {
    display: grid;
    place-items: center;

    flex: 0 0 auto;

    width: 45px;
    height: 45px;

    border:
        1px
        solid
        rgba(110, 168, 255, 0.13);

    border-radius: 13px;

    color: var(--primary-light);

    background:
        linear-gradient(
            145deg,
            rgba(85, 135, 255, 0.15),
            rgba(47, 213, 255, 0.035)
        );

    box-shadow:
        inset 0 1px 0
            rgba(255, 255, 255, 0.04);
}

.file-card.is-dir .card-icon {
    color: var(--warning);

    background:
        linear-gradient(
            145deg,
            rgba(255, 209, 102, 0.15),
            rgba(255, 173, 67, 0.04)
        );

    border-color:
        rgba(255, 209, 102, 0.14);
}

.card-body {
    flex: 1;
    min-width: 0;
}

.card-name {
    margin-bottom: 0.16rem;

    color: var(--text);

    font-size: 0.9rem;
    font-weight: 720;

    white-space: nowrap;

    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;

    gap: 0.3rem 0.45rem;

    color: var(--text-muted);

    font-size: 0.75rem;
}

.card-actions {
    display: flex;
    align-items: center;

    gap: 0.3rem;

    flex-shrink: 0;
}

.empty-state {
    padding:
        4rem
        1rem;

    text-align: center;

    color: var(--text-muted);
}

.empty-state i {
    display: block;

    margin-bottom: 1rem;

    color: var(--text-subtle);

    font-size: 3rem;

    filter:
        drop-shadow(
            0 0 16px
            rgba(110, 168, 255, 0.1)
        );
}

.empty-state p {
    max-width: 460px;

    margin:
        0
        auto
        1.25rem;

    line-height: 1.7;
}


/* ================================================================
   15. MODAL — CINEMATIC VIEWER
   ================================================================ */

.modal {
    position: fixed;

    inset: 0;

    z-index: var(--z-modal);

    display: flex;
    align-items: center;
    justify-content: center;

    padding:
        max(0.8rem, env(safe-area-inset-top))
        max(0.8rem, env(safe-area-inset-right))
        max(0.8rem, env(safe-area-inset-bottom))
        max(0.8rem, env(safe-area-inset-left));
}

.modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;

    inset: 0;

    background:
        radial-gradient(
            circle at 50% 20%,
            rgba(68, 112, 255, 0.1),
            transparent 32%
        ),
        rgba(2, 5, 13, 0.78);

    backdrop-filter:
        blur(12px);

    -webkit-backdrop-filter:
        blur(12px);

    animation:
        fadeIn 0.22s ease;
}

.modal-content {
    position: relative;

    width: 100%;
    max-width: 860px;

    max-height:
        min(
            92dvh,
            900px
        );

    display: flex;
    flex-direction: column;

    overflow: hidden;

    border:
        1px
        solid
        rgba(153, 183, 229, 0.18);

    border-radius: var(--radius-lg);

    background:
        linear-gradient(
            145deg,
            rgba(17, 26, 45, 0.96),
            rgba(7, 13, 25, 0.98)
        );

    box-shadow:
        var(--shadow-xl),
        0 0 70px
            rgba(61, 124, 255, 0.08);

    backdrop-filter:
        blur(25px);

    -webkit-backdrop-filter:
        blur(25px);

    animation:
        slideUp 0.38s var(--ease);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 1rem;

    padding:
        1rem
        1.2rem;

    border-bottom:
        1px
        solid
        var(--border);

    background:
        rgba(10, 17, 31, 0.45);
}

.modal-header h2 {
    min-width: 0;

    color: var(--text);

    font-size: 1rem;
    font-weight: 720;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-body {
    flex: 1;

    min-height: 200px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: auto;

    padding: 1rem;

    background:
        radial-gradient(
            circle at center,
            rgba(75, 109, 185, 0.05),
            transparent 60%
        );
}

.modal-body img {
    max-width: 100%;
    max-height: 62dvh;

    border:
        1px
        solid
        rgba(150, 175, 216, 0.12);

    border-radius: var(--radius-sm);

    object-fit: contain;

    box-shadow:
        0 20px 60px
            rgba(0, 0, 0, 0.3);
}

.modal-body iframe {
    width: 100%;
    height: 62dvh;

    border:
        1px
        solid
        rgba(150, 175, 216, 0.12);

    border-radius: var(--radius-sm);

    background: white;
}

.modal-body pre {
    width: 100%;
    max-height: 62dvh;

    overflow: auto;

    padding: 1rem;

    border:
        1px
        solid
        var(--border);

    border-radius: var(--radius-sm);

    color: var(--text-secondary);

    background:
        rgba(3, 9, 20, 0.74);

    font-size: 0.81rem;

    line-height: 1.65;

    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;

    gap: 0.5rem;

    padding:
        1rem
        1.2rem;

    border-top:
        1px
        solid
        var(--border);

    background:
        rgba(8, 14, 27, 0.72);
}


/* ================================================================
   16. TOASTS — PREMIUM SYSTEM ALERTS
   ================================================================ */

.toast-container {
    position: fixed;

    right:
        max(1rem, env(safe-area-inset-right));

    bottom:
        max(1rem, env(safe-area-inset-bottom));

    z-index: var(--z-toast);

    display: flex;
    flex-direction: column;

    gap: 0.6rem;

    width:
        min(
            390px,
            calc(100vw - 2rem)
        );
}

.toast {
    position: relative;

    display: flex;
    align-items: flex-start;

    gap: 0.75rem;

    padding:
        0.9rem
        1rem;

    overflow: hidden;

    border:
        1px
        solid
        var(--border);

    border-left:
        3px
        solid
        var(--primary);

    border-radius: var(--radius-sm);

    background:
        linear-gradient(
            145deg,
            rgba(20, 31, 52, 0.92),
            rgba(10, 17, 31, 0.95)
        );

    box-shadow:
        var(--shadow-lg);

    backdrop-filter:
        blur(18px);

    -webkit-backdrop-filter:
        blur(18px);

    animation:
        toastIn 0.38s var(--ease);
}

.toast.success {
    border-left-color: var(--success);

    box-shadow:
        var(--shadow-lg),
        0 0 28px
            rgba(69, 230, 165, 0.06);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.warning {
    border-left-color: var(--warning);
}

.toast i {
    flex: 0 0 auto;

    margin-top: 0.13rem;

    color: var(--primary);

    font-size: 1.05rem;
}

.toast.success i {
    color: var(--success);
}

.toast.error i {
    color: var(--danger);
}

.toast.warning i {
    color: var(--warning);
}

.toast.info i {
    color: var(--info);
}

.toast-msg {
    flex: 1;

    color: var(--text-secondary);

    font-size: 0.85rem;

    line-height: 1.55;
}

.toast.leaving {
    animation:
        toastOut 0.28s ease
        forwards;
}


/* ================================================================
   17. FOOTER
   ================================================================ */

.footer {
    padding:
        1rem
        max(1rem, env(safe-area-inset-right))
        calc(1rem + env(safe-area-inset-bottom))
        max(1rem, env(safe-area-inset-left));

    text-align: center;

    color: var(--text-subtle);

    font-size: 0.73rem;

    border-top:
        1px
        solid
        var(--border);

    background:
        rgba(4, 7, 17, 0.46);
}


/* ================================================================
   18. UTILITIES
   ================================================================ */

.hidden {
    display: none !important;
}

:focus-visible {
    outline: none;
}


/* ================================================================
   19. ANIMATIONS
   ================================================================ */

@keyframes slideUp {
    from {
        opacity: 0;
        transform:
            translateY(18px)
            scale(0.985);
    }

    to {
        opacity: 1;
        transform:
            translateY(0)
            scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes popIn {
    from {
        opacity: 0;
        transform:
            scale(0.88)
            translateY(6px);
    }

    to {
        opacity: 1;
        transform:
            scale(1)
            translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.4);
    }

    55% {
        opacity: 1;
        transform: scale(1.12);
    }

    78% {
        transform: scale(0.96);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform:
            translateX(28px)
            translateY(5px)
            scale(0.98);
    }

    to {
        opacity: 1;
        transform:
            translateX(0)
            translateY(0)
            scale(1);
    }
}

@keyframes toastOut {
    to {
        opacity: 0;
        transform:
            translateX(24px)
            scale(0.98);
    }
}


/* ================================================================
   20. TABLET
   ================================================================ */

@media (min-width: 600px) {
    .header {
        padding-left: 1.4rem;
        padding-right: 1.4rem;
    }

    .main {
        padding-top: 2.8rem;
        padding-bottom: 4.5rem;
    }

    .file-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }
}


/* ================================================================
   21. LARGE DESKTOP
   ================================================================ */

@media (min-width: 1000px) {
    .header {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .main {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .drop-zone {
        min-height: 350px;
    }
}


/* ================================================================
   22. MOBILE — CAREFUL MODE
   ================================================================ */

@media (max-width: 599px) {

    :root {
        --header-height: 64px;
    }

    .header {
        min-height: 64px;

        gap: 0.55rem;
    }

    .logo {
        gap: 0.5rem;

        font-size: 0.93rem;
    }

    .logo i {
        width: 34px;
        height: 34px;

        border-radius: 10px;
    }

    .nav {
        gap: 0.18rem;
    }

    .nav-link {
        min-width: 42px;
        min-height: 42px;

        padding:
            0.5rem
            0.62rem;
    }

    .main {
        padding:
            1.45rem
            max(0.8rem, env(safe-area-inset-right))
            3rem
            max(0.8rem, env(safe-area-inset-left));
    }

    .hero {
        margin-bottom: 1.35rem;
    }

    .hero h1 {
        font-size:
            clamp(
                1.62rem,
                8vw,
                2.1rem
            );
    }

    .subtitle {
        font-size: 0.87rem;
    }

    .drop-zone {
        min-height: 300px;

        padding:
            2rem
            0.9rem;

        border-radius: 20px;
    }

    .icon-wrap {
        width: 72px;
        height: 72px;

        margin-bottom: 1rem;

        border-radius: 21px;
    }

    #drop-icon {
        font-size: 2.35rem;
    }

    .drop-text {
        font-size: 1rem;
    }

    .drop-or {
        font-size: 0.73rem;
    }

    .hint {
        max-width: 290px;

        font-size: 0.75rem;
    }

    .upload-panel {
        padding: 1rem;

        border-radius: 16px;
    }

    .progress-stats {
        align-items: flex-start;

        flex-direction: column;

        gap: 0.12rem;
    }

    .success-card {
        padding:
            1.7rem
            1rem;

        border-radius: 20px;
    }

    .success-actions {
        flex-direction: column;

        width: 100%;
    }

    .success-actions .btn {
        width: 100%;
    }

    .file-grid {
        grid-template-columns: 1fr;

        gap: 0.7rem;
    }

    .file-card {
        min-height: 74px;

        border-radius: 15px;

        padding:
            0.8rem;
    }

    .card-actions {
        flex-wrap: wrap;
    }

    .modal-content {
        max-height: 94dvh;

        border-radius: 17px;
    }

    .modal-header,
    .modal-footer {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }

    .modal-body {
        padding: 0.7rem;
    }

    .modal-body iframe,
    .modal-body pre {
        max-height: 64dvh;
    }

    .toast-container {
        left:
            max(
                0.7rem,
                env(safe-area-inset-left)
            );

        right:
            max(
                0.7rem,
                env(safe-area-inset-right)
            );

        bottom:
            max(
                0.7rem,
                env(safe-area-inset-bottom)
            );

        width: auto;
    }

    .toast {
        width: 100%;
    }
}


/* ================================================================
   23. VERY SMALL PHONES
   ================================================================ */

@media (max-width: 380px) {

    .header {
        padding-left: 0.7rem;
        padding-right: 0.7rem;
    }

    .logo {
        max-width: 150px;

        font-size: 0.87rem;
    }

    .logo i {
        width: 31px;
        height: 31px;
    }

    .nav-link span {
        display: none;
    }

    .nav-link {
        min-width: 40px;

        padding:
            0.48rem
            0.55rem;
    }

    .main {
        padding-left: 0.7rem;
        padding-right: 0.7rem;
    }

    .drop-zone {
        min-height: 280px;

        padding:
            1.8rem
            0.7rem;
    }

    .drop-text {
        font-size: 0.96rem;
    }

    .hint {
        max-width: 250px;
    }

    .file-card {
        gap: 0.65rem;
    }

    .card-icon {
        width: 40px;
        height: 40px;
    }

    .card-actions .btn {
        min-width: 40px;

        padding-left: 0.6rem;
        padding-right: 0.6rem;
    }
}


/* ================================================================
   24. REDUCED MOTION
   ================================================================ */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;
    }

    .drop-zone:hover,
    .drop-zone.drag-over,
    .file-card:hover,
    .btn:hover {
        transform: none;
    }
}


/* ================================================================
   25. FORCED COLORS / HIGH CONTRAST
   ================================================================ */

@media (forced-colors: active) {

    .btn,
    .nav-link,
    .drop-zone,
    .upload-panel,
    .success-card,
    .file-card,
    .modal-content,
    .toast {
        border:
            1px
            solid
            CanvasText;
    }

    .btn-primary {
        background: Highlight;
        color: HighlightText;
    }
}