:root {
    color-scheme: light;
    --bg: #f8fafc;
    --surface: rgba(255, 255, 255, 0.86);
    --surface-strong: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --muted-strong: #374151;
    --border: #e5e7eb;
    --dark: #111827;
    --dark-soft: #1f2937;
    --accent: #2563eb;
    --accent-strong: #1d4ed8;
    --gold: #f59e0b;
    --radius: 20px;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, #f8fafc 0%, #f9fafb 45%, #f5f5f4 100%);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(229, 231, 235, 0.88);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px);
}

.nav-row {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #111827, #374151);
    box-shadow: 0 12px 24px rgba(17, 24, 39, 0.22);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-copy strong {
    font-size: 20px;
    letter-spacing: -0.02em;
}

.brand-copy small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.desktop-nav a {
    position: relative;
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted-strong);
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: var(--text);
    background: #f3f4f6;
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: #f3f4f6;
    color: var(--text);
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: currentColor;
}

.mobile-nav {
    display: none;
    padding: 12px 16px 18px;
    border-top: 1px solid var(--border);
    background: #ffffff;
}

.mobile-nav a {
    display: block;
    padding: 13px 16px;
    border-radius: 14px;
    color: var(--muted-strong);
    font-weight: 700;
}

.mobile-nav a:hover {
    background: #f3f4f6;
}

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

.hero {
    position: relative;
    overflow: hidden;
    min-height: 650px;
    background: linear-gradient(135deg, #111827 0%, #1f2937 54%, #0f172a 100%);
    color: #ffffff;
}

.hero-slider {
    position: relative;
    min-height: 650px;
}

.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;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.26;
    filter: blur(4px) saturate(1.15);
    transform: scale(1.04);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.26), transparent 36%),
        linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.68), rgba(17, 24, 39, 0.95));
}

.hero-inner {
    position: relative;
    min-height: 650px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.62fr);
    align-items: center;
    gap: 50px;
    padding: 74px 0 118px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.86);
    font-size: 13px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.hero h1 {
    margin: 22px 0 18px;
    font-size: clamp(38px, 6vw, 74px);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 720px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
}

.hero-meta,
.detail-meta,
.movie-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.hero-meta span,
.detail-meta span,
.movie-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #f3f4f6;
    color: var(--muted-strong);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 7px 10px;
}

.hero-meta span {
    background: rgba(255, 255, 255, 0.13);
    color: rgba(255, 255, 255, 0.88);
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.button,
.hero-actions a,
.detail-actions a,
.section-link,
.rank-play,
.form-button,
.page-arrow,
.page-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid rgba(17, 24, 39, 0.12);
    background: #ffffff;
    color: var(--text);
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button-primary,
.hero-actions a:first-child,
.detail-actions a:first-child,
.form-button {
    border-color: transparent;
    background: var(--text);
    color: #ffffff;
}

.hero-actions a {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
}

.hero-actions a:first-child {
    background: #ffffff;
    color: #111827;
}

.button:hover,
.hero-actions a:hover,
.detail-actions a:hover,
.section-link:hover,
.rank-play:hover,
.form-button:hover,
.page-arrow:hover,
.page-number:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.16);
}

.hero-poster {
    position: relative;
    border-radius: 32px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 24px;
    background: #111827;
}

.hero-thumbs {
    position: absolute;
    left: 50%;
    bottom: 32px;
    z-index: 3;
    display: flex;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.hero-thumbs::-webkit-scrollbar {
    display: none;
}

.hero-thumb {
    flex: 0 0 170px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 9px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    cursor: pointer;
    backdrop-filter: blur(14px);
    opacity: 0.7;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.hero-thumb.active,
.hero-thumb:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.18);
}

.hero-thumb img {
    width: 44px;
    height: 58px;
    object-fit: cover;
    border-radius: 10px;
    background: #111827;
}

.hero-thumb strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.hero-thumb small {
    display: block;
    color: rgba(255, 255, 255, 0.68);
    font-size: 12px;
}

.section-block,
.content-block {
    padding: 70px 0 0;
}

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

.section-heading h2,
.content-block h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.section-heading p,
.content-block > p {
    margin: 8px 0 0;
    color: var(--muted);
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: var(--radius);
    background: var(--surface-strong);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #374151);
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.quality-badge,
.year-badge,
.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: #111827;
    font-size: 12px;
    font-weight: 900;
    padding: 5px 8px;
    backdrop-filter: blur(8px);
}

.year-badge {
    left: auto;
    right: 10px;
}

.rank-badge {
    top: auto;
    bottom: 10px;
    background: #111827;
    color: #ffffff;
}

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

.movie-card h3 {
    min-height: 46px;
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-info h3 a:hover,
.breadcrumb a:hover {
    text-decoration: underline;
}

.movie-desc {
    min-height: 45px;
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.tag-list span {
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
}

.page-hero {
    padding: 74px 0;
    background: linear-gradient(135deg, #111827, #1f2937 58%, #0f172a);
    color: #ffffff;
}

.page-hero h1 {
    max-width: 900px;
    margin: 18px 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 18px;
}

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

.category-card {
    min-height: 190px;
    padding: 24px;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at right top, rgba(37, 99, 235, 0.12), transparent 34%),
        #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card span {
    display: inline-flex;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    padding: 6px 10px;
}

.category-card h2 {
    margin: 18px 0 8px;
    font-size: 24px;
    letter-spacing: -0.03em;
}

.category-card p {
    margin: 0;
    color: var(--muted);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 64px 82px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(229, 231, 235, 0.95);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: #111827;
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
}

.rank-cover img {
    width: 82px;
    height: 108px;
    object-fit: cover;
    border-radius: 14px;
    background: #111827;
}

.rank-info h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-info p {
    margin: 0 0 10px;
    color: var(--muted);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 46px 0 0;
}

.page-number.active {
    background: #111827;
    color: #ffffff;
}

.page-arrow.disabled,
.page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    background: #e5e7eb;
    color: #9ca3af;
    font-weight: 800;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 54px 0;
    background: linear-gradient(135deg, #111827, #1f2937 58%, #0f172a);
    color: #ffffff;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.18;
    filter: blur(8px) saturate(1.1);
    transform: scale(1.05);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.74));
}

.detail-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-poster {
    border-radius: 26px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 18px;
    background: #111827;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
}

.detail-hero h1 {
    margin: 0 0 16px;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1;
    letter-spacing: -0.05em;
}

.detail-summary {
    max-width: 830px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 17px;
}

.player-section {
    padding: 70px 0 0;
}

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

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

.player-start {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.16), rgba(0, 0, 0, 0.68));
    color: #ffffff;
    cursor: pointer;
}

.player-start span {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #111827;
    font-size: 38px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
    transition: transform 0.2s ease;
}

.player-start:hover span {
    transform: scale(1.06);
}

.player-start.hidden {
    display: none;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    padding: 54px 0 0;
}

.article-panel,
.side-panel,
.search-panel {
    border: 1px solid rgba(229, 231, 235, 0.94);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.article-panel {
    padding: 30px;
}

.article-panel h2,
.side-panel h2 {
    margin: 0 0 14px;
    font-size: 26px;
    letter-spacing: -0.03em;
}

.article-panel p {
    margin: 0 0 22px;
    color: #374151;
    font-size: 16px;
}

.info-table {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.info-table div {
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.info-table strong {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 12px;
}

.side-panel {
    padding: 20px;
    height: fit-content;
}

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

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

.side-card img {
    width: 70px;
    height: 94px;
    object-fit: cover;
    border-radius: 12px;
    background: #111827;
}

.side-card h3 {
    margin: 0 0 6px;
    font-size: 15px;
    line-height: 1.35;
}

.side-card p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.search-panel {
    margin-top: -32px;
    padding: 22px;
}

.search-form {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(130px, 0.6fr)) auto;
    gap: 12px;
}

.search-form input,
.search-form select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0 14px;
    background: #ffffff;
    color: var(--text);
    outline: none;
}

.search-form input:focus,
.search-form select:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(147, 197, 253, 0.22);
}

.search-status {
    margin: 20px 0 0;
    color: var(--muted);
    font-weight: 700;
}

.site-footer {
    margin-top: 80px;
    padding: 54px 0;
    background: linear-gradient(135deg, #111827, #1f2937 58%, #0f172a);
    color: rgba(255, 255, 255, 0.76);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) 1fr 1fr;
    gap: 32px;
}

.footer-brand {
    display: inline-flex;
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 24px;
}

.site-footer p {
    max-width: 620px;
    margin: 0;
}

.site-footer h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 18px;
}

.site-footer a:not(.footer-brand) {
    display: block;
    margin: 8px 0;
}

.site-footer a:hover {
    color: #ffffff;
}

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

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

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

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

    .mobile-toggle {
        display: block;
    }

    .hero,
    .hero-slider,
    .hero-inner {
        min-height: auto;
    }

    .hero-slide {
        position: relative;
        display: none;
    }

    .hero-slide.active {
        display: block;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 48px 0 138px;
    }

    .hero h1 {
        font-size: clamp(34px, 12vw, 54px);
    }

    .hero-poster {
        max-width: 260px;
    }

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

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

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

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

    .detail-poster {
        max-width: 240px;
    }

    .rank-row {
        grid-template-columns: 46px 68px minmax(0, 1fr);
    }

    .rank-play {
        grid-column: 1 / -1;
        width: 100%;
    }

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

    .search-form input,
    .search-form .form-button {
        grid-column: 1 / -1;
    }

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

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

    .brand-copy small {
        display: none;
    }

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

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

    .movie-card h3 {
        min-height: auto;
        font-size: 15px;
    }

    .movie-desc {
        display: none;
    }

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

    .hero-thumb {
        flex-basis: 152px;
    }

    .info-table {
        grid-template-columns: 1fr;
    }

    .article-panel {
        padding: 22px;
    }

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