:root {
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --amber-600: #d97706;
    --amber-500: #f59e0b;
    --amber-400: #fbbf24;
    --orange-50: #fff7ed;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
    --soft-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background: #f8fafc;
    color: var(--slate-800);
}

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

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

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: linear-gradient(90deg, var(--slate-800), var(--slate-700), var(--slate-800));
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.2);
}

.header-inner {
    min-height: 66px;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--slate-900);
    background: var(--amber-400);
    font-weight: 800;
    box-shadow: 0 0 0 6px rgba(251, 191, 36, 0.12);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-copy strong {
    font-size: 20px;
}

.brand-copy em {
    margin-top: 3px;
    color: var(--slate-300);
    font-size: 12px;
    font-style: normal;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    font-size: 15px;
}

.main-nav a {
    color: var(--slate-200);
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--amber-400);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 270px;
    padding: 8px;
    border-radius: 999px;
    background: rgba(71, 85, 105, 0.95);
}

.header-search input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--white);
    background: transparent;
}

.header-search input::placeholder {
    color: var(--slate-300);
}

.header-search button,
.primary-button,
.secondary-button,
.watch-button {
    border: 0;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button {
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--slate-900);
    background: var(--amber-400);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: var(--white);
    background: transparent;
    font-size: 26px;
}

.hero {
    overflow: hidden;
    position: relative;
    color: var(--white);
    background:
        radial-gradient(circle at 12% 10%, rgba(251, 191, 36, 0.25), transparent 28%),
        radial-gradient(circle at 85% 18%, rgba(245, 158, 11, 0.2), transparent 26%),
        linear-gradient(135deg, #172033 0%, #334155 48%, #78350f 100%);
}

.hero-inner {
    min-height: 560px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 44px;
    align-items: center;
    padding: 66px 0;
}

.hero-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 5vw, 62px);
    line-height: 1.08;
    letter-spacing: -1px;
}

.hero-copy p {
    max-width: 650px;
    margin: 0 0 26px;
    color: var(--slate-200);
    font-size: 18px;
    line-height: 1.85;
}

.hero-meta,
.detail-meta,
.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-meta span,
.detail-meta span,
.movie-meta span,
.movie-tags span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: inherit;
    padding: 6px 11px;
    font-size: 13px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.primary-button,
.secondary-button,
.watch-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: var(--radius-sm);
}

.primary-button,
.watch-button {
    color: var(--white);
    background: var(--amber-500);
    box-shadow: 0 14px 24px rgba(245, 158, 11, 0.28);
}

.primary-button:hover,
.watch-button:hover {
    background: var(--amber-600);
    transform: translateY(-1px);
}

.secondary-button {
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
}

.secondary-button:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
}

.hero-card {
    position: relative;
    overflow: hidden;
    min-height: 420px;
    border-radius: 22px;
    box-shadow: 0 28px 70px rgba(2, 6, 23, 0.42);
    transform: translateZ(0);
}

.hero-card img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hero-card:hover img {
    transform: scale(1.05);
}

.hero-card::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 58%);
}

.hero-card-info {
    position: absolute;
    z-index: 2;
    left: 24px;
    right: 24px;
    bottom: 24px;
}

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

.hero-rail {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.compact-card {
    overflow: hidden;
    position: relative;
    min-height: 108px;
    border-radius: var(--radius-md);
    background: var(--slate-800);
    box-shadow: var(--soft-shadow);
}

.compact-card img {
    width: 100%;
    height: 108px;
    object-fit: cover;
    opacity: 0.72;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.compact-card span {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 10px;
    z-index: 2;
    color: var(--white);
    font-size: 13px;
    font-weight: 700;
}

.compact-card:hover img {
    opacity: 0.95;
    transform: scale(1.06);
}

.section {
    padding: 56px 0;
}

.section-muted {
    background: var(--slate-100);
}

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

.section-heading h2,
.section-heading h1 {
    margin: 0;
    color: var(--slate-800);
    font-size: clamp(26px, 3vw, 34px);
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--slate-500);
    line-height: 1.7;
}

.more-link {
    color: var(--amber-600);
    font-weight: 700;
}

.feature-box {
    padding: 28px;
    border-radius: 22px;
    background: linear-gradient(90deg, #fffbeb, var(--orange-50));
    box-shadow: var(--soft-shadow);
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-card.is-hidden,
.ranking-item.is-hidden {
    display: none;
}

.movie-cover {
    position: relative;
    overflow: hidden;
    display: block;
    background: var(--slate-800);
}

.movie-cover img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .movie-cover img {
    transform: scale(1.06);
}

.movie-year {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(2, 6, 23, 0.72);
    font-size: 12px;
    font-weight: 700;
}

.play-mark {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    background: rgba(2, 6, 23, 0.24);
    font-size: 40px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .play-mark {
    opacity: 1;
}

.movie-body {
    padding: 16px;
}

.movie-body h3 {
    min-height: 46px;
    margin: 0 0 8px;
    color: var(--slate-800);
    font-size: 17px;
    line-height: 1.35;
}

.movie-body h3 a:hover {
    color: var(--amber-600);
}

.movie-body p {
    min-height: 44px;
    margin: 0 0 12px;
    color: var(--slate-500);
    line-height: 1.55;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta span,
.movie-tags span,
.tag-list span {
    color: var(--slate-600);
    background: var(--slate-100);
}

.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

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

.category-card {
    display: block;
    min-height: 170px;
    padding: 24px;
    border-radius: 22px;
    color: var(--white);
    background: linear-gradient(135deg, var(--slate-800), var(--slate-700) 58%, #92400e);
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card h2 {
    margin: 0 0 12px;
    color: var(--white);
    font-size: 24px;
}

.category-card p {
    margin: 0;
    color: var(--slate-200);
    line-height: 1.7;
}

.filter-panel {
    margin-bottom: 26px;
    padding: 20px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.filter-panel label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: var(--slate-500);
    font-size: 13px;
    font-weight: 700;
}

.filter-keyword {
    margin-bottom: 14px;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    padding: 0 12px;
    color: var(--slate-800);
    background: var(--white);
    outline: 0;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--amber-500);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.ranking-list {
    display: grid;
    gap: 12px;
}

.ranking-item {
    display: grid;
    grid-template-columns: 58px 74px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 12px;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07);
}

.ranking-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-500), #ea580c);
    font-weight: 800;
}

.ranking-item img {
    width: 74px;
    height: 96px;
    border-radius: 10px;
    object-fit: cover;
}

.ranking-item h2,
.ranking-item h3 {
    margin: 0 0 7px;
    font-size: 18px;
}

.ranking-item p {
    margin: 0;
    color: var(--slate-500);
    line-height: 1.6;
}

.ranking-link {
    color: var(--amber-600);
    font-weight: 800;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 28px auto 18px;
    color: var(--slate-500);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--amber-600);
}

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

.detail-panel,
.side-panel {
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.detail-panel {
    overflow: hidden;
}

.player-wrap {
    position: relative;
    background: var(--slate-950);
}

.video-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--slate-950);
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    color: var(--white);
    background: rgba(2, 6, 23, 0.38);
    transition: opacity 0.25s ease;
}

.player-overlay img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
}

.player-overlay span {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border-radius: 999px;
    color: var(--slate-900);
    background: var(--amber-400);
    font-size: 34px;
    font-weight: 900;
    box-shadow: 0 0 0 15px rgba(251, 191, 36, 0.18);
}

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

.detail-content {
    padding: 30px;
}

.detail-content h1 {
    margin: 0 0 14px;
    color: var(--slate-800);
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.18;
}

.detail-content h2,
.side-panel h2 {
    margin: 28px 0 12px;
    color: var(--slate-800);
    font-size: 23px;
}

.detail-content p {
    color: var(--slate-600);
    font-size: 16px;
    line-height: 1.9;
}

.detail-meta {
    margin-bottom: 18px;
}

.detail-meta span {
    color: var(--slate-700);
    background: var(--slate-100);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 0;
}

.side-panel {
    padding: 20px;
}

.related-list {
    display: grid;
    gap: 12px;
}

.related-item {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    align-items: center;
}

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

.related-item strong {
    display: block;
    margin-bottom: 6px;
    color: var(--slate-800);
}

.related-item span {
    color: var(--slate-500);
    font-size: 13px;
}

.site-footer {
    margin-top: 0;
    color: var(--slate-300);
    background: var(--slate-900);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr 1fr 1fr;
    gap: 28px;
    padding: 46px 0;
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 17px;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
    color: var(--slate-300);
    line-height: 1.75;
    font-size: 14px;
}

.footer-grid ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-grid li + li {
    margin-top: 8px;
}

.footer-grid a:hover {
    color: var(--amber-400);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0 26px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.footer-bottom p {
    margin: 0;
}

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

    .main-nav.is-open {
        position: absolute;
        top: 66px;
        left: 0;
        right: 0;
        display: grid;
        gap: 0;
        padding: 12px 24px 20px;
        background: var(--slate-800);
        box-shadow: 0 16px 28px rgba(2, 6, 23, 0.25);
    }

    .main-nav.is-open a {
        padding: 12px 0;
        border-bottom: 1px solid rgba(203, 213, 225, 0.14);
    }

    .menu-toggle {
        display: block;
    }

    .header-search {
        width: 230px;
    }

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

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

@media (max-width: 720px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .header-inner {
        flex-wrap: wrap;
        padding: 10px 0;
    }

    .brand-copy strong {
        font-size: 18px;
    }

    .header-search {
        order: 3;
        width: 100%;
    }

    .hero-inner {
        min-height: auto;
        padding: 42px 0;
    }

    .hero-copy p {
        font-size: 16px;
    }

    .hero-card,
    .hero-card img {
        min-height: 320px;
        height: 320px;
    }

    .hero-rail,
    .movie-grid,
    .movie-grid.three,
    .category-grid,
    .filter-row,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 38px 0;
    }

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

    .ranking-item {
        grid-template-columns: 42px 62px 1fr;
    }

    .ranking-link {
        grid-column: 3;
    }

    .detail-content,
    .feature-box {
        padding: 22px;
    }

    .footer-bottom {
        flex-direction: column;
    }
}
