:root {
    --site-bg: #f8fafc;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --panel: #ffffff;
    --amber: #f59e0b;
    --amber-dark: #d97706;
    --slate: #0f172a;
    --slate-soft: #1e293b;
    --radius-xl: 1.25rem;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-card: 0 12px 24px rgba(15, 23, 42, 0.10);
}

body {
    background: var(--site-bg);
    color: var(--ink);
}

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

.site-header-inner {
    width: min(1180px, 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-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.site-logo-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #ffffff;
    font-size: 0.85rem;
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.36);
}

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

.nav-link {
    color: #e5e7eb;
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fbbf24;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(320px, 28vw);
}

.header-search input,
.wide-search input,
.filter-controls input,
.filter-controls select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--ink);
    padding: 11px 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.wide-search input:focus,
.filter-controls input:focus,
.filter-controls select:focus {
    border-color: var(--amber);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.header-search button,
.wide-search button {
    border-radius: 12px;
    background: var(--amber);
    color: #ffffff;
    padding: 11px 15px;
    font-weight: 800;
    white-space: nowrap;
    transition: transform 0.2s ease, background 0.2s ease;
}

.header-search button:hover,
.wide-search button:hover,
.primary-button:hover {
    background: var(--amber-dark);
    transform: translateY(-1px);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.24);
}

.mobile-nav a {
    display: block;
    color: #f8fafc;
    padding: 12px 4px;
    font-weight: 700;
}

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

.hero-section {
    min-height: 70vh;
    background-size: cover;
    background-position: center;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 38%;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.92));
}

.hero-inner {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 32px));
    min-height: 70vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.95fr);
    gap: 36px;
    align-items: center;
    padding: 60px 0;
}

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

.hero-kicker {
    display: inline-flex;
    align-items: center;
    width: max-content;
    border-radius: 999px;
    padding: 8px 14px;
    background: rgba(245, 158, 11, 0.16);
    color: #fbbf24;
    font-weight: 800;
    letter-spacing: 0.08em;
    font-size: 0.82rem;
    margin-bottom: 18px;
}

.hero-copy h1,
.page-hero h1 {
    font-size: clamp(2.45rem, 6vw, 4.65rem);
    line-height: 1.02;
    letter-spacing: -0.055em;
    font-weight: 900;
    margin-bottom: 20px;
}

.hero-copy p,
.page-hero p {
    font-size: 1.12rem;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.85;
    max-width: 720px;
}

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

.hero-meta {
    margin: 22px 0 14px;
    color: #f8fafc;
    font-weight: 750;
}

.hero-meta span,
.detail-meta span {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    padding: 7px 12px;
}

.hero-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.detail-tags span {
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.17);
    color: #ffffff;
    font-size: 0.9rem;
}

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

.primary-button,
.ghost-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 13px;
    padding: 0 18px;
    font-weight: 850;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
    background: var(--amber);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(245, 158, 11, 0.32);
}

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

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.24);
    transform: translateY(-1px);
}

.hero-card-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-self: end;
}

.page-main,
.movie-detail-main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 56px;
}

.page-hero {
    border-radius: 30px;
    padding: clamp(34px, 5vw, 64px);
    margin-bottom: 34px;
    background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.22), transparent 34%), linear-gradient(135deg, #0f172a, #1e293b);
    color: #ffffff;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.page-hero h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
}

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

.page-main .content-section,
.movie-detail-main .content-section {
    width: 100%;
}

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

.section-heading h2 {
    font-size: clamp(1.55rem, 3vw, 2.25rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.section-more {
    color: var(--amber-dark);
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.section-more:hover {
    background: var(--amber);
    color: #ffffff;
}

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

.movie-card {
    background: var(--panel);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 42px rgba(15, 23, 42, 0.16);
    border-color: rgba(245, 158, 11, 0.42);
}

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

.movie-poster img,
.detail-poster img,
.category-poster-stack img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, opacity 0.2s ease;
}

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

.cover-image.is-hidden {
    opacity: 0;
}

.poster-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.95);
    color: #ffffff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
    transform: scale(0.92);
    transition: transform 0.2s ease;
}

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

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.86);
    color: #fbbf24;
    font-weight: 900;
}

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

.movie-meta-line {
    color: var(--muted);
    font-size: 0.78rem;
    margin-bottom: 8px;
}

.movie-card h3 {
    font-size: 1rem;
    line-height: 1.35;
    font-weight: 850;
    margin-bottom: 8px;
    color: var(--ink);
}

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

.movie-card p {
    min-height: 3.1em;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card-foot {
    justify-content: space-between;
    color: #475569;
    margin-top: 12px;
    font-size: 0.86rem;
}

.rating {
    color: var(--amber-dark);
    font-weight: 850;
}

.movie-card-compact .movie-card-body {
    padding: 12px;
}

.movie-card-compact p {
    display: none;
}

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

.category-tile {
    min-height: 146px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 22px;
    padding: 18px;
    background: linear-gradient(135deg, #ffffff, #fffbeb);
    border: 1px solid #fde68a;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-overview-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 36px rgba(15, 23, 42, 0.14);
}

.category-tile span {
    font-size: 1.18rem;
    font-weight: 900;
    color: var(--ink);
}

.category-tile em {
    color: var(--muted);
    font-style: normal;
    line-height: 1.65;
    font-size: 0.92rem;
}

.category-overview-card {
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--line);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-poster-stack {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #1e293b, #475569);
}

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

.category-overview-body h2 {
    font-size: 1.2rem;
    font-weight: 900;
    margin-bottom: 8px;
}

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

.category-overview-body span {
    color: var(--amber-dark);
    font-weight: 850;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.ranking-item:hover {
    border-color: rgba(245, 158, 11, 0.5);
}

.ranking-num {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #0f172a;
    color: #fbbf24;
    font-weight: 900;
}

.ranking-title {
    font-weight: 850;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-score {
    color: var(--amber-dark);
    font-weight: 850;
}

.wide-search {
    display: flex;
    gap: 12px;
    padding: 14px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.filter-panel {
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-card);
    padding: 18px;
    margin-bottom: 24px;
}

.filter-title {
    font-weight: 900;
    margin-bottom: 14px;
    font-size: 1.1rem;
}

.filter-controls {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(150px, 0.6fr));
    gap: 12px;
}

.empty-state {
    border-radius: 22px;
    background: #ffffff;
    color: var(--muted);
    text-align: center;
    padding: 40px;
    border: 1px solid var(--line);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    color: var(--muted);
    margin-bottom: 22px;
}

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

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

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

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 26px;
    background: #020617;
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.32);
}

.movie-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #020617;
}

.player-start {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.14), rgba(2, 6, 23, 0.62));
    color: #ffffff;
    font-weight: 900;
    font-size: 1.12rem;
}

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

.player-start-icon {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--amber);
    color: #ffffff;
    font-size: 1.8rem;
    box-shadow: 0 20px 44px rgba(245, 158, 11, 0.36);
}

.detail-article,
.side-info-card {
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-card);
    padding: clamp(20px, 4vw, 34px);
}

.detail-article h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.12;
    font-weight: 950;
    letter-spacing: -0.04em;
    margin-bottom: 14px;
}

.detail-one-line {
    color: #475569;
    font-size: 1.1rem;
    line-height: 1.85;
    margin-bottom: 18px;
}

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

.detail-meta span {
    background: #f1f5f9;
    color: #334155;
}

.detail-tags span {
    background: #fffbeb;
    color: #92400e;
}

.detail-article h2,
.side-info-card h2 {
    font-size: 1.35rem;
    font-weight: 900;
    margin: 26px 0 12px;
}

.detail-article p {
    color: #334155;
    line-height: 1.9;
    font-size: 1.02rem;
}

.detail-poster {
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 24px;
    background: linear-gradient(135deg, #1e293b, #475569);
    box-shadow: var(--shadow-soft);
}

.side-info-card dl {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px 14px;
}

.side-info-card dt {
    color: var(--muted);
}

.side-info-card dd {
    color: var(--ink);
    font-weight: 750;
}

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

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

.site-footer p {
    max-width: 620px;
    line-height: 1.8;
    margin-top: 14px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-content: start;
}

.footer-links a {
    color: #fbbf24;
    font-weight: 750;
}

.footer-copy {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    color: #94a3b8;
}

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

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

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

    .hero-card-row {
        align-self: auto;
    }

    .detail-side-column {
        grid-template-columns: 220px 1fr;
    }
}

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

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

    .hero-card-row {
        grid-template-columns: repeat(3, minmax(140px, 1fr));
        overflow-x: auto;
        padding-bottom: 6px;
    }

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

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

    .ranking-panel,
    .site-footer-inner {
        grid-template-columns: 1fr;
    }
}

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

    .site-logo {
        font-size: 1.05rem;
    }

    .hero-section,
    .hero-inner {
        min-height: 620px;
    }

    .hero-inner {
        padding: 38px 0;
    }

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

    .filter-controls,
    .wide-search,
    .detail-side-column {
        grid-template-columns: 1fr;
    }

    .wide-search {
        display: grid;
    }

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

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

    .movie-card p {
        min-height: auto;
    }

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