:root {
    --teal-900: #0f3f3e;
    --teal-700: #0f766e;
    --teal-600: #0d9488;
    --cyan-600: #0891b2;
    --cyan-500: #06b6d4;
    --amber-300: #fcd34d;
    --amber-500: #f59e0b;
    --slate-950: #07111f;
    --slate-900: #111827;
    --slate-800: #1f2937;
    --slate-700: #334155;
    --slate-500: #64748b;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --white: #ffffff;
    --shadow-soft: 0 16px 40px rgba(15, 23, 42, 0.14);
    --shadow-card: 0 10px 28px rgba(15, 23, 42, 0.11);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--slate-800);
    background: linear-gradient(180deg, #ecfeff 0%, #f8fafc 30%, #ffffff 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: linear-gradient(90deg, var(--teal-600), var(--cyan-600));
    box-shadow: 0 8px 26px rgba(8, 145, 178, 0.22);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1180px, calc(100% - 32px));
    min-height: 68px;
    margin: 0 auto;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    color: var(--teal-900);
    background: linear-gradient(135deg, var(--amber-300), #fff7ad);
    border-radius: 999px;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.55);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav > a,
.nav-dropdown > a {
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease;
}

.main-nav > a:hover,
.nav-dropdown:hover > a {
    color: var(--amber-300);
    background: rgba(255, 255, 255, 0.12);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    display: grid;
    min-width: 178px;
    padding: 10px;
    color: var(--slate-800);
    background: rgba(255, 255, 255, 0.96);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.nav-dropdown-menu a {
    padding: 9px 12px;
    border-radius: 12px;
    font-weight: 700;
}

.nav-dropdown-menu a:hover {
    color: var(--teal-700);
    background: #ecfeff;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.12);
    border: 0;
    border-radius: 12px;
}

.nav-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--white);
    border-radius: 99px;
}

.page-main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 56px;
}

.hero-carousel {
    position: relative;
    min-height: 540px;
    margin: 24px 0 44px;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(135deg, var(--teal-900), var(--cyan-600));
    border-radius: 32px;
    box-shadow: var(--shadow-soft);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.75fr);
    gap: 32px;
    align-items: center;
    padding: 54px;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(7, 17, 31, 0.9), rgba(15, 118, 110, 0.56)), var(--hero-image);
    background-position: center;
    background-size: cover;
    filter: saturate(1.06);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(252, 211, 77, 0.24), transparent 28%), radial-gradient(circle at 78% 80%, rgba(6, 182, 212, 0.36), transparent 34%);
}

.hero-slide.is-active {
    position: relative;
    opacity: 1;
    transform: scale(1);
}

.hero-copy,
.hero-poster {
    position: relative;
    z-index: 2;
}

.hero-copy h1,
.hero-copy h2 {
    max-width: 760px;
    margin: 12px 0 16px;
    font-size: clamp(36px, 7vw, 68px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero-copy p {
    max-width: 660px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hero-meta span,
.pill,
.tag-row span {
    display: inline-flex;
    align-items: center;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.hero-meta span {
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

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

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: var(--slate-900);
    background: linear-gradient(135deg, var(--amber-300), #fff3a1);
    box-shadow: 0 14px 30px rgba(245, 158, 11, 0.28);
}

.btn-ghost {
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-poster {
    justify-self: end;
    width: min(330px, 100%);
    overflow: hidden;
    border: 7px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    box-shadow: 0 28px 72px rgba(0, 0, 0, 0.32);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.hero-dots {
    position: absolute;
    right: 42px;
    bottom: 32px;
    z-index: 4;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 8px;
    padding: 0;
    background: rgba(255, 255, 255, 0.34);
    border: 0;
    border-radius: 999px;
}

.hero-dot.is-active {
    background: var(--amber-300);
}

.content-section,
.detail-section,
.category-panel,
.search-panel {
    margin: 28px 0;
    padding: 26px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(8, 145, 178, 0.09);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
}

.section-heading,
.list-heading {
    display: flex;
    gap: 18px;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 20px;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--teal-700);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-heading h2,
.list-heading h1,
.detail-title h1,
.category-panel h1,
.search-panel h1 {
    margin: 0;
    color: var(--slate-900);
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.15;
}

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

.movie-card {
    overflow: hidden;
    background: var(--white);
    border: 1px solid rgba(15, 118, 110, 0.1);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.15);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #ccfbf1, #ecfeff);
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.24s ease;
}

.movie-card:hover .poster-link img {
    transform: scale(1.05);
}

.poster-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: var(--slate-900);
    background: var(--amber-300);
    border-radius: 999px;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
}

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

.movie-meta {
    color: var(--slate-500);
    font-size: 13px;
    font-weight: 800;
}

.movie-card h3 {
    margin: 8px 0 8px;
    color: var(--slate-900);
    font-size: 20px;
    line-height: 1.25;
}

.movie-card p {
    display: -webkit-box;
    min-height: 46px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--slate-500);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-row span {
    color: var(--teal-700);
    background: #f0fdfa;
}

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

.category-card {
    display: block;
    min-height: 170px;
    padding: 22px;
    color: var(--white);
    background: linear-gradient(135deg, var(--teal-600), var(--cyan-500));
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    font-size: 26px;
}

.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
}

.filter-bar {
    position: relative;
    width: min(440px, 100%);
}

.filter-bar input,
.search-box input {
    width: 100%;
    min-height: 48px;
    padding: 0 18px;
    color: var(--slate-800);
    background: var(--white);
    border: 1px solid rgba(15, 118, 110, 0.16);
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    outline: none;
}

.filter-bar input:focus,
.search-box input:focus {
    border-color: var(--cyan-500);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.13);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 20px;
    color: var(--slate-500);
    font-weight: 700;
}

.breadcrumb a {
    color: var(--teal-700);
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    gap: 28px;
    align-items: start;
}

.detail-poster {
    overflow: hidden;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.detail-title h1 {
    margin-bottom: 12px;
}

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

.pill {
    color: var(--teal-700);
    background: #ccfbf1;
}

.detail-copy h2 {
    margin: 24px 0 10px;
    color: var(--slate-900);
    font-size: 24px;
}

.detail-copy p {
    color: var(--slate-700);
    font-size: 17px;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    margin-top: 24px;
    background: #020617;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.78), rgba(13, 148, 136, 0.35));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-button {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    color: var(--slate-900);
    background: linear-gradient(135deg, var(--amber-300), #fff0a5);
    border: 0;
    border-radius: 999px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
    font-size: 32px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 58px 72px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    background: var(--white);
    border: 1px solid rgba(15, 118, 110, 0.09);
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: var(--slate-900);
    background: #fef3c7;
    border-radius: 16px;
    font-size: 20px;
    font-weight: 900;
}

.rank-item img {
    width: 72px;
    height: 96px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-item h3 {
    margin: 0 0 4px;
    font-size: 20px;
}

.rank-item p {
    margin: 0;
    color: var(--slate-500);
}

.search-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin-top: 18px;
}

.search-results {
    margin-top: 24px;
}

.empty-state {
    padding: 28px;
    text-align: center;
    color: var(--slate-500);
    background: var(--slate-50);
    border-radius: var(--radius-lg);
}

.site-footer {
    color: rgba(255, 255, 255, 0.82);
    background: linear-gradient(180deg, var(--slate-800), var(--slate-950));
}

.footer-shell {
    display: flex;
    gap: 28px;
    align-items: center;
    justify-content: space-between;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 38px 0 22px;
}

.footer-shell p {
    max-width: 560px;
    margin: 8px 0 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-weight: 800;
}

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

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 26px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 14px;
}

@media (max-width: 980px) {
    .hero-slide,
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .hero-slide {
        padding: 36px;
    }

    .hero-poster {
        justify-self: start;
        width: 220px;
    }

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

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

    .main-nav {
        position: absolute;
        top: 68px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        background: rgba(15, 118, 110, 0.98);
        border-radius: 18px;
        box-shadow: var(--shadow-soft);
    }

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

    .nav-dropdown-menu {
        position: static;
        display: grid;
        margin-top: 6px;
        opacity: 1;
        pointer-events: auto;
        transform: none;
    }

    .hero-carousel {
        min-height: 680px;
        border-radius: 22px;
    }

    .hero-copy h1,
    .hero-copy h2 {
        font-size: 38px;
    }

    .hero-dots {
        left: 32px;
        right: auto;
    }

    .section-heading,
    .list-heading,
    .footer-shell {
        align-items: stretch;
        flex-direction: column;
    }

    .movie-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 44px 62px minmax(0, 1fr);
    }

    .rank-item .btn {
        grid-column: 1 / -1;
    }

    .search-box {
        grid-template-columns: 1fr;
    }
}
