:root {
    --primary: #0284c7;
    --primary-dark: #0369a1;
    --primary-soft: #e0f2fe;
    --bamboo: #16a34a;
    --mist-50: #f8fafc;
    --mist-100: #f1f5f9;
    --mist-200: #e2e8f0;
    --mist-300: #cbd5e1;
    --mist-500: #64748b;
    --mist-600: #475569;
    --mist-700: #334155;
    --mist-900: #0f172a;
    --white: #ffffff;
    --shadow-soft: 0 18px 55px rgba(15, 23, 42, 0.12);
    --shadow-card: 0 12px 34px rgba(15, 23, 42, 0.10);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--mist-50);
    color: var(--mist-900);
    line-height: 1.65;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--mist-200);
    backdrop-filter: blur(14px);
    box-shadow: 0 1px 12px rgba(15, 23, 42, 0.05);
}

.header-inner {
    max-width: 1240px;
    margin: 0 auto;
    min-height: 68px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary), var(--bamboo));
    box-shadow: 0 10px 22px rgba(2, 132, 199, 0.25);
}

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

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

.nav-link,
.mobile-nav-link {
    color: var(--mist-600);
    font-weight: 700;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.nav-link {
    padding: 9px 14px;
}

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

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-input,
.filter-select {
    border: 1px solid var(--mist-300);
    border-radius: 14px;
    background: var(--white);
    outline: 0;
    transition: all 0.2s ease;
}

.header-search input {
    width: 250px;
    height: 40px;
    padding: 0 14px;
}

.header-search button,
.mobile-search button,
.primary-button,
.secondary-button,
.hero-control,
.player-button,
.filter-button {
    border: 0;
    cursor: pointer;
    font-weight: 800;
    transition: all 0.2s ease;
}

.header-search button,
.mobile-search button,
.primary-button,
.player-button {
    background: var(--primary);
    color: var(--white);
}

.header-search button,
.mobile-search button {
    height: 40px;
    padding: 0 16px;
    border-radius: 14px;
}

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

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    padding: 8px;
}

.menu-toggle span {
    display: block;
    width: 23px;
    height: 2px;
    background: var(--mist-700);
    margin: 5px 0;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--mist-200);
    padding: 14px 22px 20px;
    background: var(--white);
}

.mobile-nav.open {
    display: grid;
    gap: 10px;
}

.mobile-nav-link {
    padding: 12px 14px;
}

.mobile-search input {
    min-width: 0;
    flex: 1;
    height: 42px;
    padding: 0 14px;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.25), transparent 32%), linear-gradient(135deg, #0f172a 0%, #0c4a6e 52%, #052e16 100%);
    color: var(--white);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -12% -28% -12%;
    height: 260px;
    background: rgba(255, 255, 255, 0.08);
    filter: blur(50px);
    border-radius: 50%;
}

.hero-track {
    position: relative;
    max-width: 1240px;
    min-height: 620px;
    margin: 0 auto;
    padding: 70px 22px 86px;
}

.hero-slide {
    position: absolute;
    inset: 0 22px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.72fr);
    align-items: center;
    gap: 48px;
    opacity: 0;
    transform: translateY(18px);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

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

.hero-title {
    margin: 16px 0 18px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-summary {
    max-width: 660px;
    margin: 0 0 24px;
    color: #e0f2fe;
    font-size: 18px;
}

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

.tag-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    background: rgba(224, 242, 254, 0.82);
    color: #075985;
    font-size: 12px;
    font-weight: 800;
}

.hero .tag-pill {
    background: rgba(255, 255, 255, 0.14);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
}

.secondary-button {
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.secondary-button:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

.hero-visual {
    position: relative;
}

.hero-visual::before {
    content: "";
    position: absolute;
    inset: 22px -18px -18px 18px;
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.42), rgba(22, 163, 74, 0.28));
    filter: blur(2px);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 34px;
    background: linear-gradient(135deg, #1e293b, #075985);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.35);
}

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

.hero-poster::after,
.poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.68), rgba(15, 23, 42, 0.02) 55%);
}

.hero-controls {
    position: absolute;
    left: 22px;
    bottom: 28px;
    display: flex;
    gap: 10px;
    z-index: 3;
}

.hero-control {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-control:hover {
    background: rgba(255, 255, 255, 0.28);
}

.main-content,
.page-main {
    max-width: 1240px;
    margin: 0 auto;
    padding: 44px 22px 70px;
}

.section {
    margin-bottom: 54px;
}

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

.section-heading h2,
.page-title {
    margin: 0;
    color: var(--mist-900);
    line-height: 1.16;
}

.section-heading h2 {
    font-size: clamp(24px, 3vw, 34px);
}

.section-heading p,
.page-lead {
    margin: 8px 0 0;
    color: var(--mist-600);
}

.section-more {
    color: var(--primary-dark);
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--mist-200);
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow-card);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: #bae6fd;
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #e0f2fe, #dcfce7);
}

.poster-link img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.32s ease;
}

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

.play-dot {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    height: 30px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(2, 132, 199, 0.88);
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    border-radius: 12px;
    color: var(--white);
    background: linear-gradient(135deg, #f97316, #ef4444);
    font-weight: 900;
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
}

.card-body h3 a:hover {
    color: var(--primary-dark);
}

.card-meta {
    margin: 6px 0 8px;
    color: var(--mist-500);
    font-size: 13px;
}

.card-desc {
    margin: 0 0 12px;
    color: var(--mist-600);
    font-size: 14px;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 170px;
    padding: 22px;
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(224, 242, 254, 0.95), rgba(240, 253, 244, 0.95));
    border: 1px solid var(--mist-200);
    box-shadow: var(--shadow-card);
}

.category-card::after {
    content: "";
    position: absolute;
    right: -34px;
    bottom: -34px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(2, 132, 199, 0.14);
}

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

.category-card p {
    position: relative;
    z-index: 2;
    margin: 0 0 18px;
    color: var(--mist-600);
}

.category-card span {
    position: relative;
    z-index: 2;
    color: var(--primary-dark);
    font-weight: 900;
}

.page-hero {
    background: linear-gradient(135deg, var(--white), #eff6ff 45%, #f0fdf4);
    border-bottom: 1px solid var(--mist-200);
}

.page-hero-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 48px 22px;
}

.page-title {
    margin-top: 12px;
    font-size: clamp(32px, 4vw, 50px);
    letter-spacing: -0.04em;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--mist-600);
    font-size: 14px;
}

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

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 170px 170px 140px;
    gap: 12px;
    margin: 0 0 24px;
    padding: 16px;
    border: 1px solid var(--mist-200);
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.filter-input,
.filter-select {
    width: 100%;
    height: 44px;
    padding: 0 13px;
}

.filter-button {
    height: 44px;
    border-radius: 14px;
    color: var(--white);
    background: var(--mist-900);
}

.filter-button:hover {
    background: var(--primary-dark);
}

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

.player-wrap {
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 28px 80px rgba(2, 6, 23, 0.35);
}

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

.video-stage video {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(2, 132, 199, 0.24), rgba(2, 6, 23, 0.48));
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.player-wrap.playing .player-overlay {
    opacity: 0;
}

.player-button {
    pointer-events: auto;
    min-width: 116px;
    height: 52px;
    border-radius: 999px;
    box-shadow: 0 18px 42px rgba(2, 132, 199, 0.35);
}

.player-message {
    padding: 13px 18px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.96);
    font-size: 14px;
}

.detail-card,
.info-card {
    border: 1px solid var(--mist-200);
    border-radius: 26px;
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.detail-card {
    padding: 26px;
    margin-top: 22px;
}

.detail-card h1 {
    margin: 0 0 10px;
    font-size: clamp(30px, 4vw, 48px);
    letter-spacing: -0.04em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 14px 0 18px;
}

.meta-pill {
    padding: 6px 11px;
    border-radius: 999px;
    color: var(--mist-700);
    background: var(--mist-100);
    font-weight: 800;
    font-size: 13px;
}

.detail-section h2 {
    margin: 26px 0 10px;
    font-size: 23px;
}

.detail-section p {
    margin: 0;
    color: var(--mist-700);
}

.sidebar-poster {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: var(--shadow-soft);
    background: linear-gradient(135deg, #e0f2fe, #dcfce7);
}

.sidebar-poster img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.info-card {
    padding: 20px;
    margin-top: 18px;
}

.info-card h2,
.info-card h3 {
    margin: 0 0 12px;
}

.info-list {
    display: grid;
    gap: 10px;
    color: var(--mist-600);
}

.info-list strong {
    color: var(--mist-900);
}

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

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

.related-item img {
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    object-fit: cover;
    background: var(--mist-100);
}

.related-item h3 {
    margin: 0 0 4px;
    font-size: 15px;
}

.related-item p {
    margin: 0;
    color: var(--mist-500);
    font-size: 12px;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 58px 92px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--mist-200);
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.ranking-row .ranking-number {
    font-size: 24px;
    font-weight: 900;
    color: var(--primary-dark);
    text-align: center;
}

.ranking-row img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 14px;
    background: var(--mist-100);
}

.ranking-row h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.ranking-score {
    color: #ea580c;
    font-weight: 900;
}

.no-result {
    display: none;
    padding: 30px;
    border-radius: 24px;
    text-align: center;
    color: var(--mist-600);
    background: var(--white);
    border: 1px solid var(--mist-200);
}

.no-result.show {
    display: block;
}

.site-footer {
    color: #cbd5e1;
    background: var(--mist-900);
}

.footer-grid {
    max-width: 1240px;
    margin: 0 auto;
    padding: 44px 22px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 34px;
}

.footer-brand {
    color: var(--white);
}

.site-footer p {
    max-width: 440px;
    margin: 14px 0 0;
    color: #94a3b8;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: var(--white);
}

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

.footer-links a {
    color: #94a3b8;
}

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

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding: 18px 22px;
    text-align: center;
    color: #94a3b8;
}

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

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

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 28px;
        align-content: center;
    }

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

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

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

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

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

    .hero,
    .hero-track {
        min-height: 740px;
    }

    .hero-track {
        padding: 38px 16px 84px;
    }

    .hero-slide {
        inset: 0 16px;
    }

    .hero-summary {
        font-size: 16px;
    }

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

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

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

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

    .ranking-row {
        grid-template-columns: 42px 70px minmax(0, 1fr);
    }

    .ranking-score {
        grid-column: 3;
    }

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

    .sidebar-poster {
        max-width: 280px;
    }

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

@media (max-width: 460px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

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

    .card-body h3 {
        font-size: 17px;
    }
}
