:root {
    --bg: #fff7ed;
    --surface: #ffffff;
    --surface-soft: #fff3df;
    --text: #1f2937;
    --muted: #6b7280;
    --line: rgba(251, 146, 60, 0.22);
    --orange: #f97316;
    --amber: #f59e0b;
    --coral: #fb7185;
    --dark: #111827;
    --shadow: 0 18px 42px rgba(120, 53, 15, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 5%, rgba(251, 146, 60, 0.16), transparent 34rem),
        linear-gradient(180deg, #fff7ed 0%, #f9fafb 50%, #ffffff 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: linear-gradient(90deg, #f97316 0%, #fb7185 50%, #f59e0b 100%);
    box-shadow: 0 12px 28px rgba(194, 65, 12, 0.25);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

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

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

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

.nav-link {
    color: #fff7ed;
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: #ffffff;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    color: #ffffff;
    background: linear-gradient(110deg, #c2410c 0%, #f97316 42%, #f59e0b 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.24), transparent 18rem),
        radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.18), transparent 24rem),
        linear-gradient(90deg, rgba(17, 24, 39, 0.55), rgba(17, 24, 39, 0.08));
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-image);
    background-repeat: no-repeat;
    background-size: min(52vw, 560px) auto;
    background-position: right 8vw center;
    opacity: 0.28;
    filter: saturate(1.05) contrast(1.05);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 70px 0 110px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    margin-bottom: 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff7ed;
    font-size: 14px;
    font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.02;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 640px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: clamp(17px, 2.2vw, 22px);
}

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

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

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #9a3412;
    background: #ffffff;
    box-shadow: 0 16px 32px rgba(154, 52, 18, 0.25);
}

.btn-secondary {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

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

.hero-dot {
    width: 42px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
    cursor: pointer;
}

.hero-dot.is-active {
    background: #ffffff;
}

.page-hero {
    padding: 72px 0;
    color: #ffffff;
    background: linear-gradient(110deg, #ea580c 0%, #fb923c 52%, #f59e0b 100%);
}

.page-hero p {
    max-width: 760px;
    margin: 16px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 19px;
}

.section {
    padding: 56px 0;
}

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

.section-head h2,
.detail-section h2 {
    margin: 0;
    color: #111827;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.15;
    font-weight: 950;
    letter-spacing: -0.03em;
}

.section-head p,
.category-card p,
.detail-section p,
.movie-card p,
.rank-item p {
    color: var(--muted);
}

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

.movie-card,
.category-card,
.info-card,
.rank-item,
.player-card,
.detail-panel {
    border: 1px solid rgba(251, 146, 60, 0.14);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.9);
    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 24px 52px rgba(120, 53, 15, 0.18);
}

.poster,
.rank-poster,
.detail-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(249, 115, 22, 0.36), rgba(245, 158, 11, 0.18)),
        #fed7aa;
}

.poster {
    aspect-ratio: 2 / 3;
}

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

.poster img.is-missing,
.rank-poster img.is-missing,
.detail-poster img.is-missing {
    opacity: 0;
}

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

.poster-year,
.poster-rating {
    position: absolute;
    top: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.poster-year {
    left: 12px;
    background: rgba(17, 24, 39, 0.62);
}

.poster-rating {
    right: 12px;
    background: rgba(249, 115, 22, 0.88);
}

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

.card-meta,
.mini-meta,
.breadcrumb,
.detail-meta,
.stat-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.card-meta {
    color: var(--orange);
    font-size: 13px;
    font-weight: 800;
}

.card-meta span,
.mini-meta span,
.detail-meta span,
.stat-row span {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 12px;
    font-weight: 800;
}

.movie-card h3,
.rank-item h3,
.category-card h2,
.info-card h2 {
    margin: 10px 0 8px;
    color: #111827;
    line-height: 1.25;
    font-weight: 950;
}

.movie-card h3 {
    font-size: 19px;
}

.movie-card p {
    min-height: 68px;
    margin: 0;
    font-size: 14px;
}

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

.tag-row span {
    padding: 5px 9px;
    border-radius: 999px;
    background: #ffedd5;
    color: #c2410c;
    font-size: 12px;
    font-weight: 800;
}

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

.category-card,
.info-card {
    padding: 24px;
}

.category-card h2,
.info-card h2 {
    font-size: 24px;
}

.category-card ul {
    display: grid;
    gap: 8px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.category-card li a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid #ffedd5;
    color: #374151;
    font-weight: 750;
}

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

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

.rank-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #f59e0b);
    font-weight: 950;
}

.rank-poster {
    width: 92px;
    aspect-ratio: 2 / 3;
    border-radius: 16px;
}

.rank-item h3 {
    font-size: 20px;
}

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

.search-panel {
    margin-top: -34px;
    padding: 24px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
}

.search-box {
    display: flex;
    gap: 12px;
}

.search-box input {
    width: 100%;
    min-height: 54px;
    padding: 0 18px;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    outline: 0;
    background: #fff7ed;
    color: #111827;
}

.search-box input:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.15);
}

.result-count {
    margin: 14px 0 0;
    color: var(--muted);
    font-weight: 750;
}

.detail-hero {
    padding: 56px 0;
    color: #ffffff;
    background: linear-gradient(120deg, #7c2d12 0%, #f97316 48%, #f59e0b 100%);
}

.detail-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 34px;
    align-items: center;
}

.detail-poster {
    aspect-ratio: 2 / 3;
    border-radius: 26px;
    box-shadow: 0 28px 60px rgba(67, 20, 7, 0.3);
}

.breadcrumb {
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 800;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.detail-title p {
    max-width: 780px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 19px;
}

.detail-meta {
    margin-top: 22px;
}

.detail-meta span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

.player-card {
    position: relative;
    overflow: hidden;
    background: #0f172a;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background:
        linear-gradient(120deg, rgba(15, 23, 42, 0.85), rgba(124, 45, 18, 0.46)),
        var(--player-poster);
    background-size: cover;
    background-position: center;
    cursor: pointer;
}

.player-card.is-playing .player-cover {
    display: none;
}

.play-circle {
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: rgba(249, 115, 22, 0.92);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.38);
    font-size: 32px;
    font-weight: 950;
}

.detail-panel {
    padding: 26px;
}

.detail-section {
    display: grid;
    gap: 18px;
}

.detail-section + .detail-section {
    margin-top: 32px;
}

.detail-section p {
    margin: 0;
    font-size: 17px;
}

.site-footer {
    margin-top: 40px;
    padding: 48px 0;
    color: #d1d5db;
    background: linear-gradient(180deg, #111827 0%, #030712 100%);
}

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

.footer-brand {
    color: #ffffff;
    font-size: 20px;
}

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

.site-footer p {
    color: #d1d5db;
}

.footer-links {
    display: grid;
    gap: 9px;
}

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

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

.pagination-note {
    margin-top: 22px;
    color: var(--muted);
    font-weight: 750;
}

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

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

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

@media (max-width: 760px) {
    .nav-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        top: 68px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border-radius: 18px;
        background: #ea580c;
        box-shadow: var(--shadow);
    }

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

    .nav-link {
        text-align: center;
    }

    .hero {
        min-height: 560px;
    }

    .hero-slide::after {
        background-position: right -120px center;
        background-size: 420px auto;
        opacity: 0.18;
    }

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

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

    .rank-item {
        grid-template-columns: auto 74px 1fr;
        gap: 12px;
    }

    .rank-poster {
        width: 74px;
    }
}

@media (max-width: 520px) {
    .movie-grid,
    .category-grid,
    .info-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions,
    .section-actions,
    .detail-actions,
    .search-box {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

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

    .rank-num {
        width: 36px;
        height: 36px;
    }
}
