* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: #1e293b;
    --panel-deep: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --accent: #10b981;
    --accent-deep: #059669;
    --yellow: #f59e0b;
    --blue: #38bdf8;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at 18% 0%, rgba(16, 185, 129, 0.16), transparent 30%), linear-gradient(180deg, #0f172a 0%, #020617 100%);
    color: var(--text);
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(18px);
}

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

.navbar {
    height: 70px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #10b981, #06b6d4);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.34);
}

.logo-text {
    font-size: 21px;
}

.nav-search {
    flex: 1;
    max-width: 520px;
    margin-left: auto;
}

.search-control {
    position: relative;
}

.search-control input {
    width: 100%;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(51, 65, 85, 0.86);
    color: #ffffff;
    outline: none;
    padding: 0 52px 0 18px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.search-control input:focus {
    border-color: rgba(16, 185, 129, 0.82);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
    background: rgba(30, 41, 59, 0.95);
}

.search-control button {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #cbd5e1;
    cursor: pointer;
}

.search-control button:hover {
    color: #ffffff;
    background: rgba(16, 185, 129, 0.22);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 15px;
    color: #cbd5e1;
}

.nav-links a:hover {
    color: #ffffff;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.72);
    color: #ffffff;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.98);
    padding: 14px 0 18px;
}

.mobile-panel.is-open {
    display: block;
}

.mobile-panel .nav-search {
    max-width: none;
    margin: 0 0 12px;
}

.mobile-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.mobile-links a {
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.9);
    padding: 11px 13px;
    color: #cbd5e1;
}

.hero {
    position: relative;
    height: 580px;
    overflow: hidden;
    background: #020617;
}

.hero-track {
    height: 100%;
    display: flex;
    transition: transform 0.55s ease;
}

.hero-slide {
    position: relative;
    width: 100%;
    flex: 0 0 100%;
    min-height: 100%;
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.1) 0%, rgba(2, 6, 23, 0.56) 44%, #020617 100%);
}

.hero-content {
    position: absolute;
    inset: auto 0 0;
    padding: 0 0 58px;
}

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

.hero-badge,
.card-badge,
.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    font-size: 13px;
    line-height: 1;
}

.hero-badge {
    background: rgba(16, 185, 129, 0.94);
    color: #ffffff;
    padding: 8px 13px;
    margin-bottom: 18px;
    box-shadow: 0 10px 24px rgba(16, 185, 129, 0.28);
}

.hero h1,
.hero h2 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.04;
    color: #ffffff;
    letter-spacing: -0.04em;
}

.hero p {
    margin: 0 0 24px;
    color: #cbd5e1;
    font-size: clamp(16px, 2vw, 19px);
    line-height: 1.75;
}

.hero-meta,
.card-meta,
.detail-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    color: #cbd5e1;
}

.hero-meta {
    margin-bottom: 28px;
}

.star {
    color: var(--yellow);
    font-weight: 800;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    border: 0;
    border-radius: 999px;
    padding: 0 22px;
    background: linear-gradient(135deg, var(--accent), #06b6d4);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 14px 34px rgba(16, 185, 129, 0.28);
    transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: 0 18px 40px rgba(16, 185, 129, 0.34);
}

.btn.secondary {
    background: rgba(30, 41, 59, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: none;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.74);
    transform: translateY(-50%) scale(1.04);
}

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

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

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    display: flex;
    gap: 9px;
}

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 32px;
    background: #ffffff;
}

.page-main {
    padding: 46px 0 68px;
}

.section {
    margin-bottom: 58px;
}

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

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

.section-kicker {
    margin: 0 0 7px;
    color: var(--accent);
    font-weight: 700;
    font-size: 14px;
}

.section-desc {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

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

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

.movie-card {
    display: block;
    overflow: hidden;
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
    transform: translateY(0);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-5px) scale(1.015);
    border-color: rgba(16, 185, 129, 0.72);
    box-shadow: 0 22px 60px rgba(16, 185, 129, 0.15), 0 18px 50px rgba(0, 0, 0, 0.32);
}

.card-poster {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0f172a;
}

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

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

.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 6px 9px;
    color: #ffffff;
    background: rgba(16, 185, 129, 0.94);
}

.card-duration {
    position: absolute;
    right: 10px;
    bottom: 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.72);
    color: #ffffff;
    font-size: 12px;
    padding: 5px 8px;
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 9px;
    color: #ffffff;
    font-size: 17px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-body p {
    margin: 0 0 12px;
    color: #94a3b8;
    line-height: 1.65;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
    color: #94a3b8;
}

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

.category-tile {
    min-height: 145px;
    padding: 24px;
    border-radius: 22px;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(6, 182, 212, 0.82));
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
    transition: transform 0.22s ease, filter 0.22s ease;
}

.category-tile:hover {
    transform: translateY(-4px) scale(1.02);
    filter: brightness(1.06);
}

.category-tile.red {
    background: linear-gradient(135deg, #ef4444, #7f1d1d);
}

.category-tile.orange {
    background: linear-gradient(135deg, #f97316, #7c2d12);
}

.category-tile.emerald {
    background: linear-gradient(135deg, #10b981, #065f46);
}

.category-tile.pink {
    background: linear-gradient(135deg, #ec4899, #831843);
}

.category-tile.purple {
    background: linear-gradient(135deg, #8b5cf6, #4c1d95);
}

.category-tile.cyan {
    background: linear-gradient(135deg, #06b6d4, #164e63);
}

.category-tile.blue {
    background: linear-gradient(135deg, #3b82f6, #1e3a8a);
}

.category-tile.yellow {
    background: linear-gradient(135deg, #eab308, #713f12);
}

.category-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.category-tile h3 {
    margin: 0 0 8px;
    font-size: 22px;
}

.category-tile p {
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.6;
    font-size: 14px;
}

.rail {
    overflow-x: auto;
    padding-bottom: 14px;
    scrollbar-color: rgba(148, 163, 184, 0.4) transparent;
}

.rail-inner {
    display: flex;
    gap: 18px;
    width: max-content;
}

.rail-card {
    width: 330px;
}

.rank-panel,
.panel {
    border-radius: 22px;
    background: rgba(30, 41, 59, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.rank-list {
    padding: 10px 18px;
}

.rank-item {
    display: grid;
    grid-template-columns: 44px 96px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.rank-item:last-child {
    border-bottom: 0;
}

.rank-num {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: #334155;
    color: #cbd5e1;
    font-weight: 800;
}

.rank-item:nth-child(-n + 3) .rank-num {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #ffffff;
}

.rank-thumb {
    width: 96px;
    height: 58px;
    object-fit: cover;
    border-radius: 12px;
    background: #0f172a;
}

.rank-title {
    margin: 0 0 5px;
    color: #ffffff;
    font-weight: 700;
}

.rank-meta {
    color: #94a3b8;
    font-size: 13px;
}

.page-hero {
    padding: 58px 0;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.94), rgba(6, 182, 212, 0.9));
}

.page-hero.purple {
    background: linear-gradient(135deg, #7c3aed, #db2777);
}

.page-hero.blue {
    background: linear-gradient(135deg, #2563eb, #0891b2);
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(34px, 5vw, 54px);
    color: #ffffff;
    letter-spacing: -0.04em;
}

.page-hero p {
    width: min(760px, 100%);
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    font-size: 17px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 14px;
    padding: 18px;
    margin-bottom: 28px;
}

.filter-panel input,
.filter-panel select {
    height: 44px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.78);
    color: #ffffff;
    outline: none;
    padding: 0 14px;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(16, 185, 129, 0.85);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.filter-note {
    margin: -12px 0 26px;
    color: #94a3b8;
    font-size: 14px;
}

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

.breadcrumb a:hover {
    color: #ffffff;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000000;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.42);
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    display: block;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle at center, rgba(16, 185, 129, 0.2), rgba(0, 0, 0, 0.74));
    color: #ffffff;
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-symbol {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), #06b6d4);
    box-shadow: 0 20px 50px rgba(16, 185, 129, 0.42);
    font-size: 31px;
    padding-left: 4px;
}

.detail-card {
    margin-top: 24px;
    padding: 24px;
    border-radius: 22px;
    background: rgba(30, 41, 59, 0.84);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.detail-card h1,
.detail-card h2 {
    margin: 0 0 16px;
    color: #ffffff;
    letter-spacing: -0.03em;
}

.detail-card h1 {
    font-size: clamp(28px, 4vw, 42px);
}

.detail-card h2 {
    font-size: 24px;
}

.detail-card p {
    color: #cbd5e1;
    line-height: 1.9;
}

.detail-meta {
    gap: 14px;
    margin: 14px 0 20px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 16px 0 0;
}

.tag {
    padding: 8px 11px;
    background: rgba(51, 65, 85, 0.92);
    color: #cbd5e1;
}

.tag.primary {
    background: rgba(16, 185, 129, 0.95);
    color: #ffffff;
}

.side-panel {
    position: sticky;
    top: 94px;
    align-self: start;
}

.cover-panel {
    padding: 18px;
}

.cover-panel img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 16px;
    background: #0f172a;
    margin-bottom: 16px;
}

.fact-list {
    display: grid;
    gap: 10px;
    color: #cbd5e1;
    font-size: 14px;
}

.fact-list span {
    color: #94a3b8;
}

.related-list {
    display: grid;
    gap: 13px;
}

.related-item {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.46);
    transition: background 0.2s ease;
}

.related-item:hover {
    background: rgba(51, 65, 85, 0.72);
}

.related-item img {
    width: 96px;
    height: 58px;
    object-fit: cover;
    border-radius: 10px;
}

.related-item h3 {
    margin: 0 0 6px;
    color: #ffffff;
    font-size: 15px;
    line-height: 1.35;
}

.related-item p {
    margin: 0;
    color: #94a3b8;
    font-size: 13px;
}

.site-footer {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), #020617);
    border-top: 1px solid var(--line);
    padding: 42px 0 24px;
    color: #94a3b8;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 28px;
}

.site-footer h2,
.site-footer h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.site-footer p,
.site-footer li {
    color: #94a3b8;
    line-height: 1.8;
}

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

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    padding-top: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    font-size: 13px;
}

.empty-state {
    padding: 70px 20px;
    text-align: center;
    color: #94a3b8;
}

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

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

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

    .side-panel {
        position: static;
    }

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

@media (max-width: 820px) {
    .navbar {
        height: 64px;
        gap: 14px;
    }

    .nav-search,
    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .hero {
        height: 560px;
    }

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

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

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

    .rank-item {
        grid-template-columns: 38px 82px 1fr;
    }

    .rank-score {
        grid-column: 3;
    }
}

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

    .logo-text {
        font-size: 18px;
    }

    .hero {
        height: 520px;
    }

    .hero-arrow {
        display: none;
    }

    .hero p {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .hero-meta {
        gap: 9px;
    }

    .page-main {
        padding-top: 32px;
    }

    .section-head {
        display: block;
    }

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

    .rail-card {
        width: 280px;
    }

    .detail-card {
        padding: 18px;
    }

    .related-item {
        grid-template-columns: 82px 1fr;
    }

    .related-item img {
        width: 82px;
        height: 52px;
    }

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

    .footer-bottom {
        display: block;
    }
}
