* {
    box-sizing: border-box;
}

:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --amber: #d97706;
    --amber-dark: #92400e;
    --orange: #ea580c;
    --soft: #fff7ed;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(229, 231, 235, 0.88);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: #7c2d12;
    white-space: nowrap;
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.nav-link {
    padding: 9px 13px;
    border-radius: 999px;
    color: #374151;
    font-size: 15px;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #7c2d12;
    background: #ffedd5;
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.toolbar input {
    width: 220px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 14px;
    outline: none;
    background: #ffffff;
    transition: all 0.2s ease;
}

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

.header-search button,
.mobile-search button,
.primary-btn,
.ghost-btn,
.ghost-link {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 700;
    cursor: pointer;
}

.header-search button,
.mobile-search button,
.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 10px 25px rgba(217, 119, 6, 0.24);
}

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

.ghost-link {
    color: #92400e;
    border-color: #fed7aa;
    background: #fff7ed;
}

.slim-btn {
    display: inline-flex;
    align-items: center;
    padding: 9px 16px;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #fff7ed;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #92400e;
}

.mobile-panel {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid var(--line);
}

.mobile-panel nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 14px 0;
}

.hero-section {
    position: relative;
    overflow: hidden;
    background: #111827;
}

.hero-slider {
    position: relative;
    min-height: 620px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.48fr);
    gap: 46px;
    align-items: center;
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-backdrop {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-size: cover;
    background-position: center;
    opacity: 0.12;
    filter: blur(8px);
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 24%, rgba(251, 191, 36, 0.32), transparent 34%),
        radial-gradient(circle at 80% 20%, rgba(234, 88, 12, 0.30), transparent 36%),
        linear-gradient(135deg, #451a03 0%, #7c2d12 42%, #111827 100%);
}

.hero-content,
.hero-poster {
    position: relative;
    z-index: 2;
}

.hero-label,
.eyebrow,
.page-hero span {
    display: inline-flex;
    color: #ffedd5;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    padding: 7px 13px;
    font-size: 14px;
    font-weight: 700;
}

.hero-content h1 {
    margin: 22px 0 18px;
    color: #ffffff;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 760px;
    margin: 0;
    color: #ffedd5;
    font-size: clamp(18px, 2vw, 24px);
}

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

.hero-tags {
    margin: 26px 0;
}

.hero-tags span,
.detail-meta span,
.card-meta span,
.tag-row span {
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 13px;
    color: #78350f;
    background: #ffedd5;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-poster {
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.35);
    transform: rotate(2deg);
}

.hero-poster img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: linear-gradient(135deg, #f59e0b, #7c2d12);
}

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

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

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

.stat-strip {
    width: min(1220px, calc(100% - 32px));
    margin: -34px auto 0;
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.stat-strip a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 82px;
    padding: 18px 22px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
}

.stat-strip strong {
    color: #7c2d12;
    font-size: 20px;
}

.stat-strip span {
    color: var(--muted);
}

.section-wrap {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 64px 0;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    letter-spacing: -0.03em;
}

.section-heading a {
    color: #b45309;
    font-weight: 700;
}

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

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

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

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #f59e0b, #7c2d12);
}

.poster-link img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.card-type,
.card-duration,
.poster-play {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.card-type {
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    color: #ffffff;
    background: var(--amber);
}

.card-duration {
    top: 12px;
    right: 12px;
    padding: 6px 10px;
    color: #ffffff;
    background: rgba(17, 24, 39, 0.72);
}

.poster-play {
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    color: #ffffff;
    background: rgba(217, 119, 6, 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.82);
    transition: all 0.25s ease;
}

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

.card-body {
    padding: 16px;
}

.card-body h2,
.wide-body h2 {
    margin: 0 0 9px;
    font-size: 18px;
    line-height: 1.35;
}

.card-body h2 a:hover,
.wide-body h2 a:hover {
    color: var(--amber-dark);
}

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

.compact-card .card-body p {
    -webkit-line-clamp: 1;
}

.tinted-section,
.editor-section {
    width: min(1260px, calc(100% - 16px));
    border-radius: 34px;
    padding-left: 24px;
    padding-right: 24px;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
}

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

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

.category-card {
    display: block;
    overflow: hidden;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-covers {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px;
    background: #fed7aa;
}

.category-covers img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: linear-gradient(135deg, #f59e0b, #7c2d12);
}

.category-info {
    padding: 18px;
}

.category-info h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

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

.category-info span {
    color: #b45309;
    font-weight: 700;
}

.wide-grid,
.rank-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

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

.wide-card {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 16px;
    padding: 14px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
    transition: all 0.25s ease;
}

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

.wide-cover {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, #f59e0b, #7c2d12);
}

.wide-cover img {
    height: 100%;
    min-height: 116px;
    object-fit: cover;
}

.wide-cover span {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(217, 119, 6, 0.9);
    transform: translate(-50%, -50%);
}

.wide-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rank-number {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    min-width: 42px;
    height: 32px;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--amber), var(--orange));
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 72px 16px;
    color: #ffffff;
    background:
        radial-gradient(circle at 10% 20%, rgba(251, 191, 36, 0.35), transparent 28%),
        linear-gradient(135deg, #451a03, #9a3412 52%, #111827);
}

.page-hero > div {
    width: min(1220px, 100%);
    margin: 0 auto;
}

.page-hero h1 {
    max-width: 860px;
    margin: 18px 0 12px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.1;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: #ffedd5;
    font-size: 18px;
}

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

.toolbar label {
    display: grid;
    gap: 8px;
    color: #92400e;
    font-weight: 700;
}

.toolbar input {
    width: min(440px, 78vw);
    border-radius: 16px;
}

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

.empty-state.show {
    display: block;
}

.breadcrumb-bar {
    width: min(1220px, calc(100% - 32px));
    margin: 28px auto 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb-bar a {
    color: #b45309;
    font-weight: 700;
}

.detail-layout {
    width: min(1220px, calc(100% - 32px));
    margin: 26px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-player {
    display: block;
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.20), rgba(0, 0, 0, 0.54));
    cursor: pointer;
}

.player-overlay span {
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
    border-radius: 999px;
    background: rgba(217, 119, 6, 0.92);
    font-size: 20px;
    font-weight: 800;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
}

.player-overlay.hide {
    display: none;
}

.detail-card,
.side-card {
    margin-top: 22px;
    padding: 26px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.detail-title-row {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 18px;
}

.detail-title-row h1 {
    margin: 14px 0 10px;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.12;
}

.detail-one-line {
    margin: 0 0 18px;
    color: #374151;
    font-size: 18px;
}

.detail-meta {
    margin-bottom: 18px;
}

.content-block {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.content-block h2,
.side-card h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.content-block p {
    margin: 0;
    color: #374151;
    font-size: 16px;
}

.detail-side {
    position: sticky;
    top: 100px;
    align-self: start;
}

.side-poster {
    display: block;
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(135deg, #f59e0b, #7c2d12);
    box-shadow: var(--shadow);
}

.side-poster img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.side-list {
    display: grid;
    gap: 12px;
}

.side-list a {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 8px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.side-list a:hover {
    background: #fff7ed;
}

.side-list img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 10px;
    background: linear-gradient(135deg, #f59e0b, #7c2d12);
}

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

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

.footer-grid h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 18px;
}

.footer-grid p {
    max-width: 520px;
    margin: 14px 0 0;
    color: #9ca3af;
}

.footer-grid a:not(.footer-logo) {
    display: block;
    margin: 8px 0;
    color: #d1d5db;
}

.footer-logo {
    color: #ffffff;
}

.footer-bottom {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0;
    color: #9ca3af;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 1080px) {
    .header-search {
        display: none;
    }

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

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

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

    .detail-side {
        position: static;
        display: grid;
        grid-template-columns: 240px minmax(0, 1fr);
        gap: 20px;
    }
}

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

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

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

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

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

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 24px;
    }

    .hero-poster {
        max-width: 220px;
        margin: 0 auto;
        transform: rotate(0deg);
    }

    .stat-strip {
        grid-template-columns: 1fr;
        margin-top: 18px;
    }

    .section-wrap,
    .tinted-section,
    .editor-section {
        padding-top: 42px;
        padding-bottom: 42px;
    }

    .section-heading,
    .toolbar,
    .detail-title-row {
        align-items: start;
        flex-direction: column;
    }

    .movie-grid,
    .small-grid,
    .category-movie-grid,
    .category-grid,
    .large-category-grid,
    .wide-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

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

    .wide-cover img {
        min-height: 124px;
    }

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

    .side-poster {
        max-width: 240px;
    }

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

@media (max-width: 520px) {
    .header-inner {
        width: min(100% - 20px, 1220px);
    }

    .site-logo span:last-child {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .movie-grid,
    .small-grid,
    .category-movie-grid,
    .category-grid,
    .large-category-grid,
    .wide-grid {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 42px;
    }
}
