:root {
    --emerald: #059669;
    --emerald-dark: #047857;
    --teal: #0f766e;
    --cyan: #0891b2;
    --rose: #f43f5e;
    --yellow: #f59e0b;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-500: #64748b;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --white: #ffffff;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--gray-900);
    background: var(--gray-50);
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    color: var(--white);
    background: linear-gradient(90deg, var(--emerald), var(--teal), var(--cyan));
    box-shadow: 0 12px 28px rgba(4, 120, 87, 0.25);
}

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

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--emerald);
    background: var(--white);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    font-weight: 650;
}

.nav-link {
    opacity: 0.92;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ccfbf1;
    opacity: 1;
}

.header-search {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 285px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.14);
}

.header-search input,
.mobile-panel input,
.search-page-form input,
.filter-box input {
    width: 100%;
    border: 0;
    outline: none;
    color: var(--gray-900);
    background: transparent;
}

.header-search input {
    padding: 11px 88px 11px 18px;
}

.header-search button,
.search-page-form button,
.mobile-panel button {
    border: 0;
    color: var(--white);
    background: var(--emerald);
    cursor: pointer;
}

.header-search button {
    position: absolute;
    right: 4px;
    top: 4px;
    bottom: 4px;
    padding: 0 16px;
    border-radius: 999px;
}

.menu-toggle {
    display: none;
    border: 0;
    color: var(--white);
    background: transparent;
    font-size: 28px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.mobile-panel a {
    display: block;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.mobile-panel form {
    display: flex;
    overflow: hidden;
    margin-top: 12px;
    border-radius: 14px;
    background: var(--white);
}

.mobile-panel input {
    padding: 12px 14px;
}

.mobile-panel button {
    padding: 0 18px;
}

.hero-carousel {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: var(--gray-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.8s ease, transform 1s ease;
    background-image: linear-gradient(120deg, rgba(4, 120, 87, 0.94), rgba(8, 145, 178, 0.76)), var(--hero-bg);
    background-position: center;
    background-size: cover;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.18), transparent 28%),
        linear-gradient(0deg, rgba(15, 23, 42, 0.34), transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    gap: 56px;
    align-items: center;
    padding: 82px 0;
    color: var(--white);
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-copy h1 {
    max-width: 820px;
    font-size: clamp(42px, 7vw, 82px);
}

.hero-copy p {
    max-width: 720px;
    margin: 24px 0 0;
    color: #ecfeff;
    font-size: clamp(18px, 2.1vw, 24px);
    line-height: 1.72;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #ccfbf1;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.section-kicker {
    color: var(--emerald);
}

.hero-tags,
.tag-row,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-tags {
    margin-top: 24px;
}

.hero-tags span,
.tag-cloud a,
.tag-row span {
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    padding: 8px 13px;
    color: #ecfeff;
    background: rgba(255, 255, 255, 0.17);
    backdrop-filter: blur(12px);
}

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

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

.primary-btn {
    color: var(--white);
    background: linear-gradient(90deg, var(--emerald), var(--teal));
    box-shadow: 0 14px 26px rgba(5, 150, 105, 0.28);
}

.hero-actions .primary-btn {
    color: var(--emerald-dark);
    background: var(--white);
}

.ghost-btn {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover,
.category-card:hover,
.home-category:hover {
    transform: translateY(-3px);
}

.primary-btn.full {
    width: 100%;
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 32px 80px rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(14px);
}

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

.hero-poster span {
    position: absolute;
    right: 18px;
    bottom: 18px;
    padding: 8px 13px;
    border-radius: 999px;
    color: var(--white);
    font-weight: 800;
    background: rgba(5, 150, 105, 0.92);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 34px;
    background: var(--white);
}

.section {
    padding: 72px 0;
}

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

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

.section-head.centered {
    justify-content: center;
    text-align: center;
}

.section-head h2 {
    margin: 0;
    font-size: clamp(28px, 3.2vw, 42px);
    line-height: 1.1;
}

.section-head.light {
    color: var(--white);
}

.text-link {
    color: var(--emerald);
    font-weight: 800;
}

.text-link.cyan {
    color: #67e8f9;
}

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

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--soft-shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    box-shadow: var(--shadow);
}

.movie-link {
    display: block;
    height: 100%;
}

.poster-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 11;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
}

.compact .poster-wrap {
    aspect-ratio: 3 / 4;
}

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.quality,
.rank-badge {
    position: absolute;
    z-index: 2;
    color: var(--white);
    font-weight: 800;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.18);
}

.quality {
    right: 12px;
    top: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    background: rgba(5, 150, 105, 0.92);
}

.rank-badge {
    left: 12px;
    top: 12px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--yellow), #f97316);
}

.movie-body {
    padding: 18px;
}

.movie-body h3 {
    margin: 0 0 8px;
    font-size: 19px;
    line-height: 1.32;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.compact .movie-body h3 {
    font-size: 16px;
}

.meta-line {
    margin: 0 0 10px;
    color: var(--gray-500);
    font-size: 13px;
}

.movie-desc {
    margin: 0 0 14px;
    color: var(--gray-700);
    line-height: 1.65;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row span {
    padding: 5px 9px;
    color: var(--emerald-dark);
    background: #d1fae5;
}

.dark-rank {
    padding: 72px 0;
    color: var(--white);
    background:
        radial-gradient(circle at top left, rgba(8, 145, 178, 0.34), transparent 30%),
        linear-gradient(135deg, var(--gray-900), #111827);
}

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

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

.horizontal-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.2s ease, transform 0.2s ease;
}

.slim-list .horizontal-item,
.related-panel .horizontal-item {
    color: var(--gray-900);
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.horizontal-item:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.16);
}

.slim-list .horizontal-item:hover,
.related-panel .horizontal-item:hover {
    background: #ecfeff;
}

.horizontal-item img {
    width: 74px;
    height: 74px;
    flex: 0 0 74px;
    border-radius: 14px;
    object-fit: cover;
}

.horizontal-item strong {
    display: block;
    margin-bottom: 5px;
    font-size: 15px;
    line-height: 1.35;
}

.horizontal-item em {
    display: block;
    color: var(--gray-500);
    font-size: 12px;
    font-style: normal;
}

.dark-rank .horizontal-item em {
    color: #cbd5e1;
}

.list-rank {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--white);
    font-size: 13px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--yellow), #f97316);
}

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

.home-category {
    min-height: 138px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border-radius: 22px;
    color: var(--white);
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    box-shadow: var(--soft-shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.home-category strong {
    font-size: 22px;
}

.home-category span {
    margin-top: 16px;
    color: #ecfeff;
    line-height: 1.58;
}

.page-hero {
    padding: 74px 0;
    color: var(--white);
    background:
        radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.22), transparent 26%),
        linear-gradient(135deg, var(--emerald), var(--teal), var(--cyan));
}

.compact-hero {
    padding: 64px 0;
}

.page-hero h1 {
    margin-bottom: 16px;
    font-size: clamp(38px, 5vw, 60px);
}

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: #ecfeff;
    font-size: 18px;
    line-height: 1.75;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
}

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

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

.category-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--soft-shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
    box-shadow: var(--shadow);
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    height: 150px;
    background: var(--gray-200);
}

.category-covers img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-content {
    padding: 22px;
}

.category-content h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.category-content p {
    margin: 0 0 16px;
    color: var(--gray-700);
    line-height: 1.65;
}

.category-samples {
    display: grid;
    gap: 8px;
}

.category-samples a {
    color: var(--emerald-dark);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-box {
    max-width: 720px;
    margin-top: 24px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.18);
}

.filter-box input {
    padding: 18px 20px;
}

.detail-top {
    padding: 42px 0 56px;
    color: var(--white);
    background:
        radial-gradient(circle at 80% 8%, rgba(255, 255, 255, 0.16), transparent 28%),
        linear-gradient(135deg, var(--emerald), var(--teal), var(--gray-900));
}

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

.detail-poster {
    display: grid;
    gap: 18px;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.32);
}

.detail-info h1 {
    max-width: 850px;
    font-size: clamp(36px, 5vw, 64px);
}

.lead-text {
    max-width: 860px;
    margin: 22px 0;
    color: #ecfeff;
    font-size: 19px;
    line-height: 1.85;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-width: 780px;
    margin: 22px 0;
}

.detail-meta span {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(12px);
}

.tag-cloud a {
    padding: 8px 13px;
    color: #ccfbf1;
    background: rgba(255, 255, 255, 0.14);
}

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

.main-detail,
.related-panel {
    min-width: 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: var(--white);
    background: radial-gradient(circle, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.58));
    cursor: pointer;
}

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

.play-icon {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--emerald-dark);
    font-size: 34px;
    background: var(--white);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.34);
}

.detail-block {
    margin-top: 26px;
    padding: 30px;
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.detail-block h2,
.related-panel h2 {
    margin: 0 0 16px;
    font-size: 24px;
}

.detail-block p {
    margin: 0;
    color: var(--gray-700);
    line-height: 1.9;
    font-size: 16px;
}

.review-block {
    background: linear-gradient(135deg, #ecfeff, #f0fdfa);
}

.related-panel {
    position: sticky;
    top: 92px;
    padding: 24px;
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.search-page-form {
    display: flex;
    max-width: 760px;
    margin-top: 26px;
    overflow: hidden;
    border-radius: 20px;
    background: var(--white);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
}

.search-page-form input {
    padding: 18px 22px;
}

.search-page-form button {
    padding: 0 28px;
}

.search-status {
    margin-bottom: 22px;
    color: var(--gray-700);
    font-size: 18px;
    font-weight: 800;
}

.site-footer {
    color: #cbd5e1;
    background: var(--gray-900);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 34px;
    padding: 52px 0;
}

.footer-logo {
    margin-bottom: 14px;
    color: var(--white);
    font-size: 20px;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: var(--white);
}

.site-footer p {
    margin: 0;
    color: #94a3b8;
    line-height: 1.75;
}

.site-footer a {
    display: block;
    margin: 8px 0;
    color: #cbd5e1;
}

.site-footer a:hover {
    color: #67e8f9;
}

.footer-bottom {
    padding: 20px 0;
    text-align: center;
    color: #94a3b8;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.is-filter-hidden {
    display: none !important;
}

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

    .menu-toggle {
        display: inline-flex;
    }

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

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

    .hero-content {
        padding: 64px 0 82px;
    }

    .hero-poster {
        max-width: 360px;
    }

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

    .related-panel {
        position: static;
    }
}

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

    .logo span:last-child {
        max-width: 160px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

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

    .hero-content {
        gap: 28px;
    }

    .hero-poster img {
        height: 330px;
    }

    .hero-actions,
    .section-head,
    .search-page-form {
        align-items: stretch;
        flex-direction: column;
    }

    .movie-grid,
    .category-grid,
    .compact-grid,
    .category-movie-grid,
    .ranking-grid,
    .category-quick-grid,
    .rank-list,
    .detail-meta {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 50px 0;
    }

    .detail-poster {
        max-width: 280px;
    }

    .play-icon {
        width: 62px;
        height: 62px;
        font-size: 28px;
    }
}
