:root {
    --red-900: #7f1d1d;
    --red-800: #991b1b;
    --red-700: #b91c1c;
    --red-600: #dc2626;
    --yellow-400: #facc15;
    --yellow-500: #eab308;
    --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;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 8px 18px rgba(15, 23, 42, 0.12);
    --shadow-xl: 0 22px 45px rgba(15, 23, 42, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--gray-800);
    background: var(--gray-50);
    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: 80;
    background: linear-gradient(90deg, var(--red-600), var(--red-700));
    color: var(--white);
    box-shadow: var(--shadow-md);
}

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

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

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: var(--gray-900);
    background: var(--yellow-400);
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.16);
}

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

.nav-link {
    padding: 8px 0;
    color: rgba(255, 255, 255, 0.92);
    transition: color 0.18s ease;
}

.nav-link:hover,
.nav-link.active,
.brand:hover {
    color: var(--yellow-400);
}

.menu-toggle {
    display: none;
    border: 0;
    color: var(--white);
    background: transparent;
    font-size: 28px;
    line-height: 1;
}

.mobile-panel {
    display: none;
    padding: 10px 16px 18px;
    background: var(--red-700);
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.mobile-panel a {
    display: block;
    padding: 11px 0;
    font-weight: 650;
    color: rgba(255, 255, 255, 0.95);
}

.mobile-panel.open {
    display: block;
}

.hero-slider {
    position: relative;
    min-height: 540px;
    color: var(--white);
    overflow: hidden;
    background: linear-gradient(135deg, var(--red-900), var(--red-700) 50%, var(--red-900));
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.15) contrast(1.05);
    opacity: 0.34;
    transform: scale(1.06);
}

.hero-bg::after,
.hero-bg::before {
    content: "";
    position: absolute;
    inset: 0;
}

.hero-bg::before {
    background: radial-gradient(circle at 78% 48%, rgba(250, 204, 21, 0.22), transparent 30%);
}

.hero-bg::after {
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(127, 29, 29, 0.72) 56%, rgba(17, 24, 39, 0.45));
}

.hero-layout {
    position: relative;
    min-height: 540px;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(240px, 360px);
    align-items: center;
    gap: 44px;
    padding: 60px 0;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--yellow-400);
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.hero-title {
    margin: 20px 0 18px;
    max-width: 760px;
    font-size: clamp(42px, 6vw, 70px);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-title span {
    color: var(--yellow-400);
}

.hero-desc {
    max-width: 720px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 20px;
}

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

.hero-tags span,
.tag-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.94);
    font-size: 14px;
    font-weight: 650;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 20px;
    border-radius: 12px;
    border: 0;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

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

.btn-primary {
    color: var(--gray-900);
    background: var(--yellow-400);
    box-shadow: 0 14px 28px rgba(250, 204, 21, 0.22);
}

.btn-primary:hover {
    background: var(--yellow-500);
}

.btn-ghost {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

.hero-poster-card {
    position: relative;
    width: min(100%, 350px);
    margin-left: auto;
    border-radius: 26px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.11);
    box-shadow: var(--shadow-xl);
    transform: rotate(1.4deg);
}

.hero-poster-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.hero-poster-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(17, 24, 39, 0.85));
}

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

.hero-poster-info strong {
    display: block;
    font-size: 20px;
}

.hero-poster-info small {
    color: rgba(255, 255, 255, 0.78);
}

.hero-dots {
    position: absolute;
    right: 50%;
    bottom: 26px;
    transform: translateX(50%);
    z-index: 3;
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.44);
}

.hero-dots button.active {
    width: 32px;
    background: var(--yellow-400);
}

.section {
    padding: 62px 0;
}

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

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

.section-title {
    margin: 0 0 8px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    color: var(--gray-900);
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-subtitle {
    max-width: 720px;
    margin: 0;
    color: var(--gray-600);
    font-size: 18px;
}

.feature-grid,
.category-grid,
.movie-grid,
.detail-related-grid {
    display: grid;
    gap: 18px;
}

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

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

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

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

.feature-card,
.category-card,
.movie-card,
.info-panel,
.player-panel,
.compact-card,
.detail-text,
.breadcrumbs,
.search-panel {
    background: var(--white);
    border: 1px solid rgba(209, 213, 219, 0.72);
    box-shadow: var(--shadow-sm);
}

.feature-card,
.category-card {
    padding: 24px;
    border-radius: 20px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.feature-card:hover,
.category-card:hover,
.movie-card:hover,
.compact-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.feature-icon,
.category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    border-radius: 16px;
    color: var(--red-700);
    background: #fee2e2;
    font-size: 24px;
}

.feature-card h2,
.category-card h2,
.info-panel h2,
.detail-text h2 {
    margin: 0 0 8px;
    color: var(--gray-900);
    font-size: 20px;
    font-weight: 850;
}

.feature-card p,
.category-card p,
.info-panel p {
    margin: 0;
    color: var(--gray-600);
}

.movie-card {
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

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

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

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

.play-mark {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--white);
    font-size: 40px;
    background: rgba(0, 0, 0, 0.0);
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
}

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

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 999px;
    color: var(--gray-900);
    background: var(--yellow-400);
    font-weight: 900;
    box-shadow: var(--shadow-sm);
}

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

.movie-card h2,
.compact-card h2 {
    display: -webkit-box;
    margin: 0 0 4px;
    overflow: hidden;
    color: var(--gray-900);
    font-size: 16px;
    line-height: 1.35;
    font-weight: 800;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.movie-meta,
.movie-one-line,
.compact-card p {
    margin: 0;
    color: var(--gray-500);
    font-size: 13px;
}

.movie-one-line {
    display: -webkit-box;
    min-height: 38px;
    margin-top: 8px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 12px;
    margin: 26px 0 28px;
    padding: 14px;
    border-radius: 16px;
}

.site-search,
.year-filter {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--gray-300);
    border-radius: 12px;
    padding: 0 14px;
    color: var(--gray-800);
    background: var(--white);
    outline: none;
}

.site-search:focus,
.year-filter:focus {
    border-color: var(--red-600);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.page-hero {
    padding: 64px 0 48px;
    color: var(--white);
    background: radial-gradient(circle at 78% 18%, rgba(250, 204, 21, 0.2), transparent 30%), linear-gradient(135deg, var(--red-900), var(--red-700));
}

.page-hero h1 {
    max-width: 900px;
    margin: 0 0 14px;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 850px;
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 19px;
}

.ranking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 26px;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 62px 1fr 42px;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 15px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.compact-card img {
    width: 62px;
    height: 86px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--gray-200);
}

.compact-card span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: var(--gray-900);
    background: var(--yellow-400);
    font-weight: 900;
}

.breadcrumbs {
    margin: 24px auto;
    padding: 12px 16px;
    border-radius: 14px;
    color: var(--gray-600);
    font-size: 14px;
}

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

.detail-hero {
    color: var(--white);
    background: linear-gradient(135deg, var(--gray-900), var(--red-900));
}

.detail-hero-inner {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 30px;
    align-items: center;
    padding: 52px 0;
}

.detail-cover {
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: var(--gray-200);
}

.detail-title {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.detail-lead {
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 19px;
}

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

.player-panel,
.info-panel,
.detail-text {
    border-radius: 20px;
    overflow: hidden;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #000;
    box-shadow: var(--shadow-xl);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: var(--white);
    background: rgba(0, 0, 0, 0.45);
    cursor: pointer;
    transition: opacity 0.2s ease;
}

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

.player-cover span {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    color: var(--gray-900);
    background: var(--yellow-400);
    font-size: 32px;
    font-weight: 900;
    box-shadow: 0 20px 40px rgba(250, 204, 21, 0.22);
}

.detail-text {
    margin-top: 24px;
    padding: 26px;
}

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

.info-panel {
    padding: 22px;
}

.info-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-200);
}

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

.info-list dd {
    margin: 0;
    color: var(--gray-800);
    font-weight: 650;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.tag-list span {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--red-700);
    background: #fee2e2;
    font-size: 13px;
    font-weight: 700;
}

.no-results {
    display: none;
    padding: 32px;
    border-radius: 18px;
    color: var(--gray-600);
    background: var(--white);
    text-align: center;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr 1fr;
    gap: 28px;
    padding: 46px 0;
}

.footer-brand {
    margin-bottom: 12px;
    color: var(--white);
}

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

.site-footer p {
    margin: 0;
    color: var(--gray-300);
}

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

.footer-links a:hover {
    color: var(--yellow-400);
}

.footer-bottom {
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--gray-400);
    text-align: center;
}

.hidden-by-search {
    display: none !important;
}

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

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

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

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

    .main-nav {
        display: none;
    }

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

    .hero-slider,
    .hero-layout {
        min-height: 640px;
    }

    .hero-layout {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 42px 0 70px;
    }

    .hero-poster-card {
        width: min(70vw, 260px);
        margin: 0;
    }

    .hero-title {
        font-size: 42px;
    }

    .hero-desc {
        font-size: 17px;
    }

    .section-head {
        display: block;
    }

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

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

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

    .detail-hero-inner {
        grid-template-columns: 120px 1fr;
        gap: 18px;
    }

    .detail-title {
        font-size: 32px;
    }

    .detail-lead {
        font-size: 16px;
    }

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

@media (max-width: 420px) {
    .movie-grid,
    .detail-related-grid {
        gap: 12px;
    }

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

    .movie-card h2 {
        font-size: 14px;
    }

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

    .detail-cover {
        max-width: 160px;
    }
}
