:root {
    --page-bg: #fffbeb;
    --card-bg: #ffffff;
    --ink: #111827;
    --muted: #6b7280;
    --soft: #fef3c7;
    --line: #fde68a;
    --orange: #f97316;
    --orange-dark: #ea580c;
    --red: #ef4444;
    --green: #10b981;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--page-bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    -webkit-font-smoothing: antialiased;
}

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 24px;
    color: var(--ink);
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.34);
}

.desktop-nav {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-link {
    color: #374151;
    font-weight: 650;
    transition: color 0.2s ease;
}

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

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: #fff7ed;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--ink);
    border-radius: 2px;
}

.mobile-nav {
    display: none;
    padding: 12px 24px 20px;
    border-top: 1px solid #f3f4f6;
    background: #ffffff;
}

.mobile-nav .nav-link {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
}

.mobile-nav .nav-link:hover {
    background: #fff7ed;
}

.hero-section {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 20% 20%, rgba(255, 237, 213, 0.92), transparent 28%), linear-gradient(135deg, #fb923c, #f97316 45%, #ef4444);
}

.hero-stage {
    position: relative;
    min-height: 610px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.6s ease, transform 0.6s ease;
    background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.84), rgba(15, 23, 42, 0.56), rgba(15, 23, 42, 0.24)), var(--hero), linear-gradient(135deg, #fb923c, #ef4444);
    background-size: cover;
    background-position: center;
}

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

.hero-copy {
    width: min(860px, calc(100% - 32px));
    margin: 0 auto;
    color: #ffffff;
    padding: 100px 0 150px;
}

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

.hero-copy .eyebrow {
    color: #fed7aa;
}

.hero-copy h1 {
    max-width: 860px;
    margin: 0 0 20px;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero-copy p {
    max-width: 760px;
    margin: 0 0 30px;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.7;
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    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(--orange), var(--red));
    box-shadow: 0 14px 32px rgba(239, 68, 68, 0.34);
}

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

.detail-info .btn.ghost {
    color: var(--orange-dark);
    background: #fff7ed;
    border-color: #fed7aa;
}

.hero-tags,
.movie-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.hero-tags span,
.movie-tags span,
.detail-tags a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

.movie-tags span,
.detail-tags a {
    color: #9a3412;
    background: #ffedd5;
}

.hero-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 42px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    user-select: none;
}

.hero-prev {
    left: 26px;
}

.hero-next {
    right: 26px;
}

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

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

.hero-dot.is-active {
    width: 30px;
    background: #ffffff;
}

.hero-search-wrap {
    position: relative;
    z-index: 3;
    margin-top: -58px;
}

.search-panel,
.inline-search {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-panel input,
.inline-search input {
    flex: 1;
    min-width: 0;
    height: 52px;
    padding: 0 18px;
    border: 1px solid #fed7aa;
    border-radius: 18px;
    outline: none;
    background: #ffffff;
}

.search-panel button,
.inline-search button {
    height: 52px;
    padding: 0 24px;
    border: 0;
    border-radius: 18px;
    color: #ffffff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--orange), var(--red));
}

.section {
    padding: 62px 0;
}

.soft-section {
    background: #ffffff;
}

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

.section-heading h2,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    color: var(--ink);
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.section-heading h2 {
    font-size: clamp(28px, 4vw, 42px);
}

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

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

.featured-grid .movie-card:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--card-bg);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
    transition: transform 0.26s ease, box-shadow 0.26s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 46px rgba(15, 23, 42, 0.16);
}

.poster-link {
    display: block;
}

.poster-frame,
.detail-cover,
.mini-poster,
.video-shell,
.category-covers span {
    background-image: var(--poster), linear-gradient(135deg, #fed7aa, #fb923c 48%, #ef4444);
    background-size: cover;
    background-position: center;
}

.poster-frame {
    position: relative;
    min-height: 260px;
    overflow: hidden;
}

.featured-grid .movie-card:first-child .poster-frame {
    min-height: 420px;
}

.poster-frame::after,
.detail-cover::after,
.video-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(15, 23, 42, 0.66));
    pointer-events: none;
}

.year-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

.year-badge {
    right: 12px;
    background: rgba(17, 24, 39, 0.76);
}

.rank-badge {
    left: 12px;
    background: linear-gradient(135deg, var(--red), var(--orange));
}

.poster-play {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(249, 115, 22, 0.9);
    box-shadow: 0 12px 34px rgba(249, 115, 22, 0.35);
    transform: translate(-50%, -50%) scale(0.92);
    opacity: 0;
    transition: transform 0.22s ease, opacity 0.22s ease;
}

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

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

.movie-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 46px;
    margin-bottom: 10px;
    color: var(--ink);
    font-size: 18px;
    font-weight: 850;
    line-height: 1.28;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-title:hover {
    color: var(--orange-dark);
}

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

.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #4b5563;
    font-size: 13px;
    font-weight: 700;
}

.movie-meta span,
.detail-meta span {
    padding: 6px 9px;
    border-radius: 999px;
    background: #f9fafb;
}

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

.category-tile {
    display: block;
    overflow: hidden;
    padding: 18px;
    border: 1px solid #ffedd5;
    border-radius: var(--radius);
    background: linear-gradient(180deg, #ffffff, #fff7ed);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-covers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 18px;
}

.category-covers span {
    min-height: 86px;
    border-radius: 14px;
}

.category-tile h3 {
    margin: 0 0 8px;
    font-size: 22px;
}

.category-tile p {
    min-height: 66px;
    margin: 0 0 16px;
    color: var(--muted);
    line-height: 1.55;
}

.category-tile strong {
    color: var(--orange-dark);
}

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

.ranking-panel,
.story-card {
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

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

.compact-heading {
    margin-bottom: 16px;
}

.compact-heading h2 {
    font-size: 28px;
}

.mini-list,
.ranking-list-page {
    display: grid;
    gap: 12px;
}

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

.mini-card {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: #fff7ed;
    transition: background 0.2s ease, transform 0.2s ease;
}

.mini-card:hover {
    background: #ffedd5;
    transform: translateX(3px);
}

.mini-poster {
    position: relative;
    display: grid;
    place-items: start;
    min-height: 88px;
    border-radius: 14px;
    overflow: hidden;
}

.mini-rank {
    display: inline-grid;
    place-items: center;
    min-width: 28px;
    height: 28px;
    margin: 8px;
    padding: 0 6px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--orange), var(--red));
}

.mini-card strong,
.mini-card span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-card strong {
    margin-bottom: 6px;
}

.mini-card span {
    color: var(--muted);
    font-size: 13px;
}

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

.page-hero,
.detail-hero {
    padding: 54px 0 20px;
}

.page-hero h1 {
    max-width: 900px;
    font-size: clamp(38px, 6vw, 62px);
}

.page-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.7;
}

.inline-search {
    max-width: 760px;
    margin-top: 28px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--orange-dark);
    font-weight: 800;
}

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

.detail-cover {
    position: relative;
    min-height: 470px;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.detail-cover span {
    position: absolute;
    z-index: 2;
    top: 18px;
    right: 18px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
    background: rgba(17, 24, 39, 0.72);
}

.detail-info h1 {
    font-size: clamp(38px, 5vw, 64px);
}

.lead-text {
    margin: 20px 0 20px;
    color: #4b5563;
    font-size: 20px;
    line-height: 1.75;
}

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

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

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background-color: #0f172a;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.video-shell video {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    background: #020617;
}

.video-shell::before {
    z-index: 2;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.65), rgba(15, 23, 42, 0.15));
}

.play-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.28);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.big-play {
    display: grid;
    place-items: center;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 18px 42px rgba(249, 115, 22, 0.42);
    font-size: 34px;
}

.play-layer strong {
    font-size: 22px;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.story-card {
    padding: 28px;
}

.story-card h2 {
    margin: 0 0 16px;
    font-size: 28px;
}

.story-card p {
    margin: 0;
    color: #4b5563;
    font-size: 17px;
    line-height: 1.9;
}

.accent-card {
    background: linear-gradient(135deg, #fff7ed, #ffffff);
    border: 1px solid #fed7aa;
}

.site-footer {
    margin-top: 40px;
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 34px;
    padding: 48px 0;
}

.site-footer h2,
.site-footer h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.site-footer p {
    margin: 0;
    color: #9ca3af;
    line-height: 1.7;
}

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

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

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

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

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

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

    .ranking-panel {
        position: static;
    }
}

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

    .nav-toggle {
        display: block;
    }

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

    .hero-stage {
        min-height: 690px;
    }

    .hero-copy {
        padding-top: 86px;
    }

    .hero-control {
        display: none;
    }

    .hero-dots {
        bottom: 104px;
    }

    .movie-grid,
    .catalog-grid,
    .related-grid,
    .latest-grid,
    .category-grid,
    .ranking-list-page {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .featured-grid .movie-card:first-child {
        grid-column: span 2;
    }

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

    .detail-cover {
        min-height: 430px;
    }
}

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

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

    .hero-stage {
        min-height: 720px;
    }

    .hero-copy p {
        font-size: 16px;
    }

    .search-panel,
    .inline-search {
        flex-direction: column;
        align-items: stretch;
        border-radius: 18px;
    }

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

    .featured-grid .movie-card:first-child {
        grid-column: auto;
    }

    .poster-frame,
    .featured-grid .movie-card:first-child .poster-frame {
        min-height: 330px;
    }

    .detail-cover {
        min-height: 390px;
    }

    .video-shell {
        border-radius: 20px;
    }
}
