:root {
    --orange: #f97316;
    --orange-dark: #ea580c;
    --amber: #f59e0b;
    --yellow: #fde047;
    --ink: #1f2937;
    --muted: #6b7280;
    --soft: #fff7ed;
    --line: rgba(249, 115, 22, 0.14);
    --shadow: 0 20px 48px rgba(124, 45, 18, 0.14);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #fffbeb 0%, #fff7ed 44%, #fef3c7 100%);
}

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

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

main {
    min-height: 70vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 251, 235, 0.86);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(249, 115, 22, 0.14);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.logo-mark {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-weight: 900;
    font-size: 22px;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.35);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.logo-text strong {
    font-size: 21px;
    letter-spacing: 0.02em;
    color: transparent;
    background: linear-gradient(90deg, var(--orange-dark), var(--amber));
    -webkit-background-clip: text;
    background-clip: text;
}

.logo-text em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    margin-top: 3px;
}

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #374151;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--orange-dark);
    background: rgba(255, 237, 213, 0.95);
    transform: translateY(-1px);
}

.menu-toggle {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 22px rgba(124, 45, 18, 0.10);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--ink);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px 16px;
}

.mobile-nav.open {
    display: grid;
    gap: 8px;
}

.hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #fb923c 0%, #f59e0b 48%, #fde047 100%);
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.24);
    filter: blur(2px);
    animation: float 8s ease-in-out infinite;
}

.hero::before {
    width: 190px;
    height: 190px;
    left: 8%;
    top: 12%;
}

.hero::after {
    width: 260px;
    height: 260px;
    right: 8%;
    bottom: 10%;
    animation-delay: -2s;
}

.hero-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.35), transparent 26%), radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.26), transparent 24%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
}

.hero-slider {
    position: relative;
}

.hero-slide {
    display: none;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
    gap: 48px;
    align-items: center;
    min-height: 560px;
}

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

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.20);
    backdrop-filter: blur(10px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
    font-weight: 700;
}

.hero h1 {
    margin: 24px 0 16px;
    color: #fff;
    font-size: clamp(42px, 7vw, 86px);
    line-height: 0.98;
    text-shadow: 0 16px 35px rgba(124, 45, 18, 0.25);
}

.hero h2 {
    margin: 0 0 16px;
    color: #fff7ed;
    font-size: clamp(26px, 4vw, 46px);
    line-height: 1.08;
}

.hero p {
    margin: 0;
    max-width: 760px;
    color: rgba(255, 255, 255, 0.94);
    font-size: 18px;
    line-height: 1.8;
    text-shadow: 0 10px 24px rgba(124, 45, 18, 0.18);
}

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

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

.btn-primary {
    background: #fff;
    color: var(--orange-dark);
    box-shadow: 0 16px 34px rgba(124, 45, 18, 0.22);
}

.btn-ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
}

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

.hero-poster {
    position: relative;
    border-radius: 34px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 35px 80px rgba(124, 45, 18, 0.32);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.46));
}

.hero-meta {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-meta span {
    color: #fff;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(8px);
}

.hero-controls {
    position: absolute;
    z-index: 5;
    left: 0;
    right: 0;
    bottom: 22px;
    display: flex;
    justify-content: center;
    gap: 9px;
}

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

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

.hero-nav {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.92);
    color: var(--orange-dark);
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 16px 30px rgba(124, 45, 18, 0.18);
}

.hero-prev {
    left: -10px;
}

.hero-next {
    right: -10px;
}

.section {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
    padding: 70px 0;
}

.section-soft {
    background: linear-gradient(90deg, rgba(255, 237, 213, 0.72), rgba(254, 243, 199, 0.52));
}

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

.section-title h2,
.section-title h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
}

.section-title p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

.title-line {
    height: 4px;
    flex: 1;
    max-width: 420px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--orange), var(--amber), transparent);
}

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

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

.movie-card {
    min-width: 0;
}

.movie-card .poster-link,
.poster-frame {
    display: block;
}

.movie-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(124, 45, 18, 0.10);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.poster-frame {
    position: relative;
    overflow: hidden;
    background: #fed7aa;
}

.poster-frame img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.58));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
    opacity: 1;
}

.duration,
.genre-pill,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.duration {
    right: 10px;
    bottom: 10px;
    padding: 7px 9px;
    background: rgba(0, 0, 0, 0.72);
}

.genre-pill {
    left: 10px;
    top: 10px;
    padding: 7px 10px;
    background: linear-gradient(90deg, var(--orange), var(--amber));
}

.rank-badge {
    left: 10px;
    bottom: 10px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ef4444, var(--orange));
    box-shadow: 0 10px 18px rgba(239, 68, 68, 0.24);
}

.card-body {
    padding: 16px;
}

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

.card-body h3 a:hover {
    color: var(--orange-dark);
}

.card-body p {
    margin: 0 0 12px;
    min-height: 46px;
    color: var(--muted);
    line-height: 1.65;
    font-size: 14px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #92400e;
    font-size: 13px;
}

.card-meta span {
    padding: 5px 9px;
    border-radius: 999px;
    background: #fff7ed;
}

.search-panel {
    margin: 24px 0 34px;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 14px 32px rgba(124, 45, 18, 0.10);
}

.search-box {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.search-box span {
    font-weight: 900;
    color: var(--orange-dark);
}

.search-box input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    min-height: 48px;
    padding: 0 16px;
    outline: 0;
    font-size: 16px;
    background: #fff;
}

.search-box input:focus {
    border-color: rgba(249, 115, 22, 0.55);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.10);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.filter-chip {
    border: 0;
    border-radius: 999px;
    padding: 9px 14px;
    color: #9a3412;
    background: #ffedd5;
    font-weight: 800;
    cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
    color: #fff;
    background: linear-gradient(90deg, var(--orange), var(--amber));
}

.empty-state {
    display: none;
    padding: 40px;
    text-align: center;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.82);
    border-radius: 22px;
}

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

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

.category-card {
    min-height: 150px;
    padding: 24px;
    border-radius: 24px;
    color: #fff;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-6px) scale(1.01);
}

.category-card strong {
    display: block;
    font-size: 23px;
    margin-bottom: 12px;
}

.category-card span {
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.88);
}

.from-purple { background: linear-gradient(135deg, #a855f7, #ec4899); }
.from-indigo { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.from-emerald { background: linear-gradient(135deg, #10b981, #14b8a6); }
.from-sky { background: linear-gradient(135deg, #0ea5e9, #06b6d4); }
.from-rose { background: linear-gradient(135deg, #f43f5e, #fb7185); }
.from-violet { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.from-orange { background: linear-gradient(135deg, #f97316, #f59e0b); }
.from-amber { background: linear-gradient(135deg, #d97706, #facc15); }
.from-teal { background: linear-gradient(135deg, #0d9488, #2dd4bf); }
.from-red { background: linear-gradient(135deg, #ef4444, #f97316); }

.rail-wrap {
    position: relative;
    overflow: hidden;
}

.rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc(25% - 18px);
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 2px 20px;
    scrollbar-width: none;
}

.rail::-webkit-scrollbar {
    display: none;
}

.rail .movie-card {
    scroll-snap-align: start;
}

.rail-button {
    position: absolute;
    top: 40%;
    z-index: 3;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--orange-dark);
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(124, 45, 18, 0.18);
}

.rail-prev { left: 2px; }
.rail-next { right: 2px; }

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

.rank-item {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 20px;
    padding: 14px;
}

.rank-cover {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 16px;
    background: #fed7aa;
}

.rank-cover img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.rank-cover span {
    position: absolute;
    left: 12px;
    top: 12px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, #ef4444, var(--orange));
}

.rank-content h3 {
    margin: 8px 0 10px;
    font-size: 24px;
}

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

.breadcrumb {
    width: min(1280px, calc(100% - 40px));
    margin: 26px auto 0;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--orange-dark);
}

.detail-layout {
    width: min(1280px, calc(100% - 40px));
    margin: 24px auto 70px;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.9fr);
    gap: 28px;
}

.panel {
    background: rgba(255, 255, 255, 0.90);
    border-radius: 24px;
    box-shadow: 0 14px 36px rgba(124, 45, 18, 0.10);
    overflow: hidden;
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 24px;
    color: #fff;
    border: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.58));
    cursor: pointer;
}

.player-overlay[hidden] {
    display: none;
}

.play-icon {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--orange-dark);
    background: rgba(255, 255, 255, 0.92);
    font-size: 32px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.player-overlay strong {
    font-size: clamp(22px, 4vw, 36px);
    text-align: center;
    text-shadow: 0 8px 20px rgba(0, 0, 0, 0.32);
}

.detail-content {
    padding: 28px;
}

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

.detail-content h2 {
    margin: 34px 0 12px;
    font-size: 24px;
}

.detail-content p {
    color: #4b5563;
    line-height: 1.9;
    font-size: 16px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 18px 0;
}

.tag-row span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #9a3412;
    background: linear-gradient(90deg, #ffedd5, #fef3c7);
    font-weight: 700;
    font-size: 13px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.info-grid div {
    padding: 13px 14px;
    border-radius: 16px;
    background: #fff7ed;
}

.info-grid span {
    color: var(--muted);
    margin-right: 8px;
}

.side-panel {
    position: sticky;
    top: 94px;
    padding: 22px;
}

.side-panel h2 {
    margin: 0 0 18px;
    font-size: 22px;
}

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

.mini-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(124, 45, 18, 0.08);
}

.mini-card:hover {
    transform: translateY(-3px);
}

.mini-cover {
    overflow: hidden;
    border-radius: 12px;
    background: #fed7aa;
}

.mini-cover img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.mini-body strong {
    display: block;
    line-height: 1.4;
    margin-bottom: 5px;
}

.mini-body em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.site-footer {
    background: #111827;
    color: #e5e7eb;
}

.footer-inner {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
    padding: 42px 0;
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.footer-logo {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 12px;
}

.footer-inner p {
    max-width: 620px;
    color: #9ca3af;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-content: start;
}

.footer-links a {
    color: #d1d5db;
}

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

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-22px) rotate(5deg); }
}

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

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

    .rail {
        grid-auto-columns: calc(33.333% - 16px);
    }

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

    .side-panel {
        position: static;
    }
}

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

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

    .hero {
        min-height: auto;
        padding: 44px 0 70px;
    }

    .hero-slide,
    .hero-slide.active {
        grid-template-columns: 1fr;
        gap: 28px;
        min-height: auto;
    }

    .hero-poster {
        max-width: 320px;
        margin: 0 auto;
    }

    .hero-nav {
        display: none;
    }

    .section {
        width: min(100% - 28px, 1280px);
        padding: 48px 0;
    }

    .section-head {
        display: block;
    }

    .title-line {
        margin-top: 14px;
        max-width: 100%;
    }

    .movie-grid,
    .movie-grid.three {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .card-body {
        padding: 13px;
    }

    .card-body p {
        min-height: auto;
        font-size: 13px;
    }

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

    .rail {
        grid-auto-columns: 78%;
    }

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

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

    .detail-layout,
    .breadcrumb {
        width: min(100% - 28px, 1280px);
    }

    .detail-content {
        padding: 20px;
    }

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

    .footer-inner {
        width: min(100% - 28px, 1280px);
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .movie-grid,
    .movie-grid.three {
        grid-template-columns: 1fr;
    }

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