:root {
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --emerald-50: #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --emerald-700: #047857;
    --teal-50: #f0fdfa;
    --blue-50: #eff6ff;
    --cyan-50: #ecfeff;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.10);
    --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--slate-50);
    color: var(--slate-800);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.94);
    color: var(--white);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(16px);
}

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

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

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--emerald-400), var(--emerald-700));
    color: #052e2b;
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(16, 185, 129, 0.28);
}

.brand-title {
    display: block;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand-subtitle {
    display: block;
    color: var(--slate-300);
    font-size: 12px;
    line-height: 1.2;
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--slate-200);
    font-size: 15px;
}

.primary-nav a {
    padding: 10px 0;
    transition: color 0.2s ease;
}

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

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
}

.hero-carousel {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(135deg, #1e293b 0%, #334155 48%, #065f46 100%);
}

.hero-slide {
    display: none;
    min-height: 560px;
    padding: 80px 0;
    background-image: linear-gradient(120deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.74) 42%, rgba(6, 78, 59, 0.55)), var(--poster-image);
    background-position: center;
    background-size: cover;
}

.hero-slide.is-active {
    display: block;
    animation: fadeIn 0.45s ease both;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.72fr);
    align-items: center;
    gap: 48px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.16);
    color: #a7f3d0;
    font-size: 14px;
    font-weight: 700;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0 0 20px;
    font-size: clamp(38px, 5vw, 60px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero-copy p {
    max-width: 700px;
    margin: 0 0 28px;
    color: #dbeafe;
    font-size: clamp(17px, 2vw, 21px);
}

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

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

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

.btn-primary {
    background: var(--emerald-600);
    color: var(--white);
    box-shadow: 0 14px 30px rgba(5, 150, 105, 0.34);
}

.btn-primary:hover {
    background: var(--emerald-700);
}

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

.btn-light {
    background: var(--white);
    color: var(--slate-800);
    box-shadow: var(--shadow-sm);
}

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

.hero-tags span,
.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.11);
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
    font-weight: 700;
}

.hero-panel {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    backdrop-filter: blur(18px);
}

.hero-poster {
    min-height: 390px;
    background-image: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.78)), var(--poster-image);
    background-position: center;
    background-size: cover;
}

.hero-panel-body {
    padding: 22px;
}

.hero-panel-body strong {
    display: block;
    margin-bottom: 8px;
    font-size: 21px;
}

.hero-panel-body p {
    margin: 0;
    color: var(--slate-200);
}

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

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

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

.section {
    padding: 56px 0;
}

.section-tight {
    padding: 34px 0;
}

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

.section-title {
    margin: 0 0 6px;
    color: var(--slate-800);
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-desc {
    margin: 0;
    color: var(--slate-600);
}

.link-more {
    color: var(--emerald-600);
    font-weight: 800;
    white-space: nowrap;
}

.feature-band {
    border-radius: 28px;
    background: linear-gradient(135deg, var(--emerald-50), var(--teal-50));
    padding: 34px;
}

.blue-band {
    background: linear-gradient(135deg, var(--blue-50), var(--cyan-50));
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--slate-200);
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    border-color: rgba(16, 185, 129, 0.45);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.poster-card {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background-image: linear-gradient(160deg, rgba(15, 23, 42, 0.10), rgba(15, 23, 42, 0.84)), var(--poster-image);
    background-position: center;
    background-size: cover;
}

.poster-card::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.82));
}

.poster-badge,
.poster-type {
    position: absolute;
    z-index: 2;
    top: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.poster-badge {
    left: 12px;
}

.poster-type {
    right: 12px;
    background: rgba(5, 150, 105, 0.82);
}

.rank-badge {
    position: absolute;
    z-index: 3;
    left: 12px;
    bottom: 12px;
    display: inline-grid;
    place-items: center;
    min-width: 38px;
    height: 38px;
    border-radius: 14px;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    color: #111827;
    font-weight: 900;
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.28);
}

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

.movie-title {
    display: block;
    margin-bottom: 8px;
    color: var(--slate-800);
    font-size: 17px;
    font-weight: 900;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.movie-title:hover {
    color: var(--emerald-600);
}

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

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 12px;
    color: var(--slate-500);
    font-size: 13px;
}

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

.tag-row span {
    border-radius: 999px;
    padding: 5px 9px;
    background: var(--slate-100);
    color: var(--slate-600);
    font-size: 12px;
    font-weight: 700;
}

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

.category-card {
    display: flex;
    min-height: 168px;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--slate-200);
    border-radius: 24px;
    background: var(--white);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card h2,
.category-card h3 {
    margin: 0 0 8px;
    color: var(--slate-800);
    font-size: 22px;
    font-weight: 900;
}

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

.search-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px;
    gap: 14px;
    margin: 0 0 28px;
    border: 1px solid var(--slate-200);
    border-radius: 22px;
    background: var(--white);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.search-panel input,
.search-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--slate-200);
    border-radius: 14px;
    background: var(--slate-50);
    color: var(--slate-800);
    padding: 0 14px;
    outline: none;
}

.search-panel input:focus,
.search-panel select:focus {
    border-color: var(--emerald-500);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.page-hero {
    background: linear-gradient(135deg, var(--slate-800), var(--slate-700) 50%, #065f46);
    color: var(--white);
    padding: 64px 0;
}

.page-hero h1 {
    max-width: 900px;
    margin: 0 0 14px;
    font-size: clamp(34px, 4.2vw, 54px);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: var(--slate-200);
    font-size: 18px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 28px 0;
    color: var(--slate-600);
    font-size: 14px;
}

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

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

.player-panel {
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow-lg);
}

.player-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-frame video {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    background-image: linear-gradient(160deg, rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.92)), var(--poster-image);
    background-position: center;
    background-size: cover;
    color: var(--white);
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
    display: inline-grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    background: var(--emerald-600);
    color: var(--white);
    font-size: 34px;
    box-shadow: 0 20px 46px rgba(5, 150, 105, 0.38);
    transform: translateZ(0);
}

.cover-title {
    max-width: min(680px, calc(100% - 44px));
    text-align: center;
    font-size: clamp(22px, 4vw, 38px);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.detail-card,
.sidebar-card {
    border: 1px solid var(--slate-200);
    border-radius: 24px;
    background: var(--white);
    padding: 26px;
    box-shadow: var(--shadow-sm);
}

.detail-card {
    margin-top: 24px;
}

.detail-card h1 {
    margin: 0 0 16px;
    color: var(--slate-800);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.16;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.detail-card h2,
.sidebar-card h2,
.sidebar-card h3 {
    margin: 0 0 16px;
    color: var(--slate-800);
    font-size: 23px;
    font-weight: 900;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin: 0 0 24px;
    color: var(--slate-600);
}

.detail-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 11px;
    background: var(--slate-100);
    font-size: 14px;
    font-weight: 700;
}

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

.detail-section p {
    margin: 0;
    color: var(--slate-700);
    font-size: 16px;
}

.sidebar-card {
    position: sticky;
    top: 96px;
}

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

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

.side-poster {
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    background-image: linear-gradient(150deg, rgba(15, 23, 42, 0.20), rgba(15, 23, 42, 0.82)), var(--poster-image);
    background-position: center;
    background-size: cover;
}

.side-title {
    display: block;
    color: var(--slate-800);
    font-weight: 900;
    line-height: 1.35;
}

.side-link:hover .side-title {
    color: var(--emerald-600);
}

.side-meta {
    display: block;
    margin-top: 4px;
    color: var(--slate-500);
    font-size: 13px;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 32px;
    padding: 44px 0;
}

.site-footer h2,
.site-footer h3 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 18px;
    font-weight: 900;
}

.site-footer p,
.site-footer li {
    margin: 0;
    color: var(--slate-300);
    font-size: 14px;
}

.site-footer ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 0;
    color: var(--slate-500);
    font-size: 13px;
}

.empty-state {
    display: none;
    border: 1px dashed var(--slate-300);
    border-radius: 22px;
    background: var(--white);
    padding: 30px;
    color: var(--slate-600);
    text-align: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(1.01);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 1024px) {
    .movie-grid,
    .movie-grid.small-grid,
    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .hero-panel {
        max-width: 520px;
    }

    .sidebar-card {
        position: static;
    }
}

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

    .header-inner {
        min-height: 66px;
    }

    .brand-title {
        font-size: 18px;
    }

    .primary-nav {
        position: absolute;
        top: 66px;
        right: 12px;
        left: 12px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        border: 1px solid rgba(255, 255, 255, 0.10);
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.98);
        padding: 10px;
    }

    .primary-nav a {
        padding: 12px 14px;
    }

    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    body.nav-open .primary-nav {
        display: flex;
    }

    .hero-slide {
        min-height: 640px;
        padding: 54px 0 78px;
    }

    .hero-grid {
        gap: 28px;
    }

    .hero-poster {
        min-height: 260px;
    }

    .section {
        padding: 40px 0;
    }

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

    .feature-band {
        padding: 22px;
        border-radius: 22px;
    }

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

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

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

    .page-hero {
        padding: 44px 0;
    }

    .detail-card,
    .sidebar-card {
        padding: 20px;
        border-radius: 20px;
    }

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

@media (max-width: 480px) {
    .brand-subtitle {
        display: none;
    }

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

    .side-link {
        grid-template-columns: 96px minmax(0, 1fr);
    }
}
