:root {
    --bg: #08111f;
    --bg-2: #0b172b;
    --panel: rgba(9, 19, 38, 0.78);
    --panel-strong: rgba(10, 22, 42, 0.92);
    --line: rgba(177, 218, 255, 0.12);
    --text: #edf6ff;
    --muted: #9db3cc;
    --soft: #c6ddff;
    --accent: #56a7ff;
    --accent-2: #7ae3ff;
    --accent-3: #8ea8ff;
    --success: #76ffce;
    --danger: #ff8e8e;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(83, 168, 255, 0.22), transparent 30%),
        radial-gradient(circle at top right, rgba(122, 227, 255, 0.12), transparent 22%),
        linear-gradient(180deg, #07101b 0%, #091524 44%, #07111d 100%);
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.page-shell {
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
}

.page-shell::before,
.page-shell::after {
    content: "";
    position: fixed;
    inset: auto;
    pointer-events: none;
    z-index: 0;
    filter: blur(60px);
    opacity: 0.65;
}

.page-shell::before {
    width: 26rem;
    height: 26rem;
    top: -5rem;
    right: -6rem;
    background: rgba(89, 164, 255, 0.24);
}

.page-shell::after {
    width: 20rem;
    height: 20rem;
    left: -5rem;
    bottom: 7rem;
    background: rgba(90, 255, 214, 0.12);
}

.wrap {
    width: min(1180px, calc(100vw - 2rem));
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem 0 0.85rem;
}

.brand {
    display: inline-flex;
    gap: 0.85rem;
    align-items: center;
}

.brand strong {
    display: block;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.brand small {
    display: block;
    color: var(--muted);
    margin-top: 0.1rem;
}

.brand-mark {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 18px;
    background:
        radial-gradient(circle at 30% 30%, rgba(255,255,255,0.95), rgba(255,255,255,0.2) 26%, transparent 28%),
        linear-gradient(135deg, #95f5ff 0%, #65acff 45%, #5d73ff 100%);
    box-shadow: 0 12px 30px rgba(94, 159, 255, 0.38), inset 0 1px 0 rgba(255,255,255,0.24);
}

.topnav {
    display: inline-flex;
    gap: 0.4rem;
    padding: 0.35rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    backdrop-filter: blur(12px);
    background: rgba(9, 18, 35, 0.45);
}

.topnav a {
    color: var(--muted);
    padding: 0.7rem 1rem;
    border-radius: 999px;
    transition: 0.2s ease;
}

.topnav a:hover { color: var(--text); background: rgba(255,255,255,0.05); }

.panel {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(11, 21, 39, 0.82), rgba(8, 16, 31, 0.92));
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    border-radius: var(--radius-xl);
}

.hero {
    margin-top: 1.1rem;
    padding: 2rem;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(310px, 0.9fr);
    gap: 1.2rem;
    align-items: stretch;
}

.hero-copy h1 {
    margin: 0.25rem 0 0.8rem;
    font-size: clamp(2.35rem, 6vw, 4.5rem);
    line-height: 0.97;
    letter-spacing: -0.05em;
    max-width: 9ch;
}

.hero-copy p {
    margin: 0;
    color: var(--soft);
    font-size: 1.02rem;
    line-height: 1.7;
    max-width: 62ch;
}

.eyebrow {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.eyebrow span,
.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 2rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    color: #dbeeff;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(196, 225, 255, 0.13);
}

.hero-actions,
.file-actions,
.upload-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
}

.hero-actions { margin-top: 1.35rem; }

.button {
    appearance: none;
    border: none;
    cursor: pointer;
    padding: 0.92rem 1.25rem;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: -0.01em;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.button:hover { transform: translateY(-1px); }

.button-primary {
    color: #041321;
    background: linear-gradient(180deg, #92f2ff 0%, #5ca8ff 100%);
    box-shadow: 0 10px 24px rgba(91, 171, 255, 0.3);
}

.button-secondary {
    color: var(--text);
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(189, 221, 255, 0.13);
}

.hero-card-stack {
    display: grid;
    gap: 0.9rem;
}

.mini-card {
    padding: 1.15rem 1.1rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(201, 228, 255, 0.12);
    background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03));
}

.glow-card {
    background:
        radial-gradient(circle at 100% 0%, rgba(122,227,255,0.22), transparent 40%),
        linear-gradient(180deg, rgba(13, 30, 58, 0.96), rgba(10, 22, 42, 0.96));
}

.mini-label,
.section-kicker {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.74rem;
    color: var(--muted);
}

.mini-card strong {
    margin-top: 0.45rem;
    display: block;
    font-size: 1.6rem;
    letter-spacing: -0.04em;
}

.mini-card small,
.section-meta,
.muted-note {
    display: block;
    color: var(--muted);
    margin-top: 0.35rem;
}

.flash {
    padding: 1rem 1.15rem;
    margin-top: 1rem;
    border-radius: var(--radius-lg);
}
.flash-success { border: 1px solid rgba(118,255,206,0.22); color: #d9fff1; }
.flash-error { border: 1px solid rgba(255,142,142,0.22); color: #ffe3e3; }

.uploader-panel,
.file-panel,
.admin-panel { margin-top: 1.1rem; padding: 1.45rem; }

.section-head {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.section-head h2,
.section-head h1 {
    margin: 0.25rem 0 0;
    font-size: clamp(1.35rem, 4vw, 2rem);
    letter-spacing: -0.04em;
}

.uploader {
    display: grid;
    gap: 1rem;
}

.dropzone {
    position: relative;
    border-radius: var(--radius-lg);
    border: 1.5px dashed rgba(155, 203, 255, 0.22);
    background:
        radial-gradient(circle at top right, rgba(88,165,255,0.18), transparent 28%),
        rgba(255,255,255,0.025);
    min-height: 240px;
    padding: 1.4rem;
    display: grid;
    place-items: center;
    text-align: center;
    cursor: pointer;
    overflow: hidden;
}

.dropzone.dragover {
    border-color: rgba(124, 227, 255, 0.78);
    background: rgba(87, 173, 255, 0.1);
}

.dropzone input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.drop-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 22px;
    display: grid;
    place-items: center;
    font-size: 2rem;
    margin-bottom: 0.8rem;
    background: linear-gradient(180deg, rgba(146,242,255,0.22), rgba(92,168,255,0.18));
    border: 1px solid rgba(164, 222, 255, 0.18);
}

.file-preview {
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.file-preview .preview-pill {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(196, 225, 255, 0.12);
    color: var(--text);
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
}

.searchbox,
.login-card input {
    width: min(320px, 100%);
    border: 1px solid rgba(190, 223, 255, 0.12);
    background: rgba(255,255,255,0.045);
    color: var(--text);
    border-radius: 999px;
    padding: 0.95rem 1rem;
    outline: none;
}

.searchbox::placeholder,
.login-card input::placeholder { color: #8ca7c2; }

.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.file-card {
    border-radius: 22px;
    padding: 1rem;
    border: 1px solid rgba(188, 222, 255, 0.11);
    background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02));
}

.file-top {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
}

.file-icon {
    flex: 0 0 auto;
    width: 3rem;
    height: 3rem;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
}

.file-info h3 {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.35;
    word-break: break-word;
}

.file-info p,
.empty-state p {
    margin: 0.4rem 0 0;
    color: var(--muted);
    font-size: 0.94rem;
}

.file-info p span { margin: 0 0.28rem; }
.file-stats { display: flex; gap: 0.55rem; flex-wrap: wrap; margin: 1rem 0; }
.pill-muted { color: var(--muted); }

.empty-state {
    min-height: 320px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    text-align: center;
    background: rgba(255,255,255,0.028);
    border: 1px dashed rgba(188, 222, 255, 0.14);
}

.empty-icon {
    width: 4.5rem;
    height: 4.5rem;
    margin: 0 auto 0.75rem;
    display: grid;
    place-items: center;
    border-radius: 24px;
    font-size: 2rem;
    background: rgba(255,255,255,0.06);
}

.admin-wrap {
    padding: 2rem 0 3rem;
}

.login-card {
    display: grid;
    gap: 1rem;
    max-width: 420px;
    padding: 1rem;
    border-radius: 20px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(190, 223, 255, 0.1);
}

.login-card label {
    display: grid;
    gap: 0.5rem;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.table-card {
    overflow: auto;
    border-radius: 20px;
    border: 1px solid rgba(190, 223, 255, 0.1);
    background: rgba(255,255,255,0.03);
}

.table-card table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.table-card th,
.table-card td {
    padding: 0.95rem 1rem;
    border-bottom: 1px solid rgba(190, 223, 255, 0.08);
    text-align: left;
    vertical-align: middle;
}

.table-card th { color: var(--muted); font-size: 0.84rem; text-transform: uppercase; letter-spacing: 0.08em; }

code {
    padding: 0.16rem 0.35rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
}

@media (max-width: 920px) {
    .hero { grid-template-columns: 1fr; }
    .topbar { gap: 1rem; flex-direction: column; align-items: flex-start; }
    .topnav { width: 100%; overflow-x: auto; }
}

@media (max-width: 640px) {
    .wrap { width: min(100vw - 1rem, 1180px); }
    .hero,
    .uploader-panel,
    .file-panel,
    .admin-panel { padding: 1rem; }
    .section-head,
    .upload-footer { flex-direction: column; align-items: stretch; }
    .button { width: 100%; text-align: center; }
    .file-actions { flex-direction: column; }
}


.result-panel {
    margin-top: 1.1rem;
    padding: 1.45rem;
}

.compact-head {
    margin-bottom: 0.8rem;
}

.share-copy-text,
.bundle-meta {
    color: var(--soft);
    margin: 0 0 1rem;
}

.bundle-meta-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1rem;
}

.field-card {
    border: 1px solid rgba(189, 221, 255, 0.13);
    border-radius: var(--radius-lg);
    background: rgba(255,255,255,0.03);
    padding: 1rem 1.1rem;
}

.field-card span {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 0.55rem;
}

.field-card input {
    width: 100%;
    background: rgba(3, 9, 18, 0.55);
    color: var(--text);
    border: 1px solid rgba(189, 221, 255, 0.12);
    border-radius: 14px;
    padding: 0.9rem 1rem;
    outline: none;
}

.field-card-muted p {
    color: var(--soft);
    margin: 0;
    line-height: 1.6;
}

.bundle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.bundle-card,
.share-file-row,
.single-download-card {
    border: 1px solid rgba(189, 221, 255, 0.12);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03));
    padding: 1.1rem;
}

.bundle-card h3,
.share-file-row h3,
.single-download-card h2 {
    margin: 0.2rem 0 0.35rem;
    letter-spacing: -0.03em;
}

.preview-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 0.85rem 0 0;
}

.share-wrap {
    padding-top: 1.2rem;
    padding-bottom: 2rem;
}

.share-hero,
.bundle-list-panel,
.single-download-panel {
    margin-top: 1rem;
    padding: 1.45rem;
}

.share-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.8fr);
    gap: 1rem;
    align-items: start;
}

.share-hero-main h1 {
    margin: 0.35rem 0 0.7rem;
    font-size: clamp(2rem, 5vw, 3.4rem);
    letter-spacing: -0.05em;
}

.share-hero-main p {
    color: var(--soft);
    line-height: 1.7;
    margin: 0;
}

.share-summary-stack {
    align-self: stretch;
}

.share-file-list {
    display: grid;
    gap: 0.85rem;
}

.share-file-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.share-file-meta {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}

.share-file-meta p,
.single-download-card p {
    color: var(--muted);
    margin: 0;
}

.small-file-icon {
    width: 3rem;
    height: 3rem;
    font-size: 1.25rem;
}

.single-download-card {
    text-align: center;
    padding: 2rem 1.2rem;
}

.giant-file-icon {
    width: 5rem;
    height: 5rem;
    font-size: 2rem;
    margin: 0 auto 1rem;
}

.big-download-button {
    width: min(320px, 100%);
    justify-content: center;
    display: inline-flex;
    margin-top: 1rem;
}

.compact-empty {
    min-height: 210px;
}

@media (max-width: 900px) {
    .bundle-meta-grid,
    .share-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .share-file-row {
        flex-direction: column;
        align-items: stretch;
    }
}
