* {
    box-sizing: border-box;
}

:root {
    --blue-950: #10265c;
    --blue-900: #14357d;
    --blue-700: #1d4ed8;
    --blue-600: #2563eb;
    --cyan-600: #0891b2;
    --cyan-500: #06b6d4;
    --green-500: #22c55e;
    --slate-950: #020617;
    --gray-950: #111827;
    --gray-900: #1f2937;
    --gray-800: #374151;
    --gray-700: #4b5563;
    --gray-600: #6b7280;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 12px 28px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 22px 56px rgba(15, 23, 42, 0.18);
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

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

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, var(--blue-600), var(--cyan-600));
    box-shadow: var(--shadow-md);
}

.site-nav {
    width: min(1200px, calc(100% - 32px));
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--blue-600);
    background: var(--white);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.brand-text {
    font-size: 20px;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 650;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fde68a;
    transform: translateY(-1px);
}

.mobile-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    background: var(--white);
    border-radius: 999px;
}

.mobile-menu {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 8px 0 16px;
}

.mobile-link {
    display: block;
    padding: 12px 4px;
    color: var(--white);
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-carousel {
    position: relative;
    min-height: 540px;
    overflow: hidden;
    background: linear-gradient(120deg, var(--blue-950), var(--blue-700), var(--cyan-600));
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 32px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

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

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

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(29, 78, 216, 0.66), rgba(8, 145, 178, 0.62));
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.28;
    transform: scale(1.04);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(720px, calc(100% - 32px));
    margin-left: max(32px, calc((100% - 1200px) / 2));
    align-self: center;
    color: var(--white);
}

.hero-kicker,
.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #cffafe;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hero-content h1 {
    margin: 14px 0 18px;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero-content p {
    width: min(640px, 100%);
    margin: 0 0 24px;
    color: #dbeafe;
    font-size: clamp(18px, 2.2vw, 24px);
}

.hero-tags,
.tag-row,
.detail-tags,
.meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-row span,
.detail-tags span,
.meta-line span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    padding: 5px 10px;
    color: inherit;
    font-size: 13px;
}

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

.primary-button,
.ghost-button,
.section-link,
.hero-search button,
.global-search-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    min-height: 46px;
    padding: 0 24px;
    color: var(--blue-700);
    background: var(--white);
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.25);
}

.primary-button:hover,
.ghost-button:hover,
.section-link:hover,
.hero-search button:hover,
.global-search-form button:hover {
    transform: translateY(-2px);
}

.ghost-button {
    min-height: 46px;
    padding: 0 22px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
}

.hero-side-panel {
    position: relative;
    z-index: 4;
    width: 360px;
    margin-left: auto;
    margin-right: max(24px, calc((100% - 1200px) / 2));
    padding-top: 88px;
}

.hero-search-card {
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius-lg);
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-lg);
}

.hero-search-card strong {
    display: block;
    margin-bottom: 14px;
    font-size: 18px;
}

.hero-search,
.global-search-form,
.filter-form {
    display: flex;
    gap: 10px;
}

.hero-search input,
.global-search-form input,
.filter-form input {
    min-width: 0;
    flex: 1;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    outline: 0;
    padding: 12px 16px;
    background: var(--white);
    color: var(--gray-900);
}

.hero-search button,
.global-search-form button {
    padding: 0 18px;
    color: var(--white);
    background: var(--blue-600);
}

.hero-mini-list {
    margin-top: 18px;
    display: grid;
    gap: 12px;
}

.hero-arrow {
    position: absolute;
    z-index: 8;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.46);
    cursor: pointer;
}

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

.content-section {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 58px 0;
}

.muted-section {
    width: 100%;
    max-width: none;
    padding-left: max(16px, calc((100% - 1200px) / 2));
    padding-right: max(16px, calc((100% - 1200px) / 2));
    background: var(--white);
}

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

.section-heading h2 {
    margin: 0;
    color: var(--gray-900);
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.1;
}

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

.section-link {
    min-height: 40px;
    padding: 0 18px;
    color: var(--blue-600);
    background: #dbeafe;
}

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

.movie-card {
    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(-6px);
    box-shadow: var(--shadow-lg);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, var(--blue-900), var(--cyan-600));
}

.poster-link img,
.side-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-card:hover .poster-link img,
.side-card:hover .side-poster img {
    transform: scale(1.1);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.58));
    opacity: 0.8;
}

.year-badge,
.rank-badge,
.side-rank {
    position: absolute;
    z-index: 3;
    border-radius: 999px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.72);
    font-size: 12px;
    font-weight: 800;
}

.year-badge {
    right: 10px;
    bottom: 10px;
    padding: 4px 9px;
}

.rank-badge {
    top: 10px;
    left: 10px;
    min-width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.play-mark {
    position: absolute;
    z-index: 4;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--white);
    background: rgba(255, 255, 255, 0.22);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
    backdrop-filter: blur(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.meta-line {
    margin-bottom: 10px;
    color: var(--blue-600);
}

.meta-line span {
    background: #dbeafe;
}

.movie-card h3 {
    margin: 0 0 8px;
    color: var(--gray-900);
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.side-info h3 a:hover,
.category-overview-links a:hover,
.compact-panel a:hover {
    color: var(--blue-600);
}

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

.tag-row {
    margin-bottom: 10px;
    color: var(--gray-600);
}

.tag-row span {
    background: var(--gray-100);
}

.genre-line {
    color: var(--gray-600);
    font-size: 13px;
}

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

.category-tile {
    min-height: 156px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px;
    border-radius: var(--radius-md);
    color: var(--white);
    background: linear-gradient(135deg, var(--blue-600), var(--cyan-600));
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-overview-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

.category-tile strong {
    font-size: 22px;
}

.category-tile em {
    color: rgba(255, 255, 255, 0.84);
    font-style: normal;
    font-size: 14px;
}

.category-preview-grid,
.category-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.category-preview-card,
.category-overview-card,
.side-panel,
.detail-card,
.player-card {
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.category-preview-card {
    padding: 20px;
}

.category-preview-head,
.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.category-preview-head h3 {
    margin: 0;
    font-size: 22px;
}

.category-preview-head a {
    color: var(--blue-600);
    font-weight: 800;
}

.side-card-list {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.side-card {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.side-poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--blue-900), var(--cyan-600));
}

.side-rank {
    left: 6px;
    top: 6px;
    min-width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.side-info h3 {
    display: -webkit-box;
    margin: 0 0 5px;
    overflow: hidden;
    color: var(--gray-900);
    font-size: 16px;
    line-height: 1.34;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.side-info p {
    display: -webkit-box;
    margin: 0 0 6px;
    overflow: hidden;
    color: var(--gray-600);
    font-size: 13px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.side-info span {
    color: var(--gray-600);
    font-size: 12px;
}

.wide-cta {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 36px;
    border-radius: 28px;
    color: var(--white);
    background: linear-gradient(90deg, var(--blue-600), var(--cyan-600));
    box-shadow: var(--shadow-lg);
}

.wide-cta h2 {
    margin: 0 0 8px;
    font-size: 34px;
}

.wide-cta p {
    max-width: 760px;
    margin: 0;
    color: #dbeafe;
}

.page-hero {
    color: var(--white);
    background: linear-gradient(120deg, var(--blue-900), var(--cyan-600));
}

.rank-hero {
    background: linear-gradient(120deg, #581c87, #2563eb, #0891b2);
}

.search-hero {
    background: linear-gradient(120deg, #0f172a, #1d4ed8, #0e7490);
}

.page-hero-inner {
    width: min(960px, calc(100% - 32px));
    margin: 0 auto;
    padding: 70px 0;
    text-align: center;
}

.page-hero h1 {
    margin: 12px 0 16px;
    font-size: clamp(38px, 5vw, 58px);
    line-height: 1.08;
}

.page-hero p {
    margin: 0 auto;
    max-width: 760px;
    color: #dbeafe;
    font-size: 18px;
}

.compact-filter,
.global-search-form {
    width: min(660px, 100%);
    margin: 26px auto 0;
}

.no-results,
.search-status {
    margin-bottom: 22px;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    color: var(--blue-700);
    background: #dbeafe;
    font-weight: 800;
}

.category-overview-card {
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-overview-main {
    display: block;
    padding: 28px;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue-600), var(--cyan-600));
}

.category-overview-main h2 {
    margin: 16px 0 8px;
}

.category-overview-main p {
    margin: 0;
    color: #dbeafe;
}

.category-overview-links {
    display: grid;
    gap: 8px;
    padding: 18px 22px 24px;
}

.category-overview-links a {
    color: var(--gray-700);
    font-weight: 650;
}

.detail-wrap {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 30px 0 64px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 22px;
    color: var(--gray-600);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--blue-600);
    font-weight: 750;
}

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

.detail-main {
    display: grid;
    gap: 22px;
}

.player-card {
    padding: 16px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: #000000;
    box-shadow: var(--shadow-lg);
}

.movie-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #000000;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: var(--white);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.48));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.big-play {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.24);
    box-shadow: 0 20px 52px rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(10px);
    font-size: 36px;
}

.player-message {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 7;
    padding: 12px 18px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.72);
    transform: translate(-50%, -50%);
}

.detail-card {
    padding: clamp(22px, 4vw, 36px);
}

.detail-tags {
    color: var(--blue-600);
}

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

.detail-card h1 {
    margin: 18px 0 10px;
    color: var(--gray-950);
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.12;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-600);
}

.article-block {
    margin-top: 28px;
}

.article-block h2,
.side-panel h2 {
    margin: 0 0 12px;
    color: var(--gray-900);
    font-size: 24px;
}

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

.intro-block p {
    font-size: 19px;
    font-weight: 650;
}

.review-block {
    padding: 24px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.detail-side {
    position: sticky;
    top: 90px;
    display: grid;
    gap: 18px;
}

.side-panel {
    padding: 22px;
}

.compact-panel {
    display: grid;
    gap: 10px;
}

.compact-panel a {
    color: var(--gray-700);
    font-weight: 700;
}

.top-three-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.site-footer {
    color: #cbd5e1;
    background: var(--gray-950);
}

.footer-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 30px;
    padding: 52px 0 34px;
}

.footer-brand p {
    margin: 18px 0 0;
    color: #cbd5e1;
}

.footer-column {
    display: grid;
    align-content: start;
    gap: 8px;
}

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

.footer-column a {
    color: #cbd5e1;
}

.footer-column a:hover {
    color: var(--cyan-500);
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    text-align: center;
}

.footer-bottom p {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0;
    color: #94a3b8;
}

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

    .mobile-menu-button {
        display: block;
    }

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

    .hero-side-panel {
        display: none;
    }

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

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

    .detail-side {
        position: static;
    }

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

@media (max-width: 760px) {
    .brand-text {
        font-size: 18px;
    }

    .hero-carousel {
        min-height: 610px;
    }

    .hero-content {
        width: calc(100% - 32px);
        margin: 0 16px;
        padding-top: 70px;
        align-self: start;
    }

    .hero-content h1 {
        font-size: 44px;
    }

    .hero-arrow {
        display: none;
    }

    .section-heading,
    .wide-cta,
    .category-preview-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .movie-grid,
    .category-grid,
    .category-preview-grid,
    .category-overview-grid,
    .top-three-grid {
        grid-template-columns: 1fr;
    }

    .side-card {
        grid-template-columns: 110px minmax(0, 1fr);
    }

    .global-search-form,
    .hero-search,
    .filter-form {
        flex-direction: column;
    }

    .global-search-form button,
    .hero-search button {
        min-height: 46px;
    }

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