:root {
    --page-bg: #fffdf1;
    --surface: #ffffff;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --gold: #facc15;
    --gold-deep: #ca8a04;
    --green: #86efac;
    --shadow: 0 18px 45px rgba(31, 41, 55, 0.12);
    --shadow-soft: 0 12px 30px rgba(31, 41, 55, 0.08);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Roboto, Arial, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(250, 204, 21, 0.16), transparent 36rem),
        radial-gradient(circle at top right, rgba(134, 239, 172, 0.22), transparent 34rem),
        linear-gradient(135deg, #fffbeb 0%, #ffffff 44%, #f0fdf4 100%);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.header-inner {
    max-width: 1180px;
    margin: 0 auto;
    min-height: 76px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    white-space: nowrap;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #facc15, #fde047, #86efac);
    color: #1f2937;
    box-shadow: 0 10px 25px rgba(202, 138, 4, 0.22);
}

.brand-text {
    font-size: 21px;
    letter-spacing: -0.02em;
}

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

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

.nav-link:hover,
.nav-link.active {
    color: #1f2937;
    background: #fef3c7;
}

.header-search {
    margin-left: auto;
    display: flex;
    min-width: 280px;
    background: #f9fafb;
    border: 2px solid #f3f4f6;
    border-radius: 999px;
    overflow: hidden;
    transition: 0.2s ease;
}

.header-search:focus-within {
    border-color: #facc15;
    box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.18);
}

.header-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 11px 16px;
    color: #111827;
}

.header-search button {
    border: 0;
    padding: 0 18px;
    color: #1f2937;
    font-weight: 900;
    background: linear-gradient(135deg, #facc15, #fde047);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #fef3c7;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-button span {
    width: 20px;
    height: 2px;
    background: #1f2937;
    border-radius: 99px;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
}

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.38) 54%, rgba(0, 0, 0, 0.08)),
        radial-gradient(circle at 18% 68%, rgba(250, 204, 21, 0.36), transparent 24rem);
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: min(1180px, calc(100% - 40px));
    padding: 0 0 72px;
    color: #ffffff;
}

.hero-badge {
    display: inline-flex;
    margin-bottom: 18px;
    padding: 8px 16px;
    border-radius: 999px;
    background: #facc15;
    color: #1f2937;
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(250, 204, 21, 0.26);
}

.hero h1 {
    max-width: 920px;
    margin: 0 0 16px;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.02;
    font-weight: 950;
    letter-spacing: -0.05em;
    text-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
}

.hero p {
    max-width: 820px;
    margin: 0 0 28px;
    color: #e5e7eb;
    font-size: clamp(17px, 2.2vw, 22px);
}

.hero-actions,
.section-actions,
.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

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

.btn-primary {
    background: linear-gradient(135deg, #facc15, #fde047);
    color: #1f2937;
    box-shadow: 0 16px 35px rgba(250, 204, 21, 0.28);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-ghost {
    background: #ffffff;
    color: #ca8a04;
    box-shadow: var(--shadow-soft);
}

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

.hero-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.28);
    color: #ffffff;
    font-size: 30px;
    backdrop-filter: blur(12px);
    transition: 0.2s ease;
}

.hero-control:hover {
    background: rgba(255, 255, 255, 0.46);
}

.hero-control.prev {
    left: 22px;
}

.hero-control.next {
    right: 22px;
}

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

.hero-dots button {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    transition: 0.2s ease;
}

.hero-dots button.active {
    width: 34px;
    background: #facc15;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 48px 20px;
}

.section-block {
    margin-bottom: 70px;
}

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

.section-heading h2,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    color: #1f2937;
    font-weight: 950;
    letter-spacing: -0.035em;
}

.section-heading h2 {
    font-size: clamp(26px, 3vw, 38px);
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-heading h2::before {
    content: "";
    width: 8px;
    height: 34px;
    border-radius: 999px;
    background: linear-gradient(180deg, #facc15, #ca8a04);
}

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

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 156px;
    padding: 24px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: 0.25s ease;
}

.category-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.22), rgba(134, 239, 172, 0.2));
    transition: 0.25s ease;
}

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

.category-tile:hover::before {
    opacity: 1;
}

.category-tile strong,
.category-tile span,
.category-tile p {
    position: relative;
}

.category-tile span {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
    border-radius: 17px;
    color: #1f2937;
    font-size: 24px;
    background: linear-gradient(135deg, #facc15, #86efac);
}

.category-tile strong {
    display: block;
    font-size: 20px;
    margin-bottom: 8px;
}

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

.card-row {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding: 4px 4px 18px;
    scroll-snap-type: x mandatory;
}

.card-row .movie-card {
    flex: 0 0 312px;
    scroll-snap-align: start;
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: 0.25s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #fef3c7, #dcfce7);
}

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

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

.poster-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.72));
}

.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #1f2937;
    font-weight: 950;
    background: linear-gradient(135deg, #facc15, #fde047);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

.movie-card-body {
    padding: 18px;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: #92400e;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 9px;
}

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

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.28;
}

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

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-row span {
    padding: 4px 8px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 12px;
    font-weight: 700;
}

.movie-card.large .poster-link {
    aspect-ratio: 16 / 8.5;
}

.movie-card.compact {
    display: grid;
    grid-template-columns: 156px 1fr;
}

.movie-card.compact .poster-link {
    aspect-ratio: auto;
    height: 100%;
}

.ranking-panel,
.page-hero,
.detail-card,
.player-shell,
.related-panel,
.filter-panel {
    background: #ffffff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
}

.ranking-panel {
    padding: 24px;
}

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

.mini-item {
    display: grid;
    grid-template-columns: auto 74px 1fr;
    align-items: center;
    gap: 14px;
    padding: 10px;
    border-radius: 18px;
    background: #f9fafb;
    transition: 0.2s ease;
}

.mini-item:hover {
    background: #fef3c7;
    transform: translateX(4px);
}

.mini-rank {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #1f2937;
    font-weight: 950;
    background: linear-gradient(135deg, #facc15, #fde047);
}

.mini-item img {
    width: 74px;
    height: 50px;
    object-fit: cover;
    border-radius: 12px;
}

.mini-item strong {
    display: block;
    line-height: 1.28;
}

.mini-item em {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
    margin-top: 3px;
}

.cta-band {
    text-align: center;
    padding: 52px 24px;
    border-radius: 34px;
    background: linear-gradient(135deg, #facc15, #fde047 48%, #86efac);
    box-shadow: 0 24px 60px rgba(202, 138, 4, 0.22);
}

.cta-band h2 {
    margin: 0 0 10px;
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: -0.04em;
}

.cta-band p {
    margin: 0 auto 24px;
    max-width: 620px;
    color: #374151;
}

.page-hero {
    overflow: hidden;
    padding: 48px;
    margin-bottom: 34px;
    background:
        radial-gradient(circle at right top, rgba(134, 239, 172, 0.4), transparent 24rem),
        linear-gradient(135deg, #facc15, #fde047 42%, #ffffff);
}

.page-hero h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.filter-panel {
    padding: 18px;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: space-between;
    align-items: center;
}

.filter-panel input,
.filter-panel select,
.search-main input,
.search-main select {
    height: 46px;
    border: 2px solid #f3f4f6;
    border-radius: 999px;
    outline: 0;
    padding: 0 16px;
    background: #ffffff;
    color: #111827;
}

.filter-panel input:focus,
.filter-panel select:focus,
.search-main input:focus,
.search-main select:focus {
    border-color: #facc15;
    box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.16);
}

.search-main {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    margin-bottom: 30px;
}

.search-main button {
    border: 0;
    height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    color: #1f2937;
    font-weight: 950;
    background: linear-gradient(135deg, #facc15, #fde047);
}

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

.breadcrumb {
    margin: 0 0 18px;
    color: #6b7280;
    font-weight: 700;
}

.breadcrumb a {
    color: #b45309;
}

.player-shell {
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
    background: #000000;
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background:
        radial-gradient(circle at center, rgba(250, 204, 21, 0.26), transparent 18rem),
        linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.18));
    color: #ffffff;
    transition: opacity 0.25s ease;
}

.player-start span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    color: #1f2937;
    font-weight: 950;
    background: linear-gradient(135deg, #facc15, #fde047);
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.35);
}

.player-shell.is-playing .player-start,
.player-shell.is-ready .player-start.fade-out {
    opacity: 0;
    pointer-events: none;
}

.player-message {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    display: none;
    padding: 12px 14px;
    border-radius: 14px;
    color: #ffffff;
    background: rgba(17, 24, 39, 0.82);
}

.player-message.show {
    display: block;
}

.detail-card {
    padding: 28px;
    margin-bottom: 24px;
}

.detail-title h1 {
    font-size: clamp(32px, 4vw, 52px);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 22px;
}

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #92400e;
    background: #fef3c7;
    font-weight: 900;
}

.prose-block {
    margin-top: 26px;
}

.prose-block h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.prose-block p {
    margin: 0;
    color: #374151;
    line-height: 1.9;
    white-space: pre-line;
}

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

.related-panel {
    padding: 22px;
    margin-bottom: 22px;
}

.related-panel h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

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

.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 42px 20px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 30px;
    align-items: start;
}

.footer-inner h2 {
    margin: 0 0 10px;
    color: #facc15;
}

.footer-inner p {
    max-width: 620px;
    margin: 0;
    color: #d1d5db;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(96px, 1fr));
    gap: 10px 18px;
    color: #d1d5db;
}

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

.empty-state {
    display: none;
    padding: 46px;
    text-align: center;
    border-radius: 24px;
    color: #6b7280;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

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

@media (max-width: 980px) {
    .header-inner {
        flex-wrap: wrap;
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .menu-button {
        display: flex;
        margin-left: auto;
    }

    .main-nav {
        display: none;
        width: 100%;
        order: 4;
        flex-direction: column;
        align-items: stretch;
        padding-top: 12px;
    }

    .main-nav.open {
        display: flex;
    }

    .nav-link {
        background: #f9fafb;
    }

    .header-search {
        order: 5;
        width: 100%;
        min-width: 0;
        margin-left: 0;
    }

    .hero {
        min-height: 580px;
    }

    .hero-control {
        display: none;
    }

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

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

    .detail-sidebar {
        position: static;
    }

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

@media (max-width: 640px) {
    .container {
        padding: 32px 14px;
    }

    .hero-content {
        width: calc(100% - 28px);
        padding-bottom: 64px;
    }

    .hero h1 {
        font-size: 38px;
    }

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

    .movie-card.compact {
        grid-template-columns: 1fr;
    }

    .page-hero,
    .detail-card {
        padding: 26px;
    }

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