:root {
    --mist-950: #07111f;
    --mist-900: #0f172a;
    --mist-850: #111c2f;
    --mist-800: #1e293b;
    --mist-700: #334155;
    --mist-600: #475569;
    --mist-500: #64748b;
    --mist-300: #cbd5e1;
    --mist-200: #e2e8f0;
    --mist-100: #f1f5f9;
    --mist-50: #f8fafc;
    --lake-900: #0c4a6e;
    --lake-800: #075985;
    --lake-700: #0369a1;
    --lake-600: #0284c7;
    --lake-500: #0ea5e9;
    --lake-400: #38bdf8;
    --lake-100: #e0f2fe;
    --sepia-100: #f5efe5;
    --sepia-50: #faf8f5;
    --amber-500: #f59e0b;
    --white: #ffffff;
    --shadow-soft: 0 14px 35px rgba(15, 23, 42, 0.08);
    --shadow-elevated: 0 24px 50px rgba(15, 23, 42, 0.16);
    --radius-xl: 22px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --max-width: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--mist-900);
    background: linear-gradient(180deg, var(--sepia-50), #ffffff 460px);
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.96);
    color: var(--white);
    box-shadow: 0 12px 30px rgba(7, 17, 31, 0.2);
    backdrop-filter: blur(14px);
}

.header-inner {
    width: min(var(--max-width), calc(100% - 32px));
    height: 66px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--mist-950);
    font-weight: 900;
    background: linear-gradient(135deg, var(--lake-400), #fef3c7);
    box-shadow: 0 10px 24px rgba(14, 165, 233, 0.34);
}

.brand-text {
    display: grid;
    line-height: 1.2;
}

.brand-text strong {
    font-size: 19px;
    letter-spacing: 0.02em;
}

.brand-text em {
    color: var(--mist-300);
    font-style: normal;
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--mist-200);
    font-size: 14px;
    overflow: hidden;
    white-space: nowrap;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
    transition: color 0.2s ease, opacity 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
    color: var(--lake-400);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--white);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(var(--max-width), calc(100% - 32px));
    margin: 0 auto;
    padding: 6px 0 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--mist-200);
}

.mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
}

.page-main {
    min-height: 70vh;
}

.hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: radial-gradient(circle at 25% 10%, rgba(56, 189, 248, 0.25), transparent 30%), linear-gradient(115deg, var(--mist-900), var(--mist-800) 50%, var(--lake-900));
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.72), rgba(2, 132, 199, 0.18));
    z-index: 1;
}

.hero-track {
    position: relative;
    z-index: 2;
    min-height: 560px;
}

.hero-slide {
    display: none;
    width: min(var(--max-width), calc(100% - 32px));
    margin: 0 auto;
    padding: 70px 0 80px;
    grid-template-columns: 1.02fr 0.98fr;
    gap: 48px;
    align-items: center;
}

.hero-slide.is-active {
    display: grid;
    animation: fadeSlide 0.6s ease both;
}

.hero-copy {
    max-width: 620px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    color: var(--mist-200);
    background: rgba(255, 255, 255, 0.08);
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(36px, 6vw, 62px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.hero h1 span {
    color: var(--lake-400);
}

.hero-copy p {
    margin: 0 0 26px;
    color: var(--mist-200);
    font-size: 18px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 18px;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    color: var(--mist-950);
    background: linear-gradient(135deg, var(--lake-400), #fde68a);
    box-shadow: 0 16px 34px rgba(14, 165, 233, 0.3);
}

.btn-secondary {
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.btn-ghost {
    color: var(--lake-700);
    background: var(--lake-100);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
    transform: translateY(-2px);
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags a,
.hero-tags span {
    padding: 7px 11px;
    border-radius: 999px;
    color: var(--mist-100);
    background: rgba(255, 255, 255, 0.1);
}

.hero-visual {
    position: relative;
}

.hero-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 30px;
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.38);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(245, 158, 11, 0.18));
}

.hero-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-poster img.image-missing,
.poster-wrap img.image-missing,
.media-thumb img.image-missing,
.detail-cover img.image-missing {
    opacity: 0;
}

.hero-poster::after,
.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), transparent 62%);
    pointer-events: none;
}

.hero-floating-card {
    position: absolute;
    right: -16px;
    bottom: -22px;
    width: min(330px, 78%);
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-elevated);
}

.hero-floating-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 18px;
}

.hero-floating-card p {
    margin: 0;
    color: var(--mist-200);
    font-size: 13px;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 11px;
    height: 11px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
}

.hero-dot.is-active {
    width: 32px;
    background: var(--lake-400);
}

.section {
    width: min(var(--max-width), calc(100% - 32px));
    margin: 0 auto;
    padding: 58px 0;
}

.section.alt {
    width: 100%;
    max-width: none;
    padding: 64px 0;
    background: var(--mist-50);
}

.section.alt > .section-inner {
    width: min(var(--max-width), calc(100% - 32px));
    margin: 0 auto;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.section-head h2,
.page-title h1,
.detail-main h1 {
    margin: 0;
    color: var(--mist-900);
    line-height: 1.16;
}

.section-head h2 {
    font-size: clamp(26px, 4vw, 36px);
}

.section-head p,
.page-title p {
    margin: 8px 0 0;
    color: var(--mist-600);
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(14, 165, 233, 0.25);
    box-shadow: var(--shadow-elevated);
}

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, var(--mist-800), var(--lake-800));
}

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease;
}

.movie-card:hover .poster-wrap img {
    transform: scale(1.07);
}

.play-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    border-radius: 999px;
    color: var(--lake-700);
    background: rgba(255, 255, 255, 0.9);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-dot {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-year {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--white);
    font-size: 12px;
    background: rgba(15, 23, 42, 0.7);
}

.movie-card-body {
    padding: 17px;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--mist-500);
    font-size: 12px;
}

.card-meta a {
    color: var(--lake-700);
    font-weight: 700;
}

.movie-card h3,
.media-row h3 {
    margin: 8px 0 7px;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.media-row h3 a:hover,
.detail-related a:hover {
    color: var(--lake-700);
}

.movie-card p {
    min-height: 44px;
    margin: 0;
    color: var(--mist-600);
    font-size: 14px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-row span,
.meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--lake-700);
    background: var(--lake-100);
    font-size: 12px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}

.category-card {
    min-height: 150px;
    padding: 22px;
    border-radius: var(--radius-lg);
    color: var(--white);
    background: linear-gradient(135deg, var(--mist-900), var(--lake-800));
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-elevated);
}

.category-card strong {
    display: block;
    margin-bottom: 10px;
    font-size: 22px;
}

.category-card p {
    margin: 0;
    color: var(--mist-200);
    font-size: 14px;
}

.rank-layout {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 28px;
}

.media-list {
    display: grid;
    gap: 14px;
}

.media-row {
    display: grid;
    grid-template-columns: 132px 1fr;
    gap: 14px;
    padding: 12px;
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: 16px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.media-thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--mist-800), var(--lake-800));
}

.media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-num {
    position: absolute;
    left: 8px;
    top: 8px;
    z-index: 2;
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 10px;
    color: var(--mist-950);
    font-weight: 900;
    background: linear-gradient(135deg, var(--lake-400), #fde68a);
}

.media-row h3 {
    margin-top: 0;
    font-size: 17px;
}

.media-row p {
    margin: 3px 0;
    color: var(--mist-600);
    font-size: 13px;
}

.line-clamp {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.page-hero {
    color: var(--white);
    background: linear-gradient(115deg, var(--mist-900), var(--mist-800) 58%, var(--lake-900));
}

.page-title {
    width: min(var(--max-width), calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0;
}

.page-title h1 {
    color: var(--white);
    font-size: clamp(34px, 5vw, 52px);
}

.page-title p {
    max-width: 760px;
    color: var(--mist-200);
    font-size: 17px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--mist-300);
    font-size: 14px;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 170px 170px;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--mist-200);
    border-radius: 12px;
    padding: 0 13px;
    color: var(--mist-900);
    background: var(--mist-50);
    outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--lake-400);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14);
}

.empty-state {
    display: none;
    padding: 28px;
    text-align: center;
    color: var(--mist-600);
    border-radius: var(--radius-lg);
    background: var(--mist-50);
}

.detail-shell {
    width: min(var(--max-width), calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0 64px;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    margin-bottom: 28px;
    border-radius: 24px;
    background: #000000;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.28);
}

.player-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: var(--white);
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.25));
    cursor: pointer;
}

.player-overlay.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.play-symbol {
    display: grid;
    width: 72px;
    height: 72px;
    place-items: center;
    border-radius: 999px;
    color: var(--lake-700);
    background: rgba(255, 255, 255, 0.92);
    font-size: 28px;
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.26);
}

.detail-main,
.detail-sidebar,
.content-box {
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.detail-main {
    padding: 24px;
}

.detail-main h1 {
    font-size: clamp(30px, 4vw, 44px);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 22px;
}

.detail-main h2,
.content-box h2,
.detail-sidebar h2 {
    margin: 26px 0 10px;
    color: var(--mist-900);
}

.detail-main p {
    color: var(--mist-700);
}

.detail-cover {
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--mist-800), var(--lake-800));
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.detail-sidebar {
    padding: 18px;
}

.detail-related {
    display: grid;
    gap: 13px;
}

.content-box {
    padding: 24px;
    margin-top: 24px;
}

.pagination-links {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 26px;
}

.pagination-links a {
    flex: 1;
    padding: 16px;
    border-radius: 16px;
    color: var(--lake-700);
    background: var(--lake-100);
    font-weight: 700;
}

.pagination-links a:last-child {
    text-align: right;
}

.site-footer {
    color: var(--mist-300);
    background: var(--mist-900);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
    width: min(var(--max-width), calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    color: var(--white);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin-bottom: 18px;
    font-size: 14px;
}

.footer-inner p {
    margin: 0;
    color: var(--mist-500);
    font-size: 13px;
}

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

@media (max-width: 1020px) {
    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero-slide,
    .detail-grid,
    .rank-layout {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 720px) {
    .brand-text strong {
        font-size: 17px;
    }

    .hero-track {
        min-height: auto;
    }

    .hero-slide {
        padding: 44px 0 76px;
        gap: 28px;
    }

    .hero-floating-card {
        position: static;
        width: 100%;
        margin-top: 14px;
    }

    .section,
    .section.alt {
        padding: 42px 0;
    }

    .section-head {
        align-items: start;
        flex-direction: column;
    }

    .movie-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .movie-card-body {
        padding: 13px;
    }

    .filter-bar {
        grid-template-columns: 1fr;
    }

    .media-row {
        grid-template-columns: 112px 1fr;
    }

    .detail-main,
    .content-box {
        padding: 18px;
    }
}

@media (max-width: 460px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .media-row {
        grid-template-columns: 1fr;
    }

    .pagination-links {
        flex-direction: column;
    }

    .pagination-links a:last-child {
        text-align: left;
    }
}
