:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --primary: #2563eb;
    --primary-deep: #1d4ed8;
    --accent: #06b6d4;
    --text: #1e293b;
    --muted: #64748b;
    --line: #e2e8f0;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, #2563eb, #1d4ed8 48%, #0891b2);
    color: #ffffff;
    box-shadow: 0 16px 40px rgba(37, 99, 235, 0.22);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: max-content;
}

.brand-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
}

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

.brand-copy strong {
    font-size: 23px;
    letter-spacing: 0.02em;
}

.brand-copy small {
    margin-top: 6px;
    color: #dbeafe;
    font-size: 13px;
}

.site-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 12px;
    color: #eff6ff;
    background: rgba(255, 255, 255, 0.1);
    transition: transform 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

.nav-link-soft {
    background: rgba(255, 255, 255, 0.08);
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
}

.mobile-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 99px;
    background: #ffffff;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 640px;
    color: #ffffff;
    background:
        radial-gradient(circle at 15% 10%, rgba(59, 130, 246, 0.45), transparent 32%),
        radial-gradient(circle at 84% 28%, rgba(6, 182, 212, 0.35), transparent 36%),
        linear-gradient(180deg, #0f172a, #1e293b);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.08;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M36 18c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6 2.69-6 6-6zM24 42c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6 2.69-6 6-6z' stroke='%23fff' stroke-width='2'/%3E%3C/g%3E%3C/svg%3E");
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 0.06;
    }

    50% {
        opacity: 0.14;
    }
}

.hero-inner {
    position: relative;
    z-index: 1;
    padding: 70px 0 82px;
}

.hero-topline {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    color: #facc15;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-slide {
    display: none;
    grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
    align-items: center;
    gap: 44px;
}

.hero-slide.is-active {
    display: grid;
}

.hero-poster {
    position: relative;
    overflow: hidden;
    min-height: 430px;
    border-radius: 28px;
    box-shadow: 0 32px 70px rgba(0, 0, 0, 0.36);
}

.hero-poster img {
    width: 100%;
    height: 100%;
    min-height: 430px;
    object-fit: cover;
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.08));
}

.hero-content {
    display: grid;
    gap: 22px;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span {
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #e0f2fe;
    font-size: 14px;
}

.hero-tags span:first-child {
    background: #2563eb;
    color: #ffffff;
}

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

.hero p {
    margin: 0;
    color: #cbd5e1;
    font-size: 18px;
}

.hero-stats,
.hero-actions,
.hero-dots,
.tag-list,
.movie-meta-line,
.footer-links {
    display: flex;
    flex-wrap: wrap;
}

.hero-stats {
    gap: 24px;
    color: #e2e8f0;
}

.hero-stats strong {
    display: block;
    color: #facc15;
    font-size: 28px;
    line-height: 1.1;
}

.hero-actions,
.hero-dots {
    gap: 14px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border: 0;
    border-radius: 14px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.25);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
    background: var(--primary-deep);
    transform: translateY(-2px);
    box-shadow: 0 18px 32px rgba(37, 99, 235, 0.34);
}

.button.secondary {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

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

.hero-dot.is-active {
    width: 54px;
    background: #38bdf8;
}

.section {
    padding: 72px 0;
}

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

.section-dark {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #ffffff;
}

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

.eyebrow {
    display: inline-flex;
    margin-bottom: 10px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section h2,
.section-title {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.18;
    letter-spacing: -0.03em;
}

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

.section-dark .section-head p {
    color: #cbd5e1;
}

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

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

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

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: var(--shadow);
}

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #dbeafe, #e0f2fe);
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), transparent 46%);
}

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 8px 12px;
    background: rgba(37, 99, 235, 0.92);
}

.rank-badge {
    left: 12px;
    top: 12px;
    padding: 7px 10px;
    background: rgba(239, 68, 68, 0.94);
}

.movie-card-body {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.movie-meta-line {
    gap: 8px;
    color: #64748b;
    font-size: 13px;
}

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

.movie-card h3 a:hover {
    color: var(--primary);
}

.movie-card p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0;
    overflow: hidden;
    color: #64748b;
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tag-list {
    gap: 7px;
}

.tag-list span {
    padding: 4px 9px;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 12px;
    font-weight: 700;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 178px;
    padding: 24px;
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff, #eff6ff);
    border: 1px solid rgba(191, 219, 254, 0.78);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card::after {
    content: "";
    position: absolute;
    right: -34px;
    bottom: -34px;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
}

.category-card h3,
.category-card p,
.category-card span {
    position: relative;
    z-index: 1;
}

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

.category-card p {
    margin: 0 0 20px;
    color: #64748b;
}

.category-card span {
    color: #2563eb;
    font-weight: 900;
}

.search-panel {
    display: grid;
    grid-template-columns: 0.9fr 1.4fr;
    gap: 22px;
    align-items: center;
    margin: 36px 0;
    padding: 24px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid #dbeafe;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.08);
}

.search-copy h2 {
    margin: 0;
    font-size: 23px;
    line-height: 1.3;
}

.search-controls {
    display: grid;
    grid-template-columns: 1fr 170px 170px;
    gap: 12px;
}

.search-input,
.select-input {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #ffffff;
    color: #0f172a;
    outline: none;
}

.search-input:focus,
.select-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.empty-state {
    display: none;
    padding: 28px;
    border-radius: 20px;
    background: #ffffff;
    color: #64748b;
    text-align: center;
}

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

.page-hero {
    padding: 56px 0 36px;
    color: #ffffff;
    background:
        radial-gradient(circle at 18% 18%, rgba(59, 130, 246, 0.5), transparent 28%),
        linear-gradient(135deg, #0f172a, #1e293b 55%, #0e7490);
}

.page-hero h1 {
    max-width: 860px;
    margin: 0;
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 760px;
    margin: 16px 0 0;
    color: #cbd5e1;
    font-size: 18px;
}

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

.breadcrumbs a:hover {
    color: #ffffff;
    text-decoration: underline;
}

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

.player-card,
.info-card {
    overflow: hidden;
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: var(--shadow);
}

.player-box {
    position: relative;
    overflow: hidden;
    background: #000000;
    aspect-ratio: 16 / 9;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: rgba(15, 23, 42, 0.42);
    color: #ffffff;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.95);
    box-shadow: 0 20px 42px rgba(37, 99, 235, 0.38);
    font-size: 28px;
}

.player-title,
.info-card,
.article-section {
    padding: 24px;
}

.player-title h2,
.article-section h2 {
    margin: 0 0 12px;
    line-height: 1.25;
}

.player-title h2 {
    font-size: 28px;
}

.player-title p,
.article-section p {
    margin: 0;
    color: #64748b;
}

.detail-poster {
    overflow: hidden;
    border-radius: 22px;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #dbeafe, #e0f2fe);
}

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

.info-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
    color: #64748b;
}

.info-list strong {
    color: #0f172a;
}

.article-section {
    margin-top: 28px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.article-section p {
    color: #475569;
    white-space: pre-line;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 64px 90px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-no {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #f59e0b);
    font-weight: 900;
}

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

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

.rank-info h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-info p {
    margin: 0;
    color: #64748b;
}

.rank-score {
    text-align: right;
    color: #64748b;
}

.rank-score strong {
    display: block;
    color: #f59e0b;
    font-size: 24px;
}

.site-footer {
    padding: 40px 0;
    background: #0f172a;
    color: #cbd5e1;
}

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

.footer-inner p {
    margin: 8px 0 0;
}

.footer-links {
    gap: 16px;
}

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

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

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

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

@media (max-width: 820px) {
    .mobile-toggle {
        display: block;
    }

    .site-nav {
        display: none;
        position: absolute;
        left: 16px;
        right: 16px;
        top: 78px;
        padding: 16px;
        border-radius: 20px;
        background: #1d4ed8;
        box-shadow: var(--shadow);
    }

    .site-nav.is-open {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .hero-slide {
        grid-template-columns: 1fr;
    }

    .hero-poster,
    .hero-poster img {
        min-height: 320px;
    }

    .section-head,
    .footer-inner {
        display: grid;
    }

    .search-panel,
    .search-controls {
        grid-template-columns: 1fr;
    }

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

    .rank-row {
        grid-template-columns: 46px 74px minmax(0, 1fr);
    }

    .rank-score {
        grid-column: 3;
        text-align: left;
    }
}

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

    .brand-copy small {
        display: none;
    }

    .brand-copy strong {
        font-size: 19px;
    }

    .hero-inner {
        padding: 42px 0 52px;
    }

    .hero-poster,
    .hero-poster img {
        min-height: 260px;
    }

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

    .player-cover span {
        width: 72px;
        height: 72px;
        font-size: 24px;
    }
}
