:root {
    --bg: #fff7ed;
    --panel: #ffffff;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --orange: #f97316;
    --amber: #f59e0b;
    --red: #ef4444;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: linear-gradient(135deg, #f9fafb 0%, #fff7ed 48%, #fef3c7 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: linear-gradient(90deg, #0f172a, #1e293b, #0f172a);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.35);
}

.header-inner,
.category-strip-inner,
.page-container,
.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.header-inner {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-icon,
.footer-brand span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: 0 0 28px rgba(249, 115, 22, 0.45);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-text strong {
    font-size: 19px;
    background: linear-gradient(90deg, #fb923c, #fbbf24);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text small {
    margin-top: 4px;
    color: #9ca3af;
    font-size: 12px;
}

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

.header-search {
    flex: 1;
    max-width: 430px;
}

.header-search input,
.mobile-panel input {
    width: 100%;
    border: 1px solid #475569;
    border-radius: 999px;
    padding: 10px 16px;
    color: #fff;
    background: #334155;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-panel input:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.24);
}

.header-search button,
.mobile-panel button,
.hero-search button,
.filter-search button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(90deg, var(--orange), var(--amber));
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.mobile-panel button:hover,
.hero-search button:hover,
.filter-search button:hover,
.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.28);
}

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

.main-nav a,
.mobile-panel a,
.category-strip a {
    color: #e5e7eb;
    text-decoration: none;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active,
.mobile-panel a:hover,
.category-strip a:hover {
    color: #fb923c;
}

.mobile-menu-button {
    display: none;
    border: 0;
    border-radius: 10px;
    padding: 8px 11px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(148, 163, 184, 0.3);
    padding: 14px 16px 18px;
    background: #0f172a;
}

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

.mobile-panel form {
    margin-bottom: 14px;
}

.mobile-panel nav {
    display: grid;
    gap: 10px;
}

.category-strip {
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    background: #1e293b;
}

.category-strip-inner {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding: 11px 0;
    scrollbar-width: none;
}

.category-strip-inner::-webkit-scrollbar {
    display: none;
}

.category-strip a {
    white-space: nowrap;
    font-size: 14px;
}

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

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

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

.hero-slide img,
.detail-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.52) 52%, rgba(0, 0, 0, 0.16));
}

.hero-content {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    padding-bottom: 84px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    color: #fff;
}

.hero-label,
.category-kicker,
.page-hero-small span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 14px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    background: linear-gradient(90deg, var(--orange), var(--amber));
}

.hero-content h1 {
    max-width: 720px;
    margin: 18px 0 12px;
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1.08;
    font-weight: 850;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 24px;
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1.75;
}

.hero-meta,
.detail-meta,
.movie-meta-line,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.hero-meta {
    margin-bottom: 28px;
    color: #fff;
}

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

.primary-button,
.ghost-button,
.category-enter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 12px 24px;
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    background: linear-gradient(90deg, var(--orange), var(--amber));
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ghost-button {
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.hero-dots {
    position: absolute;
    right: max(28px, calc((100vw - 1180px) / 2));
    bottom: 34px;
    display: flex;
    gap: 8px;
}

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

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

.quick-panel {
    width: min(1180px, calc(100% - 32px));
    margin: -44px auto 0;
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 18px;
}

.quick-card {
    min-height: 150px;
    border-radius: 24px;
    padding: 26px;
    color: var(--ink);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.76);
}

.quick-card strong {
    display: block;
    font-size: 24px;
    margin-bottom: 12px;
}

.quick-card span,
.quick-card p {
    color: var(--muted);
}

.quick-search-card h2 {
    margin: 0 0 10px;
    font-size: 26px;
}

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

.hero-search input,
.filter-search input,
.search-page-form input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 12px 16px;
    background: #fff;
    outline: none;
}

.page-container {
    padding-top: 56px;
}

.page-shell {
    min-height: 62vh;
}

.content-section {
    margin-bottom: 68px;
}

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

.section-heading h2 {
    margin: 0;
    color: #111827;
    font-size: clamp(26px, 3.8vw, 36px);
    font-weight: 850;
}

.section-heading a {
    color: #ea580c;
    text-decoration: none;
    font-weight: 800;
}

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

.four-cols {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 40px rgba(15, 23, 42, 0.16);
}

.movie-card a {
    color: inherit;
    text-decoration: none;
}

.movie-thumb {
    position: relative;
    height: 238px;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #334155);
}

.movie-thumb-wide {
    width: 190px;
    height: 132px;
    flex-shrink: 0;
}

.movie-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .movie-thumb img,
.rank-card:hover img {
    transform: scale(1.08);
}

.duration,
.category-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 9px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.duration {
    right: 10px;
    bottom: 10px;
    background: rgba(0, 0, 0, 0.72);
}

.category-badge {
    left: 10px;
    top: 10px;
    background: linear-gradient(90deg, var(--orange), var(--amber));
}

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

.movie-card-body h3 {
    min-height: 48px;
    margin: 0 0 8px;
    color: #111827;
    font-size: 17px;
    line-height: 1.45;
    font-weight: 800;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card:hover h3 {
    color: #ea580c;
}

.movie-card-body p {
    min-height: 44px;
    margin: 0 0 12px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta-line,
.rank-meta {
    color: #64748b;
    font-size: 12px;
    justify-content: space-between;
}

.movie-card-horizontal a {
    display: flex;
    gap: 16px;
}

.movie-card-horizontal .movie-card-body {
    flex: 1;
    padding: 14px 16px 14px 0;
}

.movie-card-horizontal .movie-card-body h3 {
    min-height: auto;
    -webkit-line-clamp: 1;
}

.ranking-panel {
    border-radius: 26px;
    padding: 34px;
    color: #fff;
    background: linear-gradient(110deg, #1e293b, #0f172a);
    box-shadow: var(--shadow);
}

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

.rank-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.rank-card {
    background: rgba(255, 255, 255, 0.11);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: none;
    backdrop-filter: blur(12px);
}

.rank-card a {
    display: grid;
    grid-template-columns: auto 92px 1fr;
    gap: 14px;
    align-items: center;
    padding: 14px;
    color: #fff;
}

.rank-number {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-weight: 900;
    background: linear-gradient(135deg, var(--orange), var(--amber));
}

.rank-card img {
    width: 92px;
    height: 92px;
    border-radius: 14px;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.rank-card h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.45;
}

.rank-card p {
    margin: 0 0 8px;
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.55;
}

.rank-meta {
    color: #cbd5e1;
    justify-content: flex-start;
}

.standalone-ranking {
    margin-bottom: 60px;
}

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

.page-hero-small {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    margin-bottom: 38px;
    padding: clamp(34px, 6vw, 64px);
    color: #fff;
    background: radial-gradient(circle at top left, rgba(249, 115, 22, 0.8), transparent 36%), linear-gradient(135deg, #1e293b, #0f172a);
    box-shadow: var(--shadow);
}

.page-hero-small h1 {
    max-width: 760px;
    margin: 18px 0 14px;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.15;
    font-weight: 900;
}

.page-hero-small p {
    max-width: 780px;
    margin: 0;
    color: #e5e7eb;
    line-height: 1.8;
}

.page-hero-small .filter-search {
    max-width: 640px;
    margin-top: 24px;
}

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

.category-overview-card {
    display: grid;
    gap: 20px;
    border-radius: 24px;
    padding: 28px;
    background: #fff;
    box-shadow: var(--shadow);
    border-top: 5px solid var(--orange);
}

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

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

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

.category-samples a {
    border-radius: 999px;
    padding: 8px 12px;
    color: #475569;
    text-decoration: none;
    background: #f8fafc;
}

.category-enter {
    justify-self: start;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.filter-chips button {
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 999px;
    padding: 8px 13px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.filter-chips button.is-active {
    border-color: transparent;
    background: linear-gradient(90deg, var(--orange), var(--amber));
}

.empty-state {
    border-radius: 18px;
    padding: 28px;
    text-align: center;
    color: #64748b;
    background: #fff;
}

.detail-page {
    background: linear-gradient(135deg, #f9fafb 0%, #fff7ed 60%, #fef3c7 100%);
}

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

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

.detail-mask {
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.28)), linear-gradient(0deg, #020617, transparent 50%);
}

.detail-hero-inner {
    position: relative;
    min-height: 560px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 42px;
    align-items: center;
    color: #fff;
    padding-top: 40px;
    padding-bottom: 40px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 26px 50px rgba(0, 0, 0, 0.45);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: #cbd5e1;
    font-size: 14px;
}

.breadcrumb a {
    color: #fdba74;
    text-decoration: none;
}

.detail-info h1 {
    margin: 18px 0;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.1;
    font-weight: 900;
}

.detail-one-line {
    max-width: 760px;
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1.8;
}

.detail-meta {
    margin: 22px 0;
    color: #f8fafc;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0 28px;
}

.tag-list span {
    border-radius: 999px;
    padding: 7px 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
}

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

.detail-main,
.detail-side {
    display: grid;
    gap: 24px;
}

.player-section,
.text-section,
.side-card {
    border-radius: 24px;
    padding: 26px;
    background: #fff;
    box-shadow: var(--shadow);
}

.player-section h2,
.text-section h2,
.side-card h2 {
    margin: 0 0 18px;
    font-size: 24px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000;
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 16px;
    border: 0;
    color: #fff;
    cursor: pointer;
    text-align: center;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18));
}

.player-overlay.is-hidden {
    display: none;
}

.play-circle {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    padding-left: 5px;
    font-size: 32px;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: 0 0 34px rgba(249, 115, 22, 0.48);
}

.player-overlay strong {
    max-width: 80%;
    font-size: 22px;
}

.text-section p {
    margin: 0;
    color: #374151;
    line-height: 1.9;
}

.side-card dl {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px 14px;
    margin: 0;
}

.side-card dt {
    color: #64748b;
}

.side-card dd {
    margin: 0;
    color: #111827;
    font-weight: 700;
}

.side-card a {
    color: #ea580c;
    text-decoration: none;
}

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

.site-footer {
    margin-top: 72px;
    color: #cbd5e1;
    background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
    padding: 46px 0 34px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 20px;
    margin-bottom: 14px;
}

.footer-about p,
.site-footer li {
    color: #94a3b8;
    line-height: 1.75;
}

.site-footer h3 {
    margin: 0 0 16px;
    color: #fff;
    font-size: 18px;
}

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

.site-footer a {
    color: #cbd5e1;
    text-decoration: none;
}

.site-footer a:hover {
    color: #fb923c;
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    padding: 18px 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

.tone-orange,
.tone-amber,
.tone-red,
.tone-rose,
.tone-green,
.tone-blue,
.tone-purple,
.tone-cyan,
.tone-slate,
.tone-dark {
    background: linear-gradient(90deg, var(--orange), var(--amber));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.tone-bg-orange,
.tone-bg-amber,
.tone-bg-red,
.tone-bg-rose,
.tone-bg-green,
.tone-bg-blue,
.tone-bg-purple,
.tone-bg-cyan,
.tone-bg-slate,
.tone-bg-dark {
    background: radial-gradient(circle at top left, rgba(249, 115, 22, 0.82), transparent 38%), linear-gradient(135deg, #1e293b, #0f172a);
}

.tone-border-orange,
.tone-border-amber,
.tone-border-red,
.tone-border-rose,
.tone-border-green,
.tone-border-blue,
.tone-border-purple,
.tone-border-cyan,
.tone-border-slate,
.tone-border-dark {
    border-top-color: var(--orange);
}

@media (max-width: 1024px) {
    .four-cols {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .three-cols,
    .latest-grid,
    .rank-grid,
    .full-rank-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .detail-hero-inner {
        grid-template-columns: 220px 1fr;
    }
}

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

    .mobile-menu-button {
        display: block;
    }

    .hero-carousel {
        min-height: 560px;
        height: 76vh;
    }

    .hero-content {
        padding-bottom: 92px;
    }

    .hero-meta {
        gap: 10px;
        font-size: 14px;
    }

    .hero-dots {
        right: 20px;
        bottom: 24px;
    }

    .quick-panel {
        grid-template-columns: 1fr;
        margin-top: 18px;
    }

    .four-cols,
    .three-cols,
    .latest-grid,
    .rank-grid,
    .full-rank-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .movie-card-horizontal a,
    .rank-card a {
        grid-template-columns: auto 86px 1fr;
    }

    .movie-card-horizontal a {
        display: block;
    }

    .movie-thumb-wide {
        width: 100%;
        height: 210px;
    }

    .movie-card-horizontal .movie-card-body {
        padding: 16px;
    }

    .detail-hero-inner {
        grid-template-columns: 1fr;
        padding-top: 34px;
    }

    .detail-poster {
        width: min(240px, 70vw);
    }

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

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

    .side-card dl {
        grid-template-columns: 68px 1fr;
    }
}
