:root {
    --bg: #0f172a;
    --bg-soft: #111827;
    --panel: #ffffff;
    --panel-soft: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #10b981;
    --brand-dark: #059669;
    --brand-soft: rgba(16, 185, 129, 0.14);
    --gold: #f59e0b;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 48%, #f8fafc 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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: #ffffff;
    background: linear-gradient(90deg, #1e293b 0%, #334155 50%, #1e293b 100%);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.26);
}

.nav-wrap {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

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

.brand-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #052e2b;
    background: linear-gradient(135deg, #6ee7b7, #10b981);
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.35);
}

.brand-text strong,
.brand-text em {
    display: block;
    font-style: normal;
}

.brand-text strong {
    font-size: 21px;
    letter-spacing: 0.03em;
}

.brand-text em {
    margin-top: 1px;
    color: #cbd5e1;
    font-size: 12px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-weight: 600;
}

.site-nav a,
.nav-drop > span {
    color: #f8fafc;
    transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active,
.nav-drop:hover > span {
    color: #6ee7b7;
}

.nav-drop {
    position: relative;
    padding: 24px 0;
}

.nav-drop-menu {
    position: absolute;
    right: 0;
    top: 68px;
    width: 190px;
    display: none;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
}

.nav-drop:hover .nav-drop-menu {
    display: grid;
    gap: 8px;
}

.nav-drop-menu a {
    padding: 9px 10px;
    border-radius: 12px;
}

.nav-drop-menu a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.mobile-toggle {
    display: none;
    border: 0;
    border-radius: 12px;
    padding: 9px 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.hero {
    position: relative;
    min-height: 78vh;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-bg img,
.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08);
}

.hero-bg::after,
.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 28%, rgba(16, 185, 129, 0.32), transparent 28%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.78) 42%, rgba(15, 23, 42, 0.22) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.08));
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 78vh;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
    align-items: center;
    gap: 56px;
    padding: 92px 0 76px;
}

.hero-label,
.section-kicker,
.page-hero > span,
.rank-head span,
.search-panel span {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #a7f3d0;
    background: rgba(16, 185, 129, 0.14);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero-copy h1 {
    max-width: 780px;
    margin: 0 0 22px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 700px;
    margin: 0;
    color: #dbeafe;
    font-size: 18px;
}

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

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

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    color: #065f46;
    background: #d1fae5;
}

.hero-tags span {
    color: #ecfdf5;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
}

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

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

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

.btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 16px 32px rgba(16, 185, 129, 0.32);
}

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

.hero-poster {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 32px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.hero-poster::before {
    content: "";
    display: block;
    padding-top: 135%;
}

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

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

.hero-controls button {
    width: 34px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
}

.hero-controls button.is-active {
    background: #6ee7b7;
}

.page-main {
    padding-bottom: 60px;
}

.content-section,
.category-preview,
.split-section,
.search-panel,
.filter-bar,
.overview-grid,
.detail-grid,
.player-section {
    margin-top: 42px;
}

.search-panel,
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.search-panel h2 {
    margin: 0;
    font-size: 24px;
}

.search-box {
    flex: 1;
    min-width: min(420px, 100%);
}

.search-box input,
.filter-bar select {
    width: 100%;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0 16px;
    color: var(--text);
    background: #ffffff;
    outline: none;
}

.search-box input:focus,
.filter-bar select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-soft);
}

.filter-bar select {
    max-width: 180px;
}

.filter-count {
    color: var(--muted);
    font-weight: 800;
    white-space: nowrap;
}

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

.section-head h2,
.rank-head h2,
.page-hero h1,
.detail-copy h1,
.detail-article h2,
.detail-side h2 {
    margin: 0;
    color: #0f172a;
    line-height: 1.12;
}

.section-head h2 {
    font-size: clamp(26px, 4vw, 42px);
}

.section-head p {
    max-width: 720px;
    margin: 8px 0 0;
    color: var(--muted);
}

.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    color: var(--brand-dark);
    background: var(--brand-soft);
    font-weight: 800;
    white-space: nowrap;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 14px 34px 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 22px 46px rgba(15, 23, 42, 0.14);
}

.movie-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #064e3b);
}

.movie-cover::before {
    content: "";
    display: block;
    padding-top: 138%;
}

.movie-card-compact .movie-cover::before {
    padding-top: 132%;
}

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

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

.play-badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(16, 185, 129, 0.92);
    font-size: 12px;
    font-weight: 800;
}

.movie-info {
    padding: 15px;
}

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

.movie-info h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.28;
}

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

.movie-info h3 a:hover {
    color: var(--brand-dark);
}

.movie-info p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 50px;
    margin: 8px 0 12px;
    color: var(--muted);
    font-size: 14px;
}

.movie-card-compact .movie-info p {
    min-height: auto;
    font-size: 13px;
}

.tag-row span {
    color: #047857;
    background: #ecfdf5;
}

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

.rank-panel {
    padding: 22px;
    border-radius: var(--radius);
    color: #ffffff;
    background: linear-gradient(160deg, #0f172a, #1e293b 56%, #064e3b);
    box-shadow: var(--shadow);
}

.sticky-panel {
    position: sticky;
    top: 100px;
}

.rank-head h2 {
    color: #ffffff;
    font-size: 30px;
}

.rank-list {
    display: grid;
    gap: 12px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.rank-item a {
    display: grid;
    grid-template-columns: 42px 54px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.2s ease;
}

.rank-item a:hover {
    background: rgba(255, 255, 255, 0.15);
}

.rank-no {
    color: #6ee7b7;
    font-size: 20px;
    font-weight: 900;
}

.rank-item img {
    width: 54px;
    height: 70px;
    border-radius: 12px;
    object-fit: cover;
    background: #0f172a;
}

.rank-info {
    min-width: 0;
}

.rank-info strong,
.rank-info em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-info em {
    color: #cbd5e1;
    font-size: 12px;
    font-style: normal;
}

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

.category-card,
.overview-card {
    min-height: 180px;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.category-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    background:
        radial-gradient(circle at 88% 12%, rgba(16, 185, 129, 0.2), transparent 34%),
        #ffffff;
}

.category-card span {
    color: var(--brand-dark);
    font-weight: 900;
}

.category-card strong {
    font-size: 34px;
    line-height: 1;
}

.category-card em {
    color: var(--muted);
    font-style: normal;
}

.page-hero {
    margin-top: 34px;
    padding: 44px;
    border-radius: 32px;
    color: #ffffff;
    background:
        radial-gradient(circle at 84% 24%, rgba(16, 185, 129, 0.36), transparent 30%),
        linear-gradient(135deg, #0f172a 0%, #1e293b 52%, #064e3b 100%);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    color: #ffffff;
    font-size: clamp(34px, 5vw, 58px);
}

.page-hero p {
    max-width: 820px;
    margin: 14px 0 0;
    color: #dbeafe;
    font-size: 17px;
}

.page-hero a {
    color: #a7f3d0;
}

.crumb {
    margin-top: 16px;
    color: #cbd5e1;
    font-size: 14px;
}

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

.overview-covers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 8px;
    background: #0f172a;
}

.overview-covers img {
    aspect-ratio: 3 / 4;
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
    background: #1e293b;
}

.overview-info {
    padding: 20px;
}

.overview-info span {
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 900;
}

.overview-info h2 {
    margin: 4px 0 8px;
}

.overview-info p {
    margin: 0;
    color: var(--muted);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

.detail-bg {
    position: absolute;
    inset: 0;
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 36px;
    align-items: end;
    min-height: 560px;
    padding: 76px 0 58px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: #0f172a;
}

.detail-copy h1 {
    max-width: 900px;
    color: #ffffff;
    font-size: clamp(38px, 6vw, 70px);
}

.detail-line {
    max-width: 860px;
    margin: 16px 0 20px;
    color: #e2e8f0;
    font-size: 18px;
}

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

.detail-tags {
    margin-bottom: 24px;
}

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

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

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background:
        radial-gradient(circle at 50% 40%, rgba(16, 185, 129, 0.38), transparent 25%),
        rgba(2, 6, 23, 0.62);
    cursor: pointer;
}

.player-start span {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #064e3b;
    background: #a7f3d0;
    font-size: 26px;
    box-shadow: 0 18px 46px rgba(16, 185, 129, 0.38);
}

.player-start strong {
    font-size: 22px;
}

.player-start em {
    color: #cbd5e1;
    font-style: normal;
}

.player-shell.is-playing .player-start {
    display: none;
}

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

.detail-article,
.detail-side {
    padding: 28px;
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.detail-article h2,
.detail-side h2 {
    margin: 0 0 12px;
    font-size: 26px;
}

.detail-article p {
    margin: 0 0 24px;
    color: #334155;
    font-size: 16px;
}

.info-table {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.info-table div {
    padding: 13px 14px;
    border-radius: 16px;
    background: var(--panel-soft);
}

.info-table dt {
    color: var(--muted);
    font-size: 12px;
}

.info-table dd {
    margin: 2px 0 0;
    font-weight: 800;
}

.info-table a {
    color: var(--brand-dark);
}

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

.side-card-list .movie-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
}

.side-card-list .movie-cover::before {
    padding-top: 136%;
}

.site-footer {
    margin-top: 58px;
    padding: 36px 0;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 28px;
}

.site-footer strong,
.site-footer span {
    display: block;
    margin-bottom: 8px;
    color: #ffffff;
    font-size: 18px;
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    color: #a7f3d0;
}

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

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

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

    .split-section,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .sticky-panel {
        position: static;
    }
}

@media (max-width: 820px) {
    .mobile-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 82px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 14px;
        border-radius: 20px;
        background: rgba(15, 23, 42, 0.98);
        box-shadow: var(--shadow);
    }

    .site-nav.is-open {
        display: flex;
    }

    .nav-drop {
        padding: 0;
    }

    .nav-drop-menu {
        position: static;
        display: grid;
        width: auto;
        margin-top: 8px;
        background: rgba(255, 255, 255, 0.08);
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 28px;
        min-height: auto;
        padding-top: 74px;
    }

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

    .search-panel,
    .filter-bar,
    .section-head,
    .footer-grid {
        align-items: stretch;
        flex-direction: column;
        grid-template-columns: 1fr;
    }

    .filter-bar select {
        max-width: none;
    }

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

    .page-hero {
        padding: 30px;
    }

    .detail-hero-inner {
        grid-template-columns: 1fr;
        min-height: auto;
        padding-top: 54px;
    }

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

    .info-table {
        grid-template-columns: 1fr;
    }
}

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

    .brand-text strong {
        font-size: 17px;
    }

    .brand-text em {
        display: none;
    }

    .hero-copy h1,
    .detail-copy h1 {
        font-size: 36px;
    }

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

    .side-card-list .movie-card {
        grid-template-columns: 82px minmax(0, 1fr);
    }
}
