:root {
    --primary: #0284c7;
    --primary-dark: #0369a1;
    --primary-soft: #e0f2fe;
    --secondary-soft: #f0fdf4;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --surface: #ffffff;
    --page: #f9fafb;
    --dark: #0f172a;
    --radius-lg: 24px;
    --radius-md: 16px;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    backdrop-filter: blur(14px);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1240px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--text);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #38bdf8);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(2, 132, 199, 0.28);
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #374151;
    font-size: 15px;
    font-weight: 600;
}

.nav-links a {
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-toggle {
    display: none;
    border: 0;
    border-radius: 10px;
    background: #eef2ff;
    padding: 9px 12px;
    color: var(--text);
    font-size: 20px;
}

.hero-carousel {
    position: relative;
    width: min(1240px, calc(100% - 32px));
    height: 68vh;
    min-height: 520px;
    margin: 28px auto 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #0f172a, #0369a1);
    box-shadow: var(--shadow);
}

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

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

.hero-image-wrap,
.hero-image,
.hero-overlay {
    position: absolute;
    inset: 0;
}

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

.hero-image.is-missing {
    display: none;
}

.hero-fallback,
.cover-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: radial-gradient(circle at 20% 10%, rgba(56, 189, 248, 0.42), transparent 35%),
        linear-gradient(135deg, #0f172a, #075985 48%, #111827);
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(28px, 7vw, 86px);
    font-weight: 900;
    letter-spacing: -0.08em;
    text-align: center;
}

.hero-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.12));
}

.hero-content {
    position: absolute;
    left: clamp(24px, 7vw, 86px);
    right: clamp(24px, 8vw, 110px);
    bottom: clamp(42px, 10vh, 90px);
    max-width: 760px;
    color: #ffffff;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 14px;
    border-radius: 999px;
    background: var(--primary);
    padding: 6px 13px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.hero-content h1 {
    margin: 0 0 18px;
    font-size: clamp(36px, 7vw, 70px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-content p {
    max-width: 650px;
    margin: 0 0 28px;
    color: #e5e7eb;
    font-size: clamp(16px, 2.4vw, 21px);
}

.hero-actions,
.compact-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.button-primary,
.button-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    padding: 11px 22px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.button-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(2, 132, 199, 0.28);
}

.button-primary:hover,
.player-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.button-ghost {
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.13);
    color: #ffffff;
    backdrop-filter: blur(6px);
}

.button-ghost.light {
    border-color: rgba(255, 255, 255, 0.75);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.48);
    color: #ffffff;
    font-size: 36px;
    line-height: 1;
    transform: translateY(-50%);
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

.hero-dots {
    position: absolute;
    right: 28px;
    bottom: 26px;
    z-index: 6;
    display: flex;
    gap: 8px;
}

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

.hero-dot.is-active {
    width: 32px;
    background: #ffffff;
}

.main-shell,
.footer-shell {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.main-shell {
    padding: 42px 0 70px;
}

.page-shell {
    padding-top: 34px;
}

.filter-panel,
.search-page-panel {
    margin-bottom: 38px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.9);
    padding: 18px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.search-label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.search-input,
.filter-row select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    padding: 13px 15px;
    color: var(--text);
    font-size: 16px;
    outline: none;
}

.search-input:focus,
.filter-row select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12);
}

.search-input.large {
    font-size: 18px;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.filter-count {
    min-height: 24px;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.featured-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(250px, 0.6fr);
    gap: 28px;
    align-items: center;
    margin-bottom: 56px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #e0f2fe, #f0fdf4);
    padding: clamp(24px, 5vw, 48px);
}

.featured-copy h2 {
    margin: 0 0 14px;
    font-size: clamp(30px, 5vw, 50px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.featured-copy p {
    margin: 0 0 20px;
    color: #374151;
    font-size: 17px;
}

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

.feature-meta span,
.detail-meta-grid span,
.detail-tags span,
.card-tags span,
.card-tags a {
    border-radius: 999px;
    background: #ffffff;
    padding: 6px 10px;
    color: #374151;
    font-size: 13px;
    font-weight: 700;
}

.featured-poster,
.poster-link,
.detail-poster {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 18px;
    background: #0f172a;
}

.featured-poster {
    aspect-ratio: 3 / 4;
    box-shadow: var(--shadow);
}

.content-section {
    margin-top: 56px;
}

.gradient-section {
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary-soft), var(--secondary-soft));
    padding: clamp(20px, 4vw, 32px);
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(24px, 3.4vw, 32px);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

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

.section-link,
.new-label {
    color: var(--primary);
    font-weight: 800;
    white-space: nowrap;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

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

.cover-img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.cover-img.is-missing {
    display: none;
}

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

.rating-badge {
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 2;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.72);
    padding: 5px 8px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.movie-info {
    padding: 14px;
}

.movie-info h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.3;
}

.movie-meta {
    display: flex;
    gap: 8px;
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 13px;
}

.movie-line {
    display: -webkit-box;
    min-height: 42px;
    margin: 0 0 12px;
    overflow: hidden;
    color: #4b5563;
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.card-tags span,
.card-tags a {
    background: #f3f4f6;
    color: #374151;
    font-size: 12px;
}

.page-hero {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.36), transparent 32%),
        linear-gradient(135deg, #0f172a, #075985);
    padding: clamp(30px, 7vw, 70px);
    color: #ffffff;
    box-shadow: var(--shadow);
}

.page-hero h1 {
    max-width: 820px;
    margin: 0 0 14px;
    font-size: clamp(34px, 6vw, 62px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

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

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

.category-card a {
    display: grid;
    gap: 12px;
    min-height: 210px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #ffffff;
    padding: 26px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card a:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.1);
}

.category-name {
    color: var(--text);
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.category-desc,
.category-sample {
    color: #4b5563;
}

.category-count {
    width: fit-content;
    border-radius: 999px;
    background: var(--primary-soft);
    padding: 7px 12px;
    color: var(--primary-dark);
    font-weight: 800;
}

.rank-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-item a {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) 130px;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    padding: 13px 16px;
}

.rank-number {
    color: var(--primary);
    font-weight: 900;
}

.rank-title {
    overflow: hidden;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-score {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-align: right;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--primary-dark);
    font-weight: 800;
}

.detail-shell {
    padding-top: 28px;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
    gap: clamp(24px, 5vw, 54px);
    align-items: center;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #ffffff, #e0f2fe);
    padding: clamp(20px, 5vw, 42px);
    box-shadow: var(--shadow);
}

.detail-poster {
    aspect-ratio: 3 / 4;
    box-shadow: var(--shadow);
}

.detail-copy h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.detail-one-line {
    margin: 0;
    color: #374151;
    font-size: 18px;
}

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

.player-section,
.detail-text-grid,
.content-section {
    scroll-margin-top: 90px;
}

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #020617;
    box-shadow: var(--shadow);
}

.video-frame video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-button {
    position: absolute;
    left: 50%;
    top: 50%;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 999px;
    background: var(--primary);
    padding: 14px 24px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 900;
    box-shadow: 0 18px 42px rgba(2, 132, 199, 0.35);
    transform: translate(-50%, -50%);
    transition: background 0.2s ease, opacity 0.2s ease;
}

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

.play-icon {
    font-size: 20px;
}

.detail-text-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 56px;
}

.text-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #ffffff;
    padding: clamp(20px, 4vw, 30px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.text-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.text-card p {
    margin: 0;
    color: #374151;
}

.full-card {
    grid-column: 1 / -1;
}

.site-footer {
    margin-top: 60px;
    background: #111827;
    color: #d1d5db;
}

.footer-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
    gap: 30px;
    padding: 46px 0;
}

.footer-logo {
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
}

.footer-brand p {
    max-width: 720px;
    margin: 0;
    color: #9ca3af;
}

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

.footer-grid a:hover {
    color: #38bdf8;
}

[hidden],
.searchable-card.is-filtered {
    display: none !important;
}

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

@media (max-width: 820px) {
    .nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        border: 1px solid var(--line);
        border-radius: 16px;
        background: #ffffff;
        padding: 12px;
        box-shadow: var(--shadow);
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-links a {
        width: 100%;
        border-radius: 10px;
        padding: 10px 12px;
    }

    .hero-carousel {
        height: 62vh;
        min-height: 460px;
    }

    .hero-arrow {
        display: none;
    }

    .featured-panel,
    .detail-hero,
    .footer-shell,
    .detail-text-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

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

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

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

    .rank-item a {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .rank-score {
        grid-column: 2;
        text-align: left;
    }
}

@media (max-width: 520px) {
    .nav-shell,
    .main-shell,
    .footer-shell,
    .hero-carousel {
        width: min(100% - 22px, 1240px);
    }

    .hero-content {
        left: 20px;
        right: 20px;
        bottom: 52px;
    }

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

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

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