:root {
    --page-bg: #fffaf0;
    --ink: #162032;
    --muted: #64748b;
    --line: rgba(148, 163, 184, 0.28);
    --amber: #f59e0b;
    --orange: #ea580c;
    --rose: #be123c;
    --teal: #0f766e;
    --deep: #0f172a;
    --card: rgba(255, 255, 255, 0.94);
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

.page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1;
    padding-top: 72px;
}

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

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(120, 53, 15, 0.96), rgba(154, 52, 18, 0.96));
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 25px;
    font-weight: 900;
    letter-spacing: 0.02em;
    color: #fff7ed;
}

.logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 30% 30%, #fde68a, #f59e0b 50%, #ea580c);
    color: #7c2d12;
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.45);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #fffbeb;
    font-weight: 700;
}

.nav-links a {
    position: relative;
    padding: 8px 0;
    opacity: 0.92;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 999px;
    background: #fde68a;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.22s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: scaleX(1);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #fffbeb;
    background: rgba(255, 255, 255, 0.12);
}

.mobile-nav {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    padding: 12px 0 18px;
}

.mobile-nav a {
    display: block;
    padding: 12px 0;
    color: #fffbeb;
    font-weight: 700;
}

.hero {
    position: relative;
    min-height: 680px;
    display: grid;
    align-items: center;
    overflow: hidden;
    color: white;
    background: radial-gradient(circle at 15% 10%, rgba(253, 230, 138, 0.25), transparent 28%), linear-gradient(135deg, #78350f 0%, #9a3412 46%, #881337 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-bg);
    background-size: cover;
    background-position: center;
    opacity: 0.18;
    transform: scale(1.04);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.38), rgba(15, 23, 42, 0.18) 45%, rgba(15, 23, 42, 0.58));
}

.hero-particles {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.hero-particles span {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: rgba(253, 230, 138, 0.55);
    box-shadow: 0 0 26px rgba(253, 230, 138, 0.8);
    animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.25; transform: scale(0.76); }
    50% { opacity: 0.9; transform: scale(1.25); }
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 84px 0 72px;
}

.hero-slider {
    position: relative;
}

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

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

.hero-copy {
    max-width: 760px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fde68a;
    font-weight: 800;
    backdrop-filter: blur(12px);
    margin-bottom: 22px;
}

.hero h1 {
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.02;
    margin: 0 0 22px;
    font-weight: 950;
    letter-spacing: -0.045em;
}

.hero h1 span {
    display: block;
    color: #fde68a;
}

.hero-text {
    font-size: clamp(18px, 2.3vw, 24px);
    line-height: 1.72;
    color: #ffedd5;
    margin: 0 0 28px;
}

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

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

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

.btn-primary {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    color: white;
    box-shadow: 0 16px 34px rgba(234, 88, 12, 0.32);
}

.btn-light {
    background: rgba(255, 255, 255, 0.18);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(12px);
}

.btn-ghost {
    background: #fff7ed;
    color: #9a3412;
}

.hero-poster-card {
    position: relative;
    min-height: 500px;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 34px 80px rgba(15, 23, 42, 0.42);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.4), rgba(190, 18, 60, 0.36));
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-poster-card img {
    width: 100%;
    height: 100%;
    min-height: 500px;
    object-fit: cover;
}

.hero-poster-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 24%, rgba(15, 23, 42, 0.88));
}

.poster-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 28px;
}

.poster-caption strong {
    display: block;
    font-size: 24px;
    margin-bottom: 10px;
}

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

.hero-dot {
    width: 38px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
}

.hero-dot.active {
    background: #fde68a;
}

.search-panel {
    margin-top: -42px;
    position: relative;
    z-index: 4;
}

.search-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 18px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.search-box input,
.filter-input,
.filter-select {
    width: 100%;
    min-height: 48px;
    border: 2px solid rgba(148, 163, 184, 0.28);
    border-radius: 16px;
    padding: 0 16px;
    font: inherit;
    outline: none;
    background: white;
}

.search-box input:focus,
.filter-input:focus,
.filter-select:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.stats-strip {
    padding: 52px 0;
    color: white;
    background: linear-gradient(90deg, #0f766e, #0891b2);
}

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

.stat-card {
    text-align: center;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.stat-card strong {
    display: block;
    font-size: 30px;
    margin-bottom: 4px;
}

.section {
    padding: 72px 0;
}

.section-white {
    background: white;
}

.section-soft {
    background: linear-gradient(135deg, #f8fafc, #fffbeb);
}

.section-dark {
    background: linear-gradient(135deg, #0f172a, #1e293b 50%, #0f172a);
    color: white;
}

.section-rose {
    background: linear-gradient(135deg, #fff1f2, #ffe4e6);
}

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

.section-title {
    margin: 0 0 8px;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.15;
    font-weight: 950;
    letter-spacing: -0.03em;
}

.section-desc {
    color: var(--muted);
    margin: 0;
    line-height: 1.75;
}

.section-dark .section-desc {
    color: #cbd5e1;
}

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

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

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09);
    border: 1px solid rgba(148, 163, 184, 0.16);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 44px rgba(15, 23, 42, 0.18);
    border-color: rgba(245, 158, 11, 0.4);
}

.poster-frame {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: radial-gradient(circle at 30% 20%, rgba(253, 230, 138, 0.55), transparent 30%), linear-gradient(135deg, #78350f, #be123c);
}

.poster-frame.tall {
    aspect-ratio: 3 / 4;
}

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

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

.poster-badge,
.rank-badge,
.hot-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: white;
    font-size: 12px;
    font-weight: 900;
    background: rgba(15, 23, 42, 0.74);
    backdrop-filter: blur(8px);
}

.rank-badge {
    left: 12px;
    right: auto;
    min-width: 34px;
    text-align: center;
    background: linear-gradient(135deg, #be123c, #f97316);
}

.movie-info {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.meta {
    color: #0f766e;
    font-size: 13px;
    font-weight: 850;
    margin-bottom: 8px;
}

.movie-info h3 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
}

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

.line-clamp-1,
.line-clamp-2,
.line-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-1 { -webkit-line-clamp: 1; }
.line-clamp-2 { -webkit-line-clamp: 2; }
.line-clamp-3 { -webkit-line-clamp: 3; }

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 12px;
    font-weight: 800;
}

.featured-card {
    position: relative;
    min-height: 320px;
    display: block;
    color: white;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, #78350f, #be123c);
}

.featured-card .poster-frame {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
}

.featured-card .poster-frame::after,
.trend-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.84));
}

.featured-card-body {
    position: absolute;
    z-index: 2;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 26px;
}

.featured-card h3 {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 950;
}

.featured-card p {
    color: #e2e8f0;
    line-height: 1.65;
    margin: 0;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 220px 1fr auto;
    align-items: center;
    gap: 22px;
    padding: 14px;
    border-radius: 24px;
    background: white;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.16);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-card:hover {
    transform: translateX(4px);
    box-shadow: 0 20px 42px rgba(15, 23, 42, 0.14);
}

.rank-card .poster-frame {
    border-radius: 18px;
}

.rank-content h3 {
    margin: 0 0 8px;
    font-size: 21px;
    font-weight: 950;
}

.rank-content p {
    margin: 0;
    color: var(--muted);
    line-height: 1.72;
}

.rank-score {
    padding: 10px 14px;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    font-weight: 950;
    white-space: nowrap;
}

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

.trend-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    color: white;
    background: #111827;
    min-height: 280px;
}

.trend-card .poster-frame {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
}

.trend-body {
    position: absolute;
    z-index: 2;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 16px;
}

.trend-body h3 {
    margin: 0 0 8px;
    font-weight: 900;
}

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

.category-tile {
    position: relative;
    min-height: 180px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    border-radius: 24px;
    color: white;
    background: linear-gradient(135deg, #92400e, #be123c);
    box-shadow: 0 15px 32px rgba(15, 23, 42, 0.12);
}

.category-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--tile-img);
    background-size: cover;
    background-position: center;
    opacity: 0.26;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-tile:hover::before {
    transform: scale(1.08);
    opacity: 0.36;
}

.category-tile h3,
.category-tile p,
.category-tile span {
    position: relative;
    z-index: 2;
}

.category-tile h3 {
    margin: 0 0 8px;
    font-size: 25px;
    font-weight: 950;
}

.category-tile p {
    margin: 0 0 12px;
    line-height: 1.65;
    color: #ffedd5;
}

.page-hero {
    padding: 64px 0;
    color: white;
    background: radial-gradient(circle at 20% 20%, rgba(253, 230, 138, 0.26), transparent 28%), linear-gradient(90deg, #0f766e, #0891b2);
}

.page-hero.amber {
    background: linear-gradient(135deg, #78350f, #9a3412 48%, #881337);
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(38px, 5vw, 58px);
    line-height: 1.12;
    font-weight: 950;
}

.page-hero p {
    margin: 0;
    color: #cffafe;
    font-size: 20px;
    line-height: 1.72;
    max-width: 780px;
}

.page-hero.amber p {
    color: #ffedd5;
}

.filter-panel {
    margin-bottom: 34px;
    padding: 18px;
    border-radius: 24px;
    background: white;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 14px;
}

.empty-state {
    display: none;
    padding: 42px;
    border-radius: 24px;
    text-align: center;
    background: white;
    color: var(--muted);
    box-shadow: var(--shadow);
}

.detail-wrap {
    padding: 42px 0 72px;
}

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

.breadcrumb a {
    color: #0f766e;
    font-weight: 800;
}

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

.panel {
    background: white;
    border-radius: 26px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(148, 163, 184, 0.16);
    overflow: hidden;
}

.panel-pad {
    padding: 28px;
}

.player-box {
    position: relative;
    background: #020617;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.32);
}

.player-box video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    color: white;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
    cursor: pointer;
}

.play-cover.hidden {
    opacity: 0;
    pointer-events: none;
}

.play-cover-inner {
    display: grid;
    place-items: center;
    gap: 12px;
    text-align: center;
}

.play-icon {
    width: 84px;
    height: 84px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    box-shadow: 0 18px 40px rgba(234, 88, 12, 0.34);
    font-size: 34px;
    padding-left: 4px;
}

.player-status {
    position: absolute;
    left: 18px;
    bottom: 14px;
    z-index: 4;
    color: #e2e8f0;
    font-size: 13px;
    pointer-events: none;
}

.detail-title {
    margin: 0 0 14px;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.12;
    font-weight: 950;
    letter-spacing: -0.03em;
}

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

.meta-chip {
    padding: 7px 12px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-weight: 800;
    font-size: 13px;
}

.content-block {
    margin-top: 26px;
}

.content-block h2 {
    margin: 0 0 12px;
    font-size: 25px;
    font-weight: 950;
}

.content-block p {
    margin: 0;
    color: #475569;
    line-height: 1.9;
    font-size: 16px;
}

.side-card {
    display: grid;
    grid-template-columns: 98px 1fr;
    gap: 12px;
    padding: 12px;
    border-radius: 18px;
    background: #fff7ed;
    margin-bottom: 12px;
    transition: transform 0.18s ease, background 0.18s ease;
}

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

.side-card .poster-frame {
    border-radius: 14px;
}

.side-card h3 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 900;
}

.side-card p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.55;
}

.footer {
    color: #cbd5e1;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    padding: 54px 0 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr 0.7fr;
    gap: 34px;
    margin-bottom: 32px;
}

.footer h3 {
    color: #fde68a;
    margin: 0 0 14px;
    font-size: 20px;
    font-weight: 950;
}

.footer p {
    margin: 0;
    line-height: 1.85;
}

.footer a {
    display: block;
    margin: 8px 0;
    color: #cbd5e1;
}

.footer-bottom {
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    display: flex;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 14px;
}

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

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

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

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

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

    .hero-poster-card {
        min-height: 360px;
    }

    .hero-poster-card img {
        min-height: 360px;
    }
}

@media (max-width: 760px) {
    .site-main {
        padding-top: 66px;
    }

    .header-inner {
        min-height: 66px;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-button {
        display: inline-grid;
        place-items: center;
    }

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

    .logo {
        font-size: 20px;
    }

    .hero {
        min-height: auto;
    }

    .hero-content {
        padding: 56px 0 74px;
    }

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

    .stats-grid,
    .movie-grid,
    .movie-grid.featured-grid,
    .category-grid,
    .trend-grid {
        grid-template-columns: 1fr;
    }

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

    .rank-card {
        grid-template-columns: 120px 1fr;
    }

    .rank-score {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .detail-wrap {
        padding-top: 24px;
    }

    .panel-pad {
        padding: 20px;
    }

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