:root {
    --bg: #f8fafc;
    --bg-soft: #f1f5f9;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --line: rgba(148, 163, 184, 0.25);
    --dark: #111827;
    --accent: #334155;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    --shadow-strong: 0 24px 80px rgba(15, 23, 42, 0.20);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f8fafc 100%);
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

.container {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 90;
    background: rgba(255, 255, 255, 0.84);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
    backdrop-filter: blur(18px);
}

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #111827, #64748b);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
    font-size: 15px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.12;
}

.logo-text strong {
    font-size: 20px;
    letter-spacing: -0.02em;
}

.logo-text small {
    color: var(--muted);
    font-size: 12px;
    margin-top: 3px;
}

.header-search {
    flex: 1;
    max-width: 460px;
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.8);
    overflow: hidden;
}

.header-search input,
.mobile-search input,
.filter-box input,
.filter-box select {
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
}

.header-search input {
    width: 100%;
    padding: 11px 16px;
}

.header-search button,
.mobile-search button {
    border: 0;
    background: #111827;
    color: #ffffff;
    padding: 11px 18px;
    cursor: pointer;
}

.main-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--muted);
    font-size: 15px;
}

.main-nav a {
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
    color: var(--dark);
}

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: var(--dark);
    font-size: 24px;
    cursor: pointer;
}

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

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

.mobile-search {
    display: flex;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 14px;
}

.mobile-search input {
    flex: 1;
    padding: 11px 14px;
}

.mobile-nav {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.mobile-nav a {
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--bg);
}

.mobile-tags {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 3px;
}

.mobile-tags a {
    white-space: nowrap;
    padding: 7px 10px;
    border-radius: 999px;
    background: #eef2f7;
    color: #475569;
    font-size: 13px;
}

.hero {
    position: relative;
    height: 500px;
    overflow: hidden;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.75s ease, transform 1.2s ease;
    transform: scale(1.02);
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.94) 0%, rgba(31, 41, 55, 0.78) 48%, rgba(17, 24, 39, 0.26) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 720px;
    margin-left: max(16px, calc((100vw - 1280px) / 2));
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: 8px 15px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    margin-bottom: 22px;
    font-size: 14px;
}

.hero h1 {
    color: #ffffff;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    margin: 0 0 18px;
    letter-spacing: -0.04em;
}

.hero p {
    color: rgba(255, 255, 255, 0.90);
    font-size: 19px;
    line-height: 1.8;
    margin: 0 0 20px;
    max-width: 760px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.hero-meta span {
    padding: 7px 12px;
    color: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    background: #ffffff;
    color: #111827;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.24);
}

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

.btn-line {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.btn-dark {
    color: #ffffff;
    background: #111827;
}

.btn-light {
    color: #111827;
    background: #ffffff;
    border: 1px solid var(--line);
}

.hero-controls {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
}

.hero-arrow,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    font-size: 24px;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 9px;
    height: 9px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.34);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
    width: 28px;
    background: #ffffff;
}

.section {
    padding: 58px 0 0;
}

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

.section-heading span,
.page-hero span {
    display: inline-flex;
    margin-bottom: 9px;
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.section-heading h2,
.page-hero h1 {
    margin: 0;
    color: #111827;
    font-size: clamp(26px, 3vw, 38px);
    letter-spacing: -0.03em;
}

.section-heading p,
.page-hero p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

.section-more {
    flex-shrink: 0;
    padding: 10px 15px;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    font-weight: 600;
}

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

.category-pill {
    min-height: 128px;
    padding: 20px;
    border-radius: 22px;
    background: linear-gradient(135deg, #ffffff, #f1f5f9);
    border: 1px solid var(--line);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-pill:hover,
.movie-card:hover,
.category-overview-card:hover,
.compact-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.category-pill strong {
    display: block;
    color: #111827;
    font-size: 18px;
    margin-bottom: 8px;
}

.category-pill span {
    color: var(--muted);
    line-height: 1.7;
    font-size: 14px;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.92);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-link,
.movie-info {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cover-wrap {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e2e8f0;
}

.cover-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.movie-card:hover .cover-wrap img {
    transform: scale(1.06);
}

.cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.56), rgba(15, 23, 42, 0.02));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .cover-shade {
    opacity: 1;
}

.play-badge {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.94);
    color: #111827;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.20);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-info {
    padding: 16px;
}

.movie-label {
    width: max-content;
    max-width: 100%;
    padding: 5px 10px;
    border-radius: 999px;
    color: #475569;
    background: #f1f5f9;
    font-size: 12px;
    margin-bottom: 10px;
}

.movie-info h3 {
    margin: 0 0 9px;
    color: #111827;
    font-size: 17px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-info p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta {
    margin-top: auto;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.6;
}

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

.movie-tags span,
.detail-tags span {
    padding: 5px 8px;
    border-radius: 999px;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 12px;
}

.two-column-section {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.7fr);
    gap: 30px;
    align-items: start;
}

.ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.ranking-item a {
    min-height: 100px;
    display: grid;
    grid-template-columns: 50px 110px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.rank-no {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: #334155;
    font-weight: 800;
}

.top-rank .rank-no {
    background: linear-gradient(135deg, #111827, #64748b);
}

.ranking-item img {
    width: 110px;
    height: 72px;
    object-fit: cover;
    border-radius: 14px;
}

.rank-body {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.rank-body strong {
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-body em,
.rank-body span,
.rank-score {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.rank-body span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-score {
    padding: 7px 10px;
    border-radius: 999px;
    background: #f1f5f9;
}

.side-panel {
    padding: 22px;
    border-radius: 26px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    position: sticky;
    top: 92px;
}

.side-panel h2 {
    margin: 0 0 18px;
}

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

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

.compact-card img {
    width: 86px;
    height: 58px;
    object-fit: cover;
    border-radius: 12px;
}

.compact-card span {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.compact-card strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.compact-card em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-box {
    display: flex;
    gap: 12px;
    margin-bottom: 22px;
}

.filter-box input,
.filter-box select {
    min-height: 46px;
    padding: 0 16px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.filter-box input {
    flex: 1;
}

.filter-box select {
    min-width: 170px;
}

.movie-card.is-hidden,
.ranking-item.is-hidden {
    display: none;
}

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

.page-hero {
    min-height: 260px;
    padding: 56px;
    border-radius: 34px;
    background: radial-gradient(circle at top left, #e2e8f0, transparent 32%), linear-gradient(135deg, #ffffff, #f1f5f9);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.page-hero p {
    max-width: 760px;
}

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

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

.category-overview-card a {
    display: block;
    padding: 18px;
}

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.category-thumbs img {
    height: 86px;
    width: 100%;
    object-fit: cover;
    border-radius: 14px;
    background: #e2e8f0;
}

.category-copy strong {
    display: block;
    color: #111827;
    font-size: 20px;
    margin-bottom: 8px;
}

.category-copy em {
    color: var(--muted);
    font-style: normal;
    line-height: 1.7;
}

.full-ranking {
    gap: 10px;
}

.detail-layout {
    display: grid;
    gap: 18px;
}

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

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

.detail-card {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
    gap: 28px;
    padding: 24px;
    border-radius: 34px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow-strong);
}

.movie-video,
.player-cover,
.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.movie-video {
    z-index: 1;
    object-fit: contain;
    background: #020617;
}

.player-cover {
    z-index: 3;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover img {
    object-fit: cover;
    filter: brightness(0.55);
}

.player-button {
    position: relative;
    z-index: 4;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    border: 0;
    display: grid;
    place-items: center;
    color: #111827;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    font-size: 28px;
}

.detail-copy {
    display: flex;
    flex-direction: column;
}

.detail-label {
    width: max-content;
    padding: 7px 12px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 13px;
    margin-bottom: 16px;
}

.detail-copy h1 {
    margin: 0 0 14px;
    color: #111827;
    font-size: clamp(30px, 3.4vw, 48px);
    line-height: 1.14;
    letter-spacing: -0.04em;
}

.detail-one-line {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.8;
    margin: 0 0 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 14px;
}

.detail-meta span {
    padding: 7px 10px;
    border-radius: 999px;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 13px;
}

.detail-section {
    margin-top: 20px;
}

.detail-section h2 {
    margin: 0 0 10px;
    color: #111827;
    font-size: 21px;
}

.detail-section p {
    margin: 0;
    color: #475569;
    line-height: 1.9;
}

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

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

.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 36px;
    display: grid;
    grid-template-columns: 1.6fr repeat(3, minmax(0, 0.7fr));
    gap: 32px;
}

.footer-brand p {
    max-width: 520px;
    color: var(--muted);
    line-height: 1.8;
}

.footer-column h2 {
    margin: 0 0 14px;
    font-size: 16px;
}

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

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

.footer-column a:hover {
    color: #111827;
}

.footer-bottom {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid var(--line);
    color: #64748b;
    font-size: 14px;
}

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

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

    .detail-card,
    .two-column-section {
        grid-template-columns: 1fr;
    }

    .side-panel {
        position: static;
    }
}

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

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

    .hero {
        height: 560px;
    }

    .hero-content {
        width: calc(100% - 32px);
        margin-left: 16px;
        max-width: calc(100% - 32px);
    }

    .hero p {
        font-size: 16px;
    }

    .movie-grid,
    .all-movies-grid,
    .featured-grid,
    .related-grid,
    .category-pills,
    .category-overview-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .section-heading,
    .filter-box {
        align-items: stretch;
        flex-direction: column;
    }

    .ranking-item a {
        grid-template-columns: 38px 82px minmax(0, 1fr);
    }

    .ranking-item img {
        width: 82px;
        height: 58px;
    }

    .rank-score {
        display: none;
    }

    .page-hero {
        padding: 34px 22px;
        border-radius: 26px;
    }

    .detail-card {
        padding: 16px;
        border-radius: 26px;
    }
}

@media (max-width: 520px) {
    .container,
    .header-inner,
    .footer-inner,
    .footer-bottom {
        width: min(100% - 24px, 1280px);
    }

    .logo-text strong {
        font-size: 17px;
    }

    .logo-mark {
        width: 32px;
        height: 32px;
        border-radius: 12px;
    }

    .hero {
        height: 600px;
    }

    .hero-actions,
    .page-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .hero-controls {
        bottom: 18px;
    }

    .hero-arrow {
        display: none;
    }

    .section {
        padding-top: 42px;
    }
}
