* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --dark-950: #0b0d10;
    --dark-900: #141618;
    --dark-850: #1a1d23;
    --dark-800: #24272c;
    --dark-700: #353940;
    --dark-600: #464c56;
    --primary-600: #096dd9;
    --primary-500: #1890ff;
    --primary-400: #40a9ff;
    --primary-300: #69c0ff;
    --secondary-500: #13c2c2;
    --secondary-400: #36cfc9;
    --secondary-300: #5cdbd3;
    --text-main: #ffffff;
    --text-soft: #d1d5db;
    --text-muted: #9ca3af;
    --line: rgba(255, 255, 255, 0.08);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at 18% 12%, rgba(24, 144, 255, 0.18), transparent 28rem),
        radial-gradient(circle at 80% 0%, rgba(19, 194, 194, 0.13), transparent 30rem),
        var(--dark-900);
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(20, 22, 24, 0.9);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    width: min(1280px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    box-shadow: 0 12px 28px rgba(24, 144, 255, 0.28);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.main-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--text-soft);
    transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #ffffff;
    background: rgba(24, 144, 255, 0.18);
}

.top-search {
    width: 310px;
    display: flex;
    align-items: center;
    padding: 4px;
    border: 1px solid rgba(24, 144, 255, 0.26);
    border-radius: 999px;
    background: rgba(36, 39, 44, 0.8);
}

.top-search input,
.hero-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-width: 0;
    color: var(--text-main);
    border: 0;
    outline: 0;
    background: transparent;
}

.top-search input {
    padding: 8px 12px;
}

.top-search button,
.hero-search button,
.primary-btn,
.ghost-btn,
.filter-panel button,
.player-button {
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: var(--primary-500);
    box-shadow: 0 14px 30px rgba(24, 144, 255, 0.28);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.top-search button {
    flex: 0 0 auto;
    padding: 8px 16px;
}

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 20px;
    font-weight: 700;
}

.ghost-btn {
    color: var(--primary-300);
    border: 1px solid rgba(24, 144, 255, 0.42);
    background: rgba(24, 144, 255, 0.12);
    box-shadow: none;
}

.top-search button:hover,
.hero-search button:hover,
.primary-btn:hover,
.filter-panel button:hover,
.player-button:hover {
    transform: translateY(-1px);
    background: var(--primary-600);
    box-shadow: 0 16px 32px rgba(24, 144, 255, 0.36);
}

.ghost-btn:hover {
    transform: translateY(-1px);
    color: #ffffff;
    border-color: rgba(24, 144, 255, 0.72);
    background: rgba(24, 144, 255, 0.22);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(36, 39, 44, 0.86);
}

.nav-toggle span {
    display: block;
    width: 19px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: #ffffff;
}

.hero {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: #000000;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(20, 22, 24, 0.96) 0%, rgba(20, 22, 24, 0.78) 34%, rgba(20, 22, 24, 0.28) 68%, rgba(20, 22, 24, 0.76) 100%),
        linear-gradient(0deg, var(--dark-900) 0%, rgba(20, 22, 24, 0.22) 42%, rgba(20, 22, 24, 0.08) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    min-height: 70vh;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 96px 0 72px;
}

.hero-copy {
    width: min(700px, 100%);
    animation: slideUp 0.6s ease-out;
}

.eyebrow,
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid rgba(24, 144, 255, 0.46);
    border-radius: 999px;
    color: var(--primary-300);
    background: rgba(24, 144, 255, 0.16);
    font-size: 14px;
    font-weight: 700;
}

.hero h1,
.hero h2 {
    margin: 18px 0 18px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

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

.hero-meta,
.detail-meta,
.movie-card-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--text-muted);
}

.hero-meta {
    margin-top: 20px;
}

.hero-meta span,
.detail-meta span,
.movie-card-meta span,
.rank-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

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

.hero-search {
    width: min(580px, 100%);
    display: flex;
    gap: 8px;
    margin-top: 32px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    background: rgba(20, 22, 24, 0.72);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.hero-search input {
    padding: 13px 16px;
}

.hero-search button {
    padding: 0 22px;
}

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

.hero-dots button {
    width: 38px;
    height: 5px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
}

.hero-dots button.is-active {
    background: var(--primary-400);
}

.main-section,
.page-main {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.main-section {
    padding: 64px 0 16px;
}

.page-main {
    padding: 56px 0 40px;
}

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

.section-head h2,
.page-head h1,
.detail-title h1 {
    margin: 10px 0 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.18;
    letter-spacing: -0.03em;
}

.section-head p,
.page-head p,
.detail-title p,
.category-tile p,
.info-block p,
.review-block p {
    color: var(--text-soft);
    line-height: 1.8;
}

.more-link {
    flex: 0 0 auto;
    color: var(--primary-300);
    font-weight: 700;
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(36, 39, 44, 0.72);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(24, 144, 255, 0.48);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.34);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.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);
}

.movie-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), transparent 56%);
}

.play-mark {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(24, 144, 255, 0.9);
    box-shadow: 0 10px 22px rgba(24, 144, 255, 0.35);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    min-width: 36px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 9px;
    border-radius: 10px;
    font-weight: 900;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

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

.movie-card-meta {
    gap: 6px;
    margin-bottom: 10px;
    font-size: 12px;
}

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

.movie-card h3 a:hover {
    color: var(--primary-300);
}

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

.movie-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.movie-tags span,
.detail-tags span {
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--secondary-300);
    background: rgba(19, 194, 194, 0.12);
    font-size: 12px;
}

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

.category-tile {
    position: relative;
    min-height: 180px;
    padding: 26px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(24, 144, 255, 0.18), rgba(19, 194, 194, 0.08)),
        rgba(36, 39, 44, 0.78);
    box-shadow: var(--shadow);
}

.category-tile::before {
    content: "";
    position: absolute;
    width: 170px;
    height: 170px;
    right: -60px;
    top: -60px;
    border-radius: 999px;
    background: rgba(24, 144, 255, 0.2);
}

.category-tile h2,
.category-tile h3 {
    position: relative;
    margin: 0 0 12px;
    font-size: 24px;
}

.category-tile p,
.category-tile .tile-link {
    position: relative;
}

.tile-link {
    display: inline-flex;
    margin-top: 12px;
    color: var(--primary-300);
    font-weight: 800;
}

.filter-panel {
    display: grid;
    grid-template-columns: 2fr repeat(3, minmax(140px, 1fr)) auto;
    gap: 12px;
    margin: 28px 0 28px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(36, 39, 44, 0.76);
}

.filter-panel input,
.filter-panel select {
    height: 46px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    background: rgba(20, 22, 24, 0.72);
}

.filter-panel button {
    min-width: 90px;
    padding: 0 18px;
}

.empty-state {
    display: none;
    padding: 34px;
    text-align: center;
    color: var(--text-muted);
    border: 1px dashed rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    background: rgba(36, 39, 44, 0.52);
}

.empty-state.is-visible {
    display: block;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 80px 132px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(36, 39, 44, 0.72);
}

.rank-number {
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    font-size: 22px;
    font-weight: 900;
    background: rgba(24, 144, 255, 0.16);
    color: var(--primary-300);
}

.rank-poster {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
}

.rank-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

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

.rank-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    height: 44px;
    padding: 0 12px;
    border-radius: 999px;
    color: #facc15;
    background: rgba(250, 204, 21, 0.1);
    font-size: 20px;
    font-weight: 900;
}

.breadcrumb {
    width: min(1280px, calc(100% - 32px));
    margin: 24px auto 0;
    color: var(--text-muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--primary-300);
}

.detail-hero {
    width: min(1280px, calc(100% - 32px));
    margin: 26px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 28px;
    align-items: start;
}

.player-shell {
    overflow: hidden;
    border: 1px solid rgba(24, 144, 255, 0.25);
    border-radius: 26px;
    background: #000000;
    box-shadow: var(--shadow);
}

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

.player-frame video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    outline: 0;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.24));
}

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

.player-button {
    width: 92px;
    height: 92px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 34px;
}

.detail-side {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(36, 39, 44, 0.76);
    box-shadow: var(--shadow);
}

.detail-cover {
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

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

.detail-title {
    padding: 22px;
}

.detail-meta {
    margin-top: 16px;
}

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

.detail-content {
    width: min(1280px, calc(100% - 32px));
    margin: 34px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
}

.info-block,
.review-block,
.side-block {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(36, 39, 44, 0.72);
}

.info-block + .review-block {
    margin-top: 22px;
}

.info-block h2,
.review-block h2,
.side-block h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

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

.side-item {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 12px;
    align-items: center;
}

.side-item img {
    width: 78px;
    height: 92px;
    object-fit: cover;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
}

.side-item h3 {
    margin: 0 0 6px;
    font-size: 15px;
    line-height: 1.4;
}

.side-item p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}

.site-footer {
    margin-top: 70px;
    border-top: 1px solid var(--line);
    background: rgba(11, 13, 16, 0.7);
}

.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 34px 0;
    color: var(--text-muted);
}

.footer-inner p {
    max-width: 720px;
    margin: 12px 0 0;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-content: start;
    justify-content: flex-end;
    gap: 12px;
}

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.06);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

@media (max-width: 920px) {
    .nav-wrap {
        flex-wrap: wrap;
        min-height: 66px;
        padding: 12px 0;
    }

    .nav-toggle {
        display: block;
    }

    .main-nav,
    .top-search {
        display: none;
        width: 100%;
        margin: 0;
    }

    .main-nav.is-open,
    .top-search.is-open {
        display: flex;
    }

    .main-nav.is-open {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-content {
        padding-top: 80px;
    }

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

    .filter-panel {
        grid-template-columns: 1fr 1fr;
    }

    .filter-panel button {
        grid-column: 1 / -1;
        min-height: 46px;
    }

    .rank-row {
        grid-template-columns: 54px 96px 1fr;
    }

    .rank-score {
        grid-column: 2 / -1;
        justify-self: start;
    }
}

@media (max-width: 680px) {
    .main-section,
    .page-main,
    .detail-hero,
    .detail-content,
    .breadcrumb,
    .footer-inner,
    .nav-wrap,
    .hero-content {
        width: min(100% - 22px, 1280px);
    }

    .hero {
        min-height: 78vh;
    }

    .hero-content {
        min-height: 78vh;
    }

    .hero-search {
        flex-direction: column;
        border-radius: 18px;
    }

    .hero-search button {
        min-height: 46px;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-btn,
    .ghost-btn {
        width: 100%;
    }

    .section-head,
    .page-head,
    .footer-inner {
        align-items: stretch;
        flex-direction: column;
    }

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

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

    .filter-panel {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 44px 82px 1fr;
        gap: 12px;
    }

    .rank-number {
        width: 44px;
        height: 44px;
        font-size: 18px;
        border-radius: 14px;
    }

    .rank-info h2,
    .rank-info h3 {
        font-size: 17px;
    }

    .rank-info p {
        display: -webkit-box;
        overflow: hidden;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .player-button {
        width: 72px;
        height: 72px;
        font-size: 26px;
    }
}
