* {
    box-sizing: border-box;
}

:root {
    --amber: #d97706;
    --amber-dark: #b45309;
    --orange: #f97316;
    --orange-soft: #ffedd5;
    --brown: #78350f;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: rgba(146, 64, 14, 0.16);
    --paper: #fffaf3;
    --card: rgba(255, 255, 255, 0.92);
    --shadow: 0 18px 45px rgba(120, 53, 15, 0.14);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(251, 191, 36, 0.2), transparent 34rem),
        linear-gradient(180deg, #fff7ed 0%, #ffffff 42%, #fff7ed 100%);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.96), rgba(249, 115, 22, 0.96));
    color: #ffffff;
    box-shadow: 0 18px 40px rgba(146, 64, 14, 0.22);
    backdrop-filter: blur(16px);
}

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.logo-mark,
.footer-logo span {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

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

.desktop-nav a,
.mobile-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.9);
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.17);
    transform: translateY(-1px);
}

.site-search {
    position: relative;
    margin-left: auto;
    width: min(320px, 30vw);
}

.site-search-input,
.category-filter-input {
    width: 100%;
    border: 0;
    outline: 0;
    color: #7c2d12;
    border-radius: 999px;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.site-search-results {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(430px, 92vw);
    max-height: 430px;
    overflow: auto;
    background: #ffffff;
    border-radius: 22px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(217, 119, 6, 0.16);
    padding: 10px;
    color: var(--ink);
    display: none;
}

.site-search-results.active {
    display: block;
}

.search-result-item {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    transition: background 0.2s ease;
}

.search-result-item:hover {
    background: #fff7ed;
}

.search-result-item img {
    width: 58px;
    height: 78px;
    object-fit: cover;
    border-radius: 12px;
    background: #fed7aa;
}

.search-result-item strong {
    display: block;
    font-size: 15px;
    color: #7c2d12;
    margin-bottom: 4px;
}

.search-result-item span {
    display: block;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: #ffffff;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    gap: 8px;
    flex-wrap: wrap;
}

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

.hero-carousel {
    position: relative;
    width: 100%;
    min-height: 680px;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

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

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

.hero-bg,
.detail-backdrop img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.06) contrast(1.08);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(17, 24, 39, 0.9) 0%, rgba(17, 24, 39, 0.55) 46%, rgba(17, 24, 39, 0.1) 100%),
        radial-gradient(circle at 20% 15%, rgba(251, 191, 36, 0.36), transparent 26rem);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 680px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 760px;
    margin-left: max(16px, calc((100vw - 1180px) / 2));
    padding: 86px 0 110px;
}

.hero-kicker,
.section-heading span,
.page-hero span,
.detail-info .breadcrumb,
.detail-info .breadcrumb a,
.detail-info .breadcrumb strong {
    font-weight: 800;
    color: #fbbf24;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1 {
    font-size: clamp(42px, 7vw, 82px);
    line-height: 1.02;
    margin: 14px 0 22px;
    letter-spacing: -0.06em;
    max-width: 820px;
}

.hero-content p {
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.9);
    max-width: 760px;
    margin: 0 0 24px;
}

.hero-tags,
.movie-tags,
.detail-tags,
.detail-meta,
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.movie-tags span,
.detail-tags span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
}

.hero-tags span {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    backdrop-filter: blur(8px);
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    box-shadow: 0 16px 34px rgba(249, 115, 22, 0.34);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
}

.primary-button:hover,
.ghost-button:hover,
.category-tile:hover,
.movie-card:hover,
.category-overview-card:hover,
.ranking-item:hover {
    transform: translateY(-4px);
}

.hero-poster-card {
    position: absolute;
    z-index: 3;
    right: max(20px, calc((100vw - 1180px) / 2));
    bottom: 110px;
    width: min(300px, 24vw);
    padding: 12px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(18px);
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.34);
}

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

.hero-poster-card span {
    display: block;
    padding: 12px 6px 4px;
    font-weight: 800;
    color: #ffffff;
}

.hero-controls {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 18px;
}

.hero-arrow,
.hero-dot {
    border: 0;
    cursor: pointer;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    transition: width 0.25s ease, background 0.25s ease;
}

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

.section-panel {
    width: min(1180px, calc(100% - 32px));
    margin: 54px auto;
}

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

.section-heading.centered {
    text-align: center;
    display: block;
    max-width: 760px;
    margin: 0 auto 24px;
}

.section-heading h2 {
    margin: 7px 0 0;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.04em;
    color: #7c2d12;
}

.section-heading p,
.page-hero p,
.category-overview-card em,
.category-tile em {
    color: var(--muted);
    line-height: 1.75;
    font-style: normal;
}

.section-heading a {
    color: var(--amber);
    font-weight: 800;
}

.quick-search-panel {
    margin-top: -42px;
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(217, 119, 6, 0.14);
    box-shadow: var(--shadow);
    border-radius: 28px;
    padding: 32px;
    backdrop-filter: blur(16px);
}

.wide-search {
    position: relative;
    max-width: 780px;
    margin: 0 auto;
}

.wide-search .site-search-results {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(780px, 92vw);
}

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

.category-tile,
.category-overview-card,
.movie-card,
.ranking-item,
.article-panel,
.catalog-tools,
.player-shell {
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.category-tile {
    min-height: 170px;
    padding: 24px;
    border-radius: 24px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile span,
.category-overview-icon {
    font-size: 34px;
}

.category-tile strong,
.category-overview-card strong {
    display: block;
    margin: 14px 0 8px;
    color: #7c2d12;
    font-size: 20px;
}

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

.movie-card {
    border-radius: 24px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: #fed7aa;
}

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

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

.quality-badge,
.rating-badge {
    position: absolute;
    top: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    background: rgba(17, 24, 39, 0.72);
    backdrop-filter: blur(10px);
}

.quality-badge {
    left: 12px;
}

.rating-badge {
    right: 12px;
    background: rgba(217, 119, 6, 0.88);
}

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

.movie-card-title {
    margin: 0 0 10px;
    color: #7c2d12;
    font-size: 19px;
    line-height: 1.35;
}

.movie-card-title a:hover {
    color: var(--amber);
}

.movie-card-desc {
    min-height: 66px;
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.62;
    font-size: 14px;
}

.movie-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #9a3412;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
}

.movie-card-meta span {
    background: #ffedd5;
    border-radius: 999px;
    padding: 5px 8px;
}

.movie-tags span,
.detail-tags span {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid rgba(217, 119, 6, 0.14);
}

.ranking-section {
    border-radius: 32px;
    padding: 30px;
    background: linear-gradient(135deg, rgba(255, 247, 237, 0.96), rgba(255, 255, 255, 0.86));
    border: 1px solid var(--line);
}

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

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

.ranking-item {
    display: grid;
    grid-template-columns: 44px 64px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 20px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ranking-number {
    font-size: 18px;
    font-weight: 900;
    color: var(--amber);
}

.ranking-item img {
    width: 64px;
    height: 84px;
    object-fit: cover;
    border-radius: 14px;
    background: #fed7aa;
}

.ranking-copy strong,
.ranking-copy em {
    display: block;
}

.ranking-copy strong {
    color: #7c2d12;
    margin-bottom: 6px;
}

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

.ranking-score {
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    border-radius: 999px;
    padding: 7px 10px;
    font-weight: 900;
}

.page-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 32px auto 0;
    border-radius: 34px;
    padding: clamp(36px, 8vw, 76px);
    background:
        radial-gradient(circle at 84% 12%, rgba(255, 255, 255, 0.35), transparent 20rem),
        linear-gradient(135deg, #92400e, #f97316);
    color: #ffffff;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.page-hero h1 {
    margin: 12px 0;
    font-size: clamp(36px, 6vw, 62px);
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
}

.breadcrumb i {
    color: rgba(255, 255, 255, 0.58);
    font-style: normal;
}

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

.category-overview-card {
    position: relative;
    min-height: 320px;
    border-radius: 28px;
    padding: 22px;
    overflow: hidden;
    color: #ffffff;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-overview-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.1), rgba(17, 24, 39, 0.82));
    z-index: 1;
}

.category-overview-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-overview-card span,
.category-overview-card strong,
.category-overview-card em,
.category-overview-card small {
    position: relative;
    z-index: 2;
}

.category-overview-card strong {
    color: #ffffff;
    margin-top: 122px;
    font-size: 26px;
}

.category-overview-card em {
    color: rgba(255, 255, 255, 0.86);
}

.category-overview-card small {
    display: inline-flex;
    margin-top: 18px;
    color: #fff7ed;
    font-weight: 900;
}

.catalog-tools {
    border-radius: 24px;
    padding: 18px;
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: minmax(240px, 380px) 1fr;
    gap: 18px;
    align-items: center;
}

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

.filter-chip.active,
.filter-chip:hover {
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

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

.detail-hero {
    position: relative;
    color: #ffffff;
    min-height: 600px;
    overflow: hidden;
    background: #111827;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.62), rgba(17, 24, 39, 0.88)),
        radial-gradient(circle at 20% 10%, rgba(251, 191, 36, 0.24), transparent 24rem);
}

.detail-layout {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 600px;
    display: grid;
    grid-template-columns: minmax(240px, 330px) 1fr;
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
    padding: 54px 0;
}

.detail-cover {
    border-radius: 28px;
    overflow: hidden;
    padding: 12px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 20px;
}

.detail-info h1 {
    margin: 16px 0;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.08;
    letter-spacing: -0.055em;
}

.detail-line {
    color: rgba(255, 255, 255, 0.88);
    font-size: 19px;
    line-height: 1.8;
    max-width: 800px;
}

.detail-meta {
    margin: 24px 0 16px;
}

.detail-meta span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.detail-tags {
    margin-bottom: 28px;
}

.player-section {
    scroll-margin-top: 92px;
}

.player-shell {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    background: #050505;
}

.movie-player-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #050505;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.48));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-symbol {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    box-shadow: 0 18px 42px rgba(249, 115, 22, 0.42);
    font-size: 30px;
    padding-left: 5px;
}

.article-panel {
    border-radius: 28px;
    padding: clamp(24px, 5vw, 46px);
}

.article-panel h2 {
    margin: 0 0 16px;
    color: #7c2d12;
    font-size: 28px;
}

.article-panel h2:not(:first-child) {
    margin-top: 34px;
}

.article-panel p {
    color: #4b5563;
    line-height: 1.95;
    font-size: 17px;
    margin: 0 0 14px;
}

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

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

.footer-brand p {
    line-height: 1.75;
    color: #9ca3af;
}

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

.footer-links a {
    display: block;
    color: #9ca3af;
    margin: 10px 0;
    transition: color 0.2s ease;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px;
    text-align: center;
    color: #9ca3af;
}

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

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

    .site-search {
        width: min(360px, 42vw);
    }

    .hero-poster-card {
        display: none;
    }

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

    .ranking-list,
    .ranking-list.expanded {
        grid-template-columns: 1fr;
    }

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

    .detail-cover {
        max-width: 330px;
    }
}

@media (max-width: 680px) {
    .header-inner {
        min-height: 66px;
        gap: 12px;
    }

    .site-logo span:last-child {
        display: none;
    }

    .site-search {
        width: 100%;
    }

    .hero-carousel,
    .hero-content {
        min-height: 620px;
    }

    .hero-content {
        padding-top: 70px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .quick-search-panel,
    .ranking-section {
        padding: 20px;
    }

    .section-heading {
        display: block;
    }

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

    .ranking-item {
        grid-template-columns: 38px 54px 1fr;
    }

    .ranking-score {
        grid-column: 3;
        justify-self: start;
    }

    .page-hero {
        border-radius: 24px;
    }

    .detail-layout {
        padding: 32px 0;
    }

    .detail-info h1 {
        font-size: 34px;
    }

    .footer-inner {
        padding: 34px 0;
    }
}
