* {
    box-sizing: border-box;
}

:root {
    --bg: #ffffff;
    --surface: #fafaf9;
    --surface-strong: #f5f5f4;
    --line: #e7e5e4;
    --text: #0f172a;
    --muted: #64748b;
    --soft: #94a3b8;
    --brand: #d97706;
    --brand-dark: #b45309;
    --brand-soft: #fef3c7;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

img.image-off {
    opacity: 0;
}

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(231, 229, 228, 0.8);
}

.site-header-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

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

.logo-text {
    font-size: 20px;
    color: #1e293b;
}

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

.nav-link,
.mobile-nav-link {
    color: #475569;
    font-weight: 600;
    border-radius: 999px;
    transition: color 0.25s ease, background 0.25s ease;
}

.nav-link {
    padding: 9px 16px;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--brand-dark);
    background: #fffbeb;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

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

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.95);
}

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

.mobile-nav {
    max-width: 1240px;
    margin: 0 auto;
    padding: 10px 20px 18px;
    display: grid;
    gap: 8px;
}

.mobile-nav-link {
    padding: 11px 14px;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 540px;
    overflow: hidden;
    background: linear-gradient(135deg, #1e293b, #92400e);
}

.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 {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #1e293b, #78350f);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.35), rgba(15, 23, 42, 0.68) 48%, rgba(15, 23, 42, 0.88));
}

.hero-content {
    position: absolute;
    left: 50%;
    top: 54%;
    transform: translate(-50%, -50%);
    width: min(920px, calc(100% - 40px));
    text-align: center;
    color: #ffffff;
}

.hero-kicker,
.section-kicker {
    margin: 0 0 12px;
    color: var(--brand);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.hero-content h1,
.hero-content h2 {
    margin: 0 auto 18px;
    max-width: 840px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.04em;
    text-shadow: 0 12px 38px rgba(0, 0, 0, 0.36);
}

.hero-content p {
    margin: 0 auto 22px;
    max-width: 720px;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(16px, 2vw, 20px);
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-bottom: 26px;
}

.hero-meta span,
.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    backdrop-filter: blur(10px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 18px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn.primary {
    color: #ffffff;
    background: var(--brand);
    box-shadow: 0 12px 25px rgba(217, 119, 6, 0.35);
}

.btn.primary:hover {
    background: var(--brand-dark);
    box-shadow: 0 18px 35px rgba(180, 83, 9, 0.38);
}

.btn.ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.26);
    backdrop-filter: blur(12px);
}

.btn.ghost.dark {
    color: #334155;
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(226, 232, 240, 0.9);
}

.btn.secondary {
    color: var(--brand-dark);
    background: var(--brand-soft);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 999px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
    font-size: 38px;
    line-height: 1;
    transition: background 0.25s ease;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.28);
}

.hero-arrow.left {
    left: 22px;
}

.hero-arrow.right {
    right: 22px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    border: 0;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: #ffffff;
}

.section,
.footer-inner,
.page-main,
.movie-detail-main {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
}

.section {
    padding: 72px 0;
}

.section-heading {
    margin-bottom: 28px;
}

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

.section-heading h2,
.category-overview-main h2,
.detail-side h2,
.content-block h2 {
    margin: 0 0 8px;
    color: #1e293b;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.18;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-heading p,
.category-overview-main p,
.footer-brand p,
.footer-grid p {
    margin: 0;
    color: var(--muted);
}

.text-link {
    color: var(--brand-dark);
    font-weight: 800;
}

.quick-search-section {
    margin-top: -54px;
    position: relative;
    z-index: 4;
}

.quick-search-card,
.filter-panel {
    margin-bottom: 28px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
}

.large-search,
.search-box,
.filter-panel label {
    display: grid;
    gap: 8px;
    color: #334155;
    font-weight: 800;
}

.large-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid #d6d3d1;
    border-radius: 12px;
    background: #ffffff;
    color: var(--text);
    padding: 13px 14px;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.large-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(150px, 210px));
    gap: 16px;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.14);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #1e293b, #78350f);
}

.movie-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease;
}

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

.year-badge,
.rank-no,
.play-dot {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
}

.year-badge {
    left: 12px;
    top: 12px;
    padding: 5px 10px;
    font-size: 12px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(10px);
}

.rank-no {
    right: 12px;
    top: 12px;
    padding: 6px 11px;
    background: var(--brand);
}

.play-dot {
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(217, 119, 6, 0.92);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

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

.movie-title-link h3 {
    margin: 0 0 8px;
    color: #1e293b;
    font-size: 18px;
    line-height: 1.28;
    font-weight: 900;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-title-link:hover h3 {
    color: var(--brand-dark);
}

.movie-meta,
.movie-one-line {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.movie-one-line {
    margin-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.card-tags span,
.detail-tags span {
    padding: 4px 9px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.ranking-preview {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.ranking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
    gap: 24px;
}

.ranking-cover {
    position: relative;
    overflow: hidden;
    min-height: 480px;
    border-radius: 24px;
    background: linear-gradient(135deg, #111827, #78350f);
    color: #ffffff;
    box-shadow: var(--shadow);
}

.ranking-cover img {
    width: 100%;
    height: 100%;
    min-height: 480px;
    object-fit: cover;
    opacity: 0.72;
}

.ranking-cover div {
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: 28px;
}

.ranking-cover span {
    color: #fbbf24;
    font-weight: 900;
}

.ranking-cover h3 {
    margin: 10px 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.1;
}

.ranking-cover p {
    max-width: 620px;
    color: rgba(255, 255, 255, 0.88);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 42px 74px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #ffffff;
    transition: transform 0.2s ease, border 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    border-color: #fbbf24;
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.08);
}

.rank-row img {
    width: 74px;
    height: 54px;
    border-radius: 12px;
    object-fit: cover;
    background: linear-gradient(135deg, #1e293b, #78350f);
}

.list-rank {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    color: #ffffff;
    background: var(--brand);
    font-weight: 900;
}

.rank-info {
    min-width: 0;
}

.rank-info strong,
.rank-info em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-info strong {
    color: #1e293b;
    font-size: 15px;
}

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

.category-grid,
.category-overview-grid {
    display: grid;
    gap: 20px;
}

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

.category-card,
.category-overview-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, #ffffff, #fafaf9);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
}

.category-card {
    padding: 20px;
}

.category-title {
    display: inline-block;
    margin-bottom: 10px;
    color: #1e293b;
    font-size: 20px;
    font-weight: 900;
}

.category-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.category-mini-links {
    display: grid;
    gap: 6px;
    margin-top: 14px;
}

.category-mini-links a {
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-main {
    padding-top: 94px;
}

.page-hero,
.ranking-hero {
    position: relative;
    overflow: hidden;
    margin: 24px auto 0;
    border-radius: 28px;
    background: linear-gradient(135deg, #1e293b, #78350f);
    color: #ffffff;
    box-shadow: var(--shadow);
}

.page-hero {
    padding: 56px;
    display: flex;
    justify-content: space-between;
    gap: 22px;
    align-items: center;
}

.page-hero h1,
.ranking-hero h1,
.detail-info h1 {
    margin: 0 0 12px;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.06;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.page-hero p,
.ranking-hero p {
    margin: 0;
    max-width: 720px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
    gap: 20px;
    padding: 24px;
}

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

.empty-result {
    padding: 28px;
    border-radius: var(--radius);
    background: #fffbeb;
    color: var(--brand-dark);
    text-align: center;
    font-weight: 800;
}

.ranking-hero {
    min-height: 480px;
}

.ranking-hero img {
    width: 100%;
    height: 520px;
    object-fit: cover;
    opacity: 0.54;
    background: linear-gradient(135deg, #1e293b, #78350f);
}

.ranking-hero-content {
    position: absolute;
    left: 48px;
    right: 48px;
    bottom: 48px;
}

.ranking-hero h2 {
    margin: 0 0 10px;
    font-size: clamp(26px, 3vw, 44px);
}

.ranking-grid .poster-link {
    aspect-ratio: 16 / 10;
}

.movie-detail-main {
    padding-top: 100px;
}

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

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

.detail-hero {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 34px;
    align-items: stretch;
    padding: 28px;
    border-radius: 28px;
    background: linear-gradient(135deg, #111827, #78350f);
    color: #ffffff;
    box-shadow: var(--shadow);
}

.detail-cover {
    overflow: hidden;
    border-radius: 22px;
    background: linear-gradient(135deg, #1e293b, #78350f);
}

.detail-cover img {
    width: 100%;
    height: 100%;
    min-height: 430px;
    object-fit: cover;
}

.detail-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.detail-one-line {
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 19px;
}

.detail-info .detail-meta {
    justify-content: flex-start;
}

.detail-tags {
    margin: 0 0 26px;
}

.detail-tags span {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.player-section {
    margin: 34px 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #020617;
    box-shadow: var(--shadow);
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-layer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border: 0;
    background: radial-gradient(circle, rgba(217, 119, 6, 0.28), rgba(2, 6, 23, 0.68));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-layer.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: 999px;
    background: var(--brand);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    font-size: 30px;
}

.player-layer strong {
    max-width: min(680px, calc(100% - 40px));
    font-size: clamp(22px, 3vw, 38px);
    text-align: center;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 26px;
    align-items: start;
    margin-bottom: 72px;
}

.detail-article,
.detail-side {
    display: grid;
    gap: 22px;
}

.content-block,
.detail-side {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.content-block p {
    margin: 0;
    color: #334155;
    font-size: 17px;
    white-space: pre-line;
}

.review-block {
    background: linear-gradient(135deg, #fffbeb, #ffffff);
}

.related-grid {
    margin-top: 18px;
}

.detail-side {
    position: sticky;
    top: 96px;
}

.side-list .rank-row {
    grid-template-columns: 38px 68px minmax(0, 1fr);
}

.site-footer {
    margin-top: 44px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, #fafaf9, #e7e5e4);
}

.footer-inner {
    padding: 50px 0 30px;
}

.footer-brand {
    margin-bottom: 30px;
}

.footer-logo {
    margin-bottom: 12px;
}

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

.footer-grid h2 {
    margin: 0 0 12px;
    color: #1e293b;
    font-size: 16px;
}

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

.footer-grid a {
    color: var(--muted);
    font-weight: 700;
}

.footer-grid a:hover {
    color: var(--brand-dark);
}

.footer-bottom {
    margin-top: 32px;
    padding-top: 22px;
    border-top: 1px solid #d6d3d1;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

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

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

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

    .detail-side {
        position: static;
    }
}

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

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

    .hero {
        height: 82vh;
        min-height: 620px;
    }

    .hero-arrow {
        display: none;
    }

    .section,
    .footer-inner,
    .page-main,
    .movie-detail-main {
        width: min(100% - 28px, 1240px);
    }

    .section-heading.split,
    .page-hero {
        display: grid;
        align-items: start;
    }

    .filter-panel {
        grid-template-columns: 1fr;
    }

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

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

    .detail-cover img {
        min-height: 360px;
    }
}

@media (max-width: 560px) {
    .site-header-inner {
        padding: 11px 14px;
    }

    .hero-content {
        text-align: left;
    }

    .hero-meta,
    .hero-actions {
        justify-content: flex-start;
    }

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

    .page-hero,
    .detail-hero,
    .content-block,
    .detail-side {
        padding: 22px;
        border-radius: 20px;
    }

    .ranking-hero-content {
        left: 24px;
        right: 24px;
        bottom: 28px;
    }

    .rank-row {
        grid-template-columns: 36px 64px minmax(0, 1fr);
    }
}
