
:root {
    --primary-50: #f0f9ff;
    --primary-100: #e0f2fe;
    --primary-400: #38bdf8;
    --primary-600: #0284c7;
    --primary-700: #0369a1;
    --accent-50: #fef3c7;
    --accent-100: #fde68a;
    --accent-400: #fbbf24;
    --accent-700: #92400e;
    --secondary-50: #f8fafc;
    --secondary-100: #f1f5f9;
    --secondary-200: #e2e8f0;
    --secondary-300: #cbd5e1;
    --secondary-400: #94a3b8;
    --secondary-500: #64748b;
    --secondary-600: #475569;
    --secondary-700: #334155;
    --secondary-800: #1e293b;
    --secondary-900: #0f172a;
    --radius-lg: 14px;
    --radius-xl: 22px;
    --shadow-md: 0 10px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 22px 55px rgba(15, 23, 42, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--secondary-900);
    background: var(--secondary-50);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--secondary-200);
    backdrop-filter: blur(18px);
}

.site-header__inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--secondary-900);
    white-space: nowrap;
}

.logo__mark,
.footer-logo span {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: white;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.28);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.desktop-nav a {
    padding: 10px 14px;
    color: var(--secondary-700);
    border-radius: 11px;
    transition: 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active {
    color: var(--primary-700);
    background: var(--primary-50);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.header-search input,
.filter-bar input,
.filter-bar select,
.search-panel input,
.search-panel select {
    border: 1px solid var(--secondary-300);
    border-radius: 12px;
    padding: 11px 13px;
    background: white;
    color: var(--secondary-800);
    outline: none;
}

.header-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus,
.search-panel input:focus,
.search-panel select:focus {
    border-color: var(--primary-600);
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12);
}

.header-search button,
.btn,
.player-overlay {
    border: 0;
    cursor: pointer;
    border-radius: 12px;
    padding: 11px 18px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.btn-primary {
    color: white;
    background: var(--primary-600);
    box-shadow: 0 10px 22px rgba(2, 132, 199, 0.2);
}

.header-search button:hover,
.btn-primary:hover {
    background: var(--primary-700);
    transform: translateY(-1px);
}

.btn-ghost {
    color: white;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: var(--secondary-100);
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--secondary-800);
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 14px;
    background: white;
    border: 1px solid var(--secondary-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.mobile-panel.is-open {
    display: grid;
    gap: 10px;
}

.hero {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: var(--secondary-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s 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__shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.28), transparent 32%),
        linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.12));
}

.hero-slide__content {
    position: relative;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding-bottom: 80px;
    color: white;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--accent-400);
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 820px;
    margin: 0 0 18px;
    font-size: clamp(40px, 7vw, 72px);
    line-height: 1.05;
    font-weight: 900;
}

.hero p {
    max-width: 700px;
    margin: 0 0 24px;
    color: var(--secondary-200);
    font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.detail-tags,
.genre-pills,
.movie-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.detail-tags span,
.genre-pills span {
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: white;
    backdrop-filter: blur(8px);
}

.detail-tags span,
.genre-pills span {
    color: var(--primary-700);
    background: var(--primary-50);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.hero-dots button {
    width: 34px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
}

.hero-dots button.is-active {
    background: white;
}

.section {
    padding: 72px 0;
}

.section--soft {
    background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
}

.section--dark {
    color: white;
    background: var(--secondary-900);
}

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

.section-head h2,
.ranking-split h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.15;
}

.section-head p,
.ranking-split p {
    margin: 8px 0 0;
    color: var(--secondary-600);
}

.section--dark .section-head p,
.section--dark .ranking-split p {
    color: var(--secondary-300);
}

.section-more {
    color: var(--primary-700);
    font-weight: 800;
}

.movie-grid {
    display: grid;
    gap: 24px;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: white;
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-card__cover {
    position: relative;
    aspect-ratio: 16 / 9;
    display: block;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(2, 132, 199, 0.75), rgba(15, 23, 42, 0.92));
}

.movie-card__cover img,
.detail-poster,
.category-tile__covers img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-card:hover .movie-card__cover img {
    transform: scale(1.08);
}

.movie-card__badge,
.movie-card__play {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.movie-card__badge {
    top: 12px;
    left: 12px;
    padding: 5px 9px;
    color: var(--primary-700);
    background: white;
}

.movie-card__play {
    right: 12px;
    bottom: 12px;
    padding: 7px 12px;
    color: white;
    background: rgba(2, 132, 199, 0.9);
}

.movie-card__body {
    padding: 18px;
}

.movie-card__title {
    display: block;
    margin-bottom: 8px;
    color: var(--secondary-900);
    font-size: 18px;
    font-weight: 850;
    line-height: 1.35;
}

.movie-card__body p {
    min-height: 50px;
    margin: 0 0 12px;
    color: var(--secondary-600);
    font-size: 14px;
}

.movie-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--secondary-500);
    font-size: 13px;
}

.movie-card__tags {
    margin-top: 12px;
}

.movie-card__tags span {
    padding: 4px 7px;
    border-radius: 8px;
    color: var(--secondary-600);
    background: var(--secondary-100);
    font-size: 12px;
}

.ranking-split {
    display: grid;
    grid-template-columns: 0.9fr 1.4fr;
    gap: 40px;
    align-items: center;
}

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

.rank-row,
.ranking-table__row {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    transition: 0.2s ease;
}

.rank-row:hover,
.ranking-table__row:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateX(4px);
}

.rank-row__num {
    color: var(--accent-400);
    font-weight: 900;
}

.rank-row__score {
    color: var(--secondary-300);
    font-size: 13px;
}

.page-hero {
    padding: 58px 0;
    color: white;
    background:
        radial-gradient(circle at 12% 10%, rgba(56, 189, 248, 0.32), transparent 30%),
        linear-gradient(135deg, var(--secondary-900), var(--secondary-800));
}

.page-hero--compact {
    padding: 76px 0;
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(34px, 6vw, 58px);
}

.page-hero p {
    max-width: 820px;
    margin: 12px 0 0;
    color: var(--secondary-200);
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--secondary-300);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--primary-400);
}

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

.category-tile {
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: white;
    box-shadow: var(--shadow-md);
}

.category-tile__covers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    height: 150px;
    background: var(--secondary-900);
}

.category-tile__body {
    padding: 22px;
}

.category-tile h2 {
    margin: 0 0 8px;
}

.category-tile p {
    margin: 0 0 14px;
    color: var(--secondary-600);
}

.category-tile span {
    color: var(--primary-700);
    font-weight: 800;
}

.filter-bar,
.search-panel {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 28px;
    padding: 16px;
    border: 1px solid var(--secondary-200);
    border-radius: var(--radius-lg);
    background: white;
    box-shadow: var(--shadow-md);
}

.filter-bar span,
.search-summary {
    color: var(--secondary-600);
    font-weight: 700;
}

.search-panel {
    grid-template-columns: 1fr 180px 180px;
}

.search-summary {
    margin-bottom: 24px;
}

.ranking-table {
    display: grid;
    gap: 8px;
}

.ranking-table__row {
    grid-template-columns: 70px 1fr 140px 90px 100px;
    color: var(--secondary-900);
    background: white;
    border: 1px solid var(--secondary-200);
}

.ranking-table__row:hover {
    color: var(--primary-700);
    background: var(--primary-50);
}

.ranking-table__row em {
    color: var(--secondary-500);
    font-style: normal;
}

.detail-wrap {
    padding: 34px 0 70px;
}

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

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: black;
    box-shadow: var(--shadow-lg);
}

.movie-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: black;
}

.player-overlay {
    position: absolute;
    left: 50%;
    top: 50%;
    color: white;
    background: rgba(2, 132, 199, 0.92);
    transform: translate(-50%, -50%);
}

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

.detail-main h1 {
    margin: 26px 0 12px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.15;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
    color: var(--secondary-600);
}

.detail-section {
    margin-top: 30px;
    padding: 24px;
    border: 1px solid var(--secondary-200);
    border-radius: var(--radius-lg);
    background: white;
    box-shadow: var(--shadow-md);
}

.detail-section h2,
.side-box h2 {
    margin: 0 0 12px;
}

.detail-section p {
    margin: 0;
    color: var(--secondary-700);
    white-space: pre-line;
}

.detail-side {
    position: sticky;
    top: 96px;
}

.detail-poster {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, var(--primary-600), var(--secondary-900));
    box-shadow: var(--shadow-lg);
}

.side-box {
    margin-top: 18px;
    padding: 22px;
    border-radius: var(--radius-xl);
    background: white;
    box-shadow: var(--shadow-md);
}

.side-box dl {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 10px;
    margin: 0 0 18px;
}

.side-box dt {
    color: var(--secondary-500);
}

.side-box dd {
    margin: 0;
    font-weight: 700;
}

.site-footer {
    color: var(--secondary-400);
    background: var(--secondary-900);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 30px;
    padding: 46px 0;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: white;
    font-size: 22px;
    font-weight: 900;
}

.site-footer h3 {
    margin: 0 0 12px;
    color: white;
}

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

.site-footer li {
    margin-bottom: 8px;
}

.site-footer a:hover {
    color: var(--primary-400);
}

.footer-bottom {
    padding: 18px;
    border-top: 1px solid var(--secondary-800);
    text-align: center;
}

.image-fallback {
    opacity: 0;
}

.no-results {
    grid-column: 1 / -1;
    padding: 28px;
    border-radius: var(--radius-lg);
    background: white;
    color: var(--secondary-600);
    text-align: center;
}

@media (max-width: 980px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .movie-grid--four,
    .movie-grid--three,
    .category-grid,
    .ranking-split,
    .detail-grid,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .detail-side {
        position: static;
    }

    .ranking-table__row {
        grid-template-columns: 54px 1fr;
    }

    .ranking-table__row em,
    .ranking-table__row span:nth-child(4),
    .ranking-table__row span:nth-child(5) {
        display: none;
    }
}

@media (max-width: 640px) {
    .site-header__inner {
        min-height: 64px;
    }

    .hero,
    .hero-slide__content {
        min-height: 76vh;
    }

    .hero-slide__content {
        padding-bottom: 64px;
    }

    .section {
        padding: 46px 0;
    }

    .section-head,
    .filter-bar,
    .search-panel {
        display: grid;
        grid-template-columns: 1fr;
    }

    .movie-grid--four,
    .movie-grid--three,
    .category-grid,
    .ranking-split,
    .detail-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 45px 1fr;
    }

    .rank-row__score {
        grid-column: 2;
    }
}
