:root {
    --red-900: #7f1d1d;
    --red-800: #991b1b;
    --red-700: #b91c1c;
    --red-600: #dc2626;
    --red-500: #ef4444;
    --red-100: #fee2e2;
    --gray-950: #030712;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.10);
    --shadow-lg: 0 20px 48px rgba(15, 23, 42, 0.16);
    --radius: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--gray-50);
    color: var(--gray-900);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(229, 231, 235, 0.95);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(14px);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 68px;
}

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

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    color: var(--white);
    background: linear-gradient(135deg, var(--red-500), var(--red-800));
    box-shadow: 0 12px 22px rgba(220, 38, 38, 0.25);
}

.brand-name {
    font-size: 20px;
}

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

.main-nav a,
.nav-dropdown > button {
    border: 0;
    background: transparent;
    color: var(--gray-700);
    cursor: pointer;
    font-weight: 600;
    padding: 10px 2px;
    transition: color 0.18s ease;
}

.main-nav a:hover,
.nav-dropdown > button:hover {
    color: var(--red-600);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-panel {
    position: absolute;
    top: 100%;
    right: 0;
    display: grid;
    min-width: 180px;
    padding: 10px;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: all 0.18s ease;
}

.nav-dropdown:hover .nav-dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-panel a {
    padding: 9px 12px;
    border-radius: 10px;
}

.nav-dropdown-panel a:hover {
    background: var(--red-100);
}

.top-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 280px;
}

.top-search input,
.filter-bar input,
.filter-bar select,
.search-panel input {
    width: 100%;
    border: 1px solid var(--gray-300);
    border-radius: 999px;
    background: var(--white);
    padding: 10px 14px;
    color: var(--gray-900);
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.top-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus,
.search-panel input:focus {
    border-color: var(--red-500);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.top-search button,
.primary-button,
.secondary-button,
.player-button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.top-search button,
.primary-button,
.player-button {
    color: var(--white);
    background: linear-gradient(135deg, var(--red-500), var(--red-700));
    box-shadow: 0 12px 26px rgba(220, 38, 38, 0.24);
}

.secondary-button {
    color: var(--red-700);
    background: var(--white);
}

.top-search button:hover,
.primary-button:hover,
.secondary-button:hover,
.player-button:hover {
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    background: var(--white);
    margin-left: auto;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--gray-800);
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 70px 0 62px;
    color: var(--white);
    background:
        radial-gradient(circle at top left, rgba(248, 113, 113, 0.38), transparent 34%),
        linear-gradient(120deg, var(--red-900), var(--red-700) 48%, var(--gray-950));
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.14), transparent),
        radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.12), transparent 28%);
    pointer-events: none;
}

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

.hero-copy {
    max-width: 800px;
    margin: 0 auto 34px;
    text-align: center;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    border-radius: 999px;
    padding: 7px 14px;
    background: rgba(255, 255, 255, 0.15);
    color: #ffe4e6;
    font-size: 14px;
    font-weight: 800;
}

.hero h1,
.page-hero h1 {
    margin: 0;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.hero p,
.page-hero p {
    margin: 18px auto 0;
    color: #fee2e2;
    font-size: clamp(16px, 2vw, 20px);
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-auto-rows: 190px;
    gap: 16px;
}

.hero-card {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    border-radius: var(--radius);
    background: var(--gray-800);
    box-shadow: var(--shadow-lg);
}

.hero-card:first-child {
    grid-column: span 3;
    grid-row: span 2;
}

.hero-card img,
.movie-card img,
.feature-card img,
.small-card img,
.related-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.2s ease;
}

.hero-card:hover img,
.movie-card:hover img,
.feature-card:hover img,
.related-card:hover img {
    transform: scale(1.08);
}

.hero-card::after,
.feature-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.10) 55%, transparent);
}

.hero-card-content {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 2;
}

.hero-card h2,
.hero-card h3 {
    margin: 0 0 8px;
    font-size: 22px;
    line-height: 1.22;
}

.hero-card:first-child h2 {
    font-size: clamp(26px, 4vw, 40px);
}

.hero-card p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--gray-200);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.section {
    padding: 54px 0;
}

.section.white {
    background: var(--white);
}

.section.soft {
    background: linear-gradient(180deg, var(--gray-50), var(--white));
}

.section.red-soft {
    background: #fff1f2;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.03em;
}

.section-head p {
    margin: 6px 0 0;
    color: var(--gray-600);
}

.text-link {
    color: var(--red-600);
    font-weight: 800;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 150px;
    border-radius: var(--radius);
    padding: 24px;
    color: var(--white);
    background: linear-gradient(135deg, var(--red-500), var(--red-800));
    box-shadow: var(--shadow-md);
}

.category-tile::after {
    content: "";
    position: absolute;
    width: 130px;
    height: 130px;
    right: -46px;
    bottom: -46px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.category-tile h2,
.category-tile h3 {
    position: relative;
    z-index: 2;
    margin: 0 0 10px;
    font-size: 24px;
}

.category-tile p {
    position: relative;
    z-index: 2;
    margin: 0;
    color: #ffe4e6;
}

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

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

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

.poster-wrap {
    position: relative;
    height: 210px;
    overflow: hidden;
    background: var(--gray-200);
}

.category-pill,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.category-pill {
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    color: var(--white);
    background: rgba(220, 38, 38, 0.92);
}

.rank-badge {
    left: 12px;
    top: 12px;
    display: grid;
    min-width: 34px;
    height: 34px;
    place-items: center;
    color: var(--white);
    background: linear-gradient(135deg, #f97316, var(--red-600));
    box-shadow: var(--shadow-sm);
}

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

.movie-card h3 {
    display: -webkit-box;
    overflow: hidden;
    min-height: 48px;
    margin: 0 0 9px;
    font-size: 18px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: var(--gray-500);
    font-size: 13px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.tag-row span,
.detail-tags span {
    border-radius: 999px;
    padding: 5px 9px;
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: 12px;
}

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

.horizontal-row .movie-card {
    flex: 0 0 285px;
    scroll-snap-align: start;
}

.feature-list {
    display: grid;
    gap: 18px;
}

.feature-item {
    display: grid;
    grid-template-columns: 310px 1fr;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.feature-item img {
    width: 100%;
    height: 100%;
    min-height: 230px;
    object-fit: cover;
}

.feature-item-content {
    padding: 26px;
}

.feature-item h3 {
    margin: 0 0 10px;
    font-size: 24px;
}

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

.feature-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.feature-meta span {
    border-radius: 999px;
    padding: 6px 11px;
    background: var(--red-100);
    color: var(--red-800);
    font-size: 13px;
    font-weight: 800;
}

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

.small-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 92px;
    border-radius: var(--radius-sm);
    background: var(--white);
    padding: 12px;
    box-shadow: var(--shadow-md);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

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

.small-card img {
    flex: 0 0 96px;
    width: 96px;
    height: 66px;
    border-radius: 10px;
    object-fit: cover;
}

.small-card strong {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 4px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.small-card em {
    color: var(--gray-500);
    font-size: 13px;
    font-style: normal;
}

.small-rank {
    display: grid;
    flex: 0 0 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    color: var(--white);
    background: var(--red-600);
    font-weight: 900;
}

.page-hero {
    padding: 56px 0;
    color: var(--white);
    background:
        radial-gradient(circle at 15% 15%, rgba(248, 113, 113, 0.45), transparent 32%),
        linear-gradient(125deg, var(--red-900), var(--red-700) 52%, var(--gray-950));
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--white);
}

.filter-bar,
.search-panel {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 12px;
    margin-bottom: 26px;
    border-radius: var(--radius);
    background: var(--white);
    padding: 16px;
    box-shadow: var(--shadow-md);
}

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

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

.detail-main,
.detail-side {
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.detail-content {
    padding: 26px;
}

.detail-content h1 {
    margin: 0 0 14px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 24px;
}

.detail-meta span {
    border-radius: 999px;
    padding: 7px 12px;
    background: var(--gray-100);
    color: var(--gray-700);
    font-weight: 700;
    font-size: 13px;
}

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

.detail-section {
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

.detail-section + .detail-section {
    margin-top: 24px;
}

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

.detail-section p {
    margin: 0 0 14px;
    color: var(--gray-700);
}

.review-box {
    border-left: 5px solid var(--red-600);
    border-radius: 14px;
    background: #fff1f2;
    padding: 18px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-side {
    position: sticky;
    top: 92px;
    padding: 18px;
}

.detail-side h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

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

.related-card {
    display: grid;
    grid-template-columns: 104px 1fr;
    gap: 12px;
    align-items: center;
    overflow: hidden;
    border-radius: 14px;
    padding: 8px;
    background: var(--gray-50);
    transition: background 0.18s ease;
}

.related-card:hover {
    background: var(--red-100);
}

.related-card img {
    width: 104px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
}

.related-card strong {
    display: -webkit-box;
    overflow: hidden;
    color: var(--gray-900);
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-card em {
    display: block;
    margin-top: 4px;
    color: var(--gray-600);
    font-size: 13px;
    font-style: normal;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
    background: #000;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.28);
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

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

.player-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
}

.player-button::before {
    content: "▶";
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 34px;
}

.footer-brand {
    color: var(--white);
    font-size: 24px;
}

.site-footer p {
    max-width: 480px;
    color: var(--gray-300);
}

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

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

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

.footer-bottom {
    margin-top: 34px;
    border-top: 1px solid var(--gray-800);
    padding: 20px 16px;
    text-align: center;
    color: var(--gray-500);
}

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

@media (max-width: 980px) {
    .header-inner {
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .menu-toggle {
        display: block;
    }

    .main-nav,
    .top-search {
        display: none;
        width: 100%;
    }

    .main-nav.is-open,
    .top-search.is-open {
        display: grid;
    }

    .main-nav {
        order: 3;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .nav-dropdown {
        display: none;
    }

    .top-search {
        order: 4;
        grid-template-columns: 1fr auto;
    }

    .hero-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 210px;
    }

    .hero-card:first-child {
        grid-column: span 2;
        grid-row: span 1;
    }

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

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

    .detail-side {
        position: static;
    }

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

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

    .hero {
        padding: 44px 0;
    }

    .hero-grid,
    .category-grid,
    .movie-grid,
    .ranking-grid,
    .filter-bar,
    .search-panel {
        grid-template-columns: 1fr;
    }

    .hero-card,
    .hero-card:first-child {
        min-height: 230px;
    }

    .section-head {
        display: block;
    }

    .poster-wrap {
        height: 235px;
    }

    .feature-item img {
        min-height: 210px;
    }

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