:root {
    color-scheme: light;
    --bg: #fffbeb;
    --paper: #ffffff;
    --paper-soft: #fff7ed;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #fde68a;
    --brand: #f59e0b;
    --brand-strong: #f97316;
    --brand-deep: #92400e;
    --slate: #111827;
    --shadow: 0 24px 60px rgba(15, 23, 42, 0.13);
    --radius: 24px;
}

* {
    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(180deg, #fffbeb 0%, #ffffff 46%, #f8fafc 100%);
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 247, 237, 0.96));
    border-bottom: 1px solid rgba(251, 191, 36, 0.36);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 30px rgba(146, 64, 14, 0.08);
}

.header-inner {
    max-width: 1180px;
    height: 68px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    box-shadow: 0 12px 24px rgba(245, 158, 11, 0.35);
}

.brand-copy strong,
.brand-copy small {
    display: block;
    line-height: 1.1;
}

.brand-copy strong {
    font-size: 20px;
    color: var(--brand-deep);
}

.brand-copy small {
    margin-top: 4px;
    font-size: 12px;
    color: #b45309;
}

.search-form,
.mobile-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-form {
    flex: 1;
    max-width: 430px;
}

.search-form input,
.mobile-search input,
.filter-line input {
    width: 100%;
    border: 1px solid #fcd34d;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    padding: 11px 16px;
    color: var(--ink);
    outline: none;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.search-form input:focus,
.mobile-search input:focus,
.filter-line input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
}

.search-form button,
.mobile-search button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    cursor: pointer;
}

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

.nav-link,
.mobile-link {
    font-size: 15px;
    font-weight: 700;
    color: var(--brand-deep);
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: var(--brand-strong);
}

.mobile-toggle {
    display: none;
    border: 0;
    border-radius: 12px;
    padding: 8px 12px;
    color: var(--brand-deep);
    background: #fef3c7;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 22px 20px;
    border-top: 1px solid rgba(251, 191, 36, 0.32);
}

.mobile-menu.is-open {
    display: grid;
    gap: 12px;
}

.mobile-search {
    margin-bottom: 4px;
}

.home-hero {
    padding: 34px 22px 64px;
}

.hero-shell,
.content-section,
.footer-inner,
.footer-bottom,
.page-hero,
.watch-layout,
.detail-content {
    max-width: 1180px;
    margin: 0 auto;
}

.hero-title-block {
    margin-bottom: 22px;
}

.hero-title-block span,
.page-hero span {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 7px 13px;
    border-radius: 999px;
    color: #9a3412;
    background: #ffedd5;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hero-title-block h1,
.page-hero h1 {
    margin: 0;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.03;
    color: #0f172a;
    letter-spacing: -0.05em;
}

.hero-title-block p,
.page-hero p {
    max-width: 760px;
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.8;
}

.hero-carousel {
    position: relative;
    min-height: 510px;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: var(--shadow);
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.55s ease, transform 0.65s ease;
    pointer-events: none;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.45), rgba(2, 6, 23, 0.16));
}

.hero-content {
    position: absolute;
    left: clamp(28px, 7vw, 82px);
    bottom: clamp(36px, 8vw, 82px);
    width: min(620px, calc(100% - 52px));
    color: #ffffff;
}

.hero-label {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.95);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 16px;
}

.hero-content h2 {
    margin: 0 0 14px;
    font-size: clamp(30px, 5vw, 56px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p {
    margin: 0;
    color: #e2e8f0;
    font-size: 16px;
    line-height: 1.8;
}

.hero-meta,
.detail-meta,
.rank-meta,
.card-kicker {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
}

.hero-meta {
    margin-top: 16px;
}

.hero-meta span,
.detail-meta span,
.rank-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #f8fafc;
    font-size: 12px;
}

.hero-actions,
.page-actions,
.center-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

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

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

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

.btn.ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.btn.light {
    color: var(--brand-deep);
    background: #ffedd5;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #111827;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: transform 0.2s ease, background 0.2s ease;
}

.hero-arrow:hover {
    transform: translateY(-50%) scale(1.08);
    background: #ffffff;
}

.hero-arrow.prev {
    left: 18px;
}

.hero-arrow.next {
    right: 18px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 24px;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
}

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

.hero-dot.is-active {
    width: 34px;
    background: var(--brand);
}

.content-section {
    padding: 0 22px 70px;
}

.content-section.inner-only {
    padding-top: 62px;
    padding-bottom: 62px;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.section-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #ef4444, #f97316);
    box-shadow: 0 14px 28px rgba(239, 68, 68, 0.16);
}

.section-heading h2 {
    margin: 0;
    font-size: 27px;
    line-height: 1.2;
}

.section-heading p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 14px;
}

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

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

.movie-card {
    display: block;
    overflow: hidden;
    border-radius: 20px;
    background: var(--paper);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
}

.movie-card figure {
    position: relative;
    margin: 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #111827;
}

.movie-card figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.movie-card:hover figure img {
    transform: scale(1.08);
}

.year-pill,
.play-pill {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 800;
}

.year-pill {
    top: 12px;
    right: 12px;
    padding: 5px 9px;
    background: rgba(15, 23, 42, 0.68);
    font-size: 12px;
    backdrop-filter: blur(8px);
}

.play-pill {
    left: 50%;
    top: 50%;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    background: var(--brand);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.82);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-pill {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-body {
    padding: 17px;
}

.card-kicker span {
    color: #b45309;
    background: #ffedd5;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 700;
}

.movie-card h3 {
    margin: 12px 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

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

.tag-row span,
.tag-cloud span {
    padding: 5px 9px;
    border-radius: 999px;
    color: #475569;
    background: #f1f5f9;
    font-size: 12px;
}

.category-band {
    margin-bottom: 70px;
    background: linear-gradient(135deg, #fef3c7, #fff7ed);
}

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

.category-tile,
.category-page-card {
    padding: 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 12px 28px rgba(146, 64, 14, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile span,
.category-page-card span {
    color: var(--brand-strong);
    font-size: 13px;
    font-weight: 900;
}

.category-tile strong,
.category-page-card h2 {
    display: block;
    margin: 8px 0;
    color: var(--ink);
    font-size: 18px;
}

.category-tile p,
.category-page-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.center-actions {
    justify-content: center;
    margin-top: 34px;
}

.page-hero {
    padding: 70px 22px 52px;
}

.page-hero.slim {
    padding-bottom: 34px;
}

.page-actions .btn.light {
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.filter-line {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 14px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.filter-line label {
    color: var(--brand-deep);
    font-weight: 900;
}

.filter-line.wide input {
    max-width: 620px;
}

.empty-state {
    display: none;
    margin: 34px 0 0;
    padding: 28px;
    border-radius: 20px;
    text-align: center;
    color: var(--muted);
    background: #ffffff;
}

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

.rank-section {
    padding-top: 12px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 64px 142px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 16px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
    transform: translateX(6px);
    box-shadow: 0 20px 42px rgba(15, 23, 42, 0.12);
}

.rank-no {
    font-size: 28px;
    font-weight: 900;
    color: var(--brand-strong);
}

.rank-item img {
    width: 142px;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    object-fit: cover;
}

.rank-item h2 {
    margin: 0 0 7px;
    font-size: 20px;
}

.rank-item p {
    margin: 0 0 10px;
    color: var(--muted);
    line-height: 1.65;
}

.rank-meta span {
    color: #475569;
    background: #f1f5f9;
}

.rank-item strong {
    color: #ffffff;
    border-radius: 999px;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
}

.watch-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.8fr);
    gap: 28px;
    padding: 34px 22px 44px;
}

.player-panel {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 28px 72px rgba(2, 6, 23, 0.35);
    aspect-ratio: 16 / 9;
}

.main-player {
    width: 100%;
    height: 100%;
    background: #000000;
    object-fit: contain;
}

.player-start {
    position: absolute;
    left: 50%;
    top: 50%;
    border: 0;
    border-radius: 999px;
    padding: 15px 28px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    box-shadow: 0 18px 40px rgba(249, 115, 22, 0.32);
    font-weight: 900;
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.player-start:hover {
    transform: translate(-50%, -50%) scale(1.04);
}

.player-start.is-playing {
    opacity: 0;
    pointer-events: none;
}

.watch-info {
    align-self: stretch;
    padding: 28px;
    border-radius: 28px;
    color: #ffffff;
    background: linear-gradient(160deg, #111827, #1e293b 55%, #92400e);
    box-shadow: 0 24px 52px rgba(15, 23, 42, 0.24);
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #fcd34d;
    font-size: 13px;
    font-weight: 700;
}

.watch-info h1 {
    margin: 20px 0 14px;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.watch-one-line {
    color: #e2e8f0;
    line-height: 1.8;
}

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

.detail-meta span {
    background: rgba(255, 255, 255, 0.14);
}

.tag-cloud span {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.16);
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    padding: 0 22px 64px;
}

.detail-article {
    padding: 28px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.detail-article.accent {
    background: linear-gradient(135deg, #fffbeb, #fff7ed);
}

.detail-article h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.detail-article p {
    margin: 0;
    color: #334155;
    font-size: 16px;
    line-height: 1.9;
}

.related-section {
    padding-bottom: 84px;
}

.site-footer {
    margin-top: 30px;
    color: #cbd5e1;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 28px;
    padding: 42px 22px;
}

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

.footer-inner p {
    max-width: 560px;
    margin: 10px 0 0;
    color: #cbd5e1;
    line-height: 1.75;
}

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

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
    padding: 0 22px 24px;
    color: #94a3b8;
    font-size: 13px;
}

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

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

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

@media (max-width: 820px) {
    .desktop-nav,
    .search-form {
        display: none;
    }

    .mobile-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .hero-carousel {
        min-height: 520px;
    }

    .hero-shade {
        background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.24));
    }

    .hero-content {
        left: 24px;
        bottom: 62px;
    }

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

    .rank-item {
        grid-template-columns: 52px 102px minmax(0, 1fr);
    }

    .rank-item strong {
        grid-column: 2 / -1;
        justify-self: start;
    }

    .footer-inner {
        display: block;
    }

    .footer-links {
        margin-top: 20px;
    }
}

@media (max-width: 560px) {
    .header-inner {
        height: 62px;
        padding: 0 16px;
    }

    .brand-copy small {
        display: none;
    }

    .brand-copy strong {
        font-size: 17px;
    }

    .home-hero,
    .content-section,
    .page-hero,
    .watch-layout,
    .detail-content {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero-carousel {
        min-height: 470px;
        border-radius: 22px;
    }

    .hero-arrow {
        display: none;
    }

    .movie-grid,
    .compact-grid,
    .category-grid,
    .category-page-grid {
        grid-template-columns: 1fr;
    }

    .filter-line {
        display: block;
    }

    .filter-line label {
        display: block;
        margin-bottom: 10px;
    }

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

    .rank-item img {
        grid-column: 1 / -1;
        width: 100%;
    }
}
