:root {
    --color-primary: #0ea5e9;
    --color-primary-dark: #0284c7;
    --color-cyan: #06b6d4;
    --color-blue: #2563eb;
    --color-ink: #111827;
    --color-muted: #6b7280;
    --color-soft: #f8fafc;
    --color-line: #e5e7eb;
    --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.10);
    --shadow-soft: 0 10px 25px rgba(14, 165, 233, 0.18);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #ffffff;
    color: var(--color-ink);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

.container-custom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}

.gradient-bg,
.brand-icon {
    background: linear-gradient(135deg, #38bdf8 0%, #06b6d4 50%, #2563eb 100%);
}

.gradient-text {
    background: linear-gradient(90deg, #0284c7 0%, #0891b2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--color-line);
    box-shadow: 0 1px 8px rgba(15, 23, 42, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

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

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

.brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease;
}

.brand:hover .brand-icon {
    transform: scale(1.08);
}

.brand-text,
.footer-brand div {
    display: grid;
    gap: 2px;
}

.brand-text strong,
.footer-brand strong {
    font-size: 22px;
    line-height: 1;
    font-weight: 800;
    background: linear-gradient(90deg, #0284c7 0%, #0891b2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text small,
.footer-brand small {
    color: var(--color-muted);
    font-size: 12px;
}

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

.desktop-nav a,
.mobile-menu a {
    border-radius: 12px;
    padding: 10px 16px;
    color: #374151;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.desktop-nav a:hover,
.mobile-menu a:hover {
    background: #f0f9ff;
    color: #0284c7;
}

.desktop-nav a.active,
.mobile-menu a.active {
    color: #ffffff;
    background: #0ea5e9;
    box-shadow: 0 8px 18px rgba(14, 165, 233, 0.25);
}

.mobile-menu-button {
    display: none;
    border: 0;
    background: transparent;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 23px;
    height: 2px;
    border-radius: 999px;
    background: #374151;
}

.mobile-menu {
    display: none;
    padding: 0 16px 16px;
}

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

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

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

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.50) 45%, rgba(0, 0, 0, 0.12) 100%);
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding-bottom: 76px;
}

.hero-copy {
    max-width: 760px;
    color: #ffffff;
    animation: fadeIn 0.65s ease both;
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.badge,
.movie-tags span,
.footer-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 700;
    background: #e0f2fe;
    color: #0369a1;
}

.hero-meta .badge {
    color: #ffffff;
    background: #0ea5e9;
}

.hero-meta span:not(.badge) {
    color: rgba(255, 255, 255, 0.86);
    font-weight: 700;
}

.hero-copy h1,
.hero-copy h2 {
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.05;
    margin: 0 0 18px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.hero-copy p {
    margin: 0 0 28px;
    max-width: 680px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 18px;
    line-height: 1.75;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.hero-actions,
.movie-card-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-primary,
.btn-secondary,
.movie-card-actions a,
.detail-actions a {
    border-radius: 14px;
    padding: 12px 18px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary,
.movie-card-actions a:first-child,
.detail-actions a:first-child {
    color: #ffffff;
    background: linear-gradient(135deg, #38bdf8 0%, #06b6d4 50%, #2563eb 100%);
    box-shadow: var(--shadow-soft);
}

.btn-secondary,
.movie-card-actions a:last-child,
.detail-actions a:last-child {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
}

.movie-card-actions a:last-child {
    color: #0284c7;
    background: #f0f9ff;
    border-color: #dbeafe;
}

.btn-primary:hover,
.btn-secondary:hover,
.movie-card-actions a:hover,
.detail-actions a:hover {
    transform: translateY(-2px);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 3;
}

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

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(10px);
    cursor: pointer;
    font-size: 22px;
}

.hero-arrow.prev {
    left: 22px;
}

.hero-arrow.next {
    right: 22px;
}

.section-block {
    padding: 70px 0;
}

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

.section-gray {
    background: #f3f4f6;
}

.section-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 28px;
}

.section-mark {
    width: 8px;
    height: 42px;
    border-radius: 999px;
    background: linear-gradient(180deg, #38bdf8 0%, #2563eb 100%);
    flex: 0 0 auto;
    margin-top: 4px;
}

.section-heading h2,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    color: #111827;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
}

.section-heading p,
.page-hero p,
.detail-info p {
    color: var(--color-muted);
    line-height: 1.75;
    margin: 8px 0 0;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #0f172a;
}

.movie-card-large .movie-cover {
    aspect-ratio: 16 / 9;
}

.movie-card-compact .movie-cover {
    aspect-ratio: 3 / 4;
}

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

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

.movie-cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.58) 100%);
}

.movie-year,
.rank-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 999px;
    padding: 5px 10px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.56);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.rank-badge {
    left: 12px;
    right: auto;
    background: #0ea5e9;
}

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

.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 30px;
}

.movie-tags span:nth-child(even) {
    background: #cffafe;
    color: #0e7490;
}

.movie-card h3 {
    margin: 14px 0 10px;
    font-size: 20px;
    line-height: 1.3;
}

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

.movie-card h3 a:hover {
    color: #0284c7;
}

.movie-card p {
    margin: 0 0 18px;
    color: #4b5563;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.search-panel {
    margin: 0 0 30px;
    padding: 20px;
    border: 1px solid #dbeafe;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.90);
    box-shadow: 0 10px 28px rgba(14, 165, 233, 0.08);
}

.search-panel label {
    display: grid;
    gap: 8px;
    color: #1f2937;
    font-weight: 800;
}

.search-panel input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 16px;
    padding: 14px 16px;
    outline: none;
    color: #111827;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-panel input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.20);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.filter-chip {
    border: 0;
    border-radius: 999px;
    padding: 9px 14px;
    color: #0369a1;
    background: #e0f2fe;
    cursor: pointer;
    font-weight: 800;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.filter-chip:hover,
.filter-chip.is-active {
    color: #ffffff;
    background: #0ea5e9;
    transform: translateY(-1px);
}

.search-empty {
    display: none;
    padding: 30px;
    border-radius: 20px;
    color: #6b7280;
    background: #f9fafb;
    text-align: center;
    font-weight: 700;
}

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

.page-hero {
    padding: 66px 0;
    background: linear-gradient(135deg, #f0f9ff 0%, #ecfeff 50%, #ffffff 100%);
    border-bottom: 1px solid #e5e7eb;
}

.page-hero .eyebrow,
.detail-eyebrow {
    display: inline-flex;
    margin-bottom: 16px;
    border-radius: 999px;
    padding: 7px 14px;
    color: #0369a1;
    background: #e0f2fe;
    font-weight: 800;
}

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

.category-card {
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card-posters {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
    height: 150px;
    background: #0f172a;
}

.category-card-posters img {
    height: 100%;
    object-fit: cover;
}

.category-card-body {
    padding: 22px;
}

.category-card-body span {
    display: inline-flex;
    margin-bottom: 10px;
    border-radius: 999px;
    padding: 6px 12px;
    color: #0369a1;
    background: #e0f2fe;
    font-weight: 800;
}

.category-card-body h2 {
    margin: 0 0 8px;
    font-size: 26px;
}

.category-card-body p {
    margin: 0;
    color: #6b7280;
    line-height: 1.7;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 66px 120px 1fr;
    gap: 16px;
    align-items: center;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

.ranking-number {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.ranking-row img {
    height: 84px;
    object-fit: cover;
    border-radius: 16px;
}

.ranking-row h2,
.ranking-row h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.ranking-row p {
    margin: 0;
    color: #6b7280;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.detail-hero {
    padding: 46px 0 60px;
    background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 46%, #ecfeff 100%);
    border-bottom: 1px solid #e5e7eb;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #64748b;
    font-size: 14px;
    margin-bottom: 18px;
}

.breadcrumbs a:hover {
    color: #0284c7;
}

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

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: var(--shadow-card);
    background: #0f172a;
}

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

.detail-info h1 {
    margin-bottom: 16px;
}

.detail-info .lead {
    color: #374151;
    font-size: 18px;
    line-height: 1.85;
    margin-bottom: 22px;
}

.player-section {
    padding: 66px 0;
    background: #0f172a;
}

.player-title {
    margin: 0 0 22px;
    color: #ffffff;
    font-size: 30px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.16));
    display: grid;
    place-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 900;
    font-size: 20px;
}

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

.play-circle {
    width: 78px;
    height: 78px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
    box-shadow: 0 18px 38px rgba(14, 165, 233, 0.38);
    font-size: 28px;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 30px;
}

.detail-article,
.detail-side {
    border: 1px solid #e5e7eb;
    border-radius: 26px;
    background: #ffffff;
    padding: 28px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}

.detail-article h2,
.detail-side h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.detail-article p {
    margin: 0 0 22px;
    color: #374151;
    line-height: 1.9;
    font-size: 17px;
}

.info-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #eef2f7;
    padding-bottom: 12px;
}

.info-list dt {
    color: #6b7280;
    font-weight: 700;
}

.info-list dd {
    margin: 0;
    color: #111827;
    font-weight: 800;
    text-align: right;
}

.site-footer {
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
    gap: 34px;
    padding-top: 58px;
    padding-bottom: 44px;
}

.site-footer p {
    color: #9ca3af;
    line-height: 1.8;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

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

.footer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid #1f2937;
    padding-top: 22px;
    padding-bottom: 28px;
    color: #9ca3af;
    font-size: 14px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

    .mobile-menu-button {
        display: inline-flex;
    }

    .hero-slider {
        height: 520px;
    }

    .hero-arrow {
        display: none;
    }

    .movie-grid,
    .movie-grid-large,
    .movie-grid-compact,
    .category-grid,
    .ranking-list,
    .detail-grid,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        align-items: start;
    }

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

    .ranking-row {
        grid-template-columns: 54px 94px 1fr;
    }
}

@media (max-width: 560px) {
    .container-custom {
        padding-left: 14px;
        padding-right: 14px;
    }

    .brand-text small {
        display: none;
    }

    .hero-content {
        padding-bottom: 64px;
    }

    .hero-copy p {
        font-size: 16px;
    }

    .section-block {
        padding: 48px 0;
    }

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

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

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

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

    .movie-card-actions {
        display: grid;
    }

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