:root {
    --bg: #f9fafb;
    --panel: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --soft: #f3f4f6;
    --green: #16a34a;
    --green-dark: #15803d;
    --green-soft: #dcfce7;
    --dark: #0f172a;
    --black: #020617;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

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: 50;
    background: rgba(15, 23, 42, 0.94);
    color: #ffffff;
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 35px rgba(2, 6, 23, 0.25);
}

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

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

.brand-icon {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #22c55e, #15803d);
    box-shadow: 0 8px 22px rgba(34, 197, 94, 0.28);
}

.brand-text {
    font-size: 20px;
}

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

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    color: #d1d5db;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: rgba(34, 197, 94, 0.18);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 999px;
    background: #ffffff;
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    color: #ffffff;
    background: var(--dark);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.42);
    transform: scale(1.04);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.58) 48%, rgba(2, 6, 23, 0.28));
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(34, 197, 94, 0.26), transparent 34%), linear-gradient(0deg, rgba(2, 6, 23, 0.95), transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    min-height: 620px;
    padding: 96px 0 116px;
}

.hero-copy {
    width: min(720px, 100%);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    color: #86efac;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.06;
    font-weight: 900;
}

.hero p {
    width: min(680px, 100%);
    margin: 0 0 28px;
    color: #d1d5db;
    font-size: 18px;
}

.hero-meta,
.detail-meta,
.movie-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hero-meta span,
.detail-meta span,
.movie-meta span,
.rank-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #e5e7eb;
    font-size: 13px;
}

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

.btn-primary,
.btn-secondary,
.section-link,
.search-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    background: var(--green);
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 14px 26px rgba(22, 163, 74, 0.26);
}

.btn-primary:hover,
.search-button:hover {
    background: var(--green-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

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

.hero-dot {
    width: 38px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

.hero-dot.is-active {
    background: #22c55e;
}

.quick-search {
    position: relative;
    z-index: 5;
    margin-top: -48px;
}

.quick-search-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.search-input,
.filter-input {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    background: #ffffff;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus,
.filter-input:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.section {
    padding: 64px 0;
}

.section.alt {
    background: #ffffff;
}

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

.section-heading h2 {
    margin: 0 0 6px;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.2;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
}

.section-link {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 14px;
    box-shadow: none;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel);
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border 0.22s ease;
}

.movie-card:hover {
    border-color: rgba(34, 197, 94, 0.45);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

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

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

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

.movie-info {
    padding: 16px;
}

.movie-meta {
    gap: 6px;
    margin-bottom: 10px;
}

.movie-meta span {
    min-height: 24px;
    color: #166534;
    background: var(--green-soft);
}

.movie-info h3 {
    min-height: 52px;
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.42;
}

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

.movie-info p {
    min-height: 46px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
}

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

.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    color: #374151;
    background: var(--soft);
    font-size: 12px;
}

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

.category-tile {
    overflow: hidden;
    min-height: 220px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, border 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover {
    border-color: rgba(34, 197, 94, 0.45);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.category-thumbs {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    grid-template-rows: repeat(2, 72px);
    gap: 2px;
    background: #0f172a;
}

.category-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.category-thumbs img:first-child {
    grid-row: span 2;
}

.category-tile div:last-child {
    padding: 16px;
}

.category-tile h3 {
    margin: 0 0 6px;
    font-size: 19px;
}

.category-tile p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.rank-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 26px;
}

.rank-panel,
.filter-panel,
.detail-card,
.player-card {
    border: 1px solid var(--border);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.rank-panel {
    padding: 20px;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 42px 112px 1fr;
    align-items: center;
    gap: 14px;
    padding: 10px;
    border-radius: 16px;
    transition: background 0.2s ease;
}

.compact-card:hover {
    background: #f0fdf4;
}

.compact-card strong {
    color: var(--green);
    font-size: 20px;
}

.compact-card img {
    width: 112px;
    height: 70px;
    object-fit: cover;
    border-radius: 12px;
    background: linear-gradient(135deg, #0f172a, #14532d);
    transition: transform 0.4s ease;
}

.compact-card b,
.compact-card em {
    display: block;
}

.compact-card b {
    margin-bottom: 4px;
    font-size: 16px;
}

.compact-card em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.rank-badge,
.heat-pill {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 0 0 12px 0;
    color: #ffffff;
    background: var(--green);
    font-weight: 900;
}

.heat-pill {
    right: 10px;
    bottom: 10px;
    min-height: 28px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.7);
    font-size: 12px;
    backdrop-filter: blur(10px);
}

.page-hero {
    padding: 64px 0 46px;
    color: #ffffff;
    background: radial-gradient(circle at 15% 10%, rgba(34, 197, 94, 0.26), transparent 34%), linear-gradient(135deg, #020617, #0f172a 55%, #064e3b);
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.12;
}

.page-hero p {
    width: min(760px, 100%);
    margin: 0;
    color: #d1d5db;
    font-size: 17px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: #bbf7d0;
    font-size: 14px;
}

.breadcrumb i {
    color: rgba(255, 255, 255, 0.5);
    font-style: normal;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
}

.detail-hero {
    padding: 46px 0;
    color: #ffffff;
    background: linear-gradient(135deg, #020617, #0f172a 60%, #14532d);
}

.detail-top {
    display: grid;
    grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1.4fr);
    gap: 32px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
    background: linear-gradient(135deg, #0f172a, #14532d);
}

.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 16 / 10;
}

.detail-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.1;
}

.detail-copy p {
    color: #d1d5db;
    font-size: 18px;
}

.detail-meta span {
    background: rgba(34, 197, 94, 0.2);
    color: #dcfce7;
}

.player-card {
    overflow: hidden;
    margin-bottom: 34px;
}

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

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: rgba(2, 6, 23, 0.55);
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.56;
}

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

.play-button {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: var(--green);
    box-shadow: 0 20px 42px rgba(22, 163, 74, 0.38);
    cursor: pointer;
}

.play-button::before {
    content: "";
    display: block;
    width: 0;
    height: 0;
    margin-left: 6px;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 24px solid #ffffff;
}

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

.detail-card {
    padding: 24px;
}

.detail-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.detail-card p {
    margin: 0 0 18px;
    color: #374151;
    font-size: 16px;
}

.sidebar-title {
    margin: 0 0 16px;
    font-size: 22px;
}

.no-result {
    display: none;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 18px;
    color: var(--muted);
    background: #ffffff;
    text-align: center;
}

.site-footer {
    margin-top: 70px;
    color: #d1d5db;
    background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.7fr 0.8fr 1fr;
    gap: 32px;
    padding: 48px 0 36px;
}

.footer-brand {
    margin-bottom: 14px;
    color: #ffffff;
    font-size: 22px;
}

.site-footer p,
.site-footer a {
    color: #9ca3af;
}

.site-footer a:hover {
    color: #86efac;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 17px;
}

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

.footer-bottom {
    padding: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #6b7280;
    text-align: center;
}

@media (max-width: 980px) {
    .desktop-nav {
        display: none;
    }

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

    .mobile-nav.is-open {
        display: grid;
        gap: 8px;
    }

    .hero,
    .hero-content {
        min-height: 580px;
    }

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

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

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

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

    .hero,
    .hero-content {
        min-height: 540px;
    }

    .hero-content {
        padding: 78px 0 102px;
    }

    .quick-search-inner,
    .filter-panel {
        grid-template-columns: 1fr;
    }

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

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

    .compact-card {
        grid-template-columns: 34px 86px 1fr;
    }

    .compact-card img {
        width: 86px;
        height: 58px;
    }
}
