:root {
    --bg: #f9fafb;
    --surface: #ffffff;
    --surface-soft: #fffbeb;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --amber: #d97706;
    --amber-dark: #b45309;
    --orange: #ea580c;
    --dark: #111827;
    --radius: 18px;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: var(--bg);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px);
}

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.03em;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(217, 119, 6, 0.28);
}

.logo-text {
    white-space: nowrap;
    font-size: 22px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

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

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

.site-search {
    position: relative;
    width: min(260px, 26vw);
}

.site-search input,
.big-search input,
.local-filter input {
    width: 100%;
    height: 42px;
    padding: 0 16px;
    color: var(--ink);
    background: #f3f4f6;
    border: 1px solid transparent;
    border-radius: 999px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.site-search input:focus,
.big-search input:focus,
.local-filter input:focus {
    background: #ffffff;
    border-color: rgba(217, 119, 6, 0.5);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.search-results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 10px);
    display: none;
    max-height: 440px;
    overflow: auto;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 8px;
    z-index: 80;
}

.search-results.is-open {
    display: block;
}

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

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

.search-result-item img {
    width: 46px;
    height: 62px;
    border-radius: 10px;
}

.search-result-item strong {
    display: block;
    font-size: 14px;
    line-height: 1.35;
}

.search-result-item span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    background: #fff7ed;
    border: 0;
    border-radius: 12px;
}

.mobile-menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--amber-dark);
    border-radius: 2px;
}

.mobile-panel {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid var(--line);
}

.mobile-panel.is-open {
    display: block;
}

.mobile-panel nav {
    width: min(1280px, 100%);
    margin: 0 auto;
    display: grid;
    gap: 8px;
}

.hero {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    color: #ffffff;
    background: var(--dark);
}

.hero-slides,
.hero-slide {
    min-height: 650px;
}

.hero-slide {
    display: none;
    background-position: center;
    background-size: cover;
}

.hero-slide.active {
    display: block;
    animation: heroFade 0.6s ease both;
}

.hero-content {
    width: min(1280px, calc(100% - 32px));
    min-height: 650px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: center;
    gap: 44px;
    padding: 72px 0;
}

.hero-copy {
    max-width: 760px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--amber);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: #fbbf24;
}

.hero h1 {
    margin: 0;
    font-size: clamp(42px, 6vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.hero-desc {
    max-width: 680px;
    margin: 26px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
    line-height: 1.8;
}

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

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

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 14px 32px rgba(217, 119, 6, 0.34);
}

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

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

.hero-poster {
    position: relative;
    display: block;
    padding: 10px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 30px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(10px);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 22px;
}

.hero-tags {
    margin-top: 24px;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 34px;
    height: 8px;
    padding: 0;
    background: rgba(255, 255, 255, 0.38);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
}

.hero-dot.active {
    background: #fbbf24;
}

.quick-search-section,
.content-section,
.detail-layout {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.quick-search-section {
    padding: 56px 0 18px;
}

.centered {
    text-align: center;
    justify-content: center;
}

.centered p:last-child {
    max-width: 720px;
    margin: 0 auto;
    color: var(--muted);
}

.big-search {
    position: relative;
    max-width: 720px;
    margin: 28px auto 0;
}

.big-search input {
    height: 58px;
    padding: 0 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.search-results-large {
    top: calc(100% + 12px);
}

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

.highlight-section {
    width: min(1340px, calc(100% - 24px));
    margin-top: 24px;
    padding: 54px clamp(18px, 4vw, 44px);
    background: linear-gradient(135deg, #fffbeb, #fff7ed);
    border-radius: 34px;
}

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

.section-heading h2,
.section-heading h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(26px, 3vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

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

.inline-heading {
    display: block;
}

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(229, 231, 235, 0.92);
    border-radius: var(--radius);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(217, 119, 6, 0.35);
    box-shadow: var(--shadow);
}

.card-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: #111827;
}

.card-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    transition: transform 0.28s ease, opacity 0.28s ease;
}

.movie-card:hover .card-cover img {
    transform: scale(1.04);
    opacity: 0.86;
}

.card-play {
    position: absolute;
    left: 14px;
    bottom: 14px;
    padding: 8px 12px;
    color: #ffffff;
    background: rgba(217, 119, 6, 0.96);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .card-play {
    opacity: 1;
    transform: translateY(0);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    min-width: 38px;
    padding: 8px 9px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    border-radius: 999px;
    font-size: 13px;
    text-align: center;
    box-shadow: 0 10px 22px rgba(217, 119, 6, 0.35);
}

.card-body {
    padding: 16px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.card-body h3,
.wide-movie h3 {
    margin: 10px 0 8px;
    color: var(--ink);
    font-size: 18px;
    line-height: 1.35;
}

.card-body h3 a:hover,
.wide-movie:hover h3 {
    color: var(--amber-dark);
}

.card-body p,
.wide-movie p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

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

.card-body .tag-row {
    margin-top: 14px;
}

.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    color: var(--amber-dark);
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

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

.category-card,
.category-overview-card,
.sidebar-card,
.movie-detail-card,
.player-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.category-card {
    padding: 18px;
}

.category-card > a span {
    color: var(--ink);
    font-size: 20px;
    font-weight: 900;
}

.category-card > a p {
    min-height: 66px;
    margin: 10px 0 14px;
    color: var(--muted);
    line-height: 1.6;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-samples a {
    max-width: 100%;
    overflow: hidden;
    padding: 7px 10px;
    color: #92400e;
    background: #fffbeb;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.55fr);
    gap: 34px;
    align-items: start;
}

.wide-list {
    display: grid;
    gap: 16px;
}

.wide-movie {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 16px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wide-movie:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.wide-movie img {
    width: 118px;
    aspect-ratio: 2 / 3;
    border-radius: 14px;
}

.ranking-panel {
    position: sticky;
    top: 94px;
    padding: 24px;
    background: #111827;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.ranking-panel h2 {
    color: #ffffff;
}

.ranking-panel .movie-card {
    background: #ffffff;
}

.page-hero {
    width: min(1280px, calc(100% - 32px));
    margin: 34px auto 0;
    padding: clamp(38px, 7vw, 78px);
    color: #ffffff;
    background: radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.55), transparent 32%), linear-gradient(135deg, #111827, #27272a 52%, #92400e);
    border-radius: 34px;
    overflow: hidden;
}

.page-hero h1 {
    max-width: 780px;
    margin: 0 0 18px;
    font-size: clamp(36px, 6vw, 66px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.page-hero p:not(.eyebrow) {
    max-width: 780px;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
    line-height: 1.8;
}

.hero-small-copy {
    margin-top: 16px !important;
}

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

.category-overview-card {
    overflow: hidden;
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 12px;
    background: #111827;
}

.category-covers img {
    width: 100%;
    height: 230px;
    border-radius: 14px;
}

.category-overview-body {
    padding: 24px;
}

.category-overview-body h2 {
    margin: 0 0 10px;
    font-size: 28px;
}

.category-overview-body p {
    color: var(--muted);
    line-height: 1.7;
}

.local-filter {
    width: min(300px, 100%);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--amber-dark);
    font-weight: 800;
}

.player-card {
    overflow: hidden;
    background: #000000;
}

.video-shell {
    position: relative;
    background: #000000;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    background: #000000;
    border: 0;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.55;
    filter: blur(1px);
}

.player-button {
    position: relative;
    z-index: 2;
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    border-radius: 50%;
    font-size: 34px;
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.35);
}

.player-card.is-playing .player-cover {
    display: none;
}

.movie-detail-card {
    margin-top: 24px;
    padding: clamp(20px, 3vw, 32px);
}

.detail-intro {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 26px;
    align-items: start;
}

.detail-poster {
    width: 220px;
    aspect-ratio: 2 / 3;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.movie-detail-card h1 {
    margin: 0;
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.detail-one-line {
    margin: 18px 0 0;
    color: #374151;
    font-size: 18px;
    line-height: 1.8;
}

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

.detail-meta-grid span {
    padding: 13px 14px;
    background: #f9fafb;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: #374151;
    font-size: 14px;
}

.detail-meta-grid b {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 12px;
}

.detail-section {
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.detail-section h2,
.sidebar-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
    letter-spacing: -0.03em;
}

.detail-section p {
    margin: 0;
    color: #374151;
    font-size: 17px;
    line-height: 1.9;
}

.prev-next {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.prev-next a {
    max-width: 48%;
    color: var(--amber-dark);
    font-weight: 900;
}

.related-section {
    width: 100%;
    padding-bottom: 0;
}

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

.detail-sidebar {
    position: sticky;
    top: 94px;
}

.sidebar-card {
    padding: 20px;
}

.sidebar-list .wide-movie {
    grid-template-columns: 82px minmax(0, 1fr);
    padding: 10px;
}

.sidebar-list .wide-movie img {
    width: 82px;
}

.sidebar-list .wide-movie p,
.sidebar-list .tag-row {
    display: none;
}

.responsive-table {
    overflow: auto;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    white-space: nowrap;
}

th {
    color: var(--muted);
    background: #f9fafb;
    font-size: 13px;
}

td a {
    color: var(--ink);
    font-weight: 800;
}

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

.site-footer {
    margin-top: 40px;
    color: #d1d5db;
    background: #111827;
}

.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 36px;
    padding: 46px 0;
}

.footer-logo {
    color: #ffffff;
    font-size: 24px;
}

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

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

.footer-links a {
    display: block;
    margin-top: 9px;
    color: #d1d5db;
}

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

.footer-bottom {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: #9ca3af;
    border-top: 1px solid #1f2937;
    text-align: center;
}

@keyframes heroFade {
    from {
        opacity: 0;
        transform: scale(1.01);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 1100px) {
    .desktop-nav,
    .site-search {
        display: none;
    }

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

    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

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

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

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

    .ranking-panel,
    .detail-sidebar {
        position: static;
    }
}

@media (max-width: 760px) {
    .header-inner {
        height: 64px;
    }

    .logo-text {
        font-size: 19px;
    }

    .hero,
    .hero-slides,
    .hero-slide,
    .hero-content {
        min-height: 560px;
    }

    .hero-content {
        padding: 58px 0 76px;
    }

    .hero-arrow {
        display: none;
    }

    .movie-grid,
    .featured-grid,
    .ranking-grid,
    .related-grid,
    .compact-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

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

    .category-covers img {
        height: 150px;
    }

    .section-heading {
        display: block;
    }

    .section-heading a,
    .local-filter {
        display: inline-block;
        margin-top: 14px;
    }

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

    .detail-poster {
        width: min(260px, 100%);
    }

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

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

@media (max-width: 520px) {
    .movie-grid,
    .featured-grid,
    .ranking-grid,
    .related-grid,
    .compact-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .wide-movie {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .wide-movie img {
        width: 92px;
    }

    .prev-next {
        display: grid;
    }

    .prev-next a {
        max-width: none;
    }
}
