* {
    box-sizing: border-box;
}

:root {
    --bg: #0f172a;
    --bg-soft: #111827;
    --panel: #ffffff;
    --panel-soft: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --line: rgba(148, 163, 184, 0.26);
    --brand: #f59e0b;
    --brand-dark: #d97706;
    --brand-soft: rgba(245, 158, 11, 0.12);
    --radius: 22px;
    --shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 42%, #f8fafc 100%);
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    color: #ffffff;
    background: linear-gradient(90deg, #0f172a 0%, #334155 52%, #0f172a 100%);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.28);
}

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

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

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #0f172a;
    font-weight: 900;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.32);
}

.brand-text {
    display: grid;
    gap: 2px;
}

.brand-text strong {
    font-size: 20px;
    letter-spacing: 0.02em;
}

.brand-text small {
    color: #cbd5e1;
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 15px;
    white-space: nowrap;
}

.desktop-nav a,
.mobile-panel a {
    color: #e2e8f0;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover {
    color: #fbbf24;
}

.top-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.top-search input,
.mobile-search input {
    width: 190px;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
    padding: 8px 10px;
}

.top-search input::placeholder,
.mobile-search input::placeholder {
    color: #cbd5e1;
}

.top-search button,
.mobile-search button,
.search-form-large button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    padding: 8px 16px;
    color: #0f172a;
    font-weight: 700;
    background: #fbbf24;
}

.menu-toggle {
    display: none;
    color: #ffffff;
    background: transparent;
    border: 0;
    font-size: 28px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

.mobile-panel nav {
    display: grid;
    gap: 12px;
    padding-top: 12px;
}

.hero {
    position: relative;
    min-height: 610px;
    overflow: hidden;
    color: #ffffff;
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.03);
    transition: opacity 0.72s ease, transform 0.72s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.hero-bg::after,
.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 72% 18%, rgba(245, 158, 11, 0.32), transparent 32%), linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.72));
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 56px;
    min-height: 610px;
    padding: 76px 0;
}

.hero-copy {
    max-width: 700px;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fbbf24;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

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

.hero-copy p {
    margin: 0 0 24px;
    max-width: 680px;
    color: #dbeafe;
    font-size: 19px;
    line-height: 1.8;
}

.hero-tags,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.hero-tags span,
.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
}

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

.primary-btn,
.ghost-btn,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    padding: 14px 22px;
    color: #0f172a;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 16px 32px rgba(245, 158, 11, 0.28);
}

.ghost-btn {
    padding: 13px 20px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    display: block;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.45);
}

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

.hero-poster:hover img {
    transform: scale(1.05);
}

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

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

.hero-dot.active {
    width: 36px;
    background: #fbbf24;
    border-color: #fbbf24;
}

.quick-panel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: -42px;
    position: relative;
    z-index: 10;
}

.quick-panel a {
    display: grid;
    gap: 6px;
    min-height: 112px;
    padding: 24px;
    border-radius: 22px;
    color: #ffffff;
    background: linear-gradient(135deg, #1e293b, #334155);
    box-shadow: var(--shadow);
}

.quick-panel strong {
    font-size: 22px;
}

.quick-panel span {
    color: #cbd5e1;
}

.section-block {
    padding: 56px 0;
}

.highlight-block {
    margin-top: 18px;
}

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

.section-head h2,
.page-hero h1,
.rank-copy h2,
.detail-info h1 {
    margin: 8px 0 0;
    color: #0f172a;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-link {
    padding: 11px 16px;
    color: #92400e;
    background: #fef3c7;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.1);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.16);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #1e293b;
}

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

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

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

.poster-year {
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    color: #0f172a;
    background: #fbbf24;
}

.poster-play {
    right: 12px;
    bottom: 12px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(12px);
}

.card-body {
    padding: 18px;
}

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

.meta-line {
    margin: 0 0 10px;
    color: #64748b;
    font-size: 14px;
}

.card-desc {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 14px;
    color: #334155;
    font-size: 14px;
    line-height: 1.65;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.tag-row span {
    padding: 5px 9px;
    border-radius: 999px;
    color: #92400e;
    background: #fffbeb;
    font-size: 12px;
    font-weight: 700;
}

.rank-preview {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 28px;
    align-items: stretch;
    padding: 36px;
    border-radius: 28px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #334155 62%, #92400e);
    box-shadow: var(--shadow);
}

.rank-copy h2 {
    color: #ffffff;
}

.rank-copy p:not(.eyebrow) {
    color: #cbd5e1;
    line-height: 1.8;
}

.rank-list,
.rank-page-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

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

.rank-list a {
    display: grid;
    grid-template-columns: 46px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
}

.rank-list span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #0f172a;
    background: #fbbf24;
    font-weight: 900;
}

.rank-list em {
    color: #cbd5e1;
    font-style: normal;
    font-size: 13px;
}

.page-main {
    min-height: 70vh;
}

.page-hero {
    padding: 56px 0 28px;
}

.slim-hero {
    max-width: 860px;
    text-align: center;
}

.page-hero p:not(.eyebrow) {
    max-width: 760px;
    color: #475569;
    line-height: 1.8;
    font-size: 17px;
}

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

.breadcrumb a {
    color: #fbbf24;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    padding: 28px 0 72px;
}

.category-card a {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 22px;
    padding: 20px;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.category-covers img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
}

.category-info h2 {
    margin: 4px 0 10px;
    font-size: 28px;
}

.category-info p {
    color: #64748b;
    line-height: 1.7;
}

.category-info span {
    display: inline-flex;
    margin-top: 10px;
    color: #92400e;
    font-weight: 800;
}

.filter-panel,
.search-panel {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    margin-bottom: 28px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.filter-panel input,
.filter-panel select,
.search-form-large input,
.search-selects select {
    height: 48px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 0 14px;
    outline: 0;
    color: #0f172a;
    background: #f8fafc;
}

.filter-panel input {
    flex: 1;
}

.category-movies {
    padding-bottom: 72px;
}

.rank-page {
    padding-bottom: 72px;
}

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

.rank-row a {
    display: grid;
    grid-template-columns: 64px 64px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

.rank-no {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    color: #0f172a;
    background: #fbbf24;
    font-weight: 900;
}

.rank-row img {
    width: 64px;
    height: 88px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-title {
    font-size: 18px;
    font-weight: 800;
}

.rank-meta {
    color: #64748b;
}

.search-panel {
    justify-content: space-between;
}

.search-form-large {
    display: flex;
    flex: 1;
    gap: 10px;
}

.search-form-large input {
    flex: 1;
}

.search-selects {
    display: flex;
    gap: 10px;
}

.search-results {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    padding-bottom: 72px;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 48px;
    border-radius: 24px;
    color: #64748b;
    text-align: center;
    background: #ffffff;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #0f172a;
}

.detail-hero-inner {
    position: relative;
    z-index: 1;
    padding: 52px 0 64px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 26px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.detail-info h1 {
    color: #ffffff;
    font-size: clamp(34px, 6vw, 62px);
}

.detail-one-line {
    max-width: 820px;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

.detail-tags {
    margin-bottom: 26px;
}

.player-section {
    margin-top: -42px;
    position: relative;
    z-index: 5;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
}

.movie-video {
    width: 100%;
    height: 100%;
    background: #020617;
    object-fit: contain;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    padding: 30px;
    color: #ffffff;
    text-align: center;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.22), rgba(15, 23, 42, 0.88));
}

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

.player-cover button {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    border: 0;
    border-radius: 999px;
    color: #0f172a;
    background: #fbbf24;
    font-size: 30px;
    cursor: pointer;
    box-shadow: 0 18px 36px rgba(245, 158, 11, 0.35);
}

.player-cover strong {
    font-size: 28px;
}

.player-cover span {
    color: #cbd5e1;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    padding: 38px 0 18px;
}

.detail-content article {
    padding: 28px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.detail-content h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.detail-content p {
    margin: 0;
    color: #334155;
    line-height: 1.9;
}

.site-footer {
    color: #cbd5e1;
    background: #0f172a;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 28px;
    padding: 46px 0;
}

.footer-logo {
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
}

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

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

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

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

.footer-bottom {
    padding: 18px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    color: #94a3b8;
    text-align: center;
}

@media (max-width: 1080px) {
    .desktop-nav,
    .top-search {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

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

    .hero-content {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 52px 0 86px;
    }

    .hero-poster {
        max-width: 360px;
    }

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

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

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

    .brand-text small {
        display: none;
    }

    .hero {
        min-height: 720px;
    }

    .hero-content {
        min-height: 720px;
    }

    .hero-copy h1 {
        font-size: 42px;
    }

    .hero-poster img {
        height: 360px;
    }

    .quick-panel,
    .rank-preview,
    .detail-layout,
    .detail-content,
    .category-card a,
    .category-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .rank-preview {
        padding: 24px;
    }

    .rank-list a,
    .rank-row a {
        grid-template-columns: 44px 1fr;
    }

    .rank-row img,
    .rank-meta {
        display: none;
    }

    .filter-panel,
    .search-panel,
    .search-form-large,
    .search-selects {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-panel input,
    .filter-panel select,
    .search-form-large input,
    .search-selects select {
        width: 100%;
    }

    .detail-poster {
        max-width: 240px;
    }
}

@media (max-width: 460px) {
    .movie-grid,
    .small-grid,
    .search-results {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        display: grid;
    }

    .card-body {
        padding: 16px;
    }
}
