:root {
    --color-red-50: #fef2f2;
    --color-red-100: #fee2e2;
    --color-red-500: #ef4444;
    --color-red-600: #dc2626;
    --color-red-700: #b91c1c;
    --color-red-800: #991b1b;
    --color-stone-50: #fafaf9;
    --color-stone-100: #f5f5f4;
    --color-stone-200: #e7e5e4;
    --color-stone-500: #78716c;
    --color-stone-600: #57534e;
    --color-stone-700: #44403c;
    --color-stone-800: #292524;
    --color-stone-900: #1c1917;
    --shadow-soft: 0 10px 30px rgba(28, 25, 23, 0.08);
    --shadow-hover: 0 24px 55px rgba(28, 25, 23, 0.16);
}

body {
    background: var(--color-stone-50);
    color: var(--color-stone-800);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
    background: var(--color-stone-900);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--color-stone-200);
    box-shadow: 0 6px 20px rgba(28, 25, 23, 0.04);
    backdrop-filter: blur(18px);
}

.site-nav {
    max-width: 1280px;
    margin: 0 auto;
    min-height: 68px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: linear-gradient(135deg, var(--color-red-600), var(--color-red-800));
    font-weight: 900;
    box-shadow: 0 12px 26px rgba(220, 38, 38, 0.35);
}

.brand-title {
    display: block;
    font-size: 20px;
    line-height: 1.1;
    font-weight: 800;
    color: var(--color-stone-800);
}

.brand-subtitle {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--color-stone-500);
    font-style: normal;
}

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

.nav-link {
    color: var(--color-stone-600);
    font-size: 14px;
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--color-red-600);
}

.nav-search {
    width: 250px;
    display: flex;
    align-items: center;
    border: 1px solid var(--color-stone-200);
    background: var(--color-stone-50);
    border-radius: 12px;
    overflow: hidden;
}

.nav-search input {
    width: 100%;
    min-width: 0;
    padding: 9px 12px;
    color: var(--color-stone-700);
    outline: 0;
    background: transparent;
    font-size: 14px;
}

.nav-search button {
    padding: 9px 12px;
    color: var(--color-red-600);
    font-weight: 800;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    padding: 9px 10px;
    border-radius: 10px;
    color: var(--color-stone-700);
    background: var(--color-stone-100);
}

.mobile-menu {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 18px;
}

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

.mobile-menu .nav-search {
    width: 100%;
    margin: 8px 0 12px;
}

.mobile-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--color-stone-700);
    font-weight: 650;
}

.mobile-menu a:hover,
.mobile-menu a.is-active {
    color: var(--color-red-600);
    background: var(--color-red-50);
}

.main-page {
    min-height: 70vh;
}

.hero-carousel {
    position: relative;
    height: 78vh;
    min-height: 560px;
    overflow: hidden;
    background: var(--color-stone-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
    pointer-events: none;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.12));
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 100%;
    max-width: 1280px;
    transform: translateX(-50%);
    padding: 0 24px 84px;
    color: white;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    margin-bottom: 18px;
    color: white;
    background: var(--color-red-500);
    border-radius: 999px;
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.35);
}

.hero-content h1,
.hero-content h2 {
    max-width: 780px;
    margin: 0 0 18px;
    font-size: clamp(36px, 6vw, 70px);
    line-height: 1.03;
    font-weight: 900;
    letter-spacing: -0.04em;
    text-shadow: 0 12px 35px rgba(0, 0, 0, 0.55);
}

.hero-content h2 {
    font-size: clamp(32px, 5vw, 60px);
}

.hero-content p {
    max-width: 740px;
    margin-bottom: 28px;
    color: #e7e5e4;
    font-size: clamp(17px, 2.2vw, 22px);
    line-height: 1.65;
}

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

.button-primary,
.button-secondary,
.button-dark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.button-primary {
    color: white;
    background: var(--color-red-500);
    box-shadow: 0 14px 32px rgba(239, 68, 68, 0.32);
}

.button-primary:hover {
    background: var(--color-red-600);
    transform: translateY(-1px);
}

.button-secondary {
    color: white;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(12px);
}

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

.button-dark {
    color: white;
    background: var(--color-stone-900);
}

.button-dark:hover {
    background: var(--color-red-600);
    transform: translateY(-1px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    transform: translateY(-50%);
    color: white;
    background: rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(8px);
    font-size: 30px;
    line-height: 1;
    transition: background 0.2s ease, transform 0.2s ease;
}

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

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

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

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

.hero-dot {
    width: 42px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    transition: background 0.2s ease, width 0.2s ease;
}

.hero-dot.is-active {
    width: 62px;
    background: var(--color-red-500);
}

.section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 58px 24px 0;
}

.section:last-child {
    padding-bottom: 70px;
}

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

.section-heading h2,
.page-title h1 {
    color: var(--color-stone-800);
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-heading p,
.page-title p {
    margin-top: 8px;
    color: var(--color-stone-500);
    font-size: 16px;
    line-height: 1.7;
}

.section-more {
    flex: 0 0 auto;
    color: var(--color-red-600);
    font-weight: 800;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: white;
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: var(--color-stone-900);
}

.movie-grid.large .card-poster {
    aspect-ratio: 16 / 10;
}

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

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

.card-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.04));
}

.card-badge,
.card-year {
    position: absolute;
    top: 12px;
    padding: 4px 8px;
    border-radius: 8px;
    color: white;
    font-size: 12px;
    font-weight: 800;
}

.card-badge {
    left: 12px;
    background: var(--color-red-500);
}

.card-year {
    right: 12px;
    background: rgba(0, 0, 0, 0.68);
}

.card-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--color-red-600);
    background: white;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.25s ease, transform 0.25s ease;
    font-weight: 900;
}

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

.card-body {
    padding: 15px;
}

.card-body h3 {
    margin-bottom: 8px;
    color: var(--color-stone-800);
    font-size: 17px;
    line-height: 1.35;
    font-weight: 850;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-body p {
    min-height: 42px;
    color: var(--color-stone-600);
    font-size: 14px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.card-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--color-stone-100);
    color: var(--color-stone-600);
    font-size: 12px;
    font-weight: 700;
}

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

.category-card {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border-radius: 20px;
    padding: 24px;
    color: white;
    background: linear-gradient(135deg, var(--color-red-600), var(--color-red-800));
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:nth-child(2n) {
    background: linear-gradient(135deg, var(--color-stone-800), var(--color-red-700));
}

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

.category-card h3 {
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 900;
}

.category-card p {
    max-width: 92%;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.65;
}

.category-card span {
    position: absolute;
    right: 22px;
    bottom: 18px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.72);
}

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

.rank-card {
    display: grid;
    grid-template-columns: 62px 116px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: white;
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.rank-number {
    color: var(--color-red-600);
    font-size: 28px;
    line-height: 1;
    font-weight: 950;
    text-align: center;
}

.rank-card img {
    width: 116px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 14px;
}

.rank-content h3 {
    margin-bottom: 8px;
    color: var(--color-stone-800);
    font-size: 18px;
    font-weight: 850;
}

.rank-content p {
    color: var(--color-stone-600);
    font-size: 14px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.page-hero {
    background: linear-gradient(135deg, var(--color-red-600), var(--color-red-800));
    color: white;
}

.page-hero-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 58px 24px;
}

.page-hero h1 {
    margin-bottom: 12px;
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 760px;
    color: var(--color-red-50);
    font-size: 18px;
    line-height: 1.75;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 160px 160px 160px;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid var(--color-stone-200);
    border-radius: 18px;
    background: white;
    box-shadow: var(--shadow-soft);
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--color-stone-200);
    border-radius: 12px;
    color: var(--color-stone-700);
    background: var(--color-stone-50);
    outline: 0;
}

.empty-state {
    display: none;
    padding: 60px 24px;
    text-align: center;
    color: var(--color-stone-500);
    background: white;
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
}

.empty-state.is-visible {
    display: block;
}

.detail-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 34px 24px 70px;
}

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

.breadcrumbs a {
    color: var(--color-red-600);
    font-weight: 750;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.26);
}

.movie-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-panel {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(220, 38, 38, 0.25), rgba(0, 0, 0, 0.62));
    transition: opacity 0.25s ease;
}

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

.play-cover {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: white;
    font-weight: 900;
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}

.play-cover span:first-child {
    width: 78px;
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--color-red-600);
    background: white;
    font-size: 28px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.player-message {
    min-height: 24px;
    margin-top: 10px;
    color: var(--color-stone-500);
    font-size: 14px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 26px;
    margin-top: 28px;
}

.detail-card,
.side-card {
    border-radius: 22px;
    background: white;
    box-shadow: var(--shadow-soft);
}

.detail-card {
    padding: 28px;
}

.detail-card h1 {
    margin-bottom: 18px;
    color: var(--color-stone-800);
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.16;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--color-stone-200);
}

.detail-meta span,
.tag-list a,
.tag-list span {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border-radius: 999px;
    color: var(--color-stone-700);
    background: var(--color-stone-100);
    font-size: 13px;
    font-weight: 750;
}

.detail-meta span:first-child {
    color: var(--color-red-700);
    background: var(--color-red-100);
}

.detail-block {
    margin-top: 24px;
}

.detail-block h2,
.detail-block h3,
.side-card h2 {
    margin-bottom: 12px;
    color: var(--color-stone-800);
    font-size: 22px;
    font-weight: 900;
}

.detail-block p {
    color: var(--color-stone-700);
    font-size: 16px;
    line-height: 1.9;
    white-space: pre-line;
}

.review-box {
    padding: 18px;
    border-radius: 16px;
    background: var(--color-stone-50);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.side-card {
    padding: 20px;
    position: sticky;
    top: 94px;
}

.side-cover {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 18px;
}

.related-list {
    display: grid;
    gap: 14px;
}

.related-item {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    background: var(--color-stone-50);
    transition: background 0.2s ease, transform 0.2s ease;
}

.related-item:hover {
    background: var(--color-red-50);
    transform: translateX(2px);
}

.related-item img {
    width: 96px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 12px;
}

.related-item h3 {
    margin-bottom: 5px;
    color: var(--color-stone-800);
    font-size: 15px;
    font-weight: 850;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-item p {
    color: var(--color-stone-500);
    font-size: 12px;
}

.site-footer {
    background: var(--color-stone-900);
    color: white;
}

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

.footer-title {
    margin-bottom: 12px;
    font-size: 21px;
    font-weight: 900;
}

.footer-inner p,
.footer-inner a {
    color: #a8a29e;
    line-height: 1.8;
}

.footer-inner a:hover {
    color: white;
}

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

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 24px;
    color: #a8a29e;
    text-align: center;
    font-size: 14px;
}

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

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

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

    .side-card {
        position: static;
    }
}

@media (max-width: 900px) {
    .desktop-nav,
    .site-nav > .nav-search {
        display: none;
    }

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

    .hero-carousel {
        height: 72vh;
        min-height: 500px;
    }

    .hero-arrow {
        display: none;
    }

    .ranking-list {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 640px) {
    .site-nav {
        padding: 0 16px;
    }

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

    .brand-subtitle {
        display: none;
    }

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

    .hero-content {
        padding: 0 18px 74px;
    }

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

    .section,
    .detail-shell,
    .page-hero-inner {
        padding-left: 16px;
        padding-right: 16px;
    }

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

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

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

    .rank-card {
        grid-template-columns: 46px 96px 1fr;
        gap: 10px;
    }

    .rank-card img {
        width: 96px;
    }

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

    .detail-card {
        padding: 20px;
    }
}
