:root {
    --bg: #fffaf2;
    --bg-soft: #fff3df;
    --text: #1f2937;
    --muted: #6b7280;
    --line: rgba(31, 41, 55, 0.12);
    --brand: #d97706;
    --brand-strong: #b45309;
    --red: #ef4444;
    --dark: #111827;
    --card: rgba(255, 255, 255, 0.92);
    --shadow: 0 18px 45px rgba(120, 53, 15, 0.16);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 42%, #fffaf2 100%);
    color: var(--text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

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

.topbar {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

.brand-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    box-shadow: 0 10px 24px rgba(239, 68, 68, 0.28);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-text strong {
    font-size: 19px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #d97706, #dc2626);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

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

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

.main-nav a,
.mobile-nav a {
    padding: 9px 14px;
    border-radius: 999px;
    color: #4b5563;
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active,
.mobile-nav a:hover {
    color: var(--brand-strong);
    background: rgba(245, 158, 11, 0.14);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: rgba(245, 158, 11, 0.14);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--brand-strong);
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 18px;
    flex-wrap: wrap;
    gap: 8px;
}

.mobile-nav.is-open {
    display: flex;
}

.hero-slider {
    position: relative;
    overflow: hidden;
    min-height: 680px;
    color: #ffffff;
    background: #111827;
}

.hero-track {
    position: relative;
    min-height: 680px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 48px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
    padding: 110px max(24px, calc((100vw - 1280px) / 2 + 24px)) 120px;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.38;
    filter: saturate(1.05) contrast(1.04);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 72% 32%, rgba(245, 158, 11, 0.32), transparent 26%), linear-gradient(90deg, rgba(17, 24, 39, 0.95), rgba(17, 24, 39, 0.62) 48%, rgba(17, 24, 39, 0.24));
}

.hero-content,
.hero-poster {
    position: relative;
    z-index: 2;
}

.eyebrow,
.section-kicker {
    margin: 0 0 12px;
    color: #f59e0b;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-desc {
    max-width: 720px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.hero-tags span,
.tag-row span {
    padding: 6px 11px;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.12);
    color: #92400e;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    color: #fffbeb;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 34px;
}

.primary-btn,
.ghost-btn,
.text-btn,
.search-jump button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.search-jump button {
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    box-shadow: 0 14px 28px rgba(239, 68, 68, 0.24);
}

.ghost-btn {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.26);
    background: rgba(255, 255, 255, 0.12);
}

.text-btn {
    color: #fcd34d;
    background: transparent;
}

.primary-btn:hover,
.ghost-btn:hover,
.text-btn:hover,
.search-jump button:hover {
    transform: translateY(-2px);
}

.hero-poster {
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
    transform: rotate(1.2deg);
}

.hero-poster img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 30px;
    z-index: 5;
    display: flex;
    gap: 10px;
    width: min(1280px, calc(100% - 48px));
    transform: translateX(-50%);
}

.hero-dot {
    flex: 1;
    min-height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(12px);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.hero-dot.is-active,
.hero-dot:hover {
    color: #ffffff;
    background: rgba(245, 158, 11, 0.36);
}

.home-search-panel,
.section-wrap,
.split-section,
.footer-grid,
.footer-bottom,
.page-main,
.detail-main {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
}

.home-search-panel {
    position: relative;
    z-index: 8;
    margin-top: -48px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
    align-items: center;
    gap: 24px;
    padding: 28px;
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.home-search-panel h2,
.section-title h2,
.ranking-panel h2,
.page-hero h1,
.detail-info h1,
.player-section h2,
.detail-content h2 {
    margin: 0;
    color: var(--dark);
    letter-spacing: -0.03em;
}

.search-jump,
.filter-line {
    display: flex;
    gap: 10px;
}

.search-jump input,
.filter-line input {
    width: 100%;
    min-height: 50px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 18px;
    outline: none;
    background: #ffffff;
}

.search-jump input:focus,
.filter-line input:focus {
    border-color: rgba(245, 158, 11, 0.68);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.section-wrap {
    padding: 72px 0 0;
}

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

.section-title h2,
.ranking-panel h2,
.page-hero h1 {
    font-size: clamp(28px, 4vw, 44px);
}

.section-title a {
    color: var(--brand-strong);
    font-weight: 800;
}

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

.category-card,
.category-overview-card a {
    min-height: 134px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border: 1px solid rgba(245, 158, 11, 0.17);
    border-radius: 22px;
    background: linear-gradient(135deg, #ffffff, #fff7ed);
    box-shadow: 0 12px 26px rgba(120, 53, 15, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.category-overview-card a:hover,
.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.category-card span,
.category-overview-card span {
    color: var(--brand-strong);
    font-size: 20px;
    font-weight: 900;
}

.category-card strong,
.category-overview-card p {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
}

.category-overview-card em {
    color: var(--brand-strong);
    font-style: normal;
    font-weight: 800;
}

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(31, 41, 55, 0.08);
    border-radius: 20px;
    background: var(--card);
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #1f2937, #92400e);
}

.poster-link img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.quality-badge,
.play-chip {
    position: absolute;
    z-index: 3;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

.quality-badge {
    left: 10px;
    top: 10px;
    background: rgba(239, 68, 68, 0.92);
}

.play-chip {
    right: 10px;
    bottom: 10px;
    background: rgba(17, 24, 39, 0.78);
    backdrop-filter: blur(8px);
}

.card-content {
    padding: 14px;
}

.card-content h2 {
    margin: 0;
    font-size: 16px;
    line-height: 1.35;
}

.card-content h2 a:hover {
    color: var(--brand-strong);
}

.card-meta,
.card-summary,
.detail-line,
.detail-desc,
.page-hero p,
.detail-content p {
    color: var(--muted);
}

.card-meta {
    margin: 6px 0;
    font-size: 12px;
}

.card-summary {
    margin: 0;
    font-size: 13px;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    padding: 72px 0 0;
}

.split-left {
    width: auto;
    padding: 0;
}

.ranking-panel {
    align-self: start;
    position: sticky;
    top: 92px;
    padding: 24px;
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
}

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

.rank-item {
    display: grid;
    grid-template-columns: auto 56px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    background: #fff7ed;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    background: #ffedd5;
    transform: translateX(3px);
}

.rank-num {
    min-width: 36px;
    color: var(--red);
    font-size: 18px;
    font-weight: 900;
    text-align: center;
}

.rank-item img {
    width: 56px;
    height: 76px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-item strong,
.rank-item em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-item em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.page-main,
.detail-main {
    padding-bottom: 84px;
}

.page-hero {
    margin-top: 34px;
    padding: 54px;
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 32px;
    background: radial-gradient(circle at top right, rgba(239, 68, 68, 0.16), transparent 34%), linear-gradient(135deg, #ffffff, #fff7ed);
    box-shadow: var(--shadow);
}

.page-hero p {
    max-width: 760px;
    margin: 14px 0 0;
    font-size: 18px;
}

.filter-line {
    max-width: 620px;
    margin-top: 26px;
}

.wide-filter {
    max-width: 860px;
}

.ranking-full .rank-item {
    grid-template-columns: 58px 64px minmax(0, 1fr);
}

.detail-main {
    padding-top: 24px;
}

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

.breadcrumb a {
    color: var(--brand-strong);
    font-weight: 700;
}

.breadcrumb em {
    font-style: normal;
}

.detail-hero {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 38px;
    margin-top: 24px;
    padding: 34px;
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 32px;
    background: linear-gradient(135deg, #ffffff, #fff7ed);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: 0 24px 52px rgba(17, 24, 39, 0.18);
}

.detail-poster img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.detail-info h1 {
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.08;
}

.detail-line {
    margin: 14px 0;
    font-weight: 700;
}

.detail-desc {
    max-width: 800px;
    margin: 0 0 24px;
    font-size: 18px;
}

.large-tags {
    margin-bottom: 28px;
}

.player-section,
.detail-content {
    margin-top: 36px;
    padding: 28px;
    border: 1px solid rgba(31, 41, 55, 0.08);
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
}

.player-box {
    position: relative;
    overflow: hidden;
    margin-top: 18px;
    border-radius: 24px;
    background: #0f172a;
}

.movie-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0f172a;
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.22), rgba(15, 23, 42, 0.5));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-start span {
    width: 86px;
    height: 86px;
    display: block;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    box-shadow: 0 18px 40px rgba(239, 68, 68, 0.34);
    position: relative;
}

.player-start span::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 52%;
    width: 0;
    height: 0;
    border-top: 17px solid transparent;
    border-bottom: 17px solid transparent;
    border-left: 26px solid #ffffff;
    transform: translate(-35%, -50%);
}

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

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.detail-content article {
    padding: 10px;
}

.related-wrap {
    width: auto;
}

.site-footer {
    margin-top: 86px;
    padding: 54px 0 26px;
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 34px;
}

.footer-brand {
    color: #f59e0b;
    font-size: 22px;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 18px;
}

.site-footer p {
    max-width: 440px;
    color: #9ca3af;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

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

.footer-bottom {
    margin-top: 32px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    font-size: 14px;
}

.movie-card.is-hidden,
.rank-item.is-hidden {
    display: none;
}

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

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

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

    .split-section {
        grid-template-columns: 1fr;
    }

    .ranking-panel {
        position: static;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero-slider,
    .hero-track {
        min-height: 720px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 24px;
        padding-top: 88px;
    }

    .hero-poster {
        width: min(260px, 76vw);
        transform: none;
    }

    .hero-dots {
        overflow-x: auto;
        justify-content: flex-start;
    }

    .hero-dot {
        min-width: 140px;
    }

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

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

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

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

@media (max-width: 720px) {
    .topbar,
    .mobile-nav,
    .home-search-panel,
    .section-wrap,
    .split-section,
    .footer-grid,
    .footer-bottom,
    .page-main,
    .detail-main {
        width: min(100% - 28px, 1280px);
    }

    .topbar {
        padding: 12px 14px;
    }

    .brand-text em {
        display: none;
    }

    .hero-slider,
    .hero-track {
        min-height: 760px;
    }

    .hero-slide {
        padding-left: 16px;
        padding-right: 16px;
    }

    .home-search-panel {
        padding: 22px;
    }

    .search-jump {
        flex-direction: column;
    }

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

    .page-hero,
    .detail-hero,
    .player-section,
    .detail-content {
        padding: 24px;
        border-radius: 24px;
    }

    .ranking-full .rank-item,
    .rank-item {
        grid-template-columns: 44px 54px minmax(0, 1fr);
    }
}

@media (max-width: 480px) {
    .category-grid,
    .category-overview-grid,
    .movie-grid,
    .page-grid,
    .compact-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

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