:root {
    --autumn-50: #fff7ed;
    --autumn-100: #ffedd5;
    --autumn-200: #fed7aa;
    --autumn-500: #f97316;
    --autumn-600: #ea580c;
    --autumn-700: #c2410c;
    --leaf-200: #fef08a;
    --leaf-400: #facc15;
    --leaf-500: #eab308;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --shadow: 0 24px 60px rgba(154, 52, 18, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: linear-gradient(180deg, var(--autumn-50), #ffffff 480px);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 28px rgba(154, 52, 18, 0.12);
    backdrop-filter: blur(12px);
}

.top-ribbon {
    padding: 8px 16px;
    color: #ffffff;
    text-align: center;
    font-size: 14px;
    background: linear-gradient(135deg, var(--autumn-500), var(--autumn-600), #fb923c);
}

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

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-weight: 800;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--autumn-500), var(--autumn-700));
    box-shadow: 0 12px 22px rgba(234, 88, 12, 0.26);
}

.brand-text strong {
    display: block;
    color: var(--autumn-700);
    font-size: 24px;
    line-height: 1.1;
}

.brand-text small {
    color: var(--autumn-500);
    font-size: 12px;
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
    width: 100%;
}

.nav-menu > a {
    color: #374151;
    font-weight: 700;
    transition: color 0.2s ease;
}

.nav-menu > a:hover {
    color: var(--autumn-600);
}

.nav-search {
    display: flex;
    align-items: center;
    border: 2px solid var(--autumn-200);
    border-radius: 999px;
    overflow: hidden;
    background: #ffffff;
}

.nav-search input {
    width: 220px;
    border: 0;
    outline: 0;
    padding: 10px 14px;
    color: #374151;
}

.nav-search button,
.search-panel button {
    border: 0;
    color: #ffffff;
    padding: 10px 18px;
    font-weight: 700;
    background: var(--autumn-600);
    cursor: pointer;
}

.nav-toggle {
    display: none;
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: #ffffff;
    background: var(--autumn-600);
}

.site-main {
    min-height: 70vh;
}

.hero-carousel {
    position: relative;
    height: 640px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--autumn-500), var(--autumn-600), #fb923c);
}

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

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-image), radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.22), transparent 30%), linear-gradient(135deg, #f97316, #ea580c 60%, #fb923c);
    background-size: cover;
    background-position: center;
    opacity: 0.22;
    filter: saturate(1.05);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(124, 45, 18, 0.88), rgba(234, 88, 12, 0.52), rgba(251, 146, 60, 0.42));
}

.hero-glow {
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background-image: radial-gradient(circle at 80% 18%, rgba(254, 240, 138, 0.7), transparent 22%), radial-gradient(circle at 12% 80%, rgba(255, 255, 255, 0.45), transparent 26%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 380px;
    align-items: center;
    gap: 54px;
}

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

.hero-eyebrow {
    display: inline-flex;
    margin-bottom: 18px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    color: var(--leaf-200);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    font-weight: 800;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0 0 16px;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-copy h2 + p,
.hero-copy p {
    max-width: 720px;
    margin: 0 0 24px;
    color: #ffedd5;
    font-size: clamp(17px, 2.2vw, 24px);
}

.hero-tags,
.detail-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span {
    padding: 6px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

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

.hero-actions.center {
    justify-content: center;
}

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

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

.btn.primary {
    color: var(--autumn-700);
    background: #ffffff;
    box-shadow: 0 16px 32px rgba(255, 255, 255, 0.22);
}

.btn.ghost {
    color: #ffffff;
    border: 2px solid #ffffff;
}

.btn.ghost:hover {
    color: var(--autumn-700);
    background: #ffffff;
}

.btn.ghost.orange {
    color: var(--autumn-600);
    border-color: var(--autumn-600);
}

.btn.ghost.orange:hover {
    color: #ffffff;
    background: var(--autumn-600);
}

.btn.soft {
    color: #7c2d12;
    background: var(--leaf-200);
}

.hero-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    border-radius: 28px;
    overflow: hidden;
    background-image: var(--poster-image), linear-gradient(135deg, #fed7aa, #f97316);
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

.hero-cover img,
.poster img,
.compact-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-cover span {
    position: absolute;
    right: 16px;
    bottom: 16px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.72);
    font-weight: 800;
}

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

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

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

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

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

.section-heading h2,
.page-hero h1,
.detail-card h1 {
    margin: 0;
    color: var(--text);
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.15;
    font-weight: 900;
}

.section-heading h2 span {
    margin-right: 10px;
}

.section-heading p,
.page-hero p,
.cta-panel p,
.footer-inner p {
    margin: 8px 0 0;
    color: var(--muted);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(254, 215, 170, 0.78);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(154, 52, 18, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 48px rgba(154, 52, 18, 0.15);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-image: var(--poster-image), linear-gradient(135deg, var(--autumn-100), var(--autumn-500));
    background-size: cover;
    background-position: center;
}

.movie-card.featured .poster {
    aspect-ratio: 16 / 12;
}

.poster::after,
.compact-thumb::after,
.hero-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, 0.55));
    pointer-events: none;
}

.poster img,
.compact-thumb img,
.hero-cover img {
    transition: transform 0.45s ease;
}

.movie-card:hover .poster img,
.compact-card:hover .compact-thumb img,
.hero-cover:hover img {
    transform: scale(1.06);
}

.score-badge,
.duration-badge {
    position: absolute;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.score-badge {
    left: 12px;
    top: 12px;
    color: #7c2d12;
    background: var(--leaf-200);
}

.duration-badge {
    right: 12px;
    bottom: 12px;
    background: rgba(0, 0, 0, 0.72);
}

.card-body {
    padding: 18px;
}

.card-meta {
    margin-bottom: 10px;
}

.card-meta a,
.card-meta span,
.detail-meta span {
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--autumn-700);
    background: var(--autumn-100);
    font-size: 12px;
    font-weight: 800;
}

.card-meta span,
.detail-meta span:nth-child(n+2) {
    color: #4b5563;
    background: #f3f4f6;
}

.movie-card h3 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 20px;
    line-height: 1.3;
}

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

.movie-card p {
    margin: 0 0 14px;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.tag-list span,
.detail-tags a {
    color: #4b5563;
    border-radius: 999px;
    padding: 5px 9px;
    background: #f3f4f6;
    font-size: 12px;
}

.detail-tags a:hover {
    color: var(--autumn-700);
    background: var(--autumn-100);
}

.rank-section {
    width: min(1180px, calc(100% - 32px));
}

.rank-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
}

.rank-layout.expanded {
    align-items: start;
}

.rank-list {
    padding: 16px;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.rank-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
    background: var(--autumn-50);
    transform: translateX(4px);
}

.rank-number {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--autumn-500), var(--autumn-700));
    font-weight: 900;
}

.rank-title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 800;
}

.rank-meta {
    color: var(--muted);
    font-size: 14px;
}

.rank-side,
.sticky-card,
.cta-panel,
.page-hero,
.detail-card,
.player-card {
    border: 1px solid rgba(254, 215, 170, 0.72);
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(154, 52, 18, 0.09);
}

.rank-side,
.sticky-card {
    padding: 28px;
}

.rank-side h2,
.sticky-card h2,
.detail-card h2,
.site-footer h2 {
    margin: 0 0 14px;
    color: #111827;
}

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

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

.category-card {
    min-height: 210px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 26px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid rgba(254, 215, 170, 0.8);
    box-shadow: 0 14px 32px rgba(154, 52, 18, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.category-card strong {
    color: #111827;
    font-size: 22px;
}

.category-card small {
    color: var(--autumn-700);
    font-weight: 800;
}

.category-card p {
    margin: 0;
    color: var(--muted);
}

.cta-panel {
    padding: 54px;
    text-align: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--autumn-500), var(--autumn-600), #fb923c);
}

.cta-panel h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(32px, 5vw, 50px);
}

.cta-panel p {
    color: #ffedd5;
    font-size: 18px;
}

.plain-page {
    padding-top: 32px;
}

.page-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 52px;
    background: linear-gradient(135deg, #ffffff, var(--autumn-50));
}

.page-hero span {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--autumn-700);
    background: var(--autumn-100);
    font-weight: 900;
}

.category-hero {
    background: linear-gradient(135deg, var(--autumn-50), #ffffff 55%, #fefce8);
}

.toolbar {
    align-items: center;
    padding: 16px 18px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(154, 52, 18, 0.08);
}

.toolbar input,
.search-panel input {
    width: min(420px, 100%);
    border: 2px solid var(--autumn-200);
    border-radius: 999px;
    outline: 0;
    padding: 12px 16px;
}

.search-panel {
    display: flex;
    gap: 12px;
    padding: 18px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(154, 52, 18, 0.08);
    margin-bottom: 18px;
}

.search-panel input {
    flex: 1;
    width: 100%;
}

.search-panel button {
    border-radius: 999px;
}

.empty-state {
    padding: 28px;
    text-align: center;
    color: var(--muted);
    border-radius: 22px;
    background: #ffffff;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 34px;
}

.pagination a,
.pagination span {
    min-width: 42px;
    padding: 10px 14px;
    border-radius: 999px;
    text-align: center;
    background: #ffffff;
    color: var(--autumn-700);
    border: 1px solid var(--autumn-200);
    font-weight: 800;
}

.pagination .is-current {
    color: #ffffff;
    background: var(--autumn-600);
}

.detail-page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 30px 0 72px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 18px;
    color: var(--muted);
}

.breadcrumb a:hover {
    color: var(--autumn-600);
}

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

.player-card {
    position: relative;
    overflow: hidden;
    background: #111827;
    aspect-ratio: 16 / 9;
}

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

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    color: #ffffff;
    border: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.62));
    cursor: pointer;
}

.play-layer span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    border-radius: 999px;
    color: var(--autumn-700);
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
    font-size: 32px;
}

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

.play-layer.is-hidden {
    display: none;
}

.detail-card {
    margin-top: 24px;
    padding: 32px;
}

.detail-card section {
    margin-top: 28px;
}

.detail-card p {
    margin: 0;
    color: #374151;
    font-size: 17px;
}

.lead-text {
    color: #111827 !important;
    font-size: 20px !important;
    font-weight: 700;
}

.detail-meta {
    margin: 16px 0 8px;
}

.detail-side {
    position: relative;
}

.sticky-card {
    position: sticky;
    top: 112px;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.compact-thumb {
    position: relative;
    height: 72px;
    overflow: hidden;
    border-radius: 14px;
    background-image: var(--poster-image), linear-gradient(135deg, var(--autumn-100), var(--autumn-500));
    background-size: cover;
    background-position: center;
}

.compact-info strong {
    display: -webkit-box;
    color: #111827;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.compact-info small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
}

.side-link {
    display: block;
    margin-top: 20px;
    padding: 12px;
    text-align: center;
    border-radius: 999px;
    color: var(--autumn-700);
    background: var(--autumn-100);
    font-weight: 900;
}

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

.index-links a {
    padding: 10px 12px;
    border-radius: 12px;
    color: #374151;
    background: #ffffff;
    border: 1px solid var(--line);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.index-links a:hover {
    color: var(--autumn-700);
    border-color: var(--autumn-200);
    background: var(--autumn-50);
}

.site-footer {
    margin-top: 40px;
    background: linear-gradient(180deg, var(--autumn-50), var(--autumn-100));
    border-top: 1px solid var(--autumn-200);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
}

.footer-brand {
    color: var(--autumn-700);
    font-size: 24px;
    font-weight: 900;
}

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

.footer-links a {
    color: #4b5563;
}

.footer-links a:hover {
    color: var(--autumn-600);
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: #6b7280;
    border-top: 1px solid var(--autumn-200);
    font-size: 14px;
}

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

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

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

    .hero-cover {
        display: none;
    }

    .sticky-card {
        position: static;
    }
}

@media (max-width: 820px) {
    .nav-toggle {
        display: inline-flex;
    }

    .nav-wrap {
        flex-wrap: wrap;
    }

    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding-top: 16px;
        border-top: 1px solid var(--autumn-100);
    }

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

    .nav-search input {
        width: 100%;
    }

    .hero-carousel {
        height: 580px;
    }

    .movie-grid,
    .featured-grid,
    .category-grid,
    .category-grid.wide,
    .index-links,
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }

    .rank-row {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .rank-meta {
        grid-column: 2;
    }

    .page-hero,
    .detail-card,
    .cta-panel {
        padding: 28px;
    }
}

@media (max-width: 560px) {
    .brand-text strong {
        font-size: 20px;
    }

    .hero-carousel {
        height: 620px;
    }

    .hero-content {
        gap: 24px;
    }

    .hero-copy h1,
    .hero-copy h2 {
        font-size: 40px;
    }

    .hero-actions,
    .page-actions,
    .detail-actions,
    .search-panel,
    .toolbar,
    .footer-bottom {
        flex-direction: column;
        align-items: stretch;
    }

    .movie-grid,
    .featured-grid,
    .category-grid,
    .category-grid.wide,
    .index-links,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

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