:root {
    --emerald: #059669;
    --emerald-dark: #047857;
    --teal: #0d9488;
    --cyan: #0891b2;
    --rose: #e11d48;
    --amber: #d97706;
    --blue: #2563eb;
    --slate: #0f172a;
    --slate-soft: #1e293b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--gray-900);
    background: linear-gradient(180deg, var(--gray-50), var(--white));
    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;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
}

.navbar {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    color: var(--white);
    box-shadow: 0 10px 24px rgba(5, 150, 105, 0.28);
}

.logo-short {
    display: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    color: var(--gray-700);
    font-weight: 700;
    font-size: 14px;
}

.nav-links a:hover,
.nav-links a.is-active {
    color: var(--emerald);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 270px;
}

.nav-search input,
.inline-search input,
.filter-bar input {
    width: 100%;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    padding: 10px 16px;
    outline: none;
    background: var(--white);
    color: var(--gray-900);
}

.nav-search input:focus,
.inline-search input:focus,
.filter-bar input:focus {
    border-color: var(--emerald);
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.nav-search button,
.primary-button,
.secondary-button,
.filter-button,
.back-top {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.nav-search button,
.primary-button,
.back-top {
    background: var(--emerald);
    color: var(--white);
    box-shadow: 0 12px 24px rgba(5, 150, 105, 0.24);
}

.nav-search button:hover,
.primary-button:hover,
.back-top:hover {
    background: var(--emerald-dark);
    transform: translateY(-1px);
}

.secondary-button {
    background: rgba(255, 255, 255, 0.18);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.32);
}

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

.menu-button {
    display: none;
    border: 0;
    color: var(--gray-700);
    background: transparent;
    font-size: 26px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--gray-200);
    padding: 16px 0 20px;
}

.mobile-panel.is-open {
    display: block;
}

.mobile-panel a {
    display: block;
    padding: 10px 0;
    color: var(--gray-700);
    font-weight: 700;
}

.hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.18), transparent 26%), linear-gradient(135deg, var(--emerald), var(--teal) 52%, var(--cyan));
    padding: 78px 0 108px;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.22));
}

.hero-inner {
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(14px);
    font-weight: 800;
    font-size: 14px;
    margin-bottom: 22px;
}

.hero-slider {
    position: relative;
}

.hero-slide {
    display: none;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    align-items: center;
    gap: 42px;
}

.hero-slide.is-active {
    display: grid;
}

.hero-title {
    font-size: clamp(38px, 6vw, 70px);
    line-height: 1.02;
    margin: 0 0 20px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-desc {
    font-size: clamp(17px, 2vw, 23px);
    color: #ecfeff;
    max-width: 760px;
    margin: 0 0 26px;
}

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

.hero-tags {
    margin-bottom: 28px;
}

.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.18);
    color: var(--white);
    font-size: 13px;
    font-weight: 800;
}

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

.hero-poster {
    position: relative;
    aspect-ratio: 16 / 10;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 34px 70px rgba(15, 23, 42, 0.38);
    transform: rotate(1.5deg);
    background: rgba(255, 255, 255, 0.18);
}

.hero-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent 48%);
}

.poster-caption {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 20px;
    z-index: 1;
}

.poster-caption strong {
    display: block;
    font-size: 22px;
    margin-bottom: 4px;
}

.poster-caption span {
    color: #d1fae5;
    font-weight: 700;
}

.hero-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 34px;
}

.hero-control,
.hero-dot {
    border: 0;
    cursor: pointer;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
}

.hero-control {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    font-size: 22px;
}

.hero-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border-radius: 999px;
    opacity: 0.6;
}

.hero-dot.is-active {
    width: 30px;
    opacity: 1;
}

.featured-lift {
    position: relative;
    z-index: 2;
    margin-top: -58px;
    margin-bottom: 72px;
}

.featured-card {
    display: grid;
    grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1fr);
    overflow: hidden;
    border-radius: 26px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.featured-card .featured-image {
    min-height: 320px;
    background: var(--gray-100);
}

.featured-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-copy {
    padding: clamp(26px, 4vw, 52px);
}

.featured-copy h2 {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.1;
}

.featured-copy p {
    color: var(--gray-600);
    margin: 0 0 18px;
}

.section {
    padding: 56px 0;
}

.section-soft {
    background: linear-gradient(135deg, #eff6ff, #ecfeff, #f0fdfa);
}

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

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
}

.section-title span {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--white);
    background: linear-gradient(135deg, var(--rose), var(--amber));
    font-size: 18px;
}

.section-line {
    height: 4px;
    flex: 1;
    min-width: 80px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--emerald), transparent);
}

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

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 18px;
    background: var(--white);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16);
}

.movie-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #ecfeff, #f0fdf4);
}

.movie-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.movie-badge,
.score-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 999px;
    padding: 5px 9px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(12px);
    font-size: 12px;
    font-weight: 900;
}

.rank-badge {
    left: 12px;
    right: auto;
    background: var(--rose);
}

.movie-body {
    padding: 15px;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
}

.movie-body h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.35;
}

.movie-body p {
    margin: 0;
    color: var(--gray-600);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--gray-500);
    font-size: 12px;
    font-weight: 800;
}

.tag {
    border-radius: 999px;
    padding: 5px 9px;
    color: var(--emerald-dark);
    background: #d1fae5;
    font-size: 12px;
    font-weight: 800;
}

.card-link {
    margin-top: auto;
    color: var(--emerald);
    font-weight: 900;
    font-size: 14px;
}

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

.category-card {
    display: block;
    min-height: 188px;
    padding: 24px;
    border-radius: 22px;
    color: var(--white);
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: var(--shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:nth-child(2n) {
    background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.category-card:nth-child(3n) {
    background: linear-gradient(135deg, var(--rose), var(--amber));
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.18);
}

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

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

.page-hero {
    color: var(--white);
    background: linear-gradient(135deg, var(--slate), var(--slate-soft) 45%, var(--emerald));
    padding: 70px 0;
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.1;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: #d1fae5;
    font-size: 19px;
}

.filter-bar {
    margin: 34px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.filter-bar input {
    max-width: 360px;
}

.filter-button {
    background: var(--white);
    color: var(--gray-700);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.filter-button:hover,
.filter-button.is-active {
    color: var(--white);
    background: var(--emerald);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    border-radius: 20px;
    background: var(--white);
    padding: 14px;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.rank-row img {
    width: 110px;
    height: 72px;
    object-fit: cover;
    border-radius: 14px;
    background: var(--gray-100);
}

.rank-row h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.rank-row p {
    margin: 0;
    color: var(--gray-600);
}

.rank-score {
    color: var(--rose);
    font-size: 24px;
    font-weight: 900;
}

.breadcrumb {
    margin: 24px 0;
    color: var(--gray-600);
    font-weight: 700;
    font-size: 14px;
}

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

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

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

.detail-content {
    padding: clamp(22px, 4vw, 34px);
}

.detail-content h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.12;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--gray-600);
    margin-bottom: 20px;
    font-weight: 800;
}

.detail-tags {
    margin: 18px 0 24px;
}

.detail-tags .tag:nth-child(2n) {
    color: #1d4ed8;
    background: #dbeafe;
}

.detail-section {
    margin-top: 26px;
}

.detail-section h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.detail-section p {
    color: var(--gray-700);
    margin: 0;
}

.player-shell {
    position: relative;
    background: #000000;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.player-shell video {
    width: 100%;
    height: 100%;
    background: #000000;
    cursor: pointer;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    z-index: 2;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.48);
}

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

.play-button {
    position: relative;
    z-index: 3;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    border: 0;
    color: var(--white);
    background: rgba(5, 150, 105, 0.94);
    box-shadow: 0 24px 52px rgba(0, 0, 0, 0.35);
    font-size: 32px;
    cursor: pointer;
}

.side-card {
    padding: 22px;
    border-bottom: 1px solid var(--gray-200);
}

.side-card:last-child {
    border-bottom: 0;
}

.side-card h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

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

.side-item {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.side-item img {
    width: 88px;
    height: 58px;
    object-fit: cover;
    border-radius: 12px;
    background: var(--gray-100);
}

.side-item h3 {
    margin: 0 0 4px;
    font-size: 15px;
    line-height: 1.35;
}

.side-item span {
    color: var(--gray-500);
    font-size: 12px;
    font-weight: 800;
}

.empty-state {
    display: none;
    padding: 32px;
    border-radius: 18px;
    background: var(--white);
    color: var(--gray-600);
    text-align: center;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.site-footer {
    margin-top: 78px;
    color: var(--white);
    background: linear-gradient(135deg, var(--slate), var(--slate-soft), var(--slate));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 28px;
    padding: 42px 0;
}

.site-footer h2,
.site-footer h3 {
    margin: 0 0 14px;
}

.site-footer p,
.site-footer a,
.site-footer li {
    color: #cbd5e1;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 18px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: #cbd5e1;
}

@media (max-width: 1040px) {
    .nav-links,
    .nav-search {
        display: none;
    }

    .menu-button {
        display: block;
    }

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

    .hero-poster {
        transform: none;
    }

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

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

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

    .logo-long {
        display: none;
    }

    .logo-short {
        display: inline;
    }

    .hero {
        padding: 54px 0 88px;
    }

    .hero-actions,
    .filter-bar,
    .footer-bottom {
        align-items: stretch;
        flex-direction: column;
    }

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

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

    .rank-row {
        grid-template-columns: 88px minmax(0, 1fr);
    }

    .rank-row img {
        width: 88px;
        height: 62px;
    }

    .rank-score {
        grid-column: 2;
        font-size: 18px;
    }

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

    .section-line {
        width: 100%;
        min-width: 0;
        flex: none;
    }
}
