:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --text: #1f2937;
    --muted: #64748b;
    --line: #e2e8f0;
    --dark: #0f172a;
    --dark-soft: #1e293b;
    --emerald: #059669;
    --emerald-soft: #d1fae5;
    --teal: #0d9488;
    --orange: #f97316;
    --shadow: 0 20px 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;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    color: var(--text);
    line-height: 1.6;
    -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: 80;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96));
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    backdrop-filter: blur(14px);
}

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

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 10px 25px rgba(5, 150, 105, 0.35);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-copy strong {
    font-size: 20px;
    letter-spacing: 0.02em;
}

.brand-copy em {
    color: #94a3b8;
    font-size: 12px;
    font-style: normal;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link {
    color: #cbd5e1;
    padding: 9px 14px;
    border-radius: 999px;
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.hero-slider {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: var(--dark);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.55s ease, visibility 0.55s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(16, 185, 129, 0.38), transparent 30%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.05));
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(680px, 100%);
    color: #ffffff;
}

.hero-tags,
.detail-tags,
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.detail-tags span,
.filter-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 13px;
    font-size: 13px;
    font-weight: 700;
}

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

.hero-tags span:first-child {
    background: var(--emerald);
}

.hero-copy h1,
.hero-copy h2 {
    margin: 18px 0;
    font-size: clamp(38px, 6vw, 66px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-copy p {
    max-width: 720px;
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1.8;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 12px;
    border: 1px solid transparent;
    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, var(--emerald), var(--teal));
    box-shadow: 0 15px 30px rgba(5, 150, 105, 0.28);
}

.btn.glass {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(10px);
}

.btn.outline {
    color: var(--emerald);
    border-color: rgba(5, 150, 105, 0.35);
    background: #ffffff;
}

.btn.full {
    width: 100%;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    font-size: 36px;
    line-height: 1;
    transform: translateY(-50%);
}

.hero-arrow.prev {
    left: 24px;
}

.hero-arrow.next {
    right: 24px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.active {
    width: 34px;
    background: #ffffff;
}

.page-stack {
    display: grid;
    gap: 48px;
    padding: 56px 0;
}

.section-block,
.filter-panel,
.rank-panel,
.rank-full,
.detail-card,
.player-card,
.poster-card,
.side-panel,
.category-overview-card,
.link-cloud {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.section-block,
.category-overview-card,
.link-cloud {
    padding: 28px;
}

.section-heading,
.category-overview-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.section-heading.compact {
    align-items: center;
}

.section-heading span,
.panel-heading span,
.category-overview-head span,
.page-hero span {
    display: inline-block;
    color: var(--emerald);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.section-heading h2,
.panel-heading h2,
.category-overview-head h2,
.link-cloud h2 {
    margin: 4px 0 0;
    color: var(--text);
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.2;
    font-weight: 900;
}

.section-heading a {
    color: var(--emerald);
    font-weight: 800;
}

.featured-grid,
.movie-grid,
.category-grid {
    display: grid;
    gap: 22px;
}

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

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

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

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

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

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

.movie-card {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(5, 150, 105, 0.35);
    box-shadow: 0 24px 44px rgba(15, 23, 42, 0.16);
}

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

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

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

.card-cover::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 54%;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.68));
}

.cover-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    max-width: calc(100% - 24px);
    padding: 5px 9px;
    border-radius: 8px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.cover-badge.left {
    left: 12px;
    background: var(--emerald);
}

.cover-badge.right {
    right: 12px;
    background: rgba(0, 0, 0, 0.56);
    backdrop-filter: blur(8px);
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
}

.card-body h3 a:hover {
    color: var(--emerald);
}

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

.card-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.featured-card .card-cover {
    aspect-ratio: 16 / 9;
}

.featured-card .card-body h3 {
    font-size: 21px;
}

.rank-panel,
.rank-full,
.side-panel {
    padding: 24px;
}

.panel-heading {
    margin-bottom: 18px;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 44px 78px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #f8fafc;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    background: #ecfdf5;
    transform: translateX(4px);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--emerald));
    font-weight: 900;
}

.rank-item img {
    width: 78px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
}

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

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

.rank-copy strong {
    font-weight: 900;
}

.rank-copy em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.category-tile {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.12);
}

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

.category-thumbs img {
    width: 100%;
    aspect-ratio: 1 / 0.72;
    object-fit: cover;
    border-radius: 10px;
}

.category-tile strong {
    font-size: 18px;
    font-weight: 900;
}

.category-tile p,
.category-overview-head p,
.page-hero p,
.link-cloud p {
    margin: 0;
    color: var(--muted);
}

.filter-panel {
    padding: 20px;
}

.filter-row {
    display: flex;
    gap: 12px;
}

.filter-row input {
    flex: 1;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 16px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.filter-row button,
.filter-chip {
    border: 0;
    color: var(--text);
    background: #e2e8f0;
}

.filter-row button {
    min-height: 48px;
    padding: 0 18px;
    border-radius: 14px;
    font-weight: 800;
}

.filter-chips {
    margin-top: 14px;
}

.filter-chip.active {
    color: #ffffff;
    background: var(--emerald);
}

.empty-state {
    display: none;
    padding: 28px;
    margin-top: 18px;
    border-radius: 16px;
    background: #f8fafc;
    color: var(--muted);
    text-align: center;
    font-weight: 800;
}

.empty-state.show {
    display: block;
}

.page-hero {
    padding: 88px 0;
    color: #ffffff;
    background:
        radial-gradient(circle at 15% 20%, rgba(16, 185, 129, 0.32), transparent 34%),
        linear-gradient(135deg, #0f172a 0%, #1e293b 54%, #0f172a 100%);
}

.page-hero.slim {
    padding: 64px 0;
}

.page-hero h1 {
    margin: 8px 0 12px;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.1;
    font-weight: 900;
}

.page-hero p {
    max-width: 760px;
    color: #cbd5e1;
    font-size: 18px;
}

.category-overview-card {
    display: grid;
    gap: 22px;
}

.link-cloud div,
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.link-cloud a,
.footer-links a {
    display: inline-flex;
    border-radius: 999px;
    padding: 8px 12px;
    color: var(--emerald);
    background: #ecfdf5;
    font-weight: 800;
}

.detail-wrap {
    padding: 32px 0 56px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

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

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

.detail-main {
    display: grid;
    gap: 22px;
}

.player-card {
    overflow: hidden;
    padding: 0;
}

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

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

.player-start {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.56));
}

.player-start span {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 20px 40px rgba(5, 150, 105, 0.35);
    font-size: 34px;
}

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

.detail-card,
.poster-card,
.side-panel {
    padding: 24px;
}

.detail-card h1 {
    margin: 14px 0 12px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.16;
    font-weight: 900;
}

.detail-card .lead {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 18px;
}

.detail-card h2 {
    margin: 26px 0 12px;
    font-size: 24px;
    font-weight: 900;
}

.detail-card p {
    margin: 0;
    color: #475569;
    font-size: 16px;
    line-height: 1.9;
}

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

.detail-meta div {
    display: grid;
    gap: 4px;
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.detail-meta strong {
    color: var(--muted);
    font-size: 12px;
}

.detail-meta span,
.detail-meta a {
    font-weight: 900;
}

.detail-tags {
    margin-top: 22px;
}

.detail-tags span {
    color: #047857;
    background: var(--emerald-soft);
}

.top-tags {
    margin-top: 0;
}

.poster-card,
.side-panel {
    display: grid;
    gap: 16px;
}

.poster-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 16px;
}

.side-panel h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 900;
}

.side-links {
    display: grid;
    gap: 10px;
}

.side-links a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: #f8fafc;
    font-weight: 800;
}

.side-links span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-links em {
    color: var(--muted);
    font-style: normal;
}

.site-footer {
    margin-top: 48px;
    color: #cbd5e1;
    background: linear-gradient(135deg, #0f172a, #1e293b, #0f172a);
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 20px;
}

.footer-brand span {
    color: var(--emerald);
}

.footer-grid p {
    max-width: 520px;
    color: #94a3b8;
}

.footer-grid h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.footer-links a {
    color: #d1fae5;
    background: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
    padding: 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    color: #94a3b8;
    text-align: center;
}

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

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

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

    .detail-side {
        display: grid;
        grid-template-columns: 280px minmax(0, 1fr);
        gap: 20px;
    }
}

@media (max-width: 760px) {
    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

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

    .nav-menu.open {
        display: flex;
    }

    .hero-slider {
        height: 620px;
    }

    .hero-arrow {
        display: none;
    }

    .hero-content {
        align-items: end;
        padding-bottom: 86px;
    }

    .featured-grid,
    .movie-grid,
    .small-grid,
    .mini-grid,
    .category-grid,
    .rank-list.wide,
    .footer-grid,
    .detail-side,
    .detail-meta {
        grid-template-columns: 1fr;
    }

    .section-heading,
    .category-overview-head,
    .filter-row {
        align-items: stretch;
        flex-direction: column;
    }

    .section-block,
    .category-overview-card,
    .link-cloud {
        padding: 20px;
    }

    .detail-wrap {
        padding-top: 20px;
    }

    .player-start span {
        width: 68px;
        height: 68px;
    }
}
