:root {
    --bg: #fff7ed;
    --bg-soft: #fffbeb;
    --ink: #1f2937;
    --muted: #6b7280;
    --amber: #d97706;
    --amber-dark: #92400e;
    --orange: #ea580c;
    --card: #ffffff;
    --line: rgba(146, 64, 14, 0.14);
    --shadow: 0 18px 45px rgba(146, 64, 14, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 44%, #fef3c7 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 251, 235, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--amber-dark);
    font-weight: 900;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 12px 24px rgba(217, 119, 6, 0.25);
}

.logo-text {
    font-size: 22px;
    letter-spacing: 0.02em;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-menu a {
    padding: 10px 15px;
    color: #78350f;
    border-radius: 999px;
    font-weight: 700;
    transition: 0.2s ease;
}

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

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 0;
    border-radius: 12px;
    background: #fff3d8;
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    background: #92400e;
    border-radius: 10px;
}

.quick-strip {
    border-top: 1px solid rgba(146, 64, 14, 0.08);
    background: rgba(255, 247, 237, 0.7);
}

.quick-inner {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
}

.quick-inner a {
    flex: 0 0 auto;
    padding: 7px 12px;
    color: #92400e;
    border: 1px solid rgba(217, 119, 6, 0.22);
    border-radius: 999px;
    background: #ffffff;
    font-size: 14px;
    font-weight: 700;
}

.hero-area {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 15% 15%, rgba(251, 191, 36, 0.42), transparent 30%), linear-gradient(135deg, #fef3c7 0%, #fff7ed 45%, #fed7aa 100%);
}

.hero-area::after {
    content: "";
    position: absolute;
    inset: auto -120px -180px auto;
    width: 360px;
    height: 360px;
    background: rgba(249, 115, 22, 0.12);
    border-radius: 999px;
    filter: blur(10px);
}

.hero-slider {
    position: relative;
    min-height: 640px;
    padding: 64px 0 46px;
}

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

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

.hero-copy {
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 7px 13px;
    color: #92400e;
    border: 1px solid rgba(146, 64, 14, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    font-weight: 800;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0 0 16px;
    color: #78350f;
    line-height: 1.1;
}

.hero-copy h1 {
    max-width: 760px;
    font-size: clamp(34px, 5vw, 62px);
    letter-spacing: -0.04em;
}

.hero-copy h2 {
    font-size: clamp(26px, 3.8vw, 46px);
}

.hero-copy p {
    max-width: 760px;
    margin: 0 0 24px;
    color: #92400e;
    font-size: 18px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid rgba(217, 119, 6, 0.32);
    color: #92400e;
    background: rgba(255, 255, 255, 0.78);
    font-weight: 900;
    box-shadow: 0 10px 26px rgba(146, 64, 14, 0.10);
    transition: 0.22s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(146, 64, 14, 0.16);
}

.btn.primary {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--amber), var(--orange));
}

.search-panel,
.filter-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 26px 0 0;
    padding: 14px;
    border: 1px solid rgba(146, 64, 14, 0.16);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 18px 40px rgba(146, 64, 14, 0.10);
}

.search-panel input,
.filter-panel input,
.filter-panel select {
    flex: 1 1 220px;
    min-height: 46px;
    padding: 0 14px;
    color: #78350f;
    border: 1px solid rgba(217, 119, 6, 0.18);
    border-radius: 14px;
    background: #ffffff;
    outline: none;
}

.search-panel button,
.filter-panel button {
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    font-weight: 900;
    cursor: pointer;
}

.hero-visual {
    position: relative;
    z-index: 2;
}

.hero-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border: 12px solid rgba(255, 255, 255, 0.68);
    border-radius: 34px;
    background: #f8e7c0;
    box-shadow: var(--shadow);
}

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

.hero-poster:hover img {
    transform: scale(1.05);
}

.hero-mini-card {
    position: absolute;
    right: -18px;
    bottom: 28px;
    max-width: 250px;
    padding: 16px;
    color: #78350f;
    border: 1px solid rgba(217, 119, 6, 0.18);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
}

.hero-mini-card strong {
    display: block;
    margin-bottom: 5px;
    font-size: 18px;
}

.hero-dots {
    display: flex;
    gap: 10px;
    margin-top: 22px;
}

.hero-dots button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(146, 64, 14, 0.28);
    cursor: pointer;
}

.hero-dots button.is-active {
    width: 34px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
}

.section {
    padding: 64px 0;
}

.section.alt {
    background: rgba(255, 255, 255, 0.5);
}

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

.section-title {
    margin: 0 0 8px;
    color: #78350f;
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 900;
}

.section-desc {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.grid {
    display: grid;
    gap: 22px;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(217, 119, 6, 0.12);
    border-radius: 20px;
    background: var(--card);
    box-shadow: 0 10px 28px rgba(146, 64, 14, 0.08);
    transition: 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 42px rgba(146, 64, 14, 0.15);
}

.movie-card[hidden],
.rank-row[hidden] {
    display: none;
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: #f8e7c0;
}

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

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

.card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 8px;
    color: #ffffff;
    border-radius: 999px;
    background: rgba(234, 88, 12, 0.92);
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 14px;
}

.card-body h3 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 16px;
    line-height: 1.35;
}

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

.card-meta,
.card-desc {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.card-desc {
    display: -webkit-box;
    min-height: 40px;
    margin-top: 8px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tag-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tag-line span {
    padding: 4px 7px;
    color: #92400e;
    border-radius: 999px;
    background: #ffedd5;
    font-size: 12px;
    font-weight: 700;
}

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 160px;
    padding: 24px;
    border: 1px solid rgba(217, 119, 6, 0.16);
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff, #fff7ed);
    box-shadow: 0 12px 30px rgba(146, 64, 14, 0.08);
    transition: 0.22s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 12px;
    color: #78350f;
    font-size: 24px;
}

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

.category-card span {
    color: var(--orange);
    font-weight: 900;
}

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

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

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

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

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

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

.rank-info h3 {
    margin: 0 0 6px;
    color: #111827;
    font-size: 17px;
}

.rank-info p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.rank-heat {
    padding: 7px 10px;
    color: #92400e;
    border-radius: 999px;
    background: #ffedd5;
    font-size: 13px;
    font-weight: 900;
}

.page-hero {
    padding: 58px 0;
    background: linear-gradient(135deg, #fef3c7, #fff7ed);
    border-bottom: 1px solid rgba(146, 64, 14, 0.12);
}

.page-hero h1 {
    margin: 0 0 12px;
    color: #78350f;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.15;
}

.page-hero p {
    max-width: 820px;
    margin: 0;
    color: #92400e;
    font-size: 18px;
    line-height: 1.8;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #92400e;
    font-size: 14px;
    font-weight: 700;
}

.breadcrumb a:hover {
    color: var(--orange);
}

.detail-hero {
    padding: 48px 0;
    background: radial-gradient(circle at top left, rgba(251, 191, 36, 0.35), transparent 30%), linear-gradient(135deg, #fff7ed, #fef3c7);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(220px, 310px) minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border: 10px solid rgba(255, 255, 255, 0.72);
    border-radius: 28px;
    background: #f8e7c0;
    box-shadow: var(--shadow);
}

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

.detail-info h1 {
    margin: 0 0 16px;
    color: #78350f;
    font-size: clamp(32px, 4.6vw, 58px);
    line-height: 1.12;
}

.one-line {
    max-width: 850px;
    margin: 0 0 22px;
    color: #92400e;
    font-size: 19px;
    line-height: 1.8;
}

.meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.meta-list span {
    padding: 8px 12px;
    color: #78350f;
    border: 1px solid rgba(217, 119, 6, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    font-weight: 800;
}

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

.movie-video {
    display: block;
    width: 100%;
    height: 100%;
    background: #000000;
    object-fit: contain;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    height: 100%;
    color: #ffffff;
    border: 0;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.15), rgba(0, 0, 0, 0.74));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    padding-left: 5px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
    font-size: 34px;
}

.content-card {
    margin-top: 28px;
    padding: clamp(22px, 4vw, 38px);
    border: 1px solid rgba(217, 119, 6, 0.12);
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(146, 64, 14, 0.08);
}

.content-card h2 {
    margin: 0 0 16px;
    color: #78350f;
    font-size: 26px;
}

.content-card p {
    margin: 0 0 18px;
    color: #374151;
    line-height: 1.9;
}

.related-block {
    margin-top: 38px;
}

.no-results {
    padding: 26px;
    color: #92400e;
    border: 1px solid rgba(217, 119, 6, 0.18);
    border-radius: 20px;
    background: #fff7ed;
    text-align: center;
    font-weight: 800;
}

.site-footer {
    margin-top: 40px;
    padding: 38px 0;
    color: #ffedd5;
    background: linear-gradient(135deg, #78350f, #9a3412);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-inner p {
    margin: 8px 0 0;
    color: #fed7aa;
}

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

.footer-links a {
    color: #ffedd5;
    font-weight: 700;
}

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

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

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

    .nav-menu {
        position: absolute;
        top: 72px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid rgba(146, 64, 14, 0.14);
        border-radius: 18px;
        background: #ffffff;
        box-shadow: var(--shadow);
    }

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

    .nav-menu a {
        text-align: center;
    }

    .hero-slider {
        min-height: auto;
        padding: 42px 0;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .hero-visual {
        max-width: 360px;
        margin: 0 auto;
    }

    .hero-mini-card {
        right: 10px;
        left: 10px;
        bottom: 14px;
        max-width: none;
    }

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

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

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

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

    .rank-heat {
        grid-column: 3;
        justify-self: start;
    }
}

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

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

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

    .section {
        padding: 42px 0;
    }

    .card-body {
        padding: 12px;
    }

    .card-desc {
        display: none;
    }

    .search-panel,
    .filter-panel {
        padding: 12px;
    }
}
