:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --cyan: #06b6d4;
    --blue: #3b82f6;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --panel: #ffffff;
    --soft: #f3f4f6;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.header-inner {
    max-width: 1280px;
    height: 72px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    box-shadow: 0 14px 28px rgba(16, 185, 129, 0.28);
}

.brand-text {
    font-size: 25px;
    font-weight: 900;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--primary-dark), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

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

.nav-link {
    font-weight: 700;
    color: #374151;
    padding: 10px 2px;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-dark);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
}

.header-search input,
.mobile-search input,
.search-hero input {
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
}

.header-search input {
    width: 210px;
    padding: 8px 12px;
}

.header-search button,
.mobile-search button,
.search-hero button,
.primary-btn,
.secondary-btn,
.play-button,
.filter-chip {
    border: 0;
    cursor: pointer;
    font: inherit;
}

.header-search button,
.mobile-search button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 800;
}

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    font-size: 26px;
    color: #374151;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    padding: 16px 24px 20px;
    background: #ffffff;
}

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

.mobile-search {
    display: flex;
    gap: 10px;
    border: 1px solid var(--line);
    padding: 8px;
    border-radius: 999px;
}

.mobile-search input {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
}

.mobile-nav {
    margin-top: 16px;
    display: grid;
    gap: 8px;
}

.mobile-nav-link {
    padding: 13px 14px;
    border-radius: 14px;
    color: #374151;
    font-weight: 800;
    background: #f9fafb;
}

.mobile-nav-link.active,
.mobile-nav-link:hover {
    color: var(--primary-dark);
    background: #ecfdf5;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 640px;
    background: linear-gradient(135deg, #10b981 0%, #06b6d4 52%, #3b82f6 100%);
    color: #ffffff;
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    filter: blur(52px);
    mix-blend-mode: overlay;
    animation: pulseGlow 6s ease-in-out infinite;
}

.hero::before {
    top: -120px;
    left: 6%;
}

.hero::after {
    right: 4%;
    bottom: -160px;
    animation-delay: 1.8s;
}

.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    min-height: 640px;
    padding: 72px 24px 88px;
}

.hero-slide {
    display: none;
    align-items: center;
    gap: 56px;
    min-height: 500px;
}

.hero-slide.is-active {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.85fr);
}

.hero-copy {
    max-width: 720px;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
    font-weight: 800;
    margin-bottom: 24px;
}

.hero h1 {
    margin: 0 0 20px;
    font-size: clamp(40px, 6vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero h1 span {
    color: #fef3c7;
}

.hero p {
    margin: 0;
    font-size: clamp(17px, 2.1vw, 23px);
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.92);
}

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

.hero-meta span,
.detail-meta span,
.category-pill,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-weight: 800;
}

.hero-meta span {
    padding: 8px 13px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

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

.primary-btn,
.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    background: #ffffff;
    color: var(--primary-dark);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.18);
}

.secondary-btn {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.12);
}

.primary-btn:hover,
.secondary-btn:hover,
.movie-card:hover,
.category-card:hover,
.rank-row:hover {
    transform: translateY(-4px);
}

.hero-visual {
    position: relative;
}

.hero-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    max-height: 520px;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.35);
    background: rgba(255, 255, 255, 0.16);
}

.hero-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.02), rgba(15, 23, 42, 0.7));
}

.hero-card-float {
    position: absolute;
    left: -28px;
    bottom: 34px;
    max-width: 280px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--text);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

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

.hero-card-float span {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.hero-dots {
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding-bottom: 28px;
}

.hero-dots button {
    width: 42px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
}

.hero-dots button.is-active {
    background: #ffffff;
}

.section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 60px 24px;
}

.section.compact-section {
    padding-top: 36px;
}

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

.section-heading h1,
.section-heading h2 {
    margin: 0 0 10px;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.04em;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.section-link {
    color: var(--primary-dark);
    font-weight: 900;
    white-space: nowrap;
}

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

.stat-card,
.category-card,
.content-panel,
.search-panel {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(229, 231, 235, 0.88);
    border-radius: 24px;
    box-shadow: 0 16px 45px rgba(15, 23, 42, 0.06);
}

.stat-card {
    padding: 28px;
    text-align: center;
}

.stat-card strong {
    display: block;
    font-size: 38px;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.stat-card span,
.category-card p,
.card-body p,
.rank-row p,
.detail-copy p,
.detail-copy li {
    color: var(--muted);
    line-height: 1.7;
}

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

.category-card {
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    font-size: 21px;
}

.category-card p {
    margin: 0 0 16px;
}

.category-pill {
    padding: 7px 11px;
    background: #ecfdf5;
    color: var(--primary-dark);
    font-size: 13px;
}

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    box-shadow: var(--shadow);
}

.poster-wrap {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #d1fae5, #cffafe);
}

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

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

.corner-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

.corner-badge {
    top: 10px;
    right: 10px;
    padding: 6px 9px;
    background: rgba(16, 185, 129, 0.94);
}

.rank-badge {
    top: 10px;
    left: 10px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.3);
}

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    padding: 26px 14px 14px;
    color: #ffffff;
    background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.88));
    transform: translateY(100%);
    transition: transform 0.25s ease;
}

.movie-card:hover .poster-shade {
    transform: translateY(0);
}

.poster-shade strong {
    display: block;
    margin-bottom: 5px;
}

.poster-shade p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.88);
}

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

.card-body h2 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-body p {
    min-height: 44px;
    margin: 0 0 10px;
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta-row,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.meta-row {
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.tag-row span {
    padding: 5px 8px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 12px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: auto 86px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    padding: 14px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row img {
    width: 86px;
    height: 118px;
    object-fit: cover;
    border-radius: 14px;
}

.rank-row h2 {
    margin: 0 0 8px;
    font-size: 19px;
}

.rank-row p {
    margin: 0 0 8px;
}

.rank-row span {
    color: var(--primary-dark);
    font-weight: 900;
}

.list-rank {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    font-weight: 900;
}

.page-hero {
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    color: #ffffff;
    padding: 70px 24px;
}

.page-hero-inner {
    max-width: 1280px;
    margin: 0 auto;
}

.page-hero h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 56px);
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 850px;
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 18px;
    line-height: 1.8;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.84);
    font-weight: 800;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.filter-chip {
    padding: 10px 15px;
    border-radius: 999px;
    color: #374151;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    font-weight: 900;
}

.filter-chip.active,
.filter-chip:hover {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
}

.search-panel {
    padding: 26px;
    margin-bottom: 28px;
}

.search-hero {
    display: flex;
    gap: 12px;
    max-width: 820px;
    background: #ffffff;
    border-radius: 999px;
    padding: 10px;
    box-shadow: var(--shadow);
}

.search-hero input {
    flex: 1;
    min-width: 0;
    padding: 12px 18px;
    font-size: 18px;
}

.search-hero button {
    border-radius: 999px;
    padding: 12px 24px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    font-weight: 900;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.9fr);
    gap: 28px;
}

.player-section {
    background: #07111f;
    padding: 36px 24px;
}

.player-inner {
    max-width: 1080px;
    margin: 0 auto;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #000000;
    box-shadow: 0 30px 75px rgba(0, 0, 0, 0.35);
}

.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.video-frame video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.72));
    z-index: 5;
}

.player-shell.is-playing .video-overlay {
    display: none;
}

.play-button {
    width: 116px;
    height: 116px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    box-shadow: 0 20px 55px rgba(16, 185, 129, 0.42);
    font-size: 34px;
    font-weight: 900;
    transition: transform 0.2s ease;
}

.play-button:hover {
    transform: scale(1.06);
}

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

.detail-meta span {
    padding: 8px 13px;
    background: #ecfdf5;
    color: var(--primary-dark);
}

.content-panel {
    padding: 28px;
}

.content-panel h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

.detail-copy p {
    margin: 0 0 18px;
    font-size: 16px;
}

.detail-cover {
    overflow: hidden;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

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

.side-box {
    padding: 22px;
    border-top: 1px solid var(--line);
}

.side-box h2 {
    margin: 0 0 14px;
    font-size: 20px;
}

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

.side-box a {
    color: #374151;
    font-weight: 800;
}

.side-box a:hover {
    color: var(--primary-dark);
}

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

.empty-state {
    display: none;
    padding: 45px 20px;
    text-align: center;
    color: var(--muted);
    background: #ffffff;
    border-radius: 24px;
}

.empty-state.show {
    display: block;
}

.site-footer {
    margin-top: 30px;
    background: linear-gradient(180deg, #f9fafb, #eef2f7);
    border-top: 1px solid var(--line);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 46px 24px;
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 34px;
}

.footer-brand p {
    color: var(--muted);
    line-height: 1.8;
    max-width: 520px;
}

.footer-links h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 9px;
}

.footer-links a {
    color: #4b5563;
}

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

.footer-bottom {
    border-top: 1px solid var(--line);
    padding: 18px 24px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

@keyframes pulseGlow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.72;
    }

    50% {
        transform: scale(1.12);
        opacity: 0.42;
    }
}

@media (max-width: 1120px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

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

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

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

@media (max-width: 860px) {
    .hero,
    .hero-inner {
        min-height: auto;
    }

    .hero-slide.is-active {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .hero-visual {
        max-width: 360px;
        margin: 0 auto;
    }

    .hero-card-float {
        left: 12px;
        right: 12px;
        max-width: none;
    }

    .stats-grid,
    .category-grid,
    .detail-layout,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 560px) {
    .header-inner {
        height: 64px;
        padding: 0 16px;
    }

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

    .hero-inner,
    .section,
    .page-hero {
        padding-left: 16px;
        padding-right: 16px;
    }

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

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

    .rank-row .list-rank {
        display: none;
    }

    .rank-row img {
        width: 64px;
        height: 92px;
    }

    .search-hero {
        border-radius: 24px;
        flex-direction: column;
    }

    .search-hero button {
        width: 100%;
    }

    .play-button {
        width: 86px;
        height: 86px;
        font-size: 28px;
    }
}
