:root {
    --primary-50: #fef3e2;
    --primary-500: #d89410;
    --primary-600: #b6790d;
    --accent-50: #fff5ed;
    --accent-500: #f95c16;
    --accent-600: #ea420c;
    --secondary-50: #f5f7fa;
    --secondary-700: #3d486a;
    --secondary-800: #353d59;
    --secondary-900: #2f344c;
    --text: #172033;
    --muted: #64748b;
    --line: #e5e7eb;
    --white: #ffffff;
    --shadow: 0 24px 60px rgba(47, 52, 76, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, var(--primary-50), var(--secondary-50) 45%, var(--accent-50));
    line-height: 1.6;
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.85);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 24px;
}

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

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    box-shadow: 0 12px 26px rgba(249, 92, 22, 0.25);
}

.brand-text {
    font-size: 21px;
    background: linear-gradient(90deg, var(--primary-600), var(--accent-600));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-link {
    padding: 9px 13px;
    border-radius: 999px;
    color: #475569;
    font-size: 14px;
    font-weight: 650;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-600);
    background: var(--primary-50);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--secondary-50);
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--secondary-800);
    border-radius: 2px;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 40px 0 58px;
    background: radial-gradient(circle at 18% 5%, rgba(249, 92, 22, 0.18), transparent 34%), radial-gradient(circle at 82% 8%, rgba(216, 148, 16, 0.18), transparent 32%);
}

.hero-glow {
    position: absolute;
    inset: auto -120px 0 auto;
    width: 420px;
    height: 420px;
    border-radius: 999px;
    background: rgba(249, 92, 22, 0.16);
    filter: blur(40px);
}

.hero-shell {
    position: relative;
}

.hero-slider {
    position: relative;
    min-height: 560px;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--secondary-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) 360px;
    gap: 48px;
    align-items: center;
    padding: 68px;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.015);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.34;
    filter: blur(1px) saturate(1.05);
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(47, 52, 76, 0.96), rgba(47, 52, 76, 0.68), rgba(47, 52, 76, 0.9));
}

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

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--primary-500);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1 {
    max-width: 760px;
    margin: 0 0 18px;
    color: var(--white);
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

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

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

.hero-tags span,
.tag-row span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    font-weight: 700;
}

.tag-row span,
.detail-tags span {
    color: var(--primary-600);
    background: var(--primary-50);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: 0.2s ease;
}

.btn.primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    box-shadow: 0 15px 32px rgba(249, 92, 22, 0.28);
}

.btn.ghost {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.detail-actions .btn.ghost {
    color: var(--primary-600);
    background: var(--primary-50);
    border-color: transparent;
}

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

.hero-poster {
    height: 430px;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
    box-shadow: 0 24px 46px rgba(0, 0, 0, 0.32);
}

.hero-poster::after,
.poster::after,
.compact-poster::after,
.rank-cover::after,
.detail-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.42));
    pointer-events: none;
}

.hero-poster span {
    position: absolute;
    left: 22px;
    bottom: 22px;
    z-index: 2;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.52);
    backdrop-filter: blur(12px);
    font-weight: 800;
}

.hero-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 22px;
}

.hero-controls button {
    border: 0;
    cursor: pointer;
}

.hero-controls > button {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    color: var(--secondary-900);
    background: rgba(255, 255, 255, 0.86);
    font-size: 26px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(47, 52, 76, 0.28);
    transition: 0.2s ease;
}

.hero-dots button.is-active {
    width: 32px;
    background: var(--accent-500);
}

.section {
    padding: 56px 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-info h1,
.text-card h2 {
    margin: 0;
    color: var(--secondary-900);
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted);
}

.section-more {
    flex: 0 0 auto;
    padding: 10px 16px;
    border-radius: 999px;
    color: var(--primary-600);
    background: var(--primary-50);
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 16px 38px rgba(47, 52, 76, 0.1);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 48px rgba(47, 52, 76, 0.17);
}

.poster,
.compact-poster,
.rank-cover,
.detail-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, var(--secondary-800), var(--primary-500), var(--accent-500));
}

.poster {
    height: 300px;
}

.poster img,
.hero-poster img,
.compact-poster img,
.rank-cover img,
.detail-poster img,
.hero-backdrop img,
.detail-bg img {
    transition: opacity 0.2s ease, transform 0.4s ease;
}

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

.image-hidden {
    opacity: 0;
}

.rating,
.play-dot,
.rank-no {
    position: absolute;
    z-index: 3;
    color: var(--white);
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(10px);
}

.rating {
    top: 12px;
    right: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.play-dot {
    left: 12px;
    bottom: 12px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
}

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

.card-meta,
.rank-meta,
.detail-stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.card-meta a,
.heat {
    color: var(--primary-600);
}

.movie-card h2,
.compact-card h3,
.rank-row h2 {
    margin: 8px 0;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card p,
.compact-card p,
.rank-row p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 48px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
}

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

.category-tile,
.category-panel {
    display: block;
    min-height: 170px;
    padding: 22px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 14px 36px rgba(47, 52, 76, 0.1);
    transition: 0.22s ease;
}

.category-tile:hover,
.category-panel:hover {
    transform: translateY(-4px);
}

.category-tile span,
.category-panel-head span {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--accent-600);
    font-weight: 850;
}

.category-tile strong {
    display: block;
    margin-bottom: 10px;
    font-size: 20px;
}

.category-tile em,
.category-panel p {
    display: block;
    color: var(--muted);
    font-style: normal;
    font-size: 14px;
}

.hot-section {
    background: linear-gradient(135deg, rgba(47, 52, 76, 0.96), rgba(53, 61, 89, 0.95));
}

.hot-section .section-heading h2,
.hot-section .section-heading p {
    color: var(--white);
}

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

.compact-card {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 14px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.compact-poster {
    height: 120px;
    border-radius: 14px;
}

.rank-no {
    left: 8px;
    top: 8px;
    padding: 4px 7px;
    border-radius: 8px;
    font-weight: 900;
    font-size: 12px;
}

.compact-card h3 {
    margin-top: 5px;
}

.compact-card p {
    color: rgba(255, 255, 255, 0.72);
}

.page-main {
    min-height: 68vh;
}

.page-hero {
    margin-top: 38px;
    padding: 54px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow);
}

.category-hero {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(254, 243, 226, 0.94));
}

.search-bar {
    max-width: 520px;
    margin-top: 26px;
}

.search-bar input {
    width: 100%;
    min-height: 52px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--white);
    outline: none;
    box-shadow: 0 12px 28px rgba(47, 52, 76, 0.08);
}

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

.category-panel {
    min-height: 230px;
}

.category-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.category-panel-head strong {
    color: var(--primary-600);
    font-size: 14px;
}

.category-panel ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 18px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.category-panel li {
    color: var(--secondary-700);
    font-weight: 700;
}

.rank-list {
    display: grid;
    gap: 16px;
    padding: 44px 0 70px;
}

.rank-row {
    display: grid;
    grid-template-columns: 70px 96px 1fr;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 30px rgba(47, 52, 76, 0.09);
}

.rank-index {
    color: var(--accent-600);
    font-size: 24px;
    font-weight: 900;
    text-align: center;
}

.rank-cover {
    height: 128px;
    border-radius: 16px;
}

.detail-main {
    background: var(--secondary-50);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 72px 0;
    background: var(--secondary-900);
}

.detail-bg {
    position: absolute;
    inset: 0;
    opacity: 0.26;
    filter: blur(2px) saturate(1.05);
}

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(47, 52, 76, 0.98), rgba(47, 52, 76, 0.74));
}

.detail-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 42px;
    align-items: center;
}

.detail-poster {
    height: 430px;
    border-radius: 26px;
    box-shadow: 0 24px 46px rgba(0, 0, 0, 0.28);
}

.detail-poster span {
    position: absolute;
    left: 20px;
    bottom: 20px;
    z-index: 3;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.56);
    font-weight: 900;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 14px;
}

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

.detail-info h1 {
    color: var(--white);
    font-size: clamp(36px, 6vw, 68px);
}

.lead {
    max-width: 780px;
    margin: 18px 0 18px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

.detail-stats {
    margin-top: 22px;
    color: rgba(255, 255, 255, 0.78);
}

.detail-stats strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 32px;
    border-radius: 999px;
    color: var(--white);
    background: var(--accent-500);
}

.player-section {
    padding-bottom: 28px;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    color: var(--white);
    background: linear-gradient(135deg, rgba(47, 52, 76, 0.88), rgba(0, 0, 0, 0.52));
    cursor: pointer;
}

.player-cover.is-hidden {
    display: none;
}

.player-icon {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    box-shadow: 0 18px 38px rgba(249, 92, 22, 0.32);
    font-size: 28px;
}

.player-cover span:not(.player-icon) {
    font-size: 24px;
    font-weight: 900;
}

.player-cover em {
    font-style: normal;
    opacity: 0.78;
}

.detail-content {
    display: grid;
    grid-template-columns: 1.35fr 0.85fr;
    gap: 22px;
}

.text-card {
    padding: 30px;
    border-radius: 26px;
    background: var(--white);
    box-shadow: 0 14px 34px rgba(47, 52, 76, 0.08);
}

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

.accent-card {
    background: linear-gradient(135deg, var(--secondary-900), var(--secondary-800));
}

.accent-card h2,
.accent-card p {
    color: var(--white);
}

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

.site-footer {
    margin-top: 40px;
    padding: 46px 0;
    color: rgba(255, 255, 255, 0.72);
    background: var(--secondary-900);
}

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

.footer-brand {
    margin-bottom: 12px;
    color: var(--white);
    font-size: 24px;
    font-weight: 900;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 17px;
}

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

.footer-links a:hover {
    color: var(--primary-500);
}

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

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

    .hero-poster {
        display: none;
    }

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

    .detail-poster {
        height: 350px;
    }
}

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

    .menu-button {
        display: block;
    }

    .nav {
        position: absolute;
        left: 12px;
        right: 12px;
        top: 74px;
        display: none;
        padding: 12px;
        border-radius: 18px;
        background: var(--white);
        box-shadow: var(--shadow);
        justify-content: flex-start;
    }

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

    .hero {
        padding-top: 18px;
    }

    .hero-slider {
        min-height: 520px;
        border-radius: 24px;
    }

    .hero-slide {
        padding: 32px 24px;
    }

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

    .section-heading,
    .category-panel-head {
        align-items: start;
        flex-direction: column;
    }

    .movie-grid,
    .movie-grid.wide,
    .category-grid,
    .category-panels,
    .ranking-grid,
    .related-grid,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .poster {
        height: 360px;
    }

    .page-hero {
        padding: 32px 24px;
        border-radius: 24px;
    }

    .rank-row {
        grid-template-columns: 48px 82px 1fr;
        gap: 12px;
    }

    .rank-cover {
        height: 108px;
    }

    .rank-row p {
        display: none;
    }

    .detail-hero {
        padding: 38px 0;
    }

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

    .detail-poster {
        max-width: 260px;
        height: 360px;
    }

    .detail-info h1 {
        font-size: 38px;
    }
}
