:root {
    --amber: #d97706;
    --amber-dark: #b45309;
    --orange: #f97316;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #fffbeb;
    --card: #ffffff;
    --dark: #111827;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 28%, #f9fafb 100%);
    line-height: 1.65;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 237, 213, 0.96));
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(120, 53, 15, 0.10);
}

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

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

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 10px 22px rgba(217, 119, 6, 0.35);
}

.brand-name {
    font-size: 23px;
    letter-spacing: 0.02em;
}

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

.nav-link {
    padding: 20px 0 16px;
    font-size: 15px;
    font-weight: 700;
    color: #4b5563;
    border-bottom: 3px solid transparent;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--amber);
    border-bottom-color: var(--amber);
}

.top-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-search input,
.search-panel input,
.search-panel select {
    height: 40px;
    border: 1px solid #fed7aa;
    background: #ffffff;
    border-radius: 999px;
    padding: 0 16px;
    outline: none;
    min-width: 180px;
}

.top-search input:focus,
.search-panel input:focus,
.search-panel select:focus {
    border-color: var(--amber);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
}

.top-search button,
.primary-btn,
.ghost-btn,
.card-link,
.search-panel button,
.play-button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search button,
.primary-btn,
.search-panel button,
.play-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 12px 26px rgba(217, 119, 6, 0.28);
}

.ghost-btn,
.card-link {
    color: var(--amber-dark);
    background: #fffbeb;
    border: 1px solid #fbbf24;
}

.primary-btn:hover,
.ghost-btn:hover,
.card-link:hover,
.search-panel button:hover,
.play-button:hover,
.top-search button:hover {
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    background: #fff7ed;
    border-radius: 12px;
    font-size: 24px;
    padding: 6px 10px;
}

.mobile-panel {
    display: none;
    border-top: 1px solid #fed7aa;
    background: #ffffff;
}

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

.mobile-panel-inner {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 14px 0;
}

.mobile-panel a {
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff7ed;
    font-weight: 700;
}

.hero-carousel {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #111827;
}

.hero-stage {
    position: relative;
    min-height: 620px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.55fr);
    align-items: center;
    gap: 48px;
    width: 100%;
    padding: 68px max(32px, calc((100vw - 1180px) / 2)) 84px;
    opacity: 0;
    transform: scale(1.01);
    pointer-events: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: blur(28px) saturate(1.2);
    transform: scale(1.08);
    opacity: 0.42;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 22%, rgba(245, 158, 11, 0.42), transparent 28%),
        linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.70), rgba(17, 24, 39, 0.88));
}

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

.eyebrow {
    margin: 0 0 12px;
    color: var(--amber);
    font-weight: 900;
    letter-spacing: 0.08em;
}

.hero-content h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(40px, 6vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-summary {
    max-width: 720px;
    margin: 20px 0 0;
    color: #f3f4f6;
    font-size: 18px;
}

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

.hero-tags {
    margin-top: 22px;
}

.hero-tags span,
.tag-row span,
.detail-tags span,
.meta-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 13px;
    font-weight: 700;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
}

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

.hero-poster {
    align-self: center;
    border-radius: 28px;
    overflow: hidden;
    transform: rotate(2deg);
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.48);
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, #78350f, #111827);
}

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

.hero-controls {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.55);
    backdrop-filter: blur(10px);
}

.hero-arrow,
.hero-dot {
    border: 0;
    color: #ffffff;
    cursor: pointer;
}

.hero-arrow {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 26px;
    background: rgba(255, 255, 255, 0.14);
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
}

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

.page-main {
    padding: 52px 0 70px;
}

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

.section-heading h1,
.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    color: #111827;
}

.section-link {
    color: var(--amber-dark);
    font-weight: 900;
}

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

.movie-card,
.category-card,
.info-card,
.detail-box,
.search-panel,
.ranking-row {
    background: var(--card);
    border: 1px solid rgba(251, 191, 36, 0.28);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.movie-card {
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

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

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

.play-chip,
.rank-badge {
    position: absolute;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--amber), var(--orange));
}

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 6px 12px;
    font-size: 13px;
}

.rank-badge {
    top: 12px;
    left: 12px;
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.movie-card h2 {
    margin: 8px 0 7px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card p {
    margin: 0 0 12px;
    min-height: 54px;
    color: var(--muted);
    font-size: 14px;
}

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

.category-card {
    padding: 22px;
    background: linear-gradient(135deg, #ffffff, #fffbeb);
}

.category-card h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.category-card p {
    margin: 0 0 18px;
    color: var(--muted);
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 64px 86px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 12px;
}

.ranking-num {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--amber), var(--orange));
}

.ranking-thumb {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 12px;
    background: #fffbeb;
}

.ranking-thumb img {
    height: 100%;
    object-fit: cover;
}

.ranking-row h2 {
    margin: 0 0 5px;
    font-size: 20px;
}

.ranking-row p {
    margin: 0;
    color: var(--muted);
}

.search-panel {
    margin-bottom: 26px;
    padding: 18px;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 170px 170px auto;
    gap: 12px;
    align-items: center;
}

.detail-hero {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    background: #111827;
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--detail-image);
    background-size: cover;
    background-position: center;
    filter: blur(24px) saturate(1.1);
    opacity: 0.35;
    transform: scale(1.08);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(17, 24, 39, 0.66));
}

.detail-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    padding: 52px 0;
}

.detail-poster {
    border-radius: 26px;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    box-shadow: 0 35px 85px rgba(0, 0, 0, 0.48);
    background: #fffbeb;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #fde68a;
    font-weight: 800;
}

.detail-info h1 {
    margin: 14px 0 14px;
    color: #ffffff;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.08;
}

.detail-intro {
    max-width: 820px;
    color: #f3f4f6;
    font-size: 18px;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 26px;
    align-items: start;
}

.player-box {
    background: #000000;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.22);
}

.player-frame {
    position: relative;
    aspect-ratio: 16 / 9;
}

.player-frame video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    background: rgba(0, 0, 0, 0.35);
    z-index: 2;
    cursor: pointer;
}

.play-button {
    min-width: 150px;
    font-size: 18px;
}

.detail-box {
    margin-top: 22px;
    padding: 24px;
}

.detail-box h2,
.info-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.detail-box p {
    margin: 0;
    color: #374151;
}

.side-stack {
    display: grid;
    gap: 18px;
}

.info-card {
    padding: 20px;
}

.info-card ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.info-card li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 8px;
}

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

.related-item {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.related-item img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 10px;
    background: #fffbeb;
}

.related-item strong {
    display: block;
    line-height: 1.3;
}

.related-item span {
    color: var(--muted);
    font-size: 13px;
}

.site-footer {
    margin-top: 30px;
    color: #d1d5db;
    background: linear-gradient(135deg, #111827, #1f2937);
}

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

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

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

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

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

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

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

.empty-message {
    display: none;
    padding: 24px;
    color: var(--muted);
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid var(--line);
}

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

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

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

    .hero-poster {
        display: none;
    }

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

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

    .menu-toggle {
        display: block;
    }

    .hero-carousel,
    .hero-stage {
        min-height: 560px;
    }

    .hero-slide {
        padding: 44px 22px 92px;
    }

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

    .category-grid,
    .footer-grid,
    .detail-hero-inner,
    .search-panel {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        width: min(260px, 72vw);
    }

    .ranking-row {
        grid-template-columns: 44px 64px minmax(0, 1fr);
    }

    .ranking-row .card-link {
        grid-column: 2 / 4;
        text-align: center;
    }
}

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

    .brand-name {
        font-size: 20px;
    }

    .hero-content h1 {
        font-size: 38px;
    }

    .hero-summary {
        font-size: 16px;
    }

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

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