:root {
    color-scheme: light;
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --orange-500: #f97316;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --black: #000000;
    --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.18);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --max-width: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: linear-gradient(180deg, var(--gray-50), var(--gray-100));
    color: var(--gray-900);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--amber-600), var(--orange-500));
    color: var(--white);
    box-shadow: 0 10px 30px rgba(180, 83, 9, 0.22);
}

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

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 24px;
    letter-spacing: -0.04em;
}

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.22);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.logo-mark::before {
    content: "";
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 13px solid var(--white);
    margin-left: 3px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    font-weight: 700;
}

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

.main-nav a:hover,
.main-nav a.is-current {
    color: var(--amber-100);
    opacity: 1;
}

.menu-toggle {
    display: none;
    border: 0;
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 9px 12px;
}

.mobile-nav {
    display: none;
    padding: 0 0 14px;
}

.mobile-nav a {
    display: block;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 700;
}

.mobile-nav a:hover {
    background: rgba(255, 255, 255, 0.16);
}

.hero {
    position: relative;
    height: 500px;
    overflow: hidden;
    background: var(--gray-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.9s ease;
}

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

.hero-slide a {
    display: block;
    height: 100%;
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.50) 45%, rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    color: var(--white);
    padding: 42px 0 56px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.22);
    border: 1px solid rgba(245, 158, 11, 0.35);
    backdrop-filter: blur(10px);
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 14px;
}

.hero h1,
.hero h2 {
    margin: 0 0 14px;
    max-width: 780px;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero p {
    margin: 0;
    max-width: 720px;
    font-size: clamp(17px, 2vw, 22px);
    color: rgba(255, 255, 255, 0.90);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 26px;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 700;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: var(--white);
    background: var(--amber-600);
    box-shadow: 0 12px 26px rgba(217, 119, 6, 0.32);
}

.btn-primary:hover {
    background: var(--amber-700);
}

.btn-light {
    color: var(--white);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    color: var(--white);
    background: rgba(0, 0, 0, 0.48);
    transition: background 0.2s ease;
}

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

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

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

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

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

.hero-dot.is-active {
    width: 34px;
    background: var(--white);
}

.main-content {
    padding: 52px 0 0;
}

.page-hero {
    padding: 48px 0 18px;
}

.page-hero-card {
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--white), var(--amber-50));
    padding: clamp(24px, 4vw, 42px);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(217, 119, 6, 0.10);
}

.page-hero h1 {
    margin: 0 0 10px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.page-hero p {
    margin: 0;
    max-width: 840px;
    color: var(--gray-600);
    font-size: 17px;
}

.section {
    margin-bottom: 58px;
}

.section-shell {
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-md);
    padding: clamp(20px, 3vw, 32px);
}

.section-shell.tint {
    background: linear-gradient(90deg, var(--amber-50), #fff7ed);
}

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

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.section-icon {
    color: var(--amber-600);
    font-size: 28px;
}

.more-link {
    color: var(--amber-700);
    font-weight: 800;
}

.horizontal-row {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 4px 4px 18px;
    scroll-snap-type: x proximity;
}

.horizontal-row .movie-card {
    width: 272px;
    min-width: 272px;
    scroll-snap-align: start;
}

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

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

.movie-card {
    display: block;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--gray-200);
}

.poster-wrap.tall {
    aspect-ratio: 3 / 4;
}

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

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

.card-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    background: rgba(0, 0, 0, 0);
    opacity: 0;
    font-size: 38px;
    transition: opacity 0.25s ease, background 0.25s ease;
}

.movie-card:hover .card-play {
    opacity: 1;
    background: rgba(0, 0, 0, 0.32);
}

.card-body {
    padding: 14px;
}

.card-title {
    margin: 0;
    color: var(--gray-900);
    font-size: 16px;
    line-height: 1.35;
    font-weight: 800;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.card-desc {
    margin: 8px 0 0;
    color: var(--gray-600);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
}

.card-meta {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--gray-500);
    font-size: 12px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--amber-100);
    color: var(--amber-700);
    font-size: 12px;
    font-weight: 800;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    padding: 24px;
    min-height: 180px;
    background: linear-gradient(135deg, var(--white), var(--amber-50));
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(217, 119, 6, 0.10);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 12px;
    font-size: 24px;
}

.category-card p {
    margin: 0 0 18px;
    color: var(--gray-600);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 54px 88px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.rank-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--amber-600);
    color: var(--white);
    font-weight: 900;
}

.rank-poster {
    width: 88px;
    height: 58px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-title {
    margin: 0;
    font-size: 18px;
    font-weight: 900;
}

.rank-meta {
    margin-top: 4px;
    color: var(--gray-500);
    font-size: 14px;
}

.rank-score {
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--amber-50);
    color: var(--amber-700);
    font-weight: 900;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px;
    gap: 14px;
    margin: 24px 0 28px;
}

.search-input,
.filter-select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    padding: 0 16px;
    color: var(--gray-800);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    outline: none;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 28px 0 18px;
    color: var(--gray-500);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--amber-700);
    font-weight: 800;
}

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

.player-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--black);
    box-shadow: var(--shadow-lg);
}

.player-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--black);
}

.player-frame video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--black);
}

.player-overlay {
    position: absolute;
    inset: 0;
    border: 0;
    color: var(--white);
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.70), rgba(0, 0, 0, 0.20));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 2;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-button-icon {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--amber-600);
    box-shadow: 0 20px 38px rgba(217, 119, 6, 0.35);
    font-size: 32px;
    padding-left: 5px;
}

.player-title {
    margin: 0;
    padding: 18px 20px 20px;
    color: var(--white);
    font-size: 22px;
    background: linear-gradient(90deg, rgba(217, 119, 6, 0.32), rgba(249, 115, 22, 0.20));
}

.detail-panel {
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.detail-cover {
    aspect-ratio: 16 / 11;
    width: 100%;
    object-fit: cover;
}

.detail-panel-body {
    padding: 20px;
}

.detail-panel h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.meta-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.meta-list div {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
}

.meta-list dt {
    color: var(--gray-500);
    font-weight: 800;
}

.meta-list dd {
    margin: 0;
    color: var(--gray-800);
}

.article-block {
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-md);
    padding: clamp(20px, 3vw, 32px);
    margin-top: 28px;
}

.article-block h2 {
    margin: 0 0 14px;
    font-size: 24px;
    border-left: 4px solid var(--amber-600);
    padding-left: 12px;
}

.article-block p {
    margin: 0;
    color: var(--gray-700);
    font-size: 16px;
}

.site-footer {
    margin-top: 72px;
    background: var(--gray-900);
    color: var(--gray-300);
}

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

.site-footer h3 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 18px;
}

.site-footer p,
.site-footer li {
    margin: 0;
    color: var(--gray-300);
    font-size: 14px;
}

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

.footer-links a:hover {
    color: var(--amber-500);
}

.footer-bottom {
    padding: 22px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    color: var(--gray-500);
    font-size: 14px;
}

.back-top {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 40;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: var(--white);
    background: var(--amber-600);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.back-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.empty-state {
    display: none;
    border-radius: var(--radius-md);
    padding: 28px;
    text-align: center;
    color: var(--gray-600);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

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

[hidden] {
    display: none !important;
}

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

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

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

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

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

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

    .logo {
        font-size: 20px;
    }

    .hero {
        height: 420px;
    }

    .hero-content {
        padding: 32px 0 48px;
    }

    .hero-arrow {
        display: none;
    }

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

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

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

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

    .rank-item {
        grid-template-columns: 42px 74px 1fr;
    }

    .rank-score {
        grid-column: 3;
        justify-self: start;
    }

    .rank-poster {
        width: 74px;
        height: 52px;
    }

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

@media (max-width: 480px) {
    .container {
        width: min(100% - 22px, var(--max-width));
    }

    .hero {
        height: 390px;
    }

    .card-body {
        padding: 12px;
    }

    .card-title {
        font-size: 15px;
    }

    .card-desc {
        font-size: 13px;
        min-height: 38px;
    }
}
