:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --text: #111827;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #2563eb;
    --brand-strong: #0891b2;
    --accent: #f97316;
    --dark: #0f172a;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select,
textarea {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(239, 246, 255, 0.92);
    border-bottom: 1px solid rgba(191, 219, 254, 0.65);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.08);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 76px;
}

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

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #ffffff;
    font-size: 15px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.28);
}

.brand-text {
    display: grid;
    line-height: 1.1;
}

.brand-name {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-subtitle {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    color: #334155;
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--brand);
}

.nav-link:hover {
    transform: translateY(-1px);
}

.nav-dropdown {
    position: relative;
}

.dropdown-trigger {
    border: 0;
    background: transparent;
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    display: grid;
    min-width: 160px;
    padding: 8px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: all 0.18s ease;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-panel a {
    padding: 9px 12px;
    color: #475569;
    border-radius: 10px;
}

.dropdown-panel a:hover {
    color: var(--brand);
    background: #eff6ff;
}

.nav-search {
    position: relative;
    display: flex;
    align-items: center;
    width: min(270px, 28vw);
    margin-left: 4px;
}

.nav-search input,
.mobile-search input,
.filter-input,
.filter-select {
    width: 100%;
    height: 42px;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    outline: 0;
    padding: 0 102px 0 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.mobile-search input:focus,
.filter-input:focus,
.filter-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.13);
}

.nav-search button,
.mobile-search button {
    position: absolute;
    right: 4px;
    height: 34px;
    padding: 0 16px;
    color: #ffffff;
    font-weight: 800;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    cursor: pointer;
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    border-radius: 2px;
    background: #1e293b;
}

.mobile-panel {
    display: none;
    padding: 0 16px 18px;
    border-top: 1px solid rgba(203, 213, 225, 0.7);
}

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

.mobile-panel nav {
    display: grid;
    gap: 8px;
    margin: 12px auto;
    width: min(1180px, 100%);
}

.mobile-search {
    position: relative;
    width: min(1180px, 100%);
    margin: 0 auto;
}

.main-section {
    padding: 64px 0;
}

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

.section-head h2,
.section-head h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-head p {
    max-width: 720px;
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

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

.hero-slider {
    position: relative;
    overflow: hidden;
    min-height: 670px;
    color: #ffffff;
    background: var(--dark);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    padding: 88px 0 72px;
    opacity: 0;
    pointer-events: none;
    background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.93) 0%, rgba(15, 23, 42, 0.74) 46%, rgba(15, 23, 42, 0.48) 100%), var(--hero-bg);
    background-size: cover;
    background-position: center;
    transition: opacity 0.55s ease;
}

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

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    align-items: center;
    gap: 48px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    padding: 8px 14px;
    color: #bfdbfe;
    font-weight: 800;
    letter-spacing: 0.08em;
    border: 1px solid rgba(191, 219, 254, 0.35);
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.16);
}

.hero-copy h1 {
    margin: 0 0 12px;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-copy h2 {
    margin: 0 0 16px;
    color: #dbeafe;
    font-size: clamp(26px, 4vw, 42px);
    font-weight: 900;
}

.hero-copy p {
    margin: 0 0 18px;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

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

.hero-tags span,
.tag-list span,
.movie-badges span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
    border-radius: 999px;
}

.hero-tags span {
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

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

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    box-shadow: 0 18px 32px rgba(37, 99, 235, 0.34);
}

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

.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 30px;
    background: linear-gradient(135deg, #1e3a8a, #0891b2);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

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

.hero-poster:hover img {
    transform: scale(1.06);
}

.hero-poster span {
    position: absolute;
    right: 20px;
    bottom: 20px;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    color: #ffffff;
    font-size: 24px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.92);
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.38);
}

.hero-controls {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 32px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 5;
}

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

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

.quick-search-panel {
    position: relative;
    z-index: 4;
    margin-top: -48px;
}

.quick-search-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 22px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.quick-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-chips a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    color: #1e40af;
    font-weight: 800;
    border-radius: 999px;
    background: #eff6ff;
}

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

.movie-card,
.category-card {
    min-width: 0;
}

.movie-card-link,
.category-card a {
    display: grid;
    height: 100%;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card-link:hover,
.category-card a:hover {
    transform: translateY(-5px);
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 20px 44px rgba(37, 99, 235, 0.14);
}

.movie-thumb,
.category-cover {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.movie-thumb img,
.category-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.movie-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    color: #ffffff;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.9);
    transform: translate(-50%, -50%) scale(0.84);
    opacity: 0;
    transition: all 0.22s ease;
}

.movie-card-link:hover .movie-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.movie-info,
.category-content {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.movie-badges span {
    color: #1d4ed8;
    background: #eff6ff;
}

.movie-info strong,
.category-content strong {
    color: #0f172a;
    font-size: 18px;
    line-height: 1.35;
}

.movie-info em,
.category-content em {
    display: -webkit-box;
    overflow: hidden;
    min-height: 44px;
    color: var(--muted);
    font-size: 14px;
    font-style: normal;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #64748b;
    font-size: 13px;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-samples span {
    max-width: 100%;
    overflow: hidden;
    padding: 5px 9px;
    color: #0f766e;
    font-size: 12px;
    white-space: nowrap;
    text-overflow: ellipsis;
    border-radius: 999px;
    background: #ccfbf1;
}

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

.ranking-item a {
    display: grid;
    grid-template-columns: 54px 122px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-item a:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.12);
}

.ranking-number {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: #ffffff;
    font-weight: 900;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), #ef4444);
}

.ranking-item img {
    width: 122px;
    height: 78px;
    object-fit: cover;
    border-radius: 14px;
    background: #dbeafe;
}

.ranking-item strong,
.ranking-item em,
.ranking-item small {
    display: block;
}

.ranking-item strong {
    overflow: hidden;
    color: #0f172a;
    font-size: 17px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ranking-item em {
    display: -webkit-box;
    overflow: hidden;
    margin: 5px 0;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ranking-item small {
    color: #2563eb;
    font-size: 12px;
}

.page-hero {
    padding: 70px 0 44px;
    color: #ffffff;
    background: radial-gradient(circle at 12% 18%, rgba(59, 130, 246, 0.55), transparent 34%), linear-gradient(135deg, #0f172a, #1e3a8a 54%, #0e7490);
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(36px, 6vw, 58px);
    font-weight: 900;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 220px 180px;
    gap: 12px;
    margin-bottom: 28px;
    padding: 18px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.filter-input,
.filter-select {
    padding: 0 16px;
}

.empty-state {
    display: none;
    padding: 50px 20px;
    color: var(--muted);
    text-align: center;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 22px;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0;
    color: #64748b;
    font-size: 14px;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 420px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    padding: 36px;
    color: #ffffff;
    background: radial-gradient(circle at 88% 16%, rgba(14, 165, 233, 0.35), transparent 36%), linear-gradient(135deg, #0f172a, #1e3a8a 56%, #0f766e);
    border-radius: 30px;
    box-shadow: var(--shadow);
}

.detail-cover {
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 24px;
    background: linear-gradient(135deg, #1e3a8a, #0891b2);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.28);
}

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

.detail-info h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.05em;
}

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

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.detail-meta span {
    padding: 8px 12px;
    color: #e0f2fe;
    font-weight: 800;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.tag-list span {
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.12);
}

.player-section,
.detail-content,
.related-section {
    margin-top: 36px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000000;
    border-radius: 26px;
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.18);
}

.player-shell video {
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.16), rgba(15, 23, 42, 0.78));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    padding-left: 5px;
    color: #ffffff;
    font-size: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.36);
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    align-items: start;
}

.content-panel,
.side-panel {
    padding: 26px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.content-panel h2,
.content-panel h3,
.player-section h2,
.related-section h2,
.side-panel h2 {
    margin: 0 0 16px;
    color: #0f172a;
    font-size: 26px;
    font-weight: 900;
}

.content-panel p {
    margin: 0 0 18px;
    color: #334155;
    font-size: 16px;
    line-height: 1.95;
}

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

.side-list a {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 14px;
    background: #f8fafc;
}

.side-list img {
    width: 86px;
    height: 58px;
    object-fit: cover;
    border-radius: 10px;
    background: #dbeafe;
}

.side-list strong {
    display: block;
    overflow: hidden;
    color: #0f172a;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.side-list span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.site-footer {
    margin-top: 64px;
    color: #cbd5e1;
    background: linear-gradient(135deg, #0f172a, #111827 52%, #0f172a);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr 1fr;
    gap: 36px;
    padding: 44px 0;
}

.footer-brand {
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
}

.site-footer p {
    max-width: 440px;
    color: #94a3b8;
    line-height: 1.8;
}

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

.site-footer a {
    display: block;
    margin: 8px 0;
    color: #cbd5e1;
}

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

.footer-link-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
}

.footer-bottom {
    display: flex;
    justify-content: center;
    gap: 18px;
    padding: 18px;
    color: #94a3b8;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

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

    .mobile-toggle {
        display: inline-block;
    }

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

    .hero-poster,
    .detail-cover {
        max-width: 560px;
    }

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

@media (max-width: 820px) {
    .hero-slider {
        min-height: 780px;
    }

    .hero-slide {
        padding: 56px 0 86px;
    }

    .quick-search-card,
    .filter-bar,
    .footer-grid,
    .ranking-grid {
        grid-template-columns: 1fr;
    }

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

    .section-head {
        display: block;
    }

    .detail-hero {
        padding: 24px;
    }
}

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

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

    .hero-copy h1 {
        font-size: 38px;
    }

    .hero-copy p,
    .page-hero p,
    .detail-one-line {
        font-size: 16px;
    }

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

    .ranking-item a {
        grid-template-columns: 44px 92px minmax(0, 1fr);
        gap: 10px;
    }

    .ranking-item img {
        width: 92px;
        height: 62px;
    }

    .footer-bottom {
        display: grid;
        text-align: center;
    }
}
