* {
    box-sizing: border-box;
}

:root {
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --text: #111827;
    --muted: #6b7280;
    --soft: #f3f4f6;
    --line: #e5e7eb;
    --card: #ffffff;
    --page: #f8fafc;
    --shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 24px 50px rgba(15, 23, 42, 0.16);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--page);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
}

.nav-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

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

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--blue), #60a5fa);
    color: #fff;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.12;
}

.brand-title {
    font-size: 21px;
    letter-spacing: -0.03em;
}

.brand-subtitle {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

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

.nav-link,
.mobile-link {
    display: inline-flex;
    align-items: center;
    border-radius: 11px;
    color: #374151;
    font-size: 14px;
    font-weight: 650;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-link {
    padding: 10px 14px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    background: #dbeafe;
    color: #1d4ed8;
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-button span {
    width: 21px;
    height: 2px;
    border-radius: 2px;
    background: #374151;
}

.mobile-nav {
    display: none;
    padding: 8px 20px 16px;
    border-top: 1px solid var(--line);
    background: #fff;
}

.mobile-link {
    width: 100%;
    padding: 12px;
}

.hero {
    position: relative;
    height: 60vh;
    min-height: 480px;
    overflow: hidden;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    transition: opacity 0.7s ease, transform 1s ease;
    transform: scale(1.03);
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
}

.hero-content h1 {
    max-width: 760px;
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 70px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 24px;
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1.78;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-badge {
    width: fit-content;
    margin-bottom: 18px;
    padding: 9px 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.9);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    backdrop-filter: blur(12px);
}

.hero-badge a {
    color: #fff;
}

.star {
    color: #fde047;
}

.split {
    color: rgba(255, 255, 255, 0.7);
}

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

.hero-tags span,
.detail-tags span,
.page-tags span {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 13px;
    font-weight: 650;
    backdrop-filter: blur(10px);
}

.hero-actions,
.detail-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.primary-button,
.ghost-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
    padding: 12px 28px;
    background: var(--blue);
    color: #fff;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.32);
}

.primary-button:hover {
    background: var(--blue-dark);
    transform: translateY(-1px);
}

.ghost-button {
    padding: 12px 22px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    backdrop-filter: blur(10px);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.48);
    color: #fff;
    cursor: pointer;
    font-size: 34px;
    line-height: 1;
    backdrop-filter: blur(10px);
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

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

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

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

.main-wrap,
.page-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 38px 20px 70px;
}

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

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

.section-heading h2,
.page-title h1,
.detail-copy h1 {
    margin: 0;
    color: #111827;
    letter-spacing: -0.035em;
}

.section-heading h2 {
    font-size: clamp(25px, 3vw, 36px);
}

.section-heading p,
.page-title p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.section-more {
    padding: 10px 16px;
    background: #eff6ff;
    color: #1d4ed8;
    white-space: nowrap;
}

.section-more:hover {
    background: #dbeafe;
}

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

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

.movie-card {
    min-width: 0;
}

.movie-card-link,
.category-card,
.review-row,
.rank-row,
.related-card {
    display: block;
    background: var(--card);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card-link:hover,
.category-card:hover,
.review-row:hover,
.rank-row:hover,
.related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.poster-frame {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #e5e7eb;
}

.movie-card-feature .poster-frame {
    aspect-ratio: 16 / 9;
}

.poster-frame img,
.category-thumbs img,
.review-thumb img,
.rank-row img,
.related-card img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-card-link:hover .poster-frame img,
.category-card:hover .category-thumbs img,
.review-row:hover .review-thumb img,
.related-card:hover img {
    transform: scale(1.08);
}

.poster-frame::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 38%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent);
}

.poster-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 12px;
    font-weight: 750;
    backdrop-filter: blur(8px);
}

.poster-badge-type {
    top: 9px;
    right: 9px;
}

.poster-badge-year {
    left: 9px;
    bottom: 9px;
}

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

.movie-card-body h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.movie-card-link:hover h3,
.review-row:hover h3,
.related-card:hover h3 {
    color: var(--blue);
}

.movie-card-body p,
.related-card p {
    margin: 0 0 12px;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
}

.movie-card-meta span:first-child {
    min-width: 0;
    padding: 5px 8px;
    border-radius: 8px;
    background: var(--soft);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.horizontal-rail {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 14px;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.horizontal-rail::-webkit-scrollbar {
    display: none;
}

.rail-item {
    flex: 0 0 220px;
}

.scroll-actions {
    display: flex;
    gap: 8px;
}

.scroll-actions button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #374151;
    font-size: 28px;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.review-row {
    display: flex;
    gap: 18px;
    padding: 16px;
    margin-bottom: 16px;
}

.review-thumb {
    position: relative;
    flex: 0 0 170px;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    background: #e5e7eb;
}

.review-thumb span {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 5px 8px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.72);
    color: #fde047;
    font-size: 12px;
    font-weight: 800;
}

.review-body {
    min-width: 0;
    flex: 1;
}

.review-body h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.review-body p {
    margin: 0 0 12px;
    color: #4b5563;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.review-meta,
.detail-meta,
.rank-info em {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.review-meta span,
.detail-meta span,
.page-tags span {
    padding: 6px 9px;
    border-radius: 9px;
    background: var(--soft);
}

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

.category-thumbs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e5e7eb;
}

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

.category-card-body h3 {
    margin: 0 0 8px;
    font-size: 19px;
}

.category-card-body p {
    margin: 0;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.65;
}

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

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

.rank-row {
    display: grid;
    grid-template-columns: 42px 72px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
}

.rank-number {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: #eff6ff;
    color: var(--blue);
    font-weight: 900;
}

.rank-row img {
    width: 72px;
    height: 96px;
    border-radius: 12px;
    background: #e5e7eb;
}

.rank-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

.rank-score {
    color: #d97706;
    font-weight: 900;
}

.filter-panel {
    margin-bottom: 28px;
    padding: 14px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow);
}

.search-box {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border-radius: 14px;
    background: var(--soft);
}

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

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

.filter-select {
    min-height: 48px;
    padding: 0 14px;
    border-radius: 14px;
    background: var(--soft);
    cursor: pointer;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 36%), #ffffff;
    border-bottom: 1px solid var(--line);
}

.page-title {
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px 20px 38px;
}

.page-title h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.page-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.page-tags span {
    background: #eff6ff;
    color: #1d4ed8;
}

.detail-hero-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 20px;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-poster {
    aspect-ratio: 3 / 4;
    border-radius: 24px;
    overflow: hidden;
    background: #e5e7eb;
    box-shadow: var(--shadow-lg);
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumbs a:hover {
    color: var(--blue);
}

.detail-copy h1 {
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.08;
}

.detail-copy .lead {
    margin: 18px 0 20px;
    color: #374151;
    font-size: 18px;
    line-height: 1.75;
}

.detail-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 18px 0 22px;
}

.detail-tags span {
    background: #dbeafe;
    color: #1d4ed8;
}

.player-card {
    margin-bottom: 42px;
    overflow: hidden;
    border-radius: 24px;
    background: #0f172a;
    box-shadow: var(--shadow-lg);
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: rgba(2, 6, 23, 0.28);
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-ring {
    width: 92px;
    height: 92px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.94);
    color: #fff;
    font-size: 40px;
    box-shadow: 0 20px 48px rgba(37, 99, 235, 0.38);
    transition: transform 0.2s ease;
}

.player-overlay:hover .play-ring {
    transform: scale(1.08);
}

.player-title {
    padding: 18px 22px 20px;
    color: #fff;
}

.player-title h2 {
    margin: 0 0 6px;
    font-size: 22px;
}

.player-title p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.65;
}

.article-block {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    align-items: start;
}

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

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

.text-card p {
    margin: 0 0 18px;
    color: #374151;
    line-height: 1.9;
    font-size: 16px;
}

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

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

.related-card img {
    aspect-ratio: 16 / 10;
    background: #e5e7eb;
}

.related-card div {
    padding: 14px;
}

.related-card h3 {
    margin: 0 0 8px;
    font-size: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.site-footer {
    background: #111827;
    color: #9ca3af;
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 20px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
}

.footer-brand {
    margin-bottom: 12px;
    color: #fff;
    font-size: 22px;
}

.site-footer p {
    max-width: 420px;
    margin: 0;
    line-height: 1.75;
}

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

.footer-links {
    display: grid;
    gap: 10px;
}

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

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 20px 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
}

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

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

    .feature-grid,
    .rank-list,
    .article-block {
        grid-template-columns: 1fr;
    }

    .detail-hero-inner {
        grid-template-columns: 240px minmax(0, 1fr);
    }
}

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

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

    .mobile-nav.is-open {
        display: grid;
        gap: 4px;
    }

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

    .hero-arrow {
        display: none;
    }

    .hero-content p {
        font-size: 16px;
        -webkit-line-clamp: 4;
    }

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

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

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

    .detail-poster {
        max-width: 300px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .nav-wrap {
        padding: 12px 14px;
    }

    .brand-title {
        font-size: 18px;
    }

    .hero {
        min-height: 600px;
    }

    .hero-content,
    .main-wrap,
    .page-wrap,
    .page-title,
    .detail-hero-inner {
        padding-left: 14px;
        padding-right: 14px;
    }

    .movie-grid,
    .feature-grid,
    .category-grid,
    .related-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

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

    .movie-card-body h3 {
        font-size: 15px;
    }

    .movie-card-body p,
    .movie-card-meta {
        font-size: 12px;
    }

    .review-row {
        gap: 12px;
        padding: 12px;
    }

    .review-thumb {
        flex-basis: 110px;
    }

    .review-body h3 {
        font-size: 16px;
    }

    .review-body p {
        -webkit-line-clamp: 2;
        font-size: 13px;
    }

    .rank-row {
        grid-template-columns: 32px 54px minmax(0, 1fr) auto;
        gap: 8px;
    }

    .rank-row img {
        width: 54px;
        height: 72px;
    }

    .rank-info em {
        display: none;
    }

    .play-ring {
        width: 72px;
        height: 72px;
        font-size: 32px;
    }
}
