:root {
    --bg: #fff7ed;
    --surface: #ffffff;
    --surface-soft: #fffbeb;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #fed7aa;
    --orange: #f97316;
    --orange-dark: #ea580c;
    --amber: #f59e0b;
    --yellow: #fde047;
    --shadow: 0 18px 45px rgba(124, 45, 18, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(253, 224, 71, 0.38), transparent 28rem),
        linear-gradient(180deg, #fff7ed 0%, #fffbeb 44%, #ffffff 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(254, 215, 170, 0.76);
    backdrop-filter: blur(14px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    color: #111827;
    white-space: nowrap;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    color: #ffffff;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: 0 10px 22px rgba(249, 115, 22, 0.35);
}

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

.nav-link {
    padding: 9px 13px;
    border-radius: 999px;
    color: #374151;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--orange-dark);
    background: #ffedd5;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 999px;
}

.header-search input {
    width: 170px;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 7px 6px 7px 12px;
}

.header-search button,
.hero-search button,
.filter-controls button,
.primary-button,
.secondary-button {
    border: 0;
    cursor: pointer;
    font-weight: 800;
    border-radius: 999px;
}

.header-search button,
.hero-search button,
.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: 0 12px 26px rgba(249, 115, 22, 0.28);
}

.header-search button {
    padding: 8px 14px;
}

.menu-button {
    display: none;
    border: 0;
    border-radius: 12px;
    padding: 8px 11px;
    color: var(--orange-dark);
    background: #ffedd5;
}

.hero {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    background: linear-gradient(135deg, #fb923c 0%, #f59e0b 52%, #fde047 100%);
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    filter: blur(8px);
}

.hero::before {
    top: 8%;
    left: 5%;
    animation: float 8s ease-in-out infinite;
}

.hero::after {
    right: 8%;
    bottom: 12%;
    animation: float 9s ease-in-out infinite reverse;
}

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

.hero-slide {
    display: none;
    align-items: center;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 44px;
}

.hero-slide.active {
    display: grid;
}

.hero-copy {
    color: #ffffff;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    font-weight: 800;
}

.hero h1 {
    margin: 24px 0 20px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.06em;
    text-shadow: 0 12px 28px rgba(124, 45, 18, 0.25);
}

.hero-copy p {
    max-width: 680px;
    margin: 0 0 22px;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.94);
}

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

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 22px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-button:hover,
.secondary-button:hover {
    transform: translateY(-2px);
}

.secondary-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.34);
    backdrop-filter: blur(8px);
}

.hero-poster {
    position: relative;
    padding: 16px;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.22);
    box-shadow: 0 30px 70px rgba(124, 45, 18, 0.28);
    backdrop-filter: blur(12px);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.2);
}

.hero-poster-card {
    position: absolute;
    left: 36px;
    right: 36px;
    bottom: 34px;
    padding: 18px;
    color: #ffffff;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.1), rgba(17, 24, 39, 0.74));
}

.hero-poster-card strong {
    display: block;
    margin-bottom: 4px;
    font-size: 22px;
}

.hero-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 34px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.55);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
    width: 34px;
    background: #ffffff;
}

.hero-search-card {
    width: min(960px, calc(100% - 32px));
    margin: -44px auto 0;
    position: relative;
    z-index: 4;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
    border: 1px solid rgba(254, 215, 170, 0.9);
}

.hero-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.hero-search input {
    min-height: 52px;
    padding: 0 18px;
    border: 1px solid #fed7aa;
    outline: 0;
    border-radius: 999px;
    background: #fff7ed;
}

.hero-search button {
    min-height: 52px;
    padding: 0 28px;
}

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

.section {
    padding: 68px 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-title h1,
.filter-panel h2 {
    margin: 0;
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.section-heading h2,
.page-hero h1,
.detail-title h1 {
    font-size: clamp(30px, 4vw, 44px);
}

.section-heading p,
.page-hero p,
.filter-panel p,
.footer-inner p {
    color: var(--muted);
    margin: 8px 0 0;
}

.heading-line {
    flex: 1;
    height: 4px;
    min-width: 120px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--orange), rgba(245, 158, 11, 0.5), transparent);
}

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(124, 45, 18, 0.09);
    border: 1px solid rgba(254, 215, 170, 0.68);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    border-color: #fdba74;
    box-shadow: 0 25px 50px rgba(124, 45, 18, 0.16);
}

.card-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #ffedd5, #fef3c7);
}

.card-cover img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .card-cover img {
    transform: scale(1.07);
}

.card-cover::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 46%;
    background: linear-gradient(180deg, transparent, rgba(17, 24, 39, 0.72));
}

.card-badge,
.card-year {
    position: absolute;
    z-index: 2;
    top: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.card-badge {
    left: 12px;
    background: linear-gradient(135deg, var(--orange), var(--amber));
}

.card-year {
    right: 12px;
    background: rgba(17, 24, 39, 0.68);
}

.card-body {
    padding: 18px;
}

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

.card-body h3 a:hover {
    color: var(--orange-dark);
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.card-tags span,
.meta-chip,
.category-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.card-tags span,
.meta-chip {
    padding: 5px 9px;
    color: #c2410c;
    background: #ffedd5;
}

.card-body p {
    margin: 12px 0 0;
    color: #4b5563;
    font-size: 14px;
}

.category-panel,
.rank-panel,
.filter-panel,
.page-hero,
.detail-card,
.text-panel {
    border: 1px solid rgba(254, 215, 170, 0.76);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
}

.category-panel {
    padding: 28px;
}

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

.category-card {
    min-height: 160px;
    padding: 22px;
    border-radius: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #f59e0b);
    box-shadow: 0 16px 35px rgba(249, 115, 22, 0.2);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:nth-child(3n + 2) {
    background: linear-gradient(135deg, #6366f1, #a855f7);
}

.category-card:nth-child(3n) {
    background: linear-gradient(135deg, #22c55e, #14b8a6);
}

.category-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 24px 45px rgba(124, 45, 18, 0.22);
}

.category-card h3 {
    margin: 0 0 10px;
    font-size: 24px;
}

.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 60px 110px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid rgba(254, 215, 170, 0.78);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    box-shadow: 0 14px 28px rgba(124, 45, 18, 0.12);
}

.rank-no {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--orange), var(--amber));
}

.rank-row img {
    width: 110px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 14px;
    background: #ffedd5;
}

.rank-title h3 {
    margin: 0;
    font-size: 18px;
}

.rank-title p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.rank-link {
    color: var(--orange-dark);
    font-weight: 900;
}

.page-hero {
    margin: 38px 0 28px;
    padding: 34px;
    background:
        radial-gradient(circle at 85% 20%, rgba(253, 224, 71, 0.34), transparent 18rem),
        rgba(255, 255, 255, 0.92);
}

.category-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0 0;
}

.category-chip {
    padding: 9px 13px;
    color: #c2410c;
    background: #ffedd5;
    border: 1px solid #fed7aa;
}

.category-chip:hover,
.category-chip.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 0.9fr);
    gap: 24px;
    align-items: center;
    margin: 28px 0;
    padding: 24px;
}

.filter-controls {
    display: grid;
    grid-template-columns: 1fr 150px;
    gap: 12px;
}

.filter-controls input,
.filter-controls select {
    min-height: 48px;
    padding: 0 14px;
    outline: 0;
    border-radius: 14px;
    border: 1px solid #fed7aa;
    background: #fff7ed;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
    gap: 28px;
    align-items: start;
    margin: 38px 0 62px;
}

.detail-card {
    overflow: hidden;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 28px 28px 0 0;
    background: #0f172a;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.28);
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.68));
}

.play-button {
    position: relative;
    z-index: 3;
    width: 82px;
    height: 82px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: 0 18px 38px rgba(249, 115, 22, 0.38);
    font-size: 28px;
    cursor: pointer;
}

.is-hidden {
    display: none;
}

.detail-info {
    padding: 26px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    margin-bottom: 16px;
    font-size: 14px;
}

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

.detail-title h1 {
    margin-bottom: 14px;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.detail-info p {
    color: #374151;
    margin: 14px 0 0;
}

.detail-side {
    display: grid;
    gap: 22px;
}

.text-panel {
    padding: 24px;
}

.text-panel h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.text-panel p {
    margin: 0;
    color: #374151;
}

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

.related-item {
    display: grid;
    grid-template-columns: 94px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
}

.related-item img {
    width: 94px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 12px;
}

.related-item strong {
    display: block;
    margin-bottom: 4px;
}

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

.site-footer {
    margin-top: 60px;
    padding: 36px 0;
    color: #e5e7eb;
    background: #111827;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

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

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

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

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-24px) rotate(5deg);
    }
}

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

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

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

    .hero-poster {
        max-width: 620px;
        margin: 0 auto;
    }
}

@media (max-width: 760px) {
    .header-inner {
        min-height: 64px;
    }

    .menu-button {
        display: inline-flex;
    }

    .site-nav {
        position: absolute;
        top: 64px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border-radius: 20px;
        background: #ffffff;
        box-shadow: var(--shadow);
        border: 1px solid #fed7aa;
    }

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

    .nav-link {
        width: 100%;
        text-align: center;
    }

    .hero {
        min-height: auto;
    }

    .hero-inner {
        padding: 48px 0 46px;
    }

    .hero-copy p {
        font-size: 17px;
    }

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

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

    .section-heading,
    .footer-inner,
    .filter-panel {
        display: block;
    }

    .heading-line {
        margin-top: 14px;
    }

    .filter-controls {
        grid-template-columns: 1fr;
        margin-top: 18px;
    }

    .rank-row {
        grid-template-columns: 42px 82px 1fr;
    }

    .rank-link {
        display: none;
    }

    .rank-row img {
        width: 82px;
    }
}

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

    .hero-actions {
        flex-direction: column;
    }

    .primary-button,
    .secondary-button {
        width: 100%;
    }

    .page-hero,
    .category-panel,
    .text-panel,
    .detail-info {
        padding: 20px;
    }
}
