:root {
    color-scheme: light;
    --bg-start: #f3f5ff;
    --bg-end: #eef3ff;
    --card-bg: rgba(255, 255, 255, 0.92);
    --text: #1f2937;
    --muted: #6b7280;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #7c3aed;
    --accent-soft: #a855f7;
    --teal: #06b6d4;
    --border: rgba(148, 163, 184, 0.3);
    --shadow: 0 25px 60px rgba(15, 23, 42, 0.16);
}

* {
    box-sizing: border-box;
}

body {
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    background: radial-gradient(circle at top, #ffffff 0%, var(--bg-start) 35%, var(--bg-end) 100%);
    color: var(--text);
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 54px 20px 72px;
    position: relative;
    overflow-x: hidden;
    animation: backgroundShift 18s ease-in-out infinite;
}

@keyframes backgroundShift {
    0% {
        background-position: 0% 0%;
    }
    50% {
        background-position: 100% 40%;
    }
    100% {
        background-position: 0% 0%;
    }
}

.page {
    width: min(920px, 100%);
    position: relative;
    z-index: 1;
}

.bg-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(0px);
    opacity: 0.55;
    z-index: 0;
}

.orb-1 {
    width: 320px;
    height: 320px;
    top: -120px;
    left: -120px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.45) 0%, rgba(124, 58, 237, 0) 70%);
}

.orb-2 {
    width: 260px;
    height: 260px;
    bottom: 60px;
    right: -80px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.4) 0%, rgba(6, 182, 212, 0) 70%);
}

.orb-3 {
    width: 180px;
    height: 180px;
    top: 160px;
    right: 140px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.35) 0%, rgba(37, 99, 235, 0) 70%);
}

.hero {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(246, 248, 255, 0.9));
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px 32px 28px;
    box-shadow: var(--shadow);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -50% -80% -50%;
    height: 260px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.16), rgba(124, 58, 237, 0) 72%);
    filter: blur(18px);
    opacity: 0.7;
    z-index: 0;
}

.hero > * {
    position: relative;
    z-index: 1;
}

.logo {
    width: 120px;
    height: auto;
    display: block;
    margin: 0 auto 14px;
    filter: drop-shadow(0 12px 24px rgba(37, 99, 235, 0.35));
    animation: floatLogo 6s ease-in-out infinite;
}

@keyframes floatLogo {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-6px);
    }
}

.title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 6px;
}

.subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

.stats {
    display: inline-flex;
    gap: 12px;
    align-items: center;
    margin-top: 18px;
    padding: 6px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(124, 58, 237, 0.18));
    color: #1e3a8a;
    font-weight: 600;
    font-size: 13px;
}

.section {
    margin-top: 28px;
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    flex: 1 1 260px;
    max-width: 360px;
}

.search-bar input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 14px;
    background: transparent;
    color: var(--text);
}

.search-bar span {
    font-size: 16px;
}

.download-all {
    padding: 10px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--teal), var(--primary));
    color: #ffffff;
    border: none;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 14px 24px rgba(6, 182, 212, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.download-all:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 26px rgba(6, 182, 212, 0.3);
}

.section-title {
    font-size: 18px;
    margin: 0 0 14px;
    text-align: left;
}

.file-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 14px;
}

.file-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.file-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.14);
}

.file-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    box-shadow: 0 10px 20px rgba(124, 58, 237, 0.3);
}

.file-meta {
    text-align: left;
}

.file-name {
    font-weight: 600;
    margin: 0 0 4px;
    word-break: break-word;
}

.file-size {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

.download-btn {
    padding: 10px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 14px 24px rgba(37, 99, 235, 0.25);
}

.download-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, var(--primary-dark), var(--accent));
}

.empty-state {
    padding: 18px;
    border-radius: 14px;
    background: rgba(148, 163, 184, 0.18);
    color: #475569;
    text-align: center;
}

.footer {
    margin-top: 32px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

.footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    padding: 12px 18px;
    background: rgba(15, 23, 42, 0.9);
    color: #ffffff;
    border-radius: 12px;
    font-size: 14px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 9999;
}

.toast.show {
    opacity: 1;
    transform: translateY(0px);
}

.toast.hidden {
    pointer-events: none;
}

@media (max-width: 640px) {
    .hero {
        padding: 28px 20px;
    }

    .file-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .file-meta {
        text-align: center;
    }

    .section-head {
        align-items: stretch;
    }

    .search-bar {
        max-width: 100%;
    }

    .download-all {
        width: 100%;
    }

    .toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
        text-align: center;
    }
}
