:root {
    --cyan-50: #ecfeff;
    --cyan-100: #cffafe;
    --cyan-500: #06b6d4;
    --cyan-600: #0891b2;
    --cyan-700: #0e7490;
    --blue-600: #2563eb;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --text: #111827;
    --muted: #64748b;
    --card: #ffffff;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
    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(135deg, var(--slate-50), var(--slate-100));
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(16px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan-600), var(--blue-600));
    box-shadow: 0 10px 22px rgba(8, 145, 178, 0.26);
    font-size: 14px;
}

.brand-name {
    font-size: 22px;
    background: linear-gradient(135deg, var(--cyan-600), var(--blue-600));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

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

.nav-link {
    color: var(--slate-700);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--cyan-600);
}

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

.search-form input,
.mobile-search input {
    width: 210px;
    border: 1px solid var(--slate-200);
    border-radius: 999px;
    padding: 10px 14px;
    outline: none;
    background: #ffffff;
}

.search-form input:focus,
.mobile-search input:focus {
    border-color: var(--cyan-500);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.14);
}

.search-form button,
.mobile-search button,
.primary-button,
.ghost-button,
.action-button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 700;
    cursor: pointer;
}

.search-form button,
.primary-button,
.action-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan-600), var(--blue-600));
    box-shadow: 0 12px 24px rgba(8, 145, 178, 0.22);
}

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

.menu-toggle {
    display: none;
    border: 0;
    border-radius: 12px;
    padding: 10px 12px;
    background: var(--slate-100);
    color: var(--slate-800);
    font-size: 20px;
}

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

.mobile-panel.is-open {
    display: grid;
    gap: 12px;
}

.mobile-panel a {
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--slate-50);
    font-weight: 700;
}

.hero-slider {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: linear-gradient(180deg, var(--slate-900), var(--slate-800));
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.9s ease;
}

.hero-slide.is-active {
    opacity: 1;
    z-index: 1;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(8, 145, 178, 0.36), transparent 30%), linear-gradient(0deg, rgba(0, 0, 0, 0.85), rgba(15, 23, 42, 0.18));
}

.hero-content {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: 70px;
    width: min(1180px, calc(100% - 48px));
    transform: translateX(-50%);
    color: #ffffff;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 14px;
    margin-bottom: 16px;
    color: #cffafe;
    background: rgba(8, 145, 178, 0.22);
    border: 1px solid rgba(207, 250, 254, 0.24);
    backdrop-filter: blur(8px);
    font-weight: 700;
}

.hero-content h2 {
    max-width: 760px;
    margin: 0 0 16px;
    font-size: clamp(34px, 6vw, 68px);
    line-height: 1.05;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 22px;
    color: #e2e8f0;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.75;
}

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

.hero-tags span,
.tag-row span {
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

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

.hero-control {
    position: absolute;
    z-index: 3;
    top: 50%;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-control.prev {
    left: 18px;
}

.hero-control.next {
    right: 18px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

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

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

.section-eyebrow {
    margin: 0 0 8px;
    color: var(--cyan-700);
    font-weight: 800;
    letter-spacing: 0.06em;
}

.section-header h1,
.section-header h2,
.page-title {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
}

.section-header p,
.page-lead {
    max-width: 760px;
    color: var(--muted);
    line-height: 1.8;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link,
.poster-frame {
    display: block;
}

.poster-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, var(--slate-800), var(--cyan-700));
}

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

.movie-card:hover .poster-frame img,
.rank-item:hover .poster-frame img {
    transform: scale(1.06);
}

.poster-year {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 999px;
    padding: 5px 10px;
    color: #ffffff;
    background: var(--cyan-600);
    font-size: 12px;
    font-weight: 800;
}

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

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

.movie-card-body h3 a:hover {
    color: var(--cyan-600);
}

.movie-card-body p {
    min-height: 48px;
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.65;
    font-size: 14px;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    color: #64748b;
    font-size: 13px;
}

.tag-row span {
    color: var(--cyan-700);
    background: var(--cyan-50);
}

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

.featured-card {
    position: relative;
    min-height: 420px;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: var(--shadow);
    background: var(--slate-800);
}

.featured-card img {
    width: 100%;
    height: 100%;
    min-height: 420px;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.featured-card-content {
    position: absolute;
    inset: auto 0 0;
    padding: 28px;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent);
}

.featured-card-content h3 {
    margin: 0 0 10px;
    font-size: 24px;
}

.featured-card-content p {
    color: #e2e8f0;
    line-height: 1.7;
}

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

.category-card {
    border-radius: 24px;
    padding: 26px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card h3 {
    margin: 0 0 10px;
    font-size: 24px;
}

.category-card p {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.75;
}

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mini-links a {
    border-radius: 999px;
    padding: 7px 11px;
    background: var(--slate-100);
    color: var(--slate-700);
    font-size: 13px;
    font-weight: 700;
}

.ranking-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 42px 70px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    border-radius: 18px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

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

.rank-thumb {
    width: 70px;
    border-radius: 12px;
}

.rank-content {
    min-width: 0;
}

.rank-content strong {
    display: block;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-content em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--cyan-700);
    font-weight: 700;
}

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

.player-shell,
.detail-card,
.review-card,
.side-card {
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.player-shell {
    overflow: hidden;
    background: #020617;
}

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

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

.play-overlay {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(8, 145, 178, 0.88);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
    font-size: 28px;
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.play-overlay.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.9);
}

.detail-card,
.review-card,
.side-card {
    padding: 26px;
}

.detail-card h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.2;
}

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

.detail-meta span {
    border-radius: 999px;
    padding: 8px 12px;
    background: var(--slate-100);
    color: var(--slate-700);
    font-weight: 700;
}

.detail-card .summary,
.review-card p {
    color: #334155;
    line-height: 1.9;
    font-size: 16px;
}

.detail-card .one-line {
    margin: 18px 0;
    padding: 18px 20px;
    border-left: 4px solid var(--cyan-600);
    border-radius: 16px;
    color: var(--cyan-700);
    background: var(--cyan-50);
    font-size: 18px;
    font-weight: 800;
}

.side-card h2,
.review-card h2 {
    margin: 0 0 18px;
}

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

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

.related-item .poster-frame {
    border-radius: 12px;
}

.related-item strong {
    display: block;
    margin-bottom: 6px;
    line-height: 1.4;
}

.related-item span {
    color: var(--muted);
    font-size: 13px;
}

.search-page {
    min-height: 58vh;
}

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

.empty-state {
    border-radius: 24px;
    padding: 44px;
    text-align: center;
    color: var(--muted);
    background: #ffffff;
    border: 1px solid var(--slate-200);
}

.site-footer {
    margin-top: 80px;
    color: #cbd5e1;
    background: linear-gradient(135deg, var(--slate-900), var(--slate-800));
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 24px;
    display: grid;
    gap: 20px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

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

.footer-inner p {
    margin: 0;
    color: #94a3b8;
}

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

    .menu-toggle {
        display: inline-flex;
    }

    .header-inner {
        justify-content: space-between;
    }

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

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

@media (max-width: 860px) {
    .search-form {
        display: none;
    }

    .hero-slider {
        min-height: 620px;
    }

    .hero-control {
        display: none;
    }

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

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

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

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

    .hero-content {
        bottom: 54px;
        width: calc(100% - 32px);
    }

    .hero-actions {
        display: grid;
    }

    .section,
    .page-section {
        padding: 44px 16px;
    }

    .movie-grid,
    .movie-grid.dense,
    .search-results {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 34px 62px minmax(0, 1fr);
    }
}
