:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1e40af;
    --color-secondary: #ea580c;
    --color-secondary-dark: #9a3412;
    --color-accent: #ca8a04;
    --color-dark: #0f172a;
    --color-slate: #1e293b;
    --color-muted: #64748b;
    --color-soft: #f8fafc;
    --shadow-soft: 0 2px 15px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-hard: 0 10px 40px rgba(0, 0, 0, 0.15);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    color: var(--color-slate);
    background: #f9fafb;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    border: 0;
    cursor: pointer;
}

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

.card {
    border-radius: 16px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-soft);
}

.nav {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand-mark,
.footer-logo span {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.28);
}

.brand-text {
    font-size: 26px;
    line-height: 1;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

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

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: #334155;
    background: #f1f5f9;
}

.mobile-menu {
    display: none;
    padding-bottom: 14px;
}

.mobile-menu.open {
    display: grid;
    gap: 8px;
}

.mobile-link {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    color: #334155;
    font-weight: 600;
    background: #ffffff;
}

.hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    background: var(--color-dark);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    background-size: cover;
    background-position: center;
    transition: opacity 0.8s ease, visibility 0.8s ease, transform 1.2s ease;
    transform: scale(1.04);
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-copy {
    width: min(720px, 100%);
    color: #ffffff;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    background: var(--color-secondary);
    box-shadow: 0 10px 28px rgba(234, 88, 12, 0.3);
}

.hero h1,
.hero h2,
.detail-summary h1 {
    margin: 22px 0 16px;
    font-size: clamp(40px, 7vw, 74px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p,
.detail-summary p {
    max-width: 720px;
    margin: 0;
    color: #e5e7eb;
    font-size: clamp(18px, 2.2vw, 24px);
    line-height: 1.7;
}

.hero-actions,
.center-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    margin-top: 30px;
}

.primary-button,
.secondary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: #ffffff;
    background: var(--color-primary);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
}

.primary-button:hover,
.secondary-button:hover {
    transform: translateY(-2px);
}

.secondary-button {
    color: #ffffff;
    background: var(--color-secondary);
    box-shadow: 0 12px 30px rgba(234, 88, 12, 0.25);
}

.ghost-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

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

.hero-tags span,
.detail-tags span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(37, 99, 235, 0.24);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 34px;
    line-height: 1;
    background: rgba(0, 0, 0, 0.45);
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.05);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

.intro-search {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 560px);
    gap: 32px;
    align-items: center;
    margin-top: 38px;
    margin-bottom: 22px;
    padding: 26px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.intro-search h2,
.section-title h2,
.latest-box h2,
.detail-card h2,
.side-rank h2 {
    margin: 0;
    color: var(--color-dark);
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.03em;
}

.intro-search p {
    margin: 10px 0 0;
    color: var(--color-muted);
    line-height: 1.8;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr 150px 150px;
    gap: 12px;
    width: 100%;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}

.search-box span {
    color: var(--color-primary);
    font-size: 22px;
}

.search-box input,
.filter-select {
    width: 100%;
    border: 0;
    outline: 0;
    color: #334155;
    background: transparent;
}

.filter-select {
    min-height: 48px;
    padding: 0 12px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}

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

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
}

.section-title > span {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: var(--color-primary);
    box-shadow: 0 10px 26px rgba(37, 99, 235, 0.2);
}

.section-title a {
    margin-left: auto;
    color: var(--color-primary);
    font-weight: 700;
}

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

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

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

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

.movie-card {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.poster-wrap {
    position: relative;
    display: block;
    height: 220px;
    overflow: hidden;
    background: #e2e8f0;
}

.movie-card.large .poster-wrap {
    height: 300px;
}

.movie-card.small .poster-wrap {
    height: 170px;
}

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

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

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.1), transparent);
}

.badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 8px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.badge-left {
    top: 10px;
    left: 10px;
    background: var(--color-primary);
}

.badge-right {
    top: 10px;
    right: 10px;
    background: var(--color-secondary);
}

.rank-badge {
    left: 10px;
    bottom: 10px;
    min-width: 34px;
    height: 34px;
    border-radius: 999px;
    background: var(--color-accent);
}

.play-hover {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    font-size: 24px;
    background: var(--color-primary);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-hover {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.movie-info {
    display: grid;
    gap: 8px;
    padding: 16px;
}

.movie-info strong {
    color: #1e293b;
    font-size: 17px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card:hover .movie-info strong {
    color: var(--color-primary);
}

.movie-meta {
    color: #64748b;
    font-size: 13px;
}

.movie-desc {
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rail-section {
    padding: 64px 0;
    background: linear-gradient(180deg, #fff7ed, #ffffff);
}

.rail-buttons {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.rail-buttons button {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    color: #334155;
    font-size: 26px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.movie-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 320px);
    gap: 24px;
    overflow-x: auto;
    padding: 4px 4px 18px;
    scroll-snap-type: x proximity;
}

.movie-rail .movie-card {
    scroll-snap-align: start;
}

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

.category-card {
    min-height: 150px;
    display: grid;
    align-content: end;
    gap: 10px;
    padding: 22px;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    box-shadow: var(--shadow-medium);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:nth-child(3n + 2) {
    background: linear-gradient(135deg, var(--color-secondary), var(--color-accent));
}

.category-card:nth-child(3n) {
    background: linear-gradient(135deg, #0f172a, #1e40af);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hard);
}

.category-card strong {
    font-size: 22px;
}

.category-card span {
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.6;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 26px;
}

.tab-button {
    min-height: 42px;
    padding: 0 18px;
    border-radius: 12px;
    color: #334155;
    font-weight: 700;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.tab-button.active {
    color: #ffffff;
    background: var(--color-primary);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.center-actions {
    justify-content: center;
}

.rank-section {
    padding: 68px 0;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.rank-layout {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 32px;
}

.section-title.light h2,
.section-title.light a {
    color: #ffffff;
}

.rank-list,
.mini-grid,
.related-list,
.overview-strip {
    display: grid;
    gap: 14px;
}

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

.latest-box {
    padding: 24px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.latest-box h2 {
    color: #ffffff;
    margin-bottom: 18px;
}

.compact-card {
    display: grid;
    grid-template-columns: auto 58px 1fr;
    gap: 12px;
    align-items: center;
    min-height: 74px;
    padding: 10px;
    border-radius: 14px;
    color: #1e293b;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.compact-card img {
    width: 58px;
    height: 58px;
    border-radius: 10px;
    object-fit: cover;
    background: #e2e8f0;
}

.compact-card span:not(.compact-rank) {
    display: grid;
    gap: 4px;
}

.compact-card strong {
    font-size: 14px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.compact-card em {
    color: #64748b;
    font-size: 12px;
    font-style: normal;
}

.compact-rank {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    background: var(--color-primary);
}

.page-hero {
    padding: 76px 0;
    color: #ffffff;
}

.page-hero p {
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 800;
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(38px, 6vw, 58px);
    letter-spacing: -0.04em;
}

.page-hero span {
    display: block;
    max-width: 760px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 18px;
    line-height: 1.7;
}

.gradient-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
}

.gradient-secondary {
    background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-dark));
}

.gradient-dark {
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.82);
}

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

.breadcrumb i {
    font-style: normal;
    opacity: 0.65;
}

.category-overview-list {
    display: grid;
    gap: 24px;
}

.category-overview-card {
    padding: 22px;
}

.category-overview-head {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

.category-overview-head strong {
    color: #0f172a;
    font-size: 24px;
}

.category-overview-head span {
    color: #64748b;
    line-height: 1.6;
}

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

.searchable-area .search-panel {
    margin-bottom: 28px;
}

.empty-state {
    display: none;
    padding: 60px 20px;
    text-align: center;
    color: #64748b;
}

.searchable-area.empty .empty-state {
    display: block;
}

.ranking-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 26px;
    align-items: start;
}

.side-rank {
    position: sticky;
    top: 88px;
    padding: 20px;
}

.side-rank h2 {
    margin-bottom: 16px;
    font-size: 22px;
}

.detail-hero {
    color: #ffffff;
    background-size: cover;
    background-position: center;
}

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

.detail-hero .breadcrumb {
    margin-top: 0;
    margin-bottom: 28px;
}

.detail-hero-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 34px;
    align-items: center;
}

.detail-cover {
    width: 260px;
    height: 360px;
    border-radius: 20px;
    object-fit: cover;
    background: #334155;
    box-shadow: var(--shadow-hard);
}

.detail-summary h1 {
    margin-top: 18px;
}

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

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

.watch-card,
.detail-card {
    padding: 22px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: #020617;
    aspect-ratio: 16 / 9;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.15), rgba(15, 23, 42, 0.42));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 32px;
    background: var(--color-primary);
    box-shadow: 0 20px 48px rgba(37, 99, 235, 0.42);
}

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

.detail-card h2 {
    margin-bottom: 14px;
    font-size: 24px;
}

.detail-card p {
    margin: 0;
    color: #334155;
    line-height: 1.9;
    font-size: 16px;
}

.info-list {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px 14px;
    margin: 0;
}

.info-list dt {
    color: #64748b;
    font-weight: 700;
}

.info-list dd {
    margin: 0;
    color: #0f172a;
}

.related-list .movie-card {
    display: grid;
    grid-template-columns: 110px 1fr;
}

.related-list .poster-wrap {
    height: 138px;
}

.related-list .movie-desc,
.related-list .badge,
.related-list .play-hover {
    display: none;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 34px;
    padding: 48px 0;
}

.footer-brand p,
.site-footer li {
    color: #cbd5e1;
    line-height: 1.8;
}

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

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

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

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

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

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

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

    .side-rank {
        position: static;
    }
}

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

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero {
        min-height: 620px;
    }

    .hero-arrow {
        display: none;
    }

    .intro-search,
    .detail-hero-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .movie-grid.three,
    .movie-grid.four,
    .movie-grid.six,
    .category-grid,
    .overview-strip,
    .rank-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-cover {
        width: 190px;
        height: 270px;
    }
}

@media (max-width: 560px) {
    .section-container {
        width: min(100% - 22px, 1280px);
    }

    .brand-text {
        font-size: 22px;
    }

    .hero {
        min-height: 590px;
    }

    .hero-copy {
        padding-top: 34px;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-button,
    .secondary-button,
    .ghost-button {
        width: 100%;
    }

    .movie-grid.three,
    .movie-grid.four,
    .movie-grid.six,
    .category-grid,
    .overview-strip,
    .rank-list,
    .related-list .movie-card {
        grid-template-columns: 1fr;
    }

    .poster-wrap,
    .movie-card.small .poster-wrap {
        height: 230px;
    }

    .detail-cover {
        width: 160px;
        height: 226px;
    }

    .watch-card,
    .detail-card {
        padding: 16px;
    }
}
