:root {
    --bg: #fffaf0;
    --paper: #ffffff;
    --paper-soft: #fff7ed;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #fed7aa;
    --orange: #f97316;
    --orange-deep: #ea580c;
    --amber: #f59e0b;
    --red: #ef4444;
    --shadow: 0 18px 45px rgba(124, 45, 18, 0.13);
    --shadow-soft: 0 12px 30px rgba(124, 45, 18, 0.09);
    --radius: 24px;
    --radius-sm: 16px;
    --container: 1240px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: #f9fafb;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.94), rgba(255, 237, 213, 0.94));
    box-shadow: 0 10px 30px rgba(124, 45, 18, 0.12);
    backdrop-filter: blur(18px);
}

.header-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    gap: 20px;
}

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #fb923c, #f59e0b);
    box-shadow: 0 10px 24px rgba(249, 115, 22, 0.35);
    transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
    transform: scale(1.08) rotate(4deg);
}

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

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

.nav-link,
.mobile-link {
    padding: 10px 14px;
    border-radius: 12px;
    color: #374151;
    font-weight: 700;
    transition: 0.22s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.is-active,
.mobile-link.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #f59e0b);
}

.header-search {
    display: flex;
    align-items: center;
    width: 330px;
    padding: 4px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #fed7aa;
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.08);
}

.header-search input,
.mobile-search input,
.big-search input,
.catalog-tools input,
.catalog-tools select {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: #ffffff;
}

.header-search input {
    padding: 10px 14px;
    border-radius: 999px;
}

.header-search button,
.mobile-search button,
.big-search button {
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #f59e0b);
    font-weight: 800;
    white-space: nowrap;
    padding: 10px 16px;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #ffedd5;
    color: #9a3412;
}

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

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

.mobile-panel-inner {
    padding: 16px 0;
    display: grid;
    gap: 10px;
}

.mobile-search {
    display: flex;
    gap: 8px;
    padding: 8px;
    border-radius: 16px;
    background: #ffffff;
}

.mobile-search input {
    padding: 10px;
}

.hero-carousel {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    background: linear-gradient(135deg, #ffedd5 0%, #fff7ed 42%, #fef3c7 100%);
}

.hero-glow {
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    filter: blur(56px);
    opacity: 0.36;
}

.hero-glow-one {
    top: 48px;
    left: 7%;
    background: #fb923c;
}

.hero-glow-two {
    right: 8%;
    bottom: 36px;
    background: #facc15;
}

.hero-shell {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: center;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.72fr);
    gap: 48px;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-eyebrow,
.section-kicker,
.ranking-head p,
.search-panel p {
    margin: 0 0 10px;
    color: var(--orange-deep);
    font-weight: 900;
    letter-spacing: 0.08em;
}

.hero-copy h1,
.page-hero h1,
.detail-intro h1 {
    margin: 0;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.055em;
    color: #111827;
}

.hero-desc,
.page-hero p,
.detail-one-line {
    margin: 22px 0 0;
    max-width: 720px;
    color: #4b5563;
    font-size: 19px;
}

.hero-tags,
.rank-tags,
.watch-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-tags span,
.rank-tags span,
.watch-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #9a3412;
    background: rgba(255, 237, 213, 0.92);
    border: 1px solid rgba(253, 186, 116, 0.6);
    font-size: 13px;
    font-weight: 800;
}

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

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

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

.btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #f59e0b);
    box-shadow: 0 14px 28px rgba(249, 115, 22, 0.25);
}

.btn.ghost {
    color: #374151;
    background: #ffffff;
    border: 1px solid #fed7aa;
    box-shadow: var(--shadow-soft);
}

.btn.ghost.light {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.45);
}

.btn.text {
    color: #ea580c;
    background: rgba(255, 255, 255, 0.52);
}

.hero-art {
    position: relative;
    display: block;
    min-height: 390px;
    border-radius: 34px;
    overflow: hidden;
    background: #111827;
    box-shadow: 0 30px 90px rgba(124, 45, 18, 0.28);
    transform: rotate(1.2deg);
}

.hero-art img {
    width: 100%;
    height: 100%;
    min-height: 390px;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.hero-art:hover img {
    transform: scale(1.06);
}

.hero-art::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.05), rgba(17, 24, 39, 0.58));
}

.hero-art-label {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
    z-index: 1;
    color: #ffffff;
    font-weight: 900;
    text-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.hero-controls {
    position: absolute;
    left: 0;
    bottom: 34px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.hero-controls button {
    border: 0;
    background: #ffffff;
    color: #ea580c;
    box-shadow: var(--shadow-soft);
}

.hero-controls > button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 30px;
    line-height: 1;
}

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

.hero-dot {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    padding: 0;
    opacity: 0.55;
}

.hero-dot.is-active {
    width: 34px;
    opacity: 1;
    background: linear-gradient(135deg, #f97316, #f59e0b);
}

.quick-search-section {
    margin-top: -44px;
    position: relative;
    z-index: 2;
}

.search-panel {
    display: grid;
    grid-template-columns: 0.72fr 1fr;
    gap: 24px;
    align-items: center;
    padding: 26px;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.search-panel h2 {
    margin: 0;
    font-size: 28px;
}

.big-search {
    display: flex;
    gap: 10px;
    padding: 8px;
    border-radius: 999px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
}

.big-search input {
    padding: 14px 18px;
    border-radius: 999px;
    background: transparent;
}

.content-section {
    padding: 72px 0;
}

.soft-bg {
    background: linear-gradient(135deg, #fff7ed, #f9fafb);
}

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

.section-head h2 {
    margin: 0;
    color: #111827;
    font-size: clamp(30px, 4vw, 44px);
    letter-spacing: -0.04em;
}

.section-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ea580c;
    font-weight: 900;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #111827;
}

.movie-card.compact .poster-link {
    aspect-ratio: 16 / 9;
}

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

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

.poster-mask {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: rgba(17, 24, 39, 0);
    transition: background 0.25s ease;
}

.poster-play {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(249, 115, 22, 0.92);
    opacity: 0;
    transform: scale(0.82);
    transition: 0.25s ease;
}

.movie-card:hover .poster-mask {
    background: rgba(17, 24, 39, 0.38);
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: scale(1);
}

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(249, 115, 22, 0.92);
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.14);
}

.movie-info {
    padding: 18px;
}

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

.movie-info h2 a {
    transition: color 0.2s ease;
}

.movie-card:hover .movie-info h2 a {
    color: #ea580c;
}

.movie-info p {
    min-height: 48px;
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.movie-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 16px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 800;
}

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

.category-tile {
    min-height: 154px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding: 24px;
    border-radius: 24px;
    color: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover,
.category-preview:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.category-icon {
    font-size: 34px;
}

.category-tile strong {
    font-size: 22px;
}

.category-tile em {
    font-style: normal;
    opacity: 0.86;
}

.tone-orange,
.tone-amber {
    background: linear-gradient(135deg, #fb923c, #f59e0b);
}

.tone-rose {
    background: linear-gradient(135deg, #fb7185, #f97316);
}

.tone-red {
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.tone-yellow {
    background: linear-gradient(135deg, #f59e0b, #eab308);
}

.tone-green {
    background: linear-gradient(135deg, #22c55e, #f59e0b);
}

.tone-violet {
    background: linear-gradient(135deg, #8b5cf6, #f97316);
}

.tone-blue {
    background: linear-gradient(135deg, #3b82f6, #f97316);
}

.tone-cyan {
    background: linear-gradient(135deg, #06b6d4, #f59e0b);
}

.tone-slate {
    background: linear-gradient(135deg, #334155, #f97316);
}

.two-column-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 34px;
    align-items: start;
}

.ranking-panel,
.article-card,
.watch-card,
.category-preview {
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.ranking-panel {
    position: sticky;
    top: 92px;
    padding: 24px;
}

.ranking-head {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.ranking-head h2 {
    margin: 0;
    font-size: 28px;
}

.ranking-head a {
    color: #ea580c;
    font-weight: 900;
}

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

.rank-card {
    position: relative;
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #ffedd5;
    transition: 0.22s ease;
}

.full-rank-list .rank-card {
    grid-template-columns: 68px 180px minmax(0, 1fr);
    padding: 16px;
}

.rank-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-soft);
}

.rank-index {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #f59e0b);
    font-weight: 900;
}

.compact-rank-list .rank-index {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 1;
    width: 30px;
    height: 30px;
    font-size: 12px;
}

.rank-poster {
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 16 / 10;
    background: #111827;
}

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

.rank-content h2 {
    margin: 0 0 6px;
    font-size: 17px;
}

.rank-content p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.page-hero {
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #f59e0b);
}

.compact-hero {
    padding: 72px 0;
}

.page-hero h1 {
    color: #ffffff;
}

.page-hero p,
.page-hero .hero-eyebrow {
    color: rgba(255, 255, 255, 0.92);
}

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

.category-stack {
    display: grid;
    gap: 28px;
}

.category-preview {
    overflow: hidden;
    padding: 26px;
    color: #ffffff;
    transition: 0.22s ease;
}

.category-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.category-preview-head span {
    font-size: 36px;
}

.category-preview-head h2 {
    margin: 4px 0;
    font-size: 30px;
}

.category-preview-head p {
    max-width: 720px;
    margin: 0;
    opacity: 0.88;
}

.catalog-tools {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 14px;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.catalog-tools label {
    display: grid;
    gap: 8px;
    color: #9a3412;
    font-size: 13px;
    font-weight: 900;
}

.catalog-tools input,
.catalog-tools select {
    min-height: 46px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid #fed7aa;
}

.movie-card.is-hidden,
.rank-card.is-hidden {
    display: none;
}

.empty-state {
    display: none;
    padding: 48px;
    text-align: center;
    color: #9a3412;
    font-weight: 900;
    border-radius: 22px;
    background: #fff7ed;
}

.empty-state.is-visible {
    display: block;
}

.detail-hero {
    padding: 54px 0;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
}

.detail-hero-grid {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 30px;
    box-shadow: var(--shadow);
    background: #111827;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 24px;
    color: #9a3412;
    font-weight: 800;
}

.breadcrumb a {
    color: #ea580c;
}

.detail-tags {
    margin-top: 20px;
}

.player-section {
    padding-top: 46px;
}

.player-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: stretch;
}

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

.player-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 14px;
    color: #ffffff;
    border: 0;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.22), rgba(2, 6, 23, 0.72));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-ring {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #f97316, #f59e0b);
    box-shadow: 0 16px 34px rgba(249, 115, 22, 0.35);
    font-size: 34px;
}

.player-overlay strong {
    font-size: 22px;
}

.watch-card {
    padding: 28px;
}

.watch-card h2 {
    margin: 0 0 14px;
    font-size: 28px;
}

.watch-card p,
.article-card p {
    margin: 0;
    color: #4b5563;
}

.detail-copy-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.75fr);
    gap: 24px;
}

.article-card {
    padding: 30px;
}

.article-card h2 {
    margin: 0 0 14px;
    font-size: 28px;
}

.accent-card {
    background: linear-gradient(135deg, #ffffff, #fff7ed);
}

.site-footer {
    color: #d1d5db;
    background: linear-gradient(180deg, #1f2937, #111827);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 36px;
    padding: 54px 0;
}

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

.site-footer p {
    max-width: 460px;
    color: #9ca3af;
}

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

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

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

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

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

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

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

    .two-column-layout,
    .player-layout {
        grid-template-columns: 1fr;
    }

    .ranking-panel {
        position: static;
    }
}

@media (max-width: 860px) {
    .desktop-nav {
        display: none;
    }

    .nav-toggle {
        display: grid;
        place-items: center;
        margin-left: auto;
    }

    .hero-shell {
        min-height: 760px;
        align-items: flex-start;
        padding-top: 50px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 28px;
        align-content: start;
    }

    .hero-art,
    .hero-art img {
        min-height: 300px;
    }

    .hero-controls {
        bottom: 24px;
    }

    .search-panel,
    .detail-hero-grid,
    .detail-copy-grid,
    .footer-grid,
    .catalog-tools {
        grid-template-columns: 1fr;
    }

    .full-rank-list .rank-card {
        grid-template-columns: 54px minmax(96px, 150px) minmax(0, 1fr);
    }
}

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

    .brand-text {
        font-size: 19px;
    }

    .hero-carousel,
    .hero-shell {
        min-height: 720px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-intro h1 {
        font-size: 38px;
    }

    .hero-desc,
    .page-hero p,
    .detail-one-line {
        font-size: 16px;
    }

    .hero-actions,
    .detail-actions,
    .section-head,
    .category-preview-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .big-search {
        border-radius: 18px;
        flex-direction: column;
    }

    .movie-grid,
    .catalog-grid,
    .latest-grid,
    .preview-grid,
    .related-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .content-section {
        padding: 46px 0;
    }

    .detail-hero-grid {
        gap: 24px;
    }

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

    .full-rank-list .rank-card,
    .rank-card {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .full-rank-list .rank-index {
        position: absolute;
        top: 8px;
        left: 8px;
        z-index: 1;
    }
}
