:root {
    --amber: #f59e0b;
    --amber-dark: #d97706;
    --amber-soft: #fff7ed;
    --orange: #f97316;
    --blue: #2563eb;
    --cyan: #06b6d4;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow: 0 18px 40px rgba(17, 24, 39, 0.12);
    --soft-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
    --radius: 22px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--gray-800);
    background: var(--gray-50);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.slim-container {
    width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 6px 24px rgba(17, 24, 39, 0.08);
    backdrop-filter: blur(14px);
}

.site-nav {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    font-size: 26px;
    color: var(--gray-800);
}

.brand-mark,
.footer-logo span {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 10px 18px rgba(245, 158, 11, 0.35);
}

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

.nav-link,
.mobile-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 14px;
    color: var(--gray-600);
    font-weight: 700;
    transition: all 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.is-active,
.mobile-link.is-active {
    color: var(--amber-dark);
    background: #ffedd5;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    background: var(--amber-soft);
    border-radius: 14px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

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

.mobile-panel {
    display: none;
    width: min(100% - 32px, var(--container));
    margin: 0 auto 14px;
    padding: 8px;
    border-radius: 18px;
    background: white;
    box-shadow: var(--soft-shadow);
}

.mobile-panel.is-open {
    display: grid;
    gap: 6px;
}

.hero-section,
.rank-hero {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    color: white;
}

.hero-bg,
.rank-hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-shade,
.rank-hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 82% 20%, rgba(245, 158, 11, 0.2), transparent 28%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.58) 45%, rgba(0, 0, 0, 0.18));
}

.hero-inner,
.rank-hero-inner {
    position: relative;
    z-index: 2;
    min-height: 600px;
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
}

.hero-copy {
    width: min(680px, 100%);
}

.hero-kicker,
.section-kicker {
    margin: 0 0 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: #fbbf24;
}

.hero-copy h1,
.rank-hero-inner h1,
.page-hero h1 {
    margin: 0;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.04;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.hero-copy h2 {
    margin: 18px 0 12px;
    font-size: clamp(26px, 3vw, 42px);
    line-height: 1.15;
}

.hero-desc,
.rank-hero-inner p,
.page-hero p {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 20px;
    line-height: 1.75;
}

.hero-meta,
.detail-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 22px 0;
}

.hero-meta span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
}

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

.primary-btn,
.ghost-btn,
.soft-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    font-weight: 900;
    transition: all 0.2s ease;
}

.primary-btn {
    padding: 14px 28px;
    color: white;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 18px 30px rgba(245, 158, 11, 0.32);
}

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

.ghost-btn {
    padding: 13px 26px;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

.hero-search,
.inline-filter,
.search-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 650px;
    padding: 8px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-search input,
.inline-filter input,
.search-panel input,
.search-panel select {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    border-radius: 14px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--gray-800);
}

.hero-search button,
.inline-filter button,
.search-panel button {
    border: 0;
    border-radius: 14px;
    padding: 14px 18px;
    color: white;
    font-weight: 900;
    background: var(--amber);
}

.hero-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.hero-cats a {
    padding: 8px 14px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.13);
    transition: all 0.2s ease;
}

.hero-cats a:hover {
    background: var(--amber);
    color: white;
}

.hero-poster {
    position: relative;
    width: 330px;
    flex: 0 0 330px;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 32px 70px rgba(0, 0, 0, 0.45);
    transform: rotate(1.4deg);
}

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

.hero-poster span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    color: white;
    background: rgba(245, 158, 11, 0.92);
    box-shadow: 0 20px 36px rgba(0, 0, 0, 0.35);
}

.content-section {
    padding: 72px 0;
}

.white-section {
    background: white;
}

.warm-section {
    background: linear-gradient(135deg, #fff7ed, #fffbeb);
}

.alt-section:nth-of-type(even) {
    background: var(--gray-100);
}

.blue-section {
    color: white;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

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

.section-head h2 {
    margin: 0;
    color: var(--gray-800);
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.15;
}

.blue-section .section-head h2,
.blue-section .section-kicker {
    color: white;
}

.section-more {
    color: var(--amber-dark);
    font-weight: 900;
    white-space: nowrap;
}

.blue-section .section-more {
    color: white;
}

.grid {
    display: grid;
    gap: 24px;
}

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

.compact-grid,
.catalog-grid,
.search-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.two-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 22px;
}

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

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

.card-link {
    height: 100%;
    display: block;
    overflow: hidden;
    border-radius: var(--radius);
    background: white;
    box-shadow: var(--soft-shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-wrap {
    position: relative;
    overflow: hidden;
    background: var(--gray-200);
}

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

.card-minimal .poster-wrap img,
.card-rank .poster-wrap img {
    aspect-ratio: 3 / 4;
}

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

.poster-play,
.rank-badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 900;
}

.poster-play {
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    background: rgba(245, 158, 11, 0.9);
    opacity: 0;
    transition: all 0.24s ease;
}

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

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.82);
}

.card-body {
    padding: 18px;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--amber-dark);
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 8px;
}

.movie-card h3 {
    margin: 0 0 8px;
    color: var(--gray-800);
    font-size: 20px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

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

.tag-row,
.detail-tags,
.genre-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-row span,
.detail-tags span,
.genre-tags span {
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--gray-700);
    background: var(--gray-100);
    font-size: 12px;
    font-weight: 700;
}

.card-horizontal .card-link {
    display: grid;
    grid-template-columns: 220px 1fr;
}

.card-horizontal .poster-wrap img {
    height: 100%;
    aspect-ratio: auto;
}

.card-side .card-link {
    display: grid;
    grid-template-columns: 110px 1fr;
    border-radius: 16px;
    box-shadow: none;
    background: var(--gray-50);
}

.card-side .poster-wrap img {
    height: 100%;
    aspect-ratio: 4 / 3;
}

.card-side .card-body {
    padding: 12px;
}

.card-side h3 {
    font-size: 15px;
}

.card-side p,
.card-side .tag-row,
.card-side .poster-play {
    display: none;
}

.page-hero {
    color: white;
    padding: 92px 0;
    background:
        radial-gradient(circle at 85% 10%, rgba(255, 255, 255, 0.18), transparent 26%),
        linear-gradient(135deg, var(--amber-dark), var(--orange));
}

.small-hero {
    background:
        radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.2), transparent 26%),
        linear-gradient(135deg, #92400e, #f97316);
}

.category-hero {
    background:
        radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.2), transparent 28%),
        linear-gradient(135deg, #111827, #b45309);
}

.search-hero {
    background:
        radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.18), transparent 28%),
        linear-gradient(135deg, #1e3a8a, #0891b2);
}

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

.category-card a {
    position: relative;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    padding: 28px;
    color: white;
    border-radius: 28px;
    background:
        radial-gradient(circle at 90% 12%, rgba(255, 255, 255, 0.25), transparent 24%),
        linear-gradient(135deg, var(--gray-900), #b45309);
    box-shadow: var(--soft-shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card p {
    order: 2;
    margin: 10px 0 18px;
    max-width: 560px;
    color: rgba(255, 255, 255, 0.82);
}

.category-card h2 {
    order: 1;
    margin: 0;
    font-size: 34px;
}

.category-card strong {
    order: 4;
    color: #fbbf24;
}

.category-samples {
    order: 3;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.category-samples span {
    padding: 6px 10px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.13);
    font-size: 13px;
}

.inline-filter,
.search-panel {
    margin-top: 28px;
    max-width: 860px;
    background: rgba(255, 255, 255, 0.18);
}

.search-panel select {
    max-width: 210px;
}

.chip-filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.chip-filter button,
.chip-link {
    border: 0;
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 800;
    color: var(--gray-600);
    background: var(--gray-100);
    transition: all 0.2s ease;
}

.chip-filter button:hover,
.chip-link:hover {
    color: white;
    background: var(--amber);
}

.empty-state {
    padding: 44px;
    text-align: center;
    color: var(--gray-600);
    border-radius: 22px;
    background: var(--gray-100);
    font-weight: 800;
}

.movie-card.is-hidden {
    display: none;
}

.rank-hero {
    min-height: 460px;
}

.rank-hero-inner {
    min-height: 460px;
    display: block;
    padding-top: 120px;
}

.rank-hero-inner p {
    margin-bottom: 24px;
}

.detail-wrap {
    padding: 34px 0 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 22px;
    color: var(--gray-600);
    font-weight: 700;
}

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

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

.player-card,
.detail-card,
.side-card {
    overflow: hidden;
    border-radius: 24px;
    background: white;
    box-shadow: var(--soft-shadow);
}

.player-frame {
    position: relative;
    background: #000;
}

.stream-player {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    border: 0;
    color: white;
    font-size: 18px;
    font-weight: 900;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.58));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-icon {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    background: rgba(245, 158, 11, 0.95);
    box-shadow: 0 24px 42px rgba(0, 0, 0, 0.32);
}

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

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

.detail-title-row h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.18;
}

.soft-btn {
    flex: 0 0 auto;
    padding: 9px 14px;
    color: var(--amber-dark);
    background: #ffedd5;
}

.detail-meta {
    margin: 18px 0 28px;
}

.detail-meta span {
    color: var(--gray-700);
    background: var(--gray-100);
}

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

.detail-card p {
    color: var(--gray-700);
    font-size: 17px;
    line-height: 1.9;
}

.lead-text {
    font-weight: 900;
    color: var(--gray-800) !important;
}

.detail-side {
    min-width: 0;
}

.side-card {
    position: sticky;
    top: 96px;
    padding: 20px;
}

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

.related-section {
    padding-top: 54px;
}

.site-footer {
    color: #d1d5db;
    background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-inner {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
    padding: 56px 0 36px;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 36px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 12px;
}

.footer-brand p {
    max-width: 420px;
    color: #9ca3af;
}

.footer-group h2 {
    margin: 0 0 14px;
    color: white;
    font-size: 18px;
}

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

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

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

@media (max-width: 1040px) {
    .feature-grid,
    .compact-grid,
    .catalog-grid,
    .search-grid,
    .rank-grid,
    .rank-list-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hero-poster {
        display: none;
    }

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

    .side-card {
        position: static;
    }
}

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

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

    .brand {
        font-size: 22px;
    }

    .hero-section,
    .hero-inner {
        min-height: 680px;
    }

    .hero-inner {
        align-items: flex-end;
        padding-bottom: 46px;
    }

    .hero-search,
    .inline-filter,
    .search-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .search-panel select {
        max-width: none;
    }

    .feature-grid,
    .compact-grid,
    .catalog-grid,
    .search-grid,
    .rank-grid,
    .rank-list-grid,
    .two-grid,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .card-horizontal .card-link,
    .card-side .card-link {
        display: block;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .detail-title-row {
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .container,
    .site-nav,
    .mobile-panel,
    .hero-inner,
    .rank-hero-inner,
    .footer-inner,
    .footer-bottom {
        width: min(100% - 24px, var(--container));
    }

    .hero-copy h1,
    .rank-hero-inner h1,
    .page-hero h1 {
        font-size: 38px;
    }

    .hero-desc,
    .rank-hero-inner p,
    .page-hero p {
        font-size: 17px;
    }

    .content-section {
        padding: 52px 0;
    }

    .feature-grid,
    .compact-grid,
    .catalog-grid,
    .search-grid,
    .rank-grid,
    .rank-list-grid,
    .two-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .detail-card,
    .side-card {
        padding: 20px;
    }

    .page-hero {
        padding: 72px 0;
    }
}
