:root {
    --brand-blue: #2563eb;
    --brand-cyan: #06b6d4;
    --brand-teal: #14b8a6;
    --brand-orange: #f97316;
    --brand-red: #ef4444;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --paper: #ffffff;
    --soft: #f8fafc;
    --deep: #0f172a;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.14);
    --shadow-soft: 0 14px 36px rgba(15, 23, 42, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: #f1f5f9;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

button,
a,
input,
select {
    -webkit-tap-highlight-color: transparent;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, #2563eb 0%, #06b6d4 52%, #14b8a6 100%);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.22);
}

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

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    text-decoration: none;
    font-size: 24px;
    font-weight: 800;
    white-space: nowrap;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
    font-size: 18px;
}

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

.desktop-nav a,
.mobile-nav a,
.dropdown-button {
    color: inherit;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.dropdown:hover .dropdown-button,
.mobile-nav a:hover {
    color: #dbeafe;
}

.dropdown {
    position: relative;
    padding: 24px 0;
}

.dropdown-menu {
    position: absolute;
    top: 64px;
    left: 0;
    width: 220px;
    padding: 10px;
    border-radius: 18px;
    color: #1e293b;
    background: #ffffff;
    box-shadow: var(--shadow);
    visibility: hidden;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.dropdown:hover .dropdown-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: #334155;
}

.dropdown-menu a:hover {
    color: #2563eb;
    background: #eff6ff;
}

.header-search {
    position: relative;
    min-width: 250px;
    flex: 0 1 330px;
}

.header-search input,
.filter-search input {
    width: 100%;
    border: 0;
    outline: 0;
    color: #ffffff;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    padding: 12px 48px 12px 18px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
}

.header-search input::placeholder,
.filter-search input::placeholder {
    color: rgba(255, 255, 255, 0.78);
}

.header-search button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    color: #2563eb;
    cursor: pointer;
    background: #ffffff;
    font-weight: 900;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    color: #ffffff;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.18);
    font-size: 22px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

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

.mobile-nav a {
    display: block;
    padding: 11px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
}

.hero-carousel {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
    background-size: cover;
    background-position: center;
}

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 72% 32%, rgba(59, 130, 246, 0.26), transparent 32%), linear-gradient(180deg, rgba(2, 6, 23, 0.26), rgba(2, 6, 23, 0.82));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    color: #ffffff;
}

.hero-panel {
    max-width: 720px;
    padding: 36px;
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.30);
    box-shadow: 0 24px 80px rgba(2, 6, 23, 0.32);
    backdrop-filter: blur(10px);
}

.hero-kicker,
.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(90deg, #f97316, #ef4444);
    font-size: 14px;
    font-weight: 800;
}

.hero-panel h1 {
    margin: 18px 0 16px;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-panel p {
    max-width: 660px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2.2vw, 22px);
    line-height: 1.65;
}

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

.hero-tags span,
.meta-row span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    padding: 7px 12px;
    font-size: 14px;
    font-weight: 700;
}

.hero-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
}

.btn-primary,
.btn-secondary,
.btn-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    padding: 13px 22px;
    text-decoration: none;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(90deg, #f97316, #ef4444);
    box-shadow: 0 16px 36px rgba(239, 68, 68, 0.30);
}

.btn-secondary {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.btn-light {
    color: #2563eb;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
}

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

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

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

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

.section {
    padding: 70px 0;
}

.section.white {
    background: #ffffff;
}

.section.soft {
    background: linear-gradient(135deg, #eff6ff 0%, #ecfeff 100%);
}

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

.section-title h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.15;
    font-weight: 900;
    color: #0f172a;
}

.section-title p {
    margin: 8px 0 0;
    color: #64748b;
}

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

.movie-card {
    position: relative;
    display: flex;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    border-radius: 24px;
    color: inherit;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    text-decoration: none;
    transform: translateY(0);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.movie-card-vertical {
    flex-direction: column;
}

.movie-card-horizontal {
    min-height: 210px;
}

.card-poster {
    position: relative;
    overflow: hidden;
    background: #0f172a;
}

.movie-card-vertical .card-poster {
    aspect-ratio: 3 / 4;
}

.movie-card-horizontal .card-poster {
    flex: 0 0 170px;
}

.card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    transition: transform 0.35s ease;
}

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

.card-badge,
.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(90deg, #f97316, #ef4444);
    font-size: 12px;
    font-weight: 900;
}

.card-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #2563eb;
    background: rgba(255, 255, 255, 0.90);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
    min-width: 0;
}

.card-body h3 {
    margin: 0;
    color: #0f172a;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card:hover h3 {
    color: #2563eb;
}

.card-body p {
    margin: 0;
    color: #64748b;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.card-meta span {
    border-radius: 999px;
    padding: 5px 9px;
    color: #334155;
    background: #f1f5f9;
    font-size: 12px;
    font-weight: 800;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    padding: 26px;
    border-radius: 28px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    box-shadow: var(--shadow-soft);
    text-decoration: none;
}

.category-card:nth-child(2n) {
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.category-card:nth-child(3n) {
    background: linear-gradient(135deg, #7c3aed, #2563eb);
}

.category-card::after {
    content: "";
    position: absolute;
    width: 160px;
    height: 160px;
    right: -44px;
    bottom: -44px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.category-card h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 900;
}

.category-card p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.65;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 86px 0;
    color: #ffffff;
    background: radial-gradient(circle at 78% 28%, rgba(20, 184, 166, 0.45), transparent 26%), linear-gradient(135deg, #1d4ed8 0%, #06b6d4 48%, #0f172a 100%);
}

.page-hero h1 {
    margin: 18px 0 12px;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.08;
    font-weight: 900;
}

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

.filter-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    margin-bottom: 30px;
    padding: 18px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.filter-search input {
    color: #0f172a;
    background: #f1f5f9;
    box-shadow: inset 0 0 0 1px #e2e8f0;
}

.filter-search input::placeholder {
    color: #94a3b8;
}

.filter-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-links a,
.filter-links button {
    border: 0;
    border-radius: 999px;
    color: #334155;
    cursor: pointer;
    background: #f1f5f9;
    padding: 10px 14px;
    text-decoration: none;
    font-weight: 800;
}

.filter-links a:hover,
.filter-links button:hover {
    color: #2563eb;
    background: #dbeafe;
}

.empty-state {
    display: none;
    padding: 34px;
    border-radius: 24px;
    color: #64748b;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    text-align: center;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 80px 112px 1fr;
    align-items: stretch;
    gap: 16px;
    padding: 16px;
    border-radius: 24px;
    color: inherit;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.rank-number {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444);
    font-size: 26px;
    font-weight: 900;
}

.rank-item img {
    width: 112px;
    height: 150px;
    border-radius: 16px;
    object-fit: cover;
}

.rank-info h3 {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 900;
}

.rank-info p {
    margin: 0 0 12px;
    color: #64748b;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 24px;
    color: #dbeafe;
    font-size: 14px;
}

.breadcrumb a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 800;
}

.detail-hero {
    padding: 44px 0 70px;
    color: #ffffff;
    background: radial-gradient(circle at 82% 18%, rgba(20, 184, 166, 0.28), transparent 28%), linear-gradient(135deg, #0f172a 0%, #1d4ed8 55%, #0891b2 100%);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr);
    gap: 30px;
    align-items: start;
}

.video-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 30px;
    background: #020617;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
}

.video-frame video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.70));
}

.player-overlay.hidden {
    display: none;
}

.play-icon {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #2563eb;
    background: #ffffff;
    font-size: 30px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.30);
}

.player-overlay strong {
    font-size: 20px;
    letter-spacing: 0.08em;
}

.detail-info {
    padding: 28px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

.detail-info h1 {
    margin: 14px 0 16px;
    font-size: clamp(30px, 5vw, 52px);
    line-height: 1.1;
    font-weight: 900;
}

.detail-info p {
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.8;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(290px, 0.8fr);
    gap: 28px;
}

.prose-card,
.side-card {
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    padding: 28px;
}

.prose-card h2,
.side-card h2 {
    margin: 0 0 18px;
    font-size: 26px;
    font-weight: 900;
}

.prose-card p {
    margin: 0 0 18px;
    color: #334155;
    line-height: 1.9;
    font-size: 17px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-list span {
    border-radius: 999px;
    color: #1e40af;
    background: #dbeafe;
    padding: 8px 12px;
    font-weight: 800;
}

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

.related-grid .movie-card .card-body h3 {
    font-size: 16px;
}

.cta-band {
    position: relative;
    overflow: hidden;
    border-radius: 34px;
    color: #ffffff;
    background: radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.24), transparent 26%), linear-gradient(90deg, #2563eb, #06b6d4, #14b8a6);
    padding: 46px;
    box-shadow: var(--shadow);
}

.cta-band h2 {
    margin: 0 0 12px;
    font-size: clamp(26px, 4vw, 42px);
    font-weight: 900;
}

.cta-band p {
    margin: 0;
    max-width: 760px;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.8;
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(135deg, #020617 0%, #0f172a 45%, #111827 100%);
}

.footer-inner {
    padding: 52px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 34px;
    margin-bottom: 36px;
}

.footer-grid h3 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
}

.footer-grid p,
.footer-grid li {
    color: #94a3b8;
    line-height: 1.8;
}

.footer-grid ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-grid a {
    color: #94a3b8;
    text-decoration: none;
}

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

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.20);
    padding-top: 24px;
    color: #64748b;
    font-size: 14px;
}

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

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

    .hero-carousel {
        height: 560px;
    }

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

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

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

@media (max-width: 760px) {
    .header-inner,
    .section-inner,
    .footer-inner,
    .hero-content {
        width: min(100% - 24px, 1180px);
    }

    .brand {
        font-size: 21px;
    }

    .hero-carousel {
        height: 620px;
    }

    .hero-panel {
        padding: 24px;
        border-radius: 24px;
    }

    .section {
        padding: 48px 0;
    }

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

    .grid-cards,
    .category-grid,
    .ranking-list,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .movie-card-horizontal,
    .rank-item {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }

    .movie-card-horizontal .card-poster,
    .rank-item img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 10;
        flex-basis: auto;
    }

    .rank-number {
        min-height: 58px;
    }

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

    .detail-info,
    .prose-card,
    .side-card,
    .cta-band {
        padding: 22px;
        border-radius: 24px;
    }

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

    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }
}
