:root {
    color-scheme: dark;
    --ice-950: #020617;
    --ice-925: #07111f;
    --ice-900: #0f172a;
    --ice-850: #142033;
    --ice-800: #1e293b;
    --ice-700: #334155;
    --ice-600: #475569;
    --ice-500: #64748b;
    --ice-400: #94a3b8;
    --ice-300: #cbd5e1;
    --ice-200: #e2e8f0;
    --ice-100: #f1f5f9;
    --frost-600: #0284c7;
    --frost-500: #0ea5e9;
    --frost-400: #38bdf8;
    --frost-300: #7dd3fc;
    --glacier-600: #0891b2;
    --glacier-500: #06b6d4;
    --gold: #facc15;
    --shadow-ice: 0 4px 16px rgba(0, 0, 0, 0.25);
    --shadow-frost: 0 8px 32px rgba(31, 38, 135, 0.37);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100%;
    background: var(--ice-950);
    color: var(--ice-200);
    font-family: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.65;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, 0.2), transparent 32rem),
        radial-gradient(circle at 80% 10%, rgba(6, 182, 212, 0.16), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

.container {
    width: min(100% - 2rem, 1280px);
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(14px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    gap: 1rem;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 0.9rem;
    background: linear-gradient(135deg, var(--frost-600), var(--glacier-500));
    color: white;
    font-weight: 800;
    box-shadow: 0 12px 26px rgba(2, 132, 199, 0.32);
    transition: transform 0.3s ease;
}

.brand:hover .brand-mark {
    transform: scale(1.08) rotate(-3deg);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-text strong,
.footer-brand {
    color: var(--ice-50, #f8fafc);
    font-size: 1.35rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.brand-text small {
    color: var(--ice-400);
    font-size: 0.78rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-link {
    border-radius: 0.75rem;
    padding: 0.72rem 1rem;
    color: var(--ice-300);
    font-weight: 600;
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    background: rgba(30, 41, 59, 0.9);
    transform: translateY(-1px);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.9), rgba(8, 145, 178, 0.88));
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.18);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 0.8rem;
    background: rgba(30, 41, 59, 0.9);
    color: white;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: currentColor;
    border-radius: 1rem;
}

.hero {
    position: relative;
    min-height: clamp(620px, 78vh, 820px);
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.78) 45%, rgba(2, 6, 23, 0.2) 100%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.82));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    padding-block: 6rem;
    animation: fadeIn 0.55s ease;
}

.hero-eyebrow,
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(125, 211, 252, 0.3);
    border-radius: 999px;
    background: rgba(2, 132, 199, 0.18);
    color: var(--frost-300);
    padding: 0.48rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

.hero h1,
.hero h2,
.page-hero h1 {
    margin: 0 0 1rem;
    color: white;
    font-size: clamp(2.4rem, 7vw, 5.8rem);
    line-height: 0.98;
    letter-spacing: -0.07em;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
}

.hero p,
.page-hero p {
    max-width: 760px;
    margin: 0 0 1.4rem;
    color: var(--ice-200);
    font-size: clamp(1.05rem, 2vw, 1.32rem);
}

.hero-meta,
.meta-row,
.detail-meta,
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.7rem 1rem;
    color: var(--ice-400);
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem;
    margin-top: 1.6rem;
}

.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0.8rem;
    padding: 0.82rem 1.35rem;
    color: white;
    font-weight: 750;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--frost-600), var(--glacier-500));
    box-shadow: 0 16px 34px rgba(2, 132, 199, 0.25);
}

.btn-ghost {
    border: 1px solid rgba(203, 213, 225, 0.16);
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(10px);
}

.btn-primary:hover,
.btn-ghost:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-frost);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
    color: white;
    font-size: 1.6rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transform: translateY(-50%);
}

.hero-control.prev {
    left: 1.4rem;
}

.hero-control.next {
    right: 1.4rem;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 2rem;
    z-index: 6;
    display: flex;
    gap: 0.55rem;
    transform: translateX(-50%);
}

.hero-dot {
    width: 0.7rem;
    height: 0.7rem;
    border: 0;
    border-radius: 999px;
    background: var(--ice-600);
    cursor: pointer;
    transition: width 0.3s ease, background 0.3s ease;
}

.hero-dot.is-active {
    width: 2.2rem;
    background: var(--frost-500);
}

.page-hero {
    padding: 5rem 0 3rem;
    background:
        radial-gradient(circle at 12% 5%, rgba(56, 189, 248, 0.18), transparent 30rem),
        linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.3));
}

.section {
    padding: 4.4rem 0;
}

.section.alt {
    background: rgba(15, 23, 42, 0.48);
}

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

.section-head h2,
.section-head h1 {
    margin: 0;
    color: white;
    font-size: clamp(1.7rem, 4vw, 2.8rem);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.section-head p {
    max-width: 660px;
    margin: 0.45rem 0 0;
    color: var(--ice-400);
}

.grid {
    display: grid;
    gap: 1.35rem;
}

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

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

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

.card {
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.56);
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.94);
    box-shadow: var(--shadow-ice);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    border-color: rgba(56, 189, 248, 0.36);
    box-shadow: var(--shadow-frost);
    transform: translateY(-4px);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.poster-link img,
.compact-card img,
.rank-cover img,
.detail-cover img,
.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.card:hover .poster-link img,
.compact-card:hover img,
.rank-item:hover img,
.category-card:hover img {
    transform: scale(1.08);
}

.poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.88));
}

.rating,
.category-pill,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: white;
    font-size: 0.78rem;
    font-weight: 800;
}

.rating {
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.28rem 0.58rem;
    background: rgba(2, 6, 23, 0.82);
    color: var(--gold);
    backdrop-filter: blur(8px);
}

.category-pill {
    left: 0.75rem;
    bottom: 0.75rem;
    padding: 0.3rem 0.62rem;
    background: rgba(2, 132, 199, 0.9);
}

.rank-badge {
    left: 0.75rem;
    top: 0.75rem;
    min-width: 2rem;
    padding: 0.25rem 0.5rem;
    text-align: center;
    background: rgba(250, 204, 21, 0.94);
    color: #172033;
}

.card-body {
    padding: 1rem;
}

.card-body h3,
.rank-item h3 {
    margin: 0 0 0.35rem;
    color: white;
    font-size: 1.08rem;
    line-height: 1.35;
}

.card-body a:hover,
.rank-item a:hover,
.compact-card:hover strong {
    color: var(--frost-300);
}

.card-body p,
.rank-item p {
    display: -webkit-box;
    min-height: 3.1rem;
    margin: 0 0 0.8rem;
    overflow: hidden;
    color: var(--ice-400);
    font-size: 0.92rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.compact-card {
    display: grid;
    gap: 0.5rem;
    color: white;
}

.compact-card img {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 0.8rem;
    background: var(--ice-900);
}

.compact-card strong {
    display: -webkit-box;
    overflow: hidden;
    color: var(--ice-100);
    font-size: 0.95rem;
    line-height: 1.35;
    transition: color 0.25s ease;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.category-card {
    position: relative;
    display: grid;
    min-height: 210px;
    overflow: hidden;
    border-radius: 1.15rem;
    background: var(--ice-900);
    box-shadow: var(--shadow-ice);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.9)),
        linear-gradient(135deg, rgba(2, 132, 199, 0.34), transparent 55%);
}

.category-card div {
    position: relative;
    z-index: 2;
    align-self: end;
    padding: 1.2rem;
}

.category-card h2,
.category-card h3 {
    margin: 0;
    color: white;
}

.category-card p {
    margin: 0.35rem 0 0;
    color: var(--ice-300);
}

.tool-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.8rem;
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid rgba(51, 65, 85, 0.56);
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(10px);
}

.search-box {
    flex: 1 1 360px;
}

.search-box input,
.filter-row select {
    width: 100%;
    border: 1px solid rgba(100, 116, 139, 0.4);
    border-radius: 0.8rem;
    background: rgba(2, 6, 23, 0.68);
    color: white;
    outline: none;
}

.search-box input {
    min-height: 48px;
    padding: 0 1rem;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.filter-row label {
    display: grid;
    min-width: 130px;
    gap: 0.2rem;
    color: var(--ice-400);
    font-size: 0.78rem;
}

.filter-row select {
    min-height: 40px;
    padding: 0 0.7rem;
}

.rank-list {
    display: grid;
    gap: 1rem;
}

.rank-item {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 1.2rem;
    align-items: center;
    border: 1px solid rgba(51, 65, 85, 0.56);
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.9);
    padding: 0.8rem;
    box-shadow: var(--shadow-ice);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rank-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-frost);
}

.rank-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 0.8rem;
}

.rank-cover b {
    position: absolute;
    left: 0.6rem;
    top: 0.6rem;
    z-index: 2;
    display: grid;
    min-width: 2.2rem;
    height: 2.2rem;
    place-items: center;
    border-radius: 999px;
    background: var(--gold);
    color: #111827;
}

.detail-hero {
    padding: 3.5rem 0 2rem;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.3));
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 2rem;
    align-items: start;
}

.player-panel,
.detail-info,
.sidebar-card {
    border: 1px solid rgba(51, 65, 85, 0.56);
    border-radius: 1.1rem;
    background: rgba(15, 23, 42, 0.9);
    box-shadow: var(--shadow-ice);
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 1.1rem 1.1rem 0 0;
    background: black;
    aspect-ratio: 16 / 9;
}

.video-shell video {
    width: 100%;
    height: 100%;
    background: black;
    object-fit: contain;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.05), rgba(2, 6, 23, 0.55));
    color: white;
    cursor: pointer;
}

.play-overlay span {
    display: inline-grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 999px;
    background: rgba(2, 132, 199, 0.92);
    font-size: 2.4rem;
    line-height: 1;
    box-shadow: 0 18px 45px rgba(2, 132, 199, 0.35);
}

.play-overlay.is-hidden {
    display: none;
}

.player-copy,
.detail-info,
.sidebar-card {
    padding: 1.3rem;
}

.player-copy h1,
.detail-info h2,
.sidebar-card h2,
.sidebar-card h3 {
    margin: 0 0 0.8rem;
    color: white;
}

.player-copy p,
.detail-info p,
.sidebar-card p {
    color: var(--ice-300);
}

.detail-cover {
    overflow: hidden;
    border-radius: 1rem;
    aspect-ratio: 3 / 4;
    background: var(--ice-900);
}

.info-table {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.info-table div {
    display: grid;
    grid-template-columns: 5rem 1fr;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(51, 65, 85, 0.42);
    padding-bottom: 0.65rem;
}

.info-table dt {
    color: var(--ice-500);
}

.info-table dd {
    margin: 0;
    color: var(--ice-200);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag-list span {
    border-radius: 999px;
    background: rgba(2, 132, 199, 0.16);
    color: var(--frost-300);
    padding: 0.35rem 0.68rem;
    font-size: 0.85rem;
}

.breadcrumbs {
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
}

.breadcrumbs a:hover {
    color: var(--frost-300);
}

.empty-state {
    display: none;
    border: 1px solid rgba(51, 65, 85, 0.56);
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.84);
    padding: 2rem;
    color: var(--ice-300);
    text-align: center;
}

.empty-state.is-visible {
    display: block;
}

.site-footer {
    border-top: 1px solid rgba(51, 65, 85, 0.5);
    background: rgba(2, 6, 23, 0.72);
    padding: 2.5rem 0;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
}

.footer-grid p {
    max-width: 560px;
    margin: 0.65rem 0 0;
    color: var(--ice-400);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.9rem;
}

.footer-links a:hover {
    color: var(--frost-300);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1100px) {
    .grid.cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .grid.compact,
    .grid.categories {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 780px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        left: 1rem;
        right: 1rem;
        top: calc(100% + 0.6rem);
        display: none;
        flex-direction: column;
        align-items: stretch;
        border: 1px solid rgba(51, 65, 85, 0.8);
        border-radius: 1rem;
        background: rgba(15, 23, 42, 0.98);
        padding: 0.8rem;
        box-shadow: var(--shadow-frost);
    }

    .nav-links.is-open {
        display: flex;
    }

    .hero {
        min-height: 680px;
    }

    .hero-content {
        padding-block: 5rem 6rem;
    }

    .hero-control {
        display: none;
    }

    .section-head,
    .tool-panel,
    .footer-grid {
        align-items: stretch;
        flex-direction: column;
    }

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

    .rank-item {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .container {
        width: min(100% - 1rem, 1280px);
    }

    .brand-text small {
        display: none;
    }

    .hero h1,
    .hero h2,
    .page-hero h1 {
        font-size: 2.35rem;
    }

    .grid.cards,
    .grid.compact,
    .grid.categories {
        grid-template-columns: 1fr;
    }

    .detail-cover {
        max-width: 240px;
    }
}
