:root {
    --bg: #fff7ed;
    --bg-soft: #fffbeb;
    --text: #1f2937;
    --muted: #6b7280;
    --line: rgba(251, 146, 60, 0.22);
    --orange: #f97316;
    --amber: #d97706;
    --yellow: #f59e0b;
    --dark: #111827;
    --card: rgba(255, 255, 255, 0.9);
    --shadow: 0 20px 50px rgba(180, 83, 9, 0.16);
}

* {
    box-sizing: border-box;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 247, 237, 0.92);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 30px rgba(154, 52, 18, 0.12);
    border-bottom: 1px solid rgba(251, 146, 60, 0.22);
}

.topbar {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

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

.brand-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: 0 16px 28px rgba(249, 115, 22, 0.35);
    transform: translateZ(0);
}

.brand-text strong {
    display: block;
    font-size: 1.55rem;
    line-height: 1.05;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #ea580c, #b45309);
    -webkit-background-clip: text;
    color: transparent;
}

.brand-text small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.76rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a {
    padding: 10px 16px;
    border-radius: 14px;
    color: #374151;
    font-weight: 700;
    transition: 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: white;
    background: linear-gradient(90deg, var(--orange), var(--amber));
    box-shadow: 0 14px 28px rgba(249, 115, 22, 0.26);
}

.menu-toggle {
    display: none;
    border: 0;
    background: rgba(255, 237, 213, 0.9);
    color: #9a3412;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 1.2rem;
}

.hero {
    position: relative;
    overflow: hidden;
    color: white;
    background: radial-gradient(circle at 15% 20%, rgba(251, 191, 36, 0.5), transparent 24%), linear-gradient(135deg, #ea580c, #b45309 52%, #78350f);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.16;
    background-image: linear-gradient(45deg, rgba(255,255,255,0.14) 25%, transparent 25%), linear-gradient(-45deg, rgba(255,255,255,0.1) 25%, transparent 25%);
    background-size: 34px 34px;
}

.hero-inner {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    min-height: 630px;
    margin: 0 auto;
    padding: 76px 0 96px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 42px;
    align-items: center;
}

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

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

.hero h1 {
    margin: 22px 0 18px;
    font-size: clamp(2.5rem, 6vw, 5.4rem);
    line-height: 1.05;
    letter-spacing: -0.045em;
    text-shadow: 0 18px 45px rgba(0,0,0,0.22);
}

.hero p {
    max-width: 760px;
    color: rgba(255,255,255,0.88);
    font-size: 1.14rem;
    line-height: 1.85;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 22px;
    border-radius: 999px;
    border: 2px solid rgba(255,255,255,0.9);
    font-weight: 800;
    transition: 0.25s ease;
}

.btn.primary {
    color: #ea580c;
    background: white;
    box-shadow: 0 20px 45px rgba(120, 53, 15, 0.25);
}

.btn.ghost {
    color: white;
    background: rgba(255,255,255,0.12);
}

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

.hero-search {
    display: flex;
    gap: 8px;
    margin-top: 30px;
    max-width: 600px;
    padding: 8px;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 22px;
    backdrop-filter: blur(16px);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    color: white;
    background: transparent;
    padding: 0 16px;
    outline: 0;
    font-size: 1rem;
}

.hero-search input::placeholder {
    color: rgba(255,255,255,0.75);
}

.hero-search button,
.filter-panel button {
    border: 0;
    border-radius: 16px;
    color: white;
    background: linear-gradient(90deg, #f97316, #d97706);
    padding: 12px 20px;
    font-weight: 800;
}

.hero-slider {
    position: relative;
    z-index: 2;
}

.hero-frame {
    position: relative;
    min-height: 490px;
    border-radius: 34px;
    overflow: hidden;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 35px 80px rgba(67, 20, 7, 0.35);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 0.7s ease, transform 0.9s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
}

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

.slide-text {
    position: absolute;
    inset: auto 0 0;
    padding: 120px 28px 28px;
    background: linear-gradient(to top, rgba(0,0,0,0.82), rgba(0,0,0,0));
}

.slide-text h2 {
    margin: 10px 0;
    font-size: 1.8rem;
    font-weight: 900;
}

.slide-text p {
    margin: 0;
    color: rgba(255,255,255,0.86);
    font-size: 0.95rem;
    line-height: 1.7;
}

.slide-tag {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    color: white;
    background: rgba(249, 115, 22, 0.9);
    font-size: 0.8rem;
    font-weight: 800;
}

.slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}

.slider-controls button {
    width: 38px;
    height: 38px;
    border: 0;
    color: white;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(12px);
}

.slider-dots {
    display: flex;
    align-items: center;
    gap: 7px;
}

.slider-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    background: rgba(255,255,255,0.45);
}

.slider-dots button.is-active {
    width: 28px;
    border-radius: 999px;
    background: white;
}

.wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 74px;
    color: var(--bg);
}

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

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

.section-title h2,
.page-title h1 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.65rem);
    font-weight: 900;
    color: #1f2937;
}

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

.more-link {
    display: inline-flex;
    color: #ea580c;
    font-weight: 900;
}

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

.category-card {
    min-height: 136px;
    padding: 22px;
    border-radius: 26px;
    color: white;
    background: linear-gradient(135deg, #f97316, #d97706);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.category-card::after {
    content: "";
    position: absolute;
    width: 140px;
    height: 140px;
    right: -46px;
    bottom: -62px;
    border-radius: 50%;
    background: rgba(255,255,255,0.16);
}

.category-card h3 {
    margin: 0 0 10px;
    font-size: 1.25rem;
    font-weight: 900;
}

.category-card p {
    margin: 0;
    color: rgba(255,255,255,0.86);
    line-height: 1.6;
    font-size: 0.92rem;
}

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

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

.movie-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 12px 28px rgba(154, 52, 18, 0.1);
    border: 1px solid rgba(251, 146, 60, 0.16);
    transition: 0.28s ease;
}

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

.poster-wrap {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #fed7aa, #fef3c7);
}

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

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

.year-badge,
.rank-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 999px;
    color: white;
    background: linear-gradient(90deg, #f97316, #d97706);
    font-size: 0.75rem;
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(0,0,0,0.25);
}

.rank-badge {
    left: 10px;
    right: auto;
    background: rgba(17, 24, 39, 0.82);
}

.poster-mask {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px;
    color: white;
    background: linear-gradient(to top, rgba(0,0,0,0.82), transparent 70%);
    opacity: 0;
    transition: 0.25s ease;
}

.movie-link:hover .poster-mask {
    opacity: 1;
}

.play-chip {
    align-self: flex-start;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.95);
    font-size: 0.82rem;
    font-weight: 900;
}

.poster-mask p {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-info {
    padding: 14px;
}

.movie-info h3 {
    margin: 0 0 8px;
    min-height: 42px;
    color: #1f2937;
    font-size: 0.98rem;
    line-height: 1.35;
    font-weight: 900;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 0.78rem;
}

.movie-desc {
    margin: 0;
    color: #6b7280;
    font-size: 0.82rem;
    line-height: 1.58;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tag-row span {
    padding: 4px 8px;
    border-radius: 999px;
    color: #9a3412;
    background: #ffedd5;
    font-size: 0.72rem;
    font-weight: 800;
}

.rank-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.38fr);
    gap: 26px;
    align-items: start;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 48px 68px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255,255,255,0.86);
    border: 1px solid rgba(251, 146, 60, 0.16);
    box-shadow: 0 10px 24px rgba(154, 52, 18, 0.08);
    transition: 0.25s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow);
}

.rank-item strong {
    color: #ea580c;
    font-size: 1.2rem;
    font-weight: 950;
    text-align: center;
}

.rank-item img {
    width: 68px;
    height: 92px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-item b {
    display: block;
    color: #1f2937;
    font-size: 0.98rem;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-item em {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-style: normal;
    font-size: 0.82rem;
}

.page-hero {
    background: linear-gradient(135deg, #ea580c, #b45309);
    color: white;
    position: relative;
    overflow: hidden;
}

.page-hero::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    right: -120px;
    top: -140px;
    border-radius: 50%;
    background: rgba(255,255,255,0.13);
}

.page-title {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0;
}

.page-title h1,
.page-title p {
    color: white;
}

.page-title p {
    max-width: 760px;
    color: rgba(255,255,255,0.86);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px 180px 160px auto;
    gap: 12px;
    padding: 18px;
    margin-bottom: 26px;
    border-radius: 24px;
    background: rgba(255,255,255,0.88);
    box-shadow: var(--shadow);
    border: 1px solid rgba(251, 146, 60, 0.18);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 2px solid #fed7aa;
    border-radius: 15px;
    background: white;
    color: #374151;
    outline: 0;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: #f97316;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(255,255,255,0.78);
    margin-bottom: 16px;
    font-size: 0.92rem;
}

.breadcrumb a:hover {
    color: white;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #0f172a;
    box-shadow: 0 32px 80px rgba(15, 23, 42, 0.36);
    border: 1px solid rgba(255,255,255,0.12);
    aspect-ratio: 16 / 9;
}

.player-shell video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #0f172a;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: linear-gradient(to top, rgba(0,0,0,0.78), rgba(0,0,0,0.08));
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    filter: brightness(0.68);
}

.play-button {
    position: relative;
    z-index: 2;
    width: 88px;
    height: 88px;
    border: 0;
    border-radius: 50%;
    color: #ea580c;
    background: rgba(255,255,255,0.94);
    font-size: 2rem;
    box-shadow: 0 20px 42px rgba(0,0,0,0.35);
    transition: 0.25s ease;
}

.play-button:hover {
    transform: scale(1.06);
}

.player-title-on-cover {
    position: absolute;
    left: 26px;
    right: 26px;
    bottom: 24px;
    z-index: 2;
    color: white;
}

.player-title-on-cover strong {
    display: block;
    font-size: 1.4rem;
    line-height: 1.35;
}

.player-title-on-cover span {
    display: block;
    margin-top: 8px;
    color: rgba(255,255,255,0.82);
}

.player-shell.is-playing .player-cover {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.detail-card,
.side-card {
    padding: 26px;
    border-radius: 28px;
    background: rgba(255,255,255,0.9);
    box-shadow: var(--shadow);
    border: 1px solid rgba(251, 146, 60, 0.16);
}

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

.detail-card h2,
.side-card h2 {
    margin: 0 0 16px;
    color: #1f2937;
    font-size: 1.45rem;
    font-weight: 950;
}

.detail-card p {
    color: #374151;
    line-height: 1.95;
    margin: 0 0 18px;
}

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

.meta-table div {
    padding: 12px;
    border-radius: 16px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
}

.meta-table span {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    margin-bottom: 4px;
}

.meta-table strong {
    color: #7c2d12;
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

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

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

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

.info-link {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    transition: 0.25s ease;
}

.info-link:hover {
    transform: translateX(4px);
    box-shadow: 0 12px 28px rgba(154, 52, 18, 0.1);
}

.info-link strong {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, #f97316, #d97706);
}

.info-link b {
    display: block;
    color: #1f2937;
    line-height: 1.35;
}

.info-link em {
    display: block;
    margin-top: 4px;
    color: #6b7280;
    font-style: normal;
    font-size: 0.82rem;
    line-height: 1.5;
}

.site-footer {
    margin-top: 54px;
    color: white;
    background: linear-gradient(135deg, #111827, #1f2937 55%, #111827);
}

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

.footer-inner h2,
.footer-inner h3 {
    margin: 0 0 14px;
}

.footer-inner p {
    margin: 0;
    color: #d1d5db;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-links a {
    padding: 8px 10px;
    border-radius: 999px;
    color: #fed7aa;
    background: rgba(255,255,255,0.08);
}

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: #9ca3af;
    border-top: 1px solid rgba(255,255,255,0.12);
}

.hide-card {
    display: none !important;
}

.empty-state {
    display: none;
    padding: 48px 20px;
    text-align: center;
    border-radius: 24px;
    color: #9a3412;
    background: rgba(255, 247, 237, 0.88);
    border: 1px solid #fed7aa;
}

.empty-state.is-visible {
    display: block;
}

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

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

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

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 74px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border-radius: 20px;
        background: rgba(255, 247, 237, 0.98);
        box-shadow: var(--shadow);
    }

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

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

    .hero-inner {
        min-height: auto;
        padding: 52px 0 86px;
    }

    .hero-frame {
        min-height: 430px;
    }

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

@media (max-width: 720px) {
    .topbar,
    .hero-inner,
    .main-section,
    .page-main,
    .page-title,
    .footer-inner,
    .copyright {
        width: min(100% - 24px, 1180px);
    }

    .brand-text strong {
        font-size: 1.28rem;
    }

    .hero-search,
    .section-title,
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

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

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

    .rank-item {
        grid-template-columns: 40px 56px minmax(0, 1fr);
    }

    .rank-item img {
        width: 56px;
        height: 76px;
    }

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

    .meta-table {
        grid-template-columns: 1fr;
    }

    .player-title-on-cover strong {
        font-size: 1.05rem;
    }

    .player-title-on-cover span {
        font-size: 0.85rem;
    }

    .play-button {
        width: 72px;
        height: 72px;
    }
}

.overview-card {
    min-height: 220px;
}

.overview-card a {
    display: block;
    position: relative;
    z-index: 1;
}

.mini-posters {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 18px;
}

.mini-posters img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 10px;
    background: rgba(255,255,255,0.16);
}
