:root {
    --brand: #d97706;
    --brand-dark: #b45309;
    --brand-soft: #fef3c7;
    --orange: #f97316;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --paper: #ffffff;
    --bg: #f7f7f8;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, var(--brand-dark), var(--brand), var(--orange));
    box-shadow: 0 8px 30px rgba(180, 83, 9, 0.24);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 68px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.logo-mark {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    color: var(--brand-dark);
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

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

.nav-link {
    padding: 10px 13px;
    border-radius: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

.quick-search,
.mobile-search,
.search-page-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-search input,
.mobile-search input,
.search-page-form input {
    min-width: 210px;
    border: 0;
    outline: 0;
    border-radius: 999px;
    padding: 10px 14px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.96);
}

.quick-search button,
.mobile-search button,
.search-page-form button,
.primary-button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    color: #ffffff;
    cursor: pointer;
    font-weight: 800;
    background: linear-gradient(135deg, var(--brand), var(--orange));
    box-shadow: 0 10px 22px rgba(217, 119, 6, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-search button {
    background: rgba(17, 24, 39, 0.24);
    box-shadow: none;
}

.quick-search button:hover,
.mobile-search button:hover,
.search-page-form button:hover,
.primary-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(217, 119, 6, 0.32);
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
}

.mobile-panel {
    display: none;
    padding: 0 16px 16px;
}

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

.mobile-link {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    font-weight: 700;
}

.mobile-link:hover,
.mobile-link.active {
    background: rgba(255, 255, 255, 0.16);
}

.mobile-search {
    margin-top: 10px;
}

.mobile-search input {
    min-width: 0;
    flex: 1;
}

.page-shell {
    min-height: 70vh;
    padding: 34px 0 10px;
}

.hero-carousel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    margin-bottom: 34px;
}

.hero-stage {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    border-radius: 28px;
    background: #111827;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.6s ease, transform 1.2s ease;
}

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.46) 44%, rgba(0, 0, 0, 0.12)), linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.18) 52%, rgba(0, 0, 0, 0.48));
}

.hero-content {
    position: absolute;
    left: clamp(24px, 6vw, 64px);
    right: 24px;
    bottom: clamp(30px, 8vw, 70px);
    max-width: 680px;
    color: #ffffff;
}

.hero-kicker,
.eyebrow {
    color: #fbbf24;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1 {
    margin: 10px 0 14px;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 650px;
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #92400e;
    background: #fef3c7;
    font-size: 12px;
    font-weight: 800;
}

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

.ghost-button {
    border-radius: 999px;
    padding: 10px 18px;
    color: #ffffff;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.ghost-button:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.28);
}

.hero-dots {
    position: absolute;
    left: clamp(24px, 6vw, 64px);
    bottom: 28px;
    display: flex;
    gap: 9px;
    z-index: 2;
}

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

.hero-dot.active {
    width: 28px;
    background: #f59e0b;
}

.hero-search-card {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 520px;
    padding: 32px;
    border-radius: 28px;
    background: linear-gradient(145deg, #ffffff, #fff7ed);
    box-shadow: var(--shadow);
}

.hero-search-card h2 {
    margin: 0 0 10px;
    font-size: 34px;
    line-height: 1.1;
}

.hero-search-card p {
    margin: 0 0 22px;
    color: var(--muted);
}

.hero-search-card form {
    display: grid;
    gap: 10px;
}

.hero-search-card input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px 16px;
    outline: 0;
    background: #ffffff;
}

.hero-search-card button {
    border: 0;
    border-radius: 16px;
    padding: 14px 18px;
    color: #ffffff;
    cursor: pointer;
    font-weight: 900;
    background: linear-gradient(135deg, var(--brand), var(--orange));
}

.hero-category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-category-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: #92400e;
    font-size: 13px;
    font-weight: 800;
    background: #fef3c7;
}

.content-section {
    margin: 34px 0;
    padding: 28px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-more,
.text-link {
    color: var(--brand);
    font-weight: 900;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.82);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(217, 119, 6, 0.35);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.14);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #78350f);
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.02) 54%);
    opacity: 0.85;
}

.play-cue {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 34px;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .play-cue {
    opacity: 1;
    transform: scale(1);
}

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

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

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

.card-desc {
    display: -webkit-box;
    min-height: 42px;
    margin: 0 0 10px;
    overflow: hidden;
    color: #4b5563;
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    margin-bottom: 10px;
    color: #6b7280;
    font-size: 12px;
}

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

.category-tile,
.category-card-wide {
    display: block;
    padding: 18px;
    border: 1px solid rgba(229, 231, 235, 0.86);
    border-radius: 20px;
    background: linear-gradient(145deg, #ffffff, #fff7ed);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover,
.category-card-wide:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.13);
}

.category-thumbs,
.wide-thumb-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.category-thumbs img,
.wide-thumb-row img {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    object-fit: cover;
    background: #111827;
}

.category-tile h3,
.category-card-wide h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.category-tile p,
.category-card-wide p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.spotlight-section {
    background: linear-gradient(135deg, #fffbeb, #fff7ed);
}

.rank-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.rank-line {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
}

.rank-line span,
.rank-badge {
    display: inline-grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--brand), var(--orange));
}

.rank-line strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-line em {
    color: var(--brand);
    font-style: normal;
    font-weight: 900;
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    min-width: 38px;
}

.page-title-card {
    margin-bottom: 28px;
    padding: 34px;
    border-radius: 26px;
    background: linear-gradient(145deg, #ffffff, #fff7ed);
    box-shadow: var(--shadow);
}

.compact-title {
    padding: 26px;
}

.page-title-card h1 {
    margin: 6px 0 8px;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.page-title-card p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 17px;
}

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

.category-card-wide {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
}

.category-card-wide .wide-thumb-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin: 0 0 18px;
    color: #6b7280;
    font-size: 14px;
}

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

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

.player-hero {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 0.9fr);
    gap: 24px;
    align-items: stretch;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000000;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    cursor: pointer;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.44), rgba(0, 0, 0, 0.1));
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-overlay span {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border-radius: 999px;
    font-size: 34px;
    background: linear-gradient(135deg, var(--brand), var(--orange));
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.34);
}

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

.detail-card {
    display: grid;
    grid-template-columns: 135px minmax(0, 1fr);
    gap: 18px;
    padding: 20px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.detail-poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 16px;
    object-fit: cover;
    background: #111827;
}

.detail-info h1 {
    margin: 8px 0 10px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.08;
}

.detail-one-line {
    margin: 0 0 14px;
    color: #374151;
    font-size: 16px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
    color: #4b5563;
    font-size: 14px;
}

.detail-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    background: #f3f4f6;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.8fr);
    gap: 24px;
    margin-top: 24px;
}

.text-card,
.side-card {
    padding: 24px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.text-card + .text-card {
    margin-top: 18px;
}

.accent-card {
    background: linear-gradient(145deg, #fff7ed, #ffffff);
}

.text-card h2,
.side-card h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.text-card p {
    margin: 0;
    color: #374151;
    font-size: 16px;
}

.side-card {
    position: sticky;
    top: 92px;
}

.side-card dl {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 10px 12px;
    margin: 0;
}

.side-card dt {
    color: #6b7280;
    font-weight: 800;
}

.side-card dd {
    margin: 0;
    color: #111827;
}

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

.search-page-form {
    margin-top: 22px;
    max-width: 760px;
}

.search-page-form input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px 16px;
}

.search-page-form button {
    border-radius: 16px;
    padding: 14px 22px;
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.filter-pills button {
    border: 1px solid #fcd34d;
    border-radius: 999px;
    padding: 8px 12px;
    color: #92400e;
    cursor: pointer;
    font-weight: 800;
    background: #fffbeb;
}

.filter-pills button.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--orange));
}

.search-status {
    margin-top: 16px !important;
    color: var(--brand) !important;
    font-weight: 800;
}

.empty-state {
    display: none;
    padding: 36px;
    border-radius: 20px;
    color: var(--muted);
    text-align: center;
    background: #ffffff;
}

.empty-state.show {
    display: block;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 28px;
    padding: 42px 0 30px;
}

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

.site-footer p {
    margin: 0;
    color: #9ca3af;
}

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

.footer-links a {
    color: #d1d5db;
}

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

.footer-bottom {
    padding: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #9ca3af;
    text-align: center;
}

@media (max-width: 1100px) {
    .quick-search {
        display: none;
    }

    .hero-carousel,
    .player-hero,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .hero-search-card {
        min-height: auto;
    }

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

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

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

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

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

    .header-inner {
        min-height: 62px;
    }

    .hero-stage {
        min-height: 440px;
        border-radius: 22px;
    }

    .hero-search-card,
    .content-section,
    .page-title-card {
        padding: 22px;
        border-radius: 22px;
    }

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

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

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

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

    .detail-card {
        grid-template-columns: 110px minmax(0, 1fr);
    }

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

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

    .logo {
        font-size: 18px;
    }

    .page-shell {
        padding-top: 20px;
    }

    .hero-carousel {
        gap: 14px;
    }

    .hero-stage {
        min-height: 390px;
    }

    .hero-content {
        left: 20px;
        right: 20px;
        bottom: 56px;
    }

    .hero-content p {
        font-size: 15px;
    }

    .hero-dots {
        left: 20px;
        bottom: 24px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

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

    .card-desc {
        min-height: 38px;
        font-size: 12px;
    }

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

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

    .side-card dl {
        grid-template-columns: 1fr;
    }

    .search-page-form {
        align-items: stretch;
        flex-direction: column;
    }
}
