:root {
    --brand-primary: #0284c7;
    --brand-primary-dark: #0369a1;
    --brand-accent: #d97706;
    --brand-bg: #f8fafc;
    --brand-card: #ffffff;
    --brand-text: #0f172a;
    --brand-muted: #64748b;
    --brand-border: #e2e8f0;
    --brand-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--brand-text);
    background: radial-gradient(circle at top left, #e0f2fe 0, rgba(224, 242, 254, 0) 34rem), var(--brand-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

.max-w-7xl {
    width: min(1280px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: blur(18px);
}

.site-nav {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

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

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

.desktop-nav a,
.mobile-nav a {
    color: #334155;
    font-weight: 650;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: var(--brand-primary);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-search input,
.hero-search input,
.inline-search input,
.library-search input {
    min-width: 0;
    border: 1px solid var(--brand-border);
    border-radius: 12px;
    padding: 11px 14px;
    outline: none;
    background: #ffffff;
    color: var(--brand-text);
}

.nav-search input:focus,
.hero-search input:focus,
.inline-search input:focus,
.library-search input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

.nav-search button,
.hero-search button,
.inline-search button,
.library-search button {
    border: 0;
    border-radius: 12px;
    padding: 11px 16px;
    color: #ffffff;
    background: var(--brand-primary);
    font-weight: 750;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.nav-search button:hover,
.hero-search button:hover,
.inline-search button:hover,
.library-search button:hover {
    background: var(--brand-primary-dark);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--brand-border);
    border-radius: 12px;
    background: #ffffff;
    color: var(--brand-text);
    font-size: 22px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 14px;
    border: 1px solid var(--brand-border);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.hero-slider {
    position: relative;
    height: 560px;
    overflow: hidden;
    background: #0f172a;
}

.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 {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
    filter: saturate(1.08) contrast(1.05);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.56) 46%, rgba(15, 23, 42, 0.18)), linear-gradient(0deg, rgba(15, 23, 42, 0.68), rgba(15, 23, 42, 0));
}

.hero-content {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    padding-right: 36%;
}

.hero-kicker,
.section-kicker {
    margin: 0 0 10px;
    color: var(--brand-primary);
    font-size: 14px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content .hero-kicker {
    color: #7dd3fc;
}

.hero-content h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.05em;
    text-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
}

.hero-text {
    max-width: 720px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
    line-height: 1.75;
}

.hero-tags,
.detail-meta,
.ranking-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.hero-tags span,
.detail-meta span,
.ranking-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

.detail-meta span,
.ranking-meta span {
    background: #f1f5f9;
    color: #475569;
}

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

.primary-action,
.secondary-action,
.section-more,
.panel-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    padding: 12px 18px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-action {
    color: #ffffff;
    background: var(--brand-primary);
    box-shadow: 0 18px 36px rgba(2, 132, 199, 0.32);
}

.secondary-action {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(12px);
}

.primary-action:hover,
.secondary-action:hover,
.section-more:hover,
.panel-more:hover {
    transform: translateY(-2px);
}

.hero-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 8;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.4);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

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

.hero-search {
    position: absolute;
    left: 50%;
    bottom: 30px;
    z-index: 9;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    transform: translateX(-50%);
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.17);
    box-shadow: 0 24px 55px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(18px);
}

.hero-search input {
    border-color: transparent;
}

.page-main,
.detail-main {
    padding-top: 42px;
    padding-bottom: 52px;
}

.content-section,
.detail-section,
.page-hero {
    margin-bottom: 44px;
    padding: 28px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 44px;
    background: linear-gradient(135deg, #ffffff, #e0f2fe);
}

.page-hero h1 {
    max-width: 820px;
    margin: 0;
    font-size: clamp(32px, 4vw, 54px);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 760px;
    color: #475569;
    font-size: 17px;
    line-height: 1.8;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 900;
    letter-spacing: -0.035em;
}

.section-more,
.panel-more {
    color: var(--brand-primary-dark);
    background: #e0f2fe;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: #bae6fd;
    box-shadow: var(--brand-shadow);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #e2e8f0;
}

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

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

.poster-badge {
    position: absolute;
    right: 10px;
    top: 10px;
    border-radius: 999px;
    padding: 5px 10px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.68);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

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

.movie-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #64748b;
    font-size: 12px;
    font-weight: 750;
}

.movie-card-meta a {
    color: var(--brand-primary-dark);
}

.movie-card h3 {
    margin: 9px 0 7px;
    font-size: 17px;
    font-weight: 850;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--brand-primary);
}

.movie-card p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0;
    overflow: hidden;
    color: #64748b;
    font-size: 13px;
    line-height: 1.65;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag-row span {
    display: inline-flex;
    border-radius: 999px;
    padding: 5px 9px;
    color: #0369a1;
    background: #e0f2fe;
    font-size: 12px;
    font-weight: 750;
}

.movie-card-compact p {
    min-height: 0;
}

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

.category-tile,
.category-panel {
    display: flex;
    min-height: 128px;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    border: 1px solid var(--brand-border);
    border-radius: 22px;
    background: linear-gradient(135deg, #ffffff, #f0f9ff);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-panel:hover {
    transform: translateY(-4px);
    box-shadow: var(--brand-shadow);
}

.category-tile span,
.category-panel-title {
    color: var(--brand-text);
    font-size: 21px;
    font-weight: 900;
}

.category-tile small,
.category-panel p {
    color: #64748b;
    line-height: 1.7;
}

.category-samples {
    display: grid;
    gap: 8px;
    margin: 14px 0;
}

.category-samples a {
    color: #0369a1;
    font-weight: 700;
}

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

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

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

.ranking-item {
    display: grid;
    grid-template-columns: 48px 92px 1fr;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--brand-border);
    border-radius: 20px;
    background: #ffffff;
}

.ranking-number {
    color: var(--brand-accent);
    font-size: 24px;
    font-weight: 950;
}

.ranking-poster {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: #e2e8f0;
}

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

.ranking-info h3 {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 900;
}

.ranking-info p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ranking-meta {
    gap: 6px;
    margin-top: 8px;
}

.ranking-meta span {
    padding: 4px 8px;
    font-size: 11px;
}

.inline-search,
.library-search {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.library-search input {
    flex: 1 1 280px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.filter-row button {
    border: 1px solid #bae6fd;
    border-radius: 999px;
    padding: 8px 13px;
    color: #0369a1;
    background: #ffffff;
    font-weight: 800;
    cursor: pointer;
}

.filter-row button.is-active {
    color: #ffffff;
    background: var(--brand-primary);
    border-color: var(--brand-primary);
}

.empty-result {
    display: none;
    margin-bottom: 18px;
    padding: 18px;
    border-radius: 18px;
    color: #92400e;
    background: #fef3c7;
    font-weight: 750;
}

.empty-result.is-visible {
    display: block;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin-bottom: 20px;
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
}

.breadcrumb a {
    color: var(--brand-primary-dark);
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(220px, 360px) 1fr;
    gap: 28px;
    margin-bottom: 34px;
    padding: 28px;
    border-radius: 28px;
    color: #ffffff;
    background: radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.46), rgba(15, 23, 42, 0) 34rem), linear-gradient(135deg, #0f172a, #1e293b);
    box-shadow: var(--brand-shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    background: #334155;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

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

.detail-intro h1 {
    margin: 0;
    font-size: clamp(32px, 5vw, 62px);
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.detail-one-line {
    max-width: 820px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.8;
}

.detail-tags span,
.genre-row span {
    color: #075985;
    background: #e0f2fe;
}

.player-section {
    margin-bottom: 34px;
}

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

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

.watch-button {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border: 0;
    border-radius: 999px;
    padding: 16px 24px;
    color: #ffffff;
    background: rgba(2, 132, 199, 0.92);
    box-shadow: 0 18px 44px rgba(2, 132, 199, 0.38);
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    transform: translate(-50%, -50%);
}

.watch-icon {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--brand-primary);
    background: #ffffff;
}

.player-frame.is-playing .watch-button {
    opacity: 0;
    pointer-events: none;
}

.player-state {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 6;
    border-radius: 999px;
    padding: 8px 12px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.68);
    font-size: 13px;
    font-weight: 750;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.player-state.is-visible {
    opacity: 1;
}

.detail-section p {
    color: #334155;
    font-size: 17px;
    line-height: 1.95;
}

.left-heading {
    align-items: flex-start;
    justify-content: flex-start;
}

.site-footer {
    border-top: 1px solid var(--brand-border);
    background: #ffffff;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 26px 0;
    color: #64748b;
}

.footer-brand {
    color: #0f172a;
    font-size: 18px;
    font-weight: 900;
}

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

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

    .desktop-nav {
        gap: 12px;
    }
}

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

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

    .hero-content {
        padding-right: 0;
    }

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

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

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

    .ranking-list-home,
    .ranking-list-full {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 640px) {
    .max-w-7xl {
        width: min(100% - 22px, 1280px);
    }

    .site-nav {
        min-height: 64px;
    }

    .brand-logo {
        font-size: 17px;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .hero-slider {
        height: 650px;
    }

    .hero-content {
        top: 44%;
    }

    .hero-text {
        font-size: 15px;
    }

    .hero-control {
        display: none;
    }

    .hero-dots {
        bottom: 142px;
    }

    .content-section,
    .detail-section,
    .page-hero,
    .detail-hero {
        padding: 20px;
        border-radius: 22px;
    }

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

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

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

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

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

    .movie-card p {
        font-size: 12px;
    }

    .ranking-item {
        grid-template-columns: 38px 74px 1fr;
        gap: 10px;
        padding: 10px;
    }

    .ranking-number {
        font-size: 20px;
    }

    .watch-button {
        padding: 13px 18px;
        font-size: 15px;
    }
}
