:root {
    color-scheme: light;
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --dark: #0f172a;
    --dark-soft: #1e293b;
    --accent: #f97316;
    --accent-dark: #ea580c;
    --radius: 1.25rem;
    --shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.96);
    color: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.24);
    backdrop-filter: blur(16px);
}

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

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

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #fb923c, #f97316 55%, #dc2626);
    box-shadow: 0 10px 30px rgba(249, 115, 22, 0.36);
}

.logo-text {
    font-size: 1.25rem;
}

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

.nav-link,
.mobile-nav-link {
    color: rgba(255, 255, 255, 0.82);
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    color: var(--accent);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.search-page-form input,
.toolbar input,
.home-search-panel input {
    border: 1px solid rgba(148, 163, 184, 0.32);
    outline: none;
    border-radius: 999px;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.72);
    color: #ffffff;
    min-width: 210px;
}

.header-search input::placeholder,
.mobile-search input::placeholder,
.search-page-form input::placeholder,
.toolbar input::placeholder,
.home-search-panel input::placeholder {
    color: rgba(255, 255, 255, 0.58);
}

.header-search button,
.mobile-search button,
.search-page-form button,
.home-search-panel button {
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    background: var(--accent);
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.search-page-form button:hover,
.home-search-panel button:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

.mobile-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #ffffff;
    border-radius: 4px;
}

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

.mobile-nav-link {
    display: block;
    padding: 13px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-search {
    display: flex;
    gap: 8px;
    padding-top: 12px;
}

.mobile-search input {
    flex: 1;
    min-width: 0;
}

.hero-slider {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    background: #020617;
}

.hero-stage,
.hero-slide,
.hero-slide img,
.hero-overlay {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.9s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-overlay {
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.66) 42%, rgba(15, 23, 42, 0.08)), linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 45%);
}

.hero-content {
    position: absolute;
    left: max(32px, calc((100% - 1180px) / 2));
    right: 32px;
    bottom: 80px;
    max-width: 720px;
    color: #ffffff;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--accent);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.9rem;
    box-shadow: 0 12px 30px rgba(249, 115, 22, 0.35);
}

.hero-content h1,
.detail-headline h1,
.page-hero h1 {
    margin: 18px 0 16px;
    font-size: clamp(2.5rem, 6vw, 4.9rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-content p,
.page-hero p,
.detail-headline p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(1.02rem, 2vw, 1.28rem);
    line-height: 1.75;
}

.hero-tags,
.tag-row,
.detail-meta,
.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.88rem;
}

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

.primary-button,
.ghost-button,
.toolbar-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 12px;
    padding: 0 20px;
    font-weight: 800;
}

.primary-button {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 18px 40px rgba(249, 115, 22, 0.32);
}

.primary-button:hover {
    background: var(--accent-dark);
}

.ghost-button {
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: rgba(2, 6, 23, 0.58);
    color: #ffffff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: var(--accent);
}

.home-search-panel,
.content-section,
.footer-inner,
.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.home-search-panel {
    margin-top: -44px;
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 1fr minmax(320px, 520px);
    gap: 24px;
    align-items: center;
    padding: 28px;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.home-search-panel span,
.section-heading span,
.page-hero span,
.category-card-main span {
    color: var(--accent);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.82rem;
}

.home-search-panel h2,
.section-heading h2,
.category-card-main h2,
.detail-content h2,
.detail-side h2 {
    margin: 8px 0 0;
    color: var(--ink);
    font-size: clamp(1.35rem, 3vw, 2rem);
    line-height: 1.22;
    letter-spacing: -0.03em;
}

.home-search-panel form {
    display: flex;
    gap: 10px;
}

.home-search-panel input {
    flex: 1;
    min-width: 0;
    background: #f8fafc;
    color: var(--ink);
}

.home-search-panel input::placeholder,
.toolbar input::placeholder {
    color: #94a3b8;
}

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

.dark-section {
    width: 100%;
    max-width: none;
    margin: 0;
    padding-left: max(16px, calc((100% - 1180px) / 2));
    padding-right: max(16px, calc((100% - 1180px) / 2));
    background: #0f172a;
}

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

.section-heading a,
.toolbar-link {
    color: var(--accent-dark);
    font-weight: 900;
}

.light-heading h2,
.light-heading span,
.light-heading a {
    color: #ffffff;
}

.light-heading span {
    color: #fb923c;
}

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

.movie-card,
.category-card,
.ranking-card,
.detail-content,
.detail-side {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

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

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.16);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #111827;
}

.movie-poster img,
.compact-card img,
.ranking-poster img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(249, 115, 22, 0.94);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 800;
}

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

.movie-meta-line {
    color: var(--muted);
    font-size: 0.86rem;
}

.movie-card h2 {
    margin: 10px 0 8px;
    font-size: 1.08rem;
    line-height: 1.35;
}

.movie-card h2 a:hover,
.ranking-card h2 a:hover,
.category-card-links a:hover {
    color: var(--accent-dark);
}

.movie-card p,
.category-card-main h2,
.ranking-card p,
.detail-content p,
.footer-brand p,
.page-hero p {
    color: var(--muted);
    line-height: 1.72;
}

.movie-card p {
    min-height: 72px;
    margin: 0 0 14px;
    font-size: 0.94rem;
}

.tag-row span {
    background: #fff7ed;
    color: #c2410c;
}

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

.compact-grid.wide {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.compact-card {
    position: relative;
    min-height: 150px;
    overflow: hidden;
    border-radius: 18px;
    background: #111827;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.16);
}

.compact-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.08));
}

.compact-card span {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 12px;
    z-index: 2;
    color: #ffffff;
    font-weight: 800;
    line-height: 1.35;
}

.category-hub {
    padding-top: 24px;
}

.category-strip {
    margin-top: 34px;
}

.compact-heading {
    margin-bottom: 18px;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.32), transparent 34%), linear-gradient(135deg, #020617, #0f172a 54%, #1e293b);
    color: #ffffff;
}

.page-hero {
    min-height: 340px;
    display: grid;
    place-items: end start;
    padding: 78px max(16px, calc((100% - 1180px) / 2));
}

.page-hero > div,
.search-page-form {
    width: min(760px, 100%);
}

.slim-hero {
    min-height: 300px;
}

.search-page-form {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.search-page-form input {
    flex: 1;
    background: rgba(255, 255, 255, 0.12);
}

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

.category-card {
    overflow: hidden;
}

.category-card-main {
    min-height: 210px;
    display: block;
    padding: 26px;
    background: linear-gradient(135deg, #ffffff, #fff7ed);
}

.category-card-links {
    display: grid;
    gap: 10px;
    padding: 18px 26px 24px;
}

.category-card-links a {
    color: var(--muted);
    font-weight: 700;
}

.toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 26px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
}

.toolbar label {
    flex: 1;
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 800;
}

.toolbar input {
    width: 100%;
    background: #f8fafc;
    color: var(--ink);
    border-color: var(--line);
}

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

.ranking-card {
    display: grid;
    grid-template-columns: 54px 132px 1fr;
    gap: 18px;
    align-items: center;
    padding: 16px;
}

.ranking-number {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #fff7ed;
    color: #c2410c;
    font-weight: 900;
}

.ranking-poster {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 16px;
    background: #111827;
}

.ranking-card h2 {
    margin: 0 0 8px;
    font-size: 1.25rem;
}

.ranking-card p {
    margin: 0 0 10px;
}

.search-results {
    display: grid;
    gap: 18px;
}

.search-result-card {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 20px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 16px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.search-result-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 16px;
    object-fit: cover;
    background: #111827;
}

.search-result-card h2 {
    margin: 0 0 10px;
    font-size: 1.35rem;
}

.search-result-card p {
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.7;
}

.detail-hero {
    min-height: 680px;
}

.detail-bg,
.detail-hero-overlay {
    position: absolute;
    inset: 0;
}

.detail-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(2px);
    transform: scale(1.02);
}

.detail-hero-overlay {
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.74) 46%, rgba(15, 23, 42, 0.28)), linear-gradient(0deg, rgba(2, 6, 23, 0.96), transparent 55%);
}

.detail-hero-inner {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 86px 0 72px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(255, 255, 255, 0.74);
    margin-bottom: 42px;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.detail-headline {
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 42px;
    align-items: end;
}

.detail-poster {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    background: #111827;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
}

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

.player-section {
    background: #020617;
    padding: 54px 0;
}

.player-wrap {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 24px;
    background: #000000;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.26), rgba(2, 6, 23, 0.74));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
    width: 92px;
    height: 92px;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--accent);
    color: #ffffff;
    font-size: 2.3rem;
    cursor: pointer;
    box-shadow: 0 22px 55px rgba(249, 115, 22, 0.42);
}

.play-button span {
    transform: translateX(4px);
}

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

.detail-content,
.detail-side {
    padding: 28px;
}

.detail-content h2,
.detail-side h2 {
    margin: 0 0 16px;
}

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

.detail-content p {
    margin: 0 0 16px;
    color: #334155;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.detail-tags a {
    border-radius: 999px;
    padding: 8px 13px;
    background: #fff7ed;
    color: #c2410c;
    font-weight: 800;
}

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

.side-grid .compact-card {
    min-height: 118px;
}

.site-footer {
    background: #0f172a;
    color: #cbd5e1;
    margin-top: 30px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 34px;
    padding: 52px 0;
}

.footer-logo {
    color: #ffffff;
    font-size: 1.25rem;
}

.footer-column h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 1rem;
}

.footer-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.footer-column a:hover {
    color: var(--accent);
}

.footer-bottom {
    padding: 18px 0 28px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    color: #94a3b8;
}

.footer-bottom p {
    margin: 0;
}

.is-hidden-card {
    display: none !important;
}

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

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

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

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

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

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

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

    .hero-slider {
        min-height: 600px;
        height: 76vh;
    }

    .hero-content {
        left: 18px;
        right: 18px;
        bottom: 76px;
    }

    .hero-arrow {
        display: none;
    }

    .home-search-panel,
    .toolbar,
    .footer-inner,
    .search-result-card,
    .ranking-card {
        grid-template-columns: 1fr;
    }

    .home-search-panel form,
    .search-page-form,
    .mobile-search {
        flex-direction: column;
    }

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

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

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

    .page-hero {
        min-height: 330px;
        padding-top: 56px;
        padding-bottom: 56px;
    }

    .detail-hero {
        min-height: auto;
    }

    .detail-hero-inner {
        padding: 56px 0;
    }

    .player-section {
        padding: 28px 0;
    }

    .player-wrap {
        border-radius: 16px;
    }

    .play-button {
        width: 74px;
        height: 74px;
        font-size: 1.8rem;
    }
}
