:root {
    --bg: #fffaf0;
    --paper: #ffffff;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #f3e8d2;
    --amber: #d97706;
    --amber-strong: #b45309;
    --green: #166534;
    --green-soft: #dcfce7;
    --shadow: 0 20px 45px rgba(120, 53, 15, 0.14);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #fff7ed 0%, #fffaf0 42%, #ffffff 100%);
    line-height: 1.65;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(217, 119, 6, 0.14);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
    white-space: nowrap;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--green));
    box-shadow: 0 12px 25px rgba(217, 119, 6, 0.25);
}

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

.nav a {
    padding: 8px 0;
    border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a.active {
    color: var(--amber);
    border-bottom-color: var(--amber);
}

.search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.search-form input {
    width: 240px;
    border: 1px solid #eadcc8;
    border-radius: 999px;
    padding: 10px 44px 10px 18px;
    outline: none;
    background: #ffffff;
    font-size: 14px;
    transition: 0.2s ease;
}

.search-form input:focus {
    border-color: var(--amber);
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.14);
}

.search-form button {
    position: absolute;
    right: 6px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: var(--amber);
    color: #ffffff;
    cursor: pointer;
    font-weight: 800;
}

.menu-toggle {
    display: none;
    border: 0;
    border-radius: 12px;
    background: #fff7ed;
    color: var(--amber-strong);
    padding: 9px 12px;
    font-weight: 800;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 690px;
    display: flex;
    align-items: center;
    color: #ffffff;
    background: #2d1b0b;
}

.hero-slides,
.hero-slide,
.hero-media,
.hero-media img,
.hero-shade {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-slide.active {
    opacity: 1;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.1) contrast(1.05);
}

.hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(120, 53, 15, 0.94), rgba(22, 101, 52, 0.84));
}

.hero-shade {
    background:
        radial-gradient(circle at 22% 28%, rgba(245, 158, 11, 0.34), transparent 33%),
        radial-gradient(circle at 86% 12%, rgba(34, 197, 94, 0.22), transparent 28%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.42));
}

.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) 420px;
    gap: 54px;
    align-items: center;
    padding: 82px 0 68px;
}

.hero-kicker {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.26);
    backdrop-filter: blur(12px);
    font-weight: 800;
}

.hero h1 {
    margin: 24px 0 18px;
    font-size: clamp(40px, 6vw, 76px);
    line-height: 1.05;
    letter-spacing: -2px;
}

.hero p {
    margin: 0;
    max-width: 720px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.hero-tags {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 11px;
    background: rgba(217, 119, 6, 0.12);
    color: #92400e;
    font-size: 12px;
    font-weight: 800;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    padding: 12px 22px;
    font-weight: 900;
    cursor: pointer;
    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, #f59e0b, #d97706);
    box-shadow: 0 16px 30px rgba(217, 119, 6, 0.32);
}

.btn-light {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-card {
    padding: 18px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
}

.hero-poster {
    aspect-ratio: 16 / 11;
    overflow: hidden;
    border-radius: 22px;
    background: rgba(0, 0, 0, 0.16);
}

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

.hero-card h2 {
    margin: 16px 0 8px;
    font-size: 24px;
}

.hero-card p {
    font-size: 14px;
}

.hero-dots {
    display: flex;
    gap: 8px;
    margin-top: 18px;
}

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

.hero-dot.active {
    width: 32px;
    background: #fbbf24;
}

.section {
    padding: 64px 0;
}

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

.section h2,
.page-title h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.18;
    letter-spacing: -0.8px;
}

.section-head p,
.page-title p,
.detail-title p {
    margin: 8px 0 0;
    color: var(--muted);
}

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 0 12px 30px rgba(146, 64, 14, 0.09);
    border: 1px solid rgba(217, 119, 6, 0.11);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.card-cover {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #1f2937;
    overflow: hidden;
}

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

.movie-card:hover .card-cover img {
    transform: scale(1.05);
}

.card-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 5px 10px;
    background: var(--amber);
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

.rank-badge {
    top: 12px;
    left: 12px;
    right: auto;
    background: #111827;
}

.card-body {
    padding: 17px;
}

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

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

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #6b7280;
    font-size: 13px;
}

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

.category-tile {
    border-radius: 22px;
    padding: 22px;
    min-height: 148px;
    background: linear-gradient(135deg, #ffffff, #fffbeb);
    border: 1px solid rgba(217, 119, 6, 0.14);
    box-shadow: 0 12px 28px rgba(146, 64, 14, 0.08);
}

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

.category-tile p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.page-hero {
    padding: 62px 0 42px;
    background:
        radial-gradient(circle at 18% 20%, rgba(245, 158, 11, 0.20), transparent 30%),
        linear-gradient(135deg, #fff7ed, #ecfdf5);
    border-bottom: 1px solid rgba(217, 119, 6, 0.14);
}

.page-title {
    max-width: 820px;
}

.filters {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 14px;
    padding: 18px;
    margin: 26px 0 32px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid rgba(217, 119, 6, 0.14);
    box-shadow: 0 12px 28px rgba(146, 64, 14, 0.08);
}

.filters input,
.filters select {
    width: 100%;
    border: 1px solid #eadcc8;
    border-radius: 14px;
    padding: 12px 14px;
    background: #fffaf0;
    outline: none;
    font-size: 14px;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid rgba(217, 119, 6, 0.12);
    box-shadow: 0 10px 24px rgba(146, 64, 14, 0.08);
}

.rank-thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    overflow: hidden;
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-info h3 {
    margin: 0 0 6px;
}

.rank-info p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.rank-score {
    color: var(--amber-strong);
    font-size: 22px;
    font-weight: 900;
}

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

.breadcrumb a {
    color: var(--amber-strong);
    font-weight: 800;
}

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

.player-card,
.detail-panel,
.side-panel {
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid rgba(217, 119, 6, 0.14);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.player-box {
    position: relative;
    background: #0f172a;
    aspect-ratio: 16 / 9;
}

.player-box video {
    width: 100%;
    height: 100%;
    display: block;
    background: #0f172a;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.34), rgba(120, 53, 15, 0.30));
    cursor: pointer;
}

.play-layer span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 34px;
    background: rgba(217, 119, 6, 0.94);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
}

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

.detail-title {
    padding: 26px;
}

.detail-title h1 {
    margin-bottom: 12px;
}

.detail-content {
    padding: 26px;
}

.detail-content h2,
.side-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.detail-content p {
    margin: 0 0 20px;
    color: #374151;
}

.info-list {
    display: grid;
    gap: 10px;
    padding: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f3e8d2;
    color: var(--muted);
    font-size: 14px;
}

.info-row strong {
    color: var(--ink);
}

.side-panel {
    padding: 20px;
}

.side-movie {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f3e8d2;
}

.side-movie:last-child {
    border-bottom: 0;
}

.side-movie img {
    width: 76px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 12px;
}

.side-movie h3 {
    margin: 0 0 4px;
    font-size: 14px;
    line-height: 1.35;
}

.side-movie p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.footer {
    margin-top: 64px;
    padding: 44px 0 28px;
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 26px;
}

.footer h2,
.footer h3 {
    margin: 0 0 12px;
    color: #ffffff;
}

.footer p,
.footer a {
    color: #d1d5db;
    font-size: 14px;
}

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

.copyright {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 13px;
    color: #9ca3af;
}

@media (max-width: 1050px) {
    .hero-content,
    .detail-layout {
        grid-template-columns: 1fr;
    }

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

    .hero-card {
        max-width: 520px;
    }
}

@media (max-width: 800px) {
    .header-inner {
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .nav,
    .search-form {
        display: none;
        width: 100%;
    }

    .nav.open,
    .search-form.open {
        display: flex;
    }

    .nav.open {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

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

    .hero {
        min-height: 760px;
    }

    .section-head,
    .footer-grid {
        display: block;
    }

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

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

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

    .rank-score {
        grid-column: 2;
        font-size: 18px;
    }
}

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

    .hero-content {
        width: min(100% - 22px, 1180px);
        gap: 28px;
        padding-top: 52px;
    }

    .grid,
    .list-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .card-cover {
        aspect-ratio: 16 / 10;
    }
}
