:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --accent: #34d399;
    --accent-dark: #059669;
    --gold: #f59e0b;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 15% 5%, rgba(16, 185, 129, 0.18), transparent 32rem),
        radial-gradient(circle at 85% 10%, rgba(59, 130, 246, 0.14), transparent 28rem),
        var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(18px);
}

.site-header-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #052e2b;
    background: linear-gradient(135deg, #6ee7b7, #22d3ee);
    box-shadow: 0 0 30px rgba(52, 211, 153, 0.32);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    color: var(--soft);
    font-size: 15px;
}

.site-nav a,
.mobile-nav a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--accent);
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.7);
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
    border-top: 1px solid var(--line);
}

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

.mobile-nav a {
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.56);
}

.hero-carousel {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: #020617;
}

.hero-stage,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
    filter: saturate(1.08) contrast(1.04);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0%, transparent 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 0 0 108px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 13px;
    border: 1px solid rgba(52, 211, 153, 0.35);
    border-radius: 999px;
    color: var(--accent);
    background: rgba(16, 185, 129, 0.14);
    font-size: 14px;
    font-weight: 700;
}

.hero-content h1 {
    max-width: 760px;
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 0.96;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 680px;
    margin: 0;
    color: #dbeafe;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
    color: var(--soft);
}

.hero-meta span {
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.58);
}

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

.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, background 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
    color: #022c22;
    background: linear-gradient(135deg, #6ee7b7, #22d3ee);
}

.btn-ghost {
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(15, 23, 42, 0.62);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 1px solid rgba(255, 255, 255, 0.44);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
}

.hero-dot.active {
    width: 32px;
    border-color: var(--accent);
    background: var(--accent);
}

.hero-thumbs {
    position: absolute;
    right: max(16px, calc((100vw - 1180px) / 2));
    bottom: 86px;
    z-index: 3;
    width: 290px;
    display: grid;
    gap: 10px;
}

.hero-thumb {
    display: grid;
    grid-template-columns: 74px 1fr;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(14px);
}

.hero-thumb img {
    width: 74px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
}

.hero-thumb span {
    color: var(--soft);
    font-size: 14px;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-panel {
    margin: 34px 0 10px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.64);
    box-shadow: var(--shadow);
}

.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    min-height: 54px;
    padding: 0 54px 0 18px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    outline: none;
    color: var(--text);
    background: rgba(2, 6, 23, 0.72);
}

.search-box input:focus {
    border-color: rgba(52, 211, 153, 0.72);
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12);
}

.search-box span {
    position: absolute;
    top: 50%;
    right: 18px;
    color: var(--accent);
    transform: translateY(-50%);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.filter-chip {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.72);
}

.filter-chip.active,
.filter-chip:hover {
    border-color: rgba(52, 211, 153, 0.6);
    color: #042f2e;
    background: var(--accent);
}

.content-section {
    padding: 54px 0 12px;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.03em;
}

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

.section-link {
    color: var(--accent);
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(52, 211, 153, 0.52);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.96);
}

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

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

.card-year,
.card-play {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.card-year {
    top: 10px;
    right: 10px;
    padding: 5px 9px;
    color: #022c22;
    background: rgba(110, 231, 183, 0.95);
}

.card-play {
    left: 10px;
    bottom: 10px;
    padding: 7px 11px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(10px);
}

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

.movie-meta-line,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.movie-meta-line span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
}

.movie-meta-line span + span::before,
.detail-meta span + span::before {
    content: "";
    width: 4px;
    height: 4px;
    margin-right: 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.55);
}

.movie-card h3 {
    margin: 9px 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-info h2 a:hover,
.compact-card:hover strong {
    color: var(--accent);
}

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

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

.tag {
    padding: 5px 8px;
    border: 1px solid rgba(52, 211, 153, 0.24);
    border-radius: 999px;
    color: #a7f3d0;
    background: rgba(16, 185, 129, 0.1);
    font-size: 12px;
}

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

.category-tile {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.8);
}

.category-tile img,
.category-shade {
    position: absolute;
    inset: 0;
}

.category-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.58;
    transition: transform 0.45s ease, opacity 0.45s ease;
}

.category-tile:hover img {
    opacity: 0.72;
    transform: scale(1.05);
}

.category-shade {
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.28));
}

.category-tile strong,
.category-tile em {
    position: relative;
    z-index: 2;
}

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

.category-tile em {
    margin-top: 8px;
    color: var(--soft);
    font-style: normal;
    line-height: 1.6;
}

.sub-hero {
    padding: 74px 0 54px;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(2, 6, 23, 0)),
        radial-gradient(circle at 12% 0%, rgba(16, 185, 129, 0.24), transparent 28rem);
}

.sub-hero h1 {
    margin: 14px 0 12px;
    font-size: clamp(34px, 5vw, 58px);
    letter-spacing: -0.04em;
}

.sub-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--soft);
    font-size: 18px;
    line-height: 1.8;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    font-size: 14px;
}

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

.ranking-list {
    display: grid;
    gap: 14px;
    padding: 42px 0 80px;
}

.rank-card {
    display: grid;
    grid-template-columns: 78px 180px 1fr;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
}

.rank-num {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    border-radius: 18px;
    color: #042f2e;
    background: linear-gradient(135deg, #6ee7b7, #facc15);
    font-size: 24px;
    font-weight: 900;
}

.rank-cover img {
    width: 180px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 18px;
}

.rank-info h2 {
    margin: 0 0 8px;
    font-size: 21px;
}

.rank-info p {
    margin: 0 0 10px;
    color: var(--soft);
    line-height: 1.7;
}

.detail-hero {
    position: fixed;
    inset: 0 0 auto 0;
    height: 58vh;
    z-index: -1;
    overflow: hidden;
    opacity: 0.42;
}

.detail-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(12px) saturate(1.2);
    transform: scale(1.06);
}

.detail-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), var(--bg));
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    padding-top: 42px;
}

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

.player-card {
    position: relative;
    overflow: hidden;
    margin-top: 22px;
    border: 1px solid rgba(52, 211, 153, 0.28);
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: var(--text);
    background: radial-gradient(circle, rgba(15, 23, 42, 0.18), rgba(2, 6, 23, 0.76));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-card.playing .player-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.player-button {
    width: 76px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #052e2b;
    background: linear-gradient(135deg, #6ee7b7, #22d3ee);
    box-shadow: 0 0 42px rgba(52, 211, 153, 0.36);
    font-size: 28px;
}

.movie-detail-content {
    margin-top: 28px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.76);
}

.movie-detail-content h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 4vw, 48px);
    letter-spacing: -0.04em;
}

.detail-tags {
    margin: 18px 0;
}

.one-line {
    margin: 20px 0;
    padding: 18px;
    border-left: 4px solid var(--accent);
    border-radius: 18px;
    color: #d1fae5;
    background: rgba(16, 185, 129, 0.1);
    font-size: 18px;
    line-height: 1.8;
}

.movie-detail-content section {
    margin-top: 28px;
}

.movie-detail-content h2,
.side-box h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.movie-detail-content p {
    margin: 0;
    color: var(--soft);
    line-height: 1.95;
    font-size: 16px;
}

.detail-sidebar {
    position: sticky;
    top: 92px;
    align-self: start;
    display: grid;
    gap: 18px;
}

.side-box {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.76);
}

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

.compact-card {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 12px;
    align-items: center;
}

.compact-card img {
    width: 112px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 14px;
}

.compact-card strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.45;
}

.compact-card em {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    color: #052e2b;
    background: var(--accent);
    font-weight: 800;
}

.site-footer {
    margin-top: 72px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.84);
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 38px 0;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 28px;
}

.footer-logo {
    margin-bottom: 14px;
}

.site-footer p {
    max-width: 430px;
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 16px;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a {
    color: var(--muted);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}

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

@media (max-width: 1060px) {
    .hero-thumbs {
        display: none;
    }

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

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

    .detail-sidebar {
        position: static;
    }
}

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

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero-carousel {
        min-height: 76vh;
    }

    .hero-content {
        padding-bottom: 92px;
    }

    .hero-meta {
        display: none;
    }

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

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

    .rank-card {
        grid-template-columns: 56px 110px 1fr;
        gap: 12px;
    }

    .rank-cover img {
        width: 110px;
    }

    .rank-info p {
        display: none;
    }

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

@media (max-width: 520px) {
    .site-container,
    .site-header-inner,
    .mobile-nav,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 22px, 1180px);
    }

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

    .hero-actions {
        width: 100%;
    }

    .btn {
        flex: 1 1 auto;
    }

    .rank-card {
        grid-template-columns: 48px 1fr;
    }

    .rank-cover {
        display: none;
    }

    .movie-detail-content {
        padding: 20px;
    }
}
