:root {
    --color-primary: #0ea5e9;
    --color-primary-dark: #0369a1;
    --color-primary-light: #7dd3fc;
    --color-secondary: #06b6d4;
    --color-accent: #22d3ee;
    --color-text: #111827;
    --color-muted: #6b7280;
    --color-soft: #f8fafc;
    --color-border: #e5e7eb;
    --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.08);
    --shadow-soft: 0 10px 28px rgba(14, 165, 233, 0.18);
    --radius-card: 18px;
    --radius-soft: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #f8fafc 0%, #eef7ff 46%, #f8fafc 100%);
    color: var(--color-text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

img,
video,
svg {
    display: block;
}

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

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

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

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.logo-mark {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, #38bdf8, #06b6d4 48%, #2563eb);
    box-shadow: var(--shadow-soft);
    color: #ffffff;
    transition: transform 0.25s ease;
}

.logo:hover .logo-mark {
    transform: scale(1.06) rotate(-2deg);
}

.logo-mark svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.logo-copy {
    display: grid;
    gap: 2px;
}

.logo-copy strong,
.footer-logo,
.gradient-text {
    background: linear-gradient(90deg, #0284c7, #0891b2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-copy strong {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.logo-copy small {
    color: var(--color-muted);
    font-size: 12px;
}

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

.nav-link,
.mobile-link {
    border-radius: 12px;
    color: #374151;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.nav-link {
    padding: 10px 16px;
}

.nav-link:hover,
.mobile-link:hover {
    color: var(--color-primary-dark);
    background: #e0f2fe;
}

.nav-link.active,
.mobile-link.active {
    color: #ffffff;
    background: var(--color-primary);
    box-shadow: 0 12px 22px rgba(14, 165, 233, 0.22);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #e0f2fe;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.mobile-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: #0369a1;
}

.mobile-panel {
    display: none;
    padding: 0 0 14px;
}

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

.mobile-link {
    padding: 12px 14px;
}

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

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

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

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

.hero-slide::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.24), transparent 36%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.55) 46%, rgba(15, 23, 42, 0.08)),
        linear-gradient(0deg, rgba(15, 23, 42, 0.96), transparent 42%);
}

.hero-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    padding-bottom: 72px;
}

.hero-copy {
    width: min(760px, 100%);
    color: #ffffff;
    animation: fadeUp 0.7s ease both;
}

.hero-kicker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 700;
    white-space: nowrap;
}

.badge-primary {
    background: var(--color-primary);
    color: #ffffff;
}

.badge-secondary {
    color: #075985;
    background: #e0f2fe;
}

.badge-dark {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
}

.hero h1 {
    margin: 0 0 14px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.04;
    letter-spacing: -0.045em;
    text-shadow: 0 5px 24px rgba(0, 0, 0, 0.42);
}

.hero-copy p {
    margin: 0 0 26px;
    max-width: 740px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border: 0;
    border-radius: 13px;
    padding: 12px 20px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #38bdf8, #06b6d4 48%, #2563eb);
    box-shadow: 0 16px 30px rgba(14, 165, 233, 0.28);
}

.btn-ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
}

.btn-soft {
    color: #075985;
    background: #e0f2fe;
}

.hero-controls {
    position: absolute;
    z-index: 5;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(14px);
}

.hero-controls:hover {
    background: rgba(255, 255, 255, 0.24);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    transition: width 0.2s ease, background 0.2s ease;
}

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

.hero-search {
    display: flex;
    width: min(560px, 100%);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(16px);
}

.hero-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    padding: 14px 16px;
    color: #ffffff;
    outline: 0;
    background: transparent;
}

.hero-search input::placeholder {
    color: rgba(255, 255, 255, 0.74);
}

.hero-search button {
    border: 0;
    padding: 0 22px;
    color: #ffffff;
    font-weight: 800;
    background: var(--color-primary);
}

.section {
    padding: 72px 0;
}

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

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

.section-title {
    margin: 0 0 6px;
    color: #111827;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.035em;
}

.section-subtitle {
    margin: 0;
    color: var(--color-muted);
}

.card,
.filter-card,
.category-card,
.info-card,
.player-panel {
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius-card);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-card);
}

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

.category-card {
    position: relative;
    min-height: 160px;
    overflow: hidden;
    padding: 24px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card::before {
    position: absolute;
    inset: auto -24px -48px auto;
    width: 140px;
    height: 140px;
    content: "";
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(37, 99, 235, 0.16));
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 42px rgba(14, 165, 233, 0.16);
}

.category-card strong {
    display: block;
    margin-bottom: 10px;
    font-size: 22px;
    font-weight: 900;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: var(--radius-card);
    background: #ffffff;
    box-shadow: 0 8px 26px 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(-6px);
    border-color: rgba(14, 165, 233, 0.35);
    box-shadow: 0 18px 34px rgba(14, 165, 233, 0.14);
}

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

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

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

.movie-type {
    position: absolute;
    top: 12px;
    left: 12px;
    border-radius: 999px;
    padding: 4px 10px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(14, 165, 233, 0.92);
    backdrop-filter: blur(8px);
}

.movie-content {
    padding: 15px;
}

.movie-meta,
.rank-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: var(--color-muted);
    font-size: 13px;
}

.movie-title {
    margin: 8px 0 8px;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 900;
}

.movie-title a:hover,
.rank-body a:hover {
    color: var(--color-primary-dark);
}

.movie-desc {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 12px;
    overflow: hidden;
    color: #4b5563;
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.movie-card.compact .movie-content {
    padding: 13px;
}

.filter-section {
    padding: 34px 0 8px;
}

.filter-card {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.5fr);
    gap: 24px;
    align-items: center;
    padding: 24px;
}

.filter-card h2 {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 900;
}

.filter-card p {
    margin: 0;
    color: var(--color-muted);
}

.filter-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px 150px;
    gap: 12px;
}

.filter-controls input,
.filter-controls select {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 13px;
    padding: 12px 14px;
    outline: none;
    background: #ffffff;
}

.filter-controls input:focus,
.filter-controls select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 82px 0;
    color: #ffffff;
    background:
        radial-gradient(circle at 82% 16%, rgba(34, 211, 238, 0.34), transparent 34%),
        linear-gradient(135deg, #0f172a 0%, #075985 48%, #0e7490 100%);
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 116px 64px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(226, 232, 240, 0.94);
    border-radius: var(--radius-card);
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.055);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 36px rgba(14, 165, 233, 0.13);
}

.rank-cover {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 15px;
    background: #dbeafe;
}

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

.rank-number {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 18px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    box-shadow: var(--shadow-soft);
}

.rank-body h3 {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.35;
    font-weight: 900;
}

.rank-body p {
    margin: 0 0 10px;
    color: #4b5563;
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.75fr);
    gap: 28px;
    align-items: start;
    padding-bottom: 72px;
}

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

.player-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-wrap video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background:
        radial-gradient(circle, rgba(14, 165, 233, 0.18), transparent 34%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.68));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-button {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border-radius: 999px;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    box-shadow: 0 20px 48px rgba(14, 165, 233, 0.36);
}

.player-button svg {
    width: 42px;
    height: 42px;
    margin-left: 5px;
    fill: #ffffff;
}

.player-status {
    position: absolute;
    left: 18px;
    bottom: 16px;
    z-index: 4;
    color: rgba(255, 255, 255, 0.84);
    font-size: 14px;
}

.info-card {
    padding: 28px;
    margin-top: 22px;
}

.info-card h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.info-card h2,
.side-card h2,
.related-title {
    margin: 28px 0 12px;
    font-size: 22px;
    line-height: 1.3;
    font-weight: 900;
}

.info-card p {
    color: #374151;
}

.side-card {
    position: sticky;
    top: 104px;
    padding: 24px;
}

.side-poster {
    overflow: hidden;
    border-radius: 18px;
    aspect-ratio: 4 / 3;
    margin-bottom: 18px;
    background: #dbeafe;
}

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

.fact-list {
    display: grid;
    gap: 16px;
    margin: 18px 0 0;
}

.fact-list div {
    padding-bottom: 14px;
    border-bottom: 1px solid #e5e7eb;
}

.fact-list strong {
    display: block;
    margin-bottom: 4px;
    color: #374151;
    font-size: 13px;
}

.fact-list span {
    color: #111827;
}

.related-section {
    padding: 0 0 76px;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.9fr 1fr;
    gap: 34px;
    padding: 56px 0;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 22px;
    font-weight: 900;
}

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

.site-footer p {
    margin: 0;
    color: #9ca3af;
}

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

.site-footer a:hover {
    color: #7dd3fc;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 16px;
    color: #9ca3af;
    text-align: center;
}

.empty-state {
    display: none;
    padding: 34px;
    border: 1px dashed #bae6fd;
    border-radius: var(--radius-card);
    color: #075985;
    text-align: center;
    background: #f0f9ff;
}

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

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

    .side-card {
        position: static;
    }

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

@media (max-width: 820px) {
    .container-custom {
        width: min(100% - 24px, 1280px);
    }

    .nav-links {
        display: none;
    }

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

    .hero {
        height: 620px;
    }

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

    .hero-controls {
        display: none;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-search {
        width: 100%;
    }

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

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

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

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

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

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

    .rank-number {
        position: absolute;
        width: 42px;
        height: 42px;
        margin: 8px;
        font-size: 14px;
    }

    .rank-item {
        position: relative;
    }

    .rank-cover {
        grid-row: span 1;
    }

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

@media (max-width: 520px) {
    .logo-copy strong {
        font-size: 18px;
    }

    .logo-copy small {
        display: none;
    }

    .logo-mark {
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }

    .movie-content {
        padding: 12px;
    }

    .movie-title {
        font-size: 15px;
    }

    .movie-desc {
        font-size: 13px;
    }

    .info-card {
        padding: 20px;
    }

    .player-button {
        width: 74px;
        height: 74px;
    }

    .player-button svg {
        width: 34px;
        height: 34px;
    }
}
