:root {
    color-scheme: dark;
    --bg: #030712;
    --bg-soft: #111827;
    --bg-card: rgba(31, 41, 55, 0.52);
    --bg-card-strong: rgba(17, 24, 39, 0.88);
    --border: rgba(75, 85, 99, 0.7);
    --text: #f9fafb;
    --muted: #9ca3af;
    --soft: #d1d5db;
    --accent: #f59e0b;
    --accent-strong: #d97706;
    --danger: #ef4444;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 36%), linear-gradient(180deg, #020617 0%, #111827 48%, #030712 100%);
    color: var(--text);
}

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: 50;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(55, 65, 81, 0.9);
}

.header-inner {
    width: min(1280px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.brand-badge {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: white;
    box-shadow: 0 14px 35px rgba(245, 158, 11, 0.28);
}

.brand-text strong,
.footer-brand {
    display: block;
    font-size: 20px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-text em {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.main-nav,
.category-nav,
.footer-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.main-nav a,
.category-nav a,
.mobile-nav a {
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--soft);
    font-size: 14px;
    font-weight: 650;
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.category-nav {
    margin-left: auto;
    padding-left: 16px;
    border-left: 1px solid rgba(75, 85, 99, 0.65);
}

.category-nav a {
    color: var(--muted);
    padding: 8px 10px;
}

.main-nav a:hover,
.category-nav a:hover,
.mobile-nav a:hover,
.main-nav a.is-active,
.mobile-nav a.is-active {
    background: rgba(245, 158, 11, 0.16);
    color: white;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(31, 41, 55, 0.9);
    color: white;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: currentColor;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 14px;
    border-top: 1px solid rgba(75, 85, 99, 0.5);
}

.hero-carousel {
    position: relative;
    height: 680px;
    overflow: hidden;
    background: #020617;
}

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

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

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

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

.hero-content {
    position: absolute;
    inset: 0;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: 1280px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
    width: min(720px, 100%);
    margin: 18px 0 16px;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.hero-content p {
    width: min(660px, 100%);
    margin: 0 0 22px;
    color: var(--soft);
    font-size: clamp(16px, 2.2vw, 20px);
    line-height: 1.75;
}

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

.hero-meta span,
.movie-meta span {
    color: var(--soft);
    font-size: 14px;
}

.hero-meta span:first-child,
.rating {
    background: var(--accent);
    color: white;
}

.hero-meta span {
    padding: 7px 12px;
    border-radius: 12px;
    background: rgba(31, 41, 55, 0.72);
}

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

.primary-button,
.ghost-button,
.small-button,
.quick-search button,
.filter-panel button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border: 0;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease, border 0.25s ease;
}

.primary-button,
.quick-search button,
.filter-panel button,
.small-button {
    background: var(--accent);
    color: white;
    box-shadow: 0 14px 35px rgba(245, 158, 11, 0.22);
}

.primary-button:hover,
.quick-search button:hover,
.filter-panel button:hover,
.small-button:hover {
    background: var(--accent-strong);
    transform: translateY(-2px);
}

.ghost-button {
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(17, 24, 39, 0.52);
    color: white;
    backdrop-filter: blur(10px);
}

.ghost-button:hover {
    border-color: rgba(245, 158, 11, 0.72);
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.52);
    color: white;
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(8px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
}

.hero-dot.is-active {
    width: 34px;
    background: var(--accent);
}

.search-band,
.content-section,
.page-hero,
.breadcrumb,
.detail-layout {
    width: min(1280px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.search-band {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 480px);
    gap: 24px;
    align-items: center;
    margin-top: -58px;
    position: relative;
    z-index: 8;
    padding: 24px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius);
    background: rgba(17, 24, 39, 0.86);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-band h2,
.section-heading h2,
.page-hero h1,
.detail-title h1,
.detail-section h2,
.related-section h2 {
    margin: 0;
    color: white;
}

.search-band p,
.page-hero p,
.category-tile p,
.category-overview-card p,
.detail-title p,
.detail-section p,
.rank-info p,
.movie-info p,
.footer-inner p {
    color: var(--muted);
    line-height: 1.7;
}

.quick-search,
.filter-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.quick-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(75, 85, 99, 0.8);
    border-radius: 14px;
    background: rgba(3, 7, 18, 0.72);
    color: white;
    outline: none;
    padding: 0 16px;
}

.quick-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(245, 158, 11, 0.86);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.content-section {
    margin-top: 56px;
}

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

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

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(75, 85, 99, 0.56);
    border-radius: 20px;
    background: var(--bg-card);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
    transition: transform 0.28s ease, border-color 0.28s ease, background 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    border-color: rgba(245, 158, 11, 0.68);
    background: rgba(31, 41, 55, 0.78);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.86);
}

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

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

.rating {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 850;
}

.play-mark {
    position: absolute;
    inset: auto 12px 12px auto;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.58);
    color: white;
    backdrop-filter: blur(8px);
}

.movie-info {
    padding: 14px;
}

.movie-info h3 {
    margin: 0 0 8px;
    color: white;
    font-size: 16px;
    line-height: 1.35;
}

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

.movie-info p {
    min-height: 48px;
    margin: 0 0 12px;
    font-size: 13px;
}

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

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

.tag-row span {
    display: inline-flex;
    max-width: 100%;
    padding: 4px 8px;
    border-radius: 9px;
    background: rgba(75, 85, 99, 0.72);
    color: var(--soft);
    font-size: 12px;
}

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

.category-tile,
.category-overview-card {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    padding: 24px;
    border: 1px solid rgba(75, 85, 99, 0.56);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(31, 41, 55, 0.72));
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile:hover,
.category-overview-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.72);
}

.category-tile span,
.category-overview-card h2 {
    display: block;
    margin-bottom: 10px;
    color: white;
    font-size: 22px;
    font-weight: 850;
}

.category-overview-card {
    min-height: 260px;
    display: flex;
    align-items: end;
}

.category-overview-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.32;
}

.category-overview-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(3, 7, 18, 0.15), rgba(3, 7, 18, 0.88));
}

.category-overview-card div {
    position: relative;
    z-index: 1;
}

.page-main {
    padding: 32px 0 72px;
}

.page-hero {
    padding: 54px;
    border: 1px solid rgba(75, 85, 99, 0.56);
    border-radius: 28px;
    background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.22), transparent 34%), rgba(17, 24, 39, 0.72);
    box-shadow: var(--shadow);
}

.compact-hero h1 {
    margin: 10px 0 14px;
    font-size: clamp(34px, 6vw, 58px);
    letter-spacing: -0.03em;
}

.compact-hero p {
    max-width: 780px;
    margin: 0;
    font-size: 17px;
}

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

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

.filter-panel {
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(130px, 180px)) auto;
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid rgba(75, 85, 99, 0.56);
    border-radius: 20px;
    background: rgba(17, 24, 39, 0.66);
}

.empty-state {
    margin-top: 22px;
    padding: 42px;
    border: 1px solid rgba(75, 85, 99, 0.56);
    border-radius: 20px;
    background: rgba(17, 24, 39, 0.7);
    color: var(--muted);
    text-align: center;
}

.ranking-list {
    display: grid;
    gap: 14px;
}

.rank-row {
    display: grid;
    grid-template-columns: 64px 92px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
}

.rank-number {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: rgba(245, 158, 11, 0.14);
    color: var(--accent);
    font-weight: 900;
}

.rank-poster {
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.86);
}

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

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

.rank-info p {
    margin: 0 0 10px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.15fr) minmax(300px, 0.85fr);
    gap: 32px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(75, 85, 99, 0.72);
    border-radius: 26px;
    background: black;
    box-shadow: var(--shadow);
}

.movie-video,
.player-overlay,
.player-overlay img {
    width: 100%;
    height: 100%;
}

.movie-video {
    display: block;
    background: black;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: black;
    cursor: pointer;
}

.player-overlay img {
    position: absolute;
    inset: 0;
    object-fit: cover;
    opacity: 0.56;
}

.player-overlay::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.68));
}

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

.big-play {
    position: relative;
    z-index: 2;
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    font-size: 34px;
    box-shadow: 0 18px 50px rgba(245, 158, 11, 0.35);
    transition: transform 0.25s ease;
}

.player-overlay:hover .big-play {
    transform: scale(1.08);
}

.detail-title {
    padding: 28px 0 18px;
}

.detail-title h1 {
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.12;
}

.detail-title p {
    margin: 14px 0 22px;
    font-size: 17px;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.info-cards div,
.detail-section,
.side-card {
    border: 1px solid rgba(75, 85, 99, 0.56);
    border-radius: 20px;
    background: rgba(31, 41, 55, 0.46);
}

.info-cards div {
    padding: 18px;
}

.info-cards span,
.side-card dt {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 13px;
}

.info-cards strong {
    color: white;
    font-size: 19px;
}

.detail-section {
    margin-top: 22px;
    padding: 28px;
}

.detail-section h2 {
    margin-bottom: 14px;
    font-size: 25px;
}

.detail-section p {
    margin: 0;
    color: var(--soft);
    font-size: 16px;
}

.detail-side {
    min-width: 0;
}

.side-card {
    position: sticky;
    top: 96px;
    padding: 18px;
}

.side-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.86);
}

.side-card dl {
    margin: 18px 0;
}

.side-card dl div {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(75, 85, 99, 0.42);
}

.side-card dd,
.side-card dt {
    margin: 0;
}

.side-card dd {
    color: white;
    font-weight: 650;
}

.wide-tags {
    align-items: flex-start;
}

.related-section {
    margin-top: 42px;
}

.site-footer {
    margin-top: 76px;
    border-top: 1px solid rgba(75, 85, 99, 0.62);
    background: rgba(17, 24, 39, 0.88);
}

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

.footer-inner p {
    max-width: 660px;
    margin: 12px 0 0;
}

.footer-links {
    justify-content: flex-end;
    flex-wrap: wrap;
}

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(31, 41, 55, 0.82);
    color: var(--soft);
    font-size: 14px;
}

.footer-links a:hover {
    color: white;
    background: rgba(245, 158, 11, 0.18);
}

.footer-bottom {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: var(--muted);
    font-size: 13px;
}

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

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

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

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

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

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

    .hero-carousel {
        height: 620px;
    }

    .hero-arrow {
        display: none;
    }

    .search-band,
    .footer-inner,
    .detail-layout {
        grid-template-columns: 1fr;
    }

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

    .filter-panel input,
    .filter-panel button {
        grid-column: span 2;
    }

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

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

    .side-card {
        position: static;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .header-inner,
    .search-band,
    .content-section,
    .page-hero,
    .breadcrumb,
    .detail-layout,
    .footer-inner,
    .footer-bottom {
        width: min(100% - 24px, 1280px);
    }

    .brand-text strong {
        font-size: 17px;
    }

    .brand-text em {
        display: none;
    }

    .hero-carousel {
        height: 560px;
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: 40px;
    }

    .hero-actions,
    .detail-actions {
        width: 100%;
    }

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

    .search-band,
    .page-hero,
    .detail-section {
        padding: 22px;
    }

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

    .filter-panel input,
    .filter-panel button {
        grid-column: span 1;
    }

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

    .movie-info {
        padding: 12px;
    }

    .movie-info p {
        display: none;
    }

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

    .rank-row .small-button {
        grid-column: 1 / -1;
    }

    .rank-number {
        width: 38px;
        height: 38px;
    }

    .info-cards {
        grid-template-columns: 1fr;
    }
}
