:root {
    color-scheme: light;
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-warm: #fff7ed;
    --text: #111827;
    --muted: #64748b;
    --line: #e5e7eb;
    --amber: #d97706;
    --amber-dark: #78350f;
    --orange: #ea580c;
    --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #f8fafc 0%, #fff7ed 42%, #f8fafc 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, #78350f 0%, #92400e 46%, #7c2d12 100%);
    box-shadow: 0 12px 30px rgba(120, 53, 15, 0.25);
}

.site-nav {
    width: min(1180px, calc(100% - 32px));
    min-height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #78350f;
    background: linear-gradient(135deg, #fde68a, #f97316);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 10px 24px rgba(0, 0, 0, 0.18);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 15px;
    font-weight: 650;
}

.nav-links a,
.mobile-category-row a {
    opacity: 0.9;
    transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active,
.mobile-category-row a:hover {
    color: #fde68a;
    opacity: 1;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: #ffffff;
}

.mobile-category-row {
    display: none;
}

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

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 75% 32%, rgba(251, 191, 36, 0.28), transparent 30%),
        linear-gradient(90deg, rgba(17, 24, 39, 0.9), rgba(17, 24, 39, 0.55) 48%, rgba(17, 24, 39, 0.18));
}

.hero-content {
    position: absolute;
    left: clamp(26px, 6vw, 74px);
    bottom: clamp(48px, 8vw, 90px);
    width: min(680px, calc(100% - 52px));
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #fcd34d;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-hero h1 {
    margin: 0;
    font-size: clamp(36px, 7vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p,
.detail-hero__content p {
    max-width: 680px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
}

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

.hero-tags {
    margin-top: 22px;
}

.hero-tags span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #78350f;
    background: #fef3c7;
    font-size: 12px;
    font-weight: 750;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    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: #78350f;
    background: linear-gradient(135deg, #fef3c7, #f59e0b);
    box-shadow: 0 16px 34px rgba(245, 158, 11, 0.28);
}

.btn-ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.26);
    backdrop-filter: blur(12px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(17, 24, 39, 0.4);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(245, 158, 11, 0.72);
    transform: translateY(-50%) scale(1.05);
}

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

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

.hero-dots {
    position: absolute;
    left: clamp(26px, 6vw, 74px);
    bottom: 28px;
    display: flex;
    gap: 8px;
}

.hero-dots button {
    width: 34px;
    height: 7px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

.hero-dots button.is-active {
    background: #fbbf24;
}

.quick-search,
.content-section,
.category-overview-card,
.detail-layout,
.player-section {
    margin: 28px 0;
    padding: clamp(22px, 4vw, 36px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.07);
}

.quick-search {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background:
        radial-gradient(circle at top right, rgba(251, 191, 36, 0.26), transparent 34%),
        linear-gradient(135deg, #ffffff, #fff7ed);
}

.quick-search h2,
.section-heading h2,
.category-overview-card h2,
.detail-article h2,
.related-box h2 {
    margin: 0;
    color: #111827;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.03em;
}

.quick-search p,
.section-heading p,
.category-overview-card p,
.detail-article p {
    color: var(--muted);
    line-height: 1.8;
}

.content-section--warm {
    background:
        radial-gradient(circle at 0% 0%, rgba(251, 191, 36, 0.2), transparent 28%),
        rgba(255, 255, 255, 0.92);
}

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

.section-link {
    color: var(--amber);
    font-weight: 800;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 20px;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 22px 42px rgba(120, 53, 15, 0.12);
    transform: translateY(-5px);
}

.movie-card__poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #78350f, #111827);
}

.movie-card__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.movie-card__body {
    padding: 14px;
}

.movie-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

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

.movie-card h3 a:hover {
    color: var(--amber);
}

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

.movie-card--compact p {
    display: none;
}

.movie-card--compact .tag-list {
    display: none;
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #78350f;
    background: #fbbf24;
    font-size: 14px;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

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

.category-tile {
    min-height: 150px;
    padding: 22px;
    border-radius: 24px;
    color: #ffffff;
    background:
        radial-gradient(circle at 86% 14%, rgba(254, 243, 199, 0.35), transparent 32%),
        linear-gradient(135deg, #92400e, #7c2d12);
    box-shadow: 0 18px 36px rgba(120, 53, 15, 0.16);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 48px rgba(120, 53, 15, 0.24);
}

.category-tile span {
    display: block;
    margin-bottom: 12px;
    font-size: 22px;
    font-weight: 900;
}

.category-tile p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.7;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px 150px;
    gap: 14px;
    margin-bottom: 24px;
    padding: 16px;
    border-radius: 18px;
    background: #f8fafc;
}

.filter-panel label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    background: #ffffff;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.page-hero,
.detail-hero {
    position: relative;
    margin: 28px 0;
    overflow: hidden;
    border-radius: 34px;
    color: #ffffff;
    background:
        radial-gradient(circle at 80% 20%, rgba(251, 191, 36, 0.28), transparent 32%),
        linear-gradient(135deg, #111827, #78350f 58%, #7c2d12);
    box-shadow: var(--shadow);
}

.page-hero {
    min-height: 340px;
    display: flex;
    align-items: center;
    padding: clamp(28px, 6vw, 76px);
}

.compact-hero {
    min-height: 300px;
}

.hero-inline-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-inline-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: #78350f;
    background: #fef3c7;
    font-weight: 800;
}

.category-overview {
    display: grid;
    gap: 24px;
    margin-bottom: 34px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
    gap: 24px;
}

.category-overview-card__head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.mini-card-row,
.mini-card-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.mini-card-list {
    grid-template-columns: 1fr;
}

.mini-card {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #f8fafc;
    transition: background 0.2s ease, transform 0.2s ease;
}

.mini-card:hover {
    background: #fff7ed;
    transform: translateY(-2px);
}

.mini-card img {
    width: 64px;
    height: 86px;
    border-radius: 12px;
    object-fit: cover;
    background: linear-gradient(135deg, #78350f, #111827);
}

.mini-card span {
    display: block;
    font-weight: 850;
    line-height: 1.35;
}

.mini-card small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: clamp(24px, 5vw, 54px);
    align-items: center;
    padding: clamp(24px, 5vw, 54px);
}

.detail-hero__poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 28px;
    object-fit: cover;
    box-shadow: 0 26px 54px rgba(0, 0, 0, 0.28);
}

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

.breadcrumb a:hover {
    color: #fcd34d;
}

.tag-list--large {
    margin-top: 22px;
}

.player-section {
    background: #111827;
}

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    aspect-ratio: 16 / 9;
}

.video-frame video {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
    cursor: pointer;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-icon {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #78350f;
    background: linear-gradient(135deg, #fef3c7, #f59e0b);
    box-shadow: 0 18px 42px rgba(245, 158, 11, 0.28);
    font-size: 30px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 30px;
}

.detail-article p {
    font-size: 16px;
}

.info-table {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
}

.info-table div {
    padding: 14px;
    border-radius: 16px;
    background: #f8fafc;
}

.info-table span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 13px;
}

.info-table strong {
    color: var(--text);
}

.related-box {
    min-width: 0;
}

.related-box h2 {
    margin-bottom: 16px;
}

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

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

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

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

@media (max-width: 820px) {
    .site-nav {
        min-height: 62px;
    }

    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 62px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        overflow: hidden;
        border-radius: 18px;
        background: #78350f;
        box-shadow: 0 22px 44px rgba(0, 0, 0, 0.24);
    }

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

    .nav-links a {
        padding: 14px 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-category-row {
        display: flex;
        width: 100%;
        gap: 12px;
        overflow-x: auto;
        padding: 0 16px 12px;
        font-size: 13px;
        white-space: nowrap;
    }

    .hero {
        min-height: 560px;
        border-radius: 26px;
    }

    .hero-arrow {
        display: none;
    }

    .quick-search,
    .section-heading,
    .category-overview-card,
    .detail-hero {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .quick-search,
    .section-heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-panel {
        grid-template-columns: 1fr;
    }

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

    .movie-card h3 {
        font-size: 15px;
    }

    .category-grid,
    .mini-card-row,
    .mini-card-list,
    .info-table {
        grid-template-columns: 1fr;
    }

    .detail-hero__poster {
        max-width: 280px;
    }
}

@media (max-width: 520px) {
    main,
    .site-nav {
        width: min(100% - 24px, 1180px);
    }

    .brand,
    .footer-brand {
        font-size: 18px;
    }

    .hero-content {
        left: 20px;
        bottom: 58px;
        width: calc(100% - 40px);
    }

    .hero-content p,
    .page-hero p,
    .detail-hero__content p {
        font-size: 15px;
    }

    .content-section,
    .quick-search,
    .category-overview-card,
    .detail-layout,
    .player-section {
        padding: 18px;
        border-radius: 20px;
    }

    .movie-grid,
    .movie-grid--six,
    .movie-grid--five {
        grid-template-columns: 1fr;
    }

    .movie-card {
        display: grid;
        grid-template-columns: 116px 1fr;
    }

    .movie-card__poster {
        height: 100%;
        aspect-ratio: auto;
    }

    .movie-card p {
        min-height: auto;
    }

    .detail-hero {
        padding: 18px;
        border-radius: 22px;
    }

    .video-frame {
        border-radius: 18px;
    }

    .play-icon {
        width: 64px;
        height: 64px;
        font-size: 24px;
    }
}
