:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --blue: #2563eb;
    --cyan: #06b6d4;
    --teal: #14b8a6;
    --orange: #f97316;
    --red: #ef4444;
    --slate: #0f172a;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --radius: 20px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

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

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

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    color: #fff;
    background: linear-gradient(90deg, var(--blue), var(--cyan), var(--teal));
    box-shadow: 0 10px 24px rgba(14, 116, 144, 0.25);
}

.header-inner {
    width: min(1220px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

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

.nav-link,
.nav-button {
    padding: 10px 13px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.95);
    background: transparent;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-button:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    width: 220px;
    padding: 8px;
    border-radius: 16px;
    background: #fff;
    color: #1f2937;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

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

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

.dropdown-menu a:hover {
    background: #eff6ff;
    color: var(--blue);
}

.header-search {
    position: relative;
    width: 260px;
}

.header-search input {
    width: 100%;
    height: 42px;
    padding: 0 16px 0 42px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
}

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

.header-search .search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.82;
}

.search-panel {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    max-height: 420px;
    overflow-y: auto;
    display: none;
    border-radius: 16px;
    background: #fff;
    color: #1f2937;
    box-shadow: var(--shadow);
}

.search-panel.is-open {
    display: block;
}

.search-panel a {
    display: block;
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
}

.search-panel a:hover {
    background: #eff6ff;
}

.search-panel strong {
    display: block;
    font-size: 15px;
}

.search-panel span {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.mobile-panel {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-panel.is-open {
    display: block;
}

.mobile-panel .nav-link {
    display: block;
    margin: 4px 0;
}

.page {
    min-height: 100vh;
}

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

.hero {
    position: relative;
    height: min(620px, 75vh);
    min-height: 500px;
    overflow: hidden;
    background: #0f172a;
}

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

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

.hero-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 35%, rgba(6, 182, 212, 0.34), transparent 34%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.46), rgba(15, 23, 42, 0.72));
}

.hero-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 720px;
    color: #fff;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    background: var(--orange);
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.32);
}

.hero h1 {
    margin: 0;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 680px;
    margin: 20px 0 0;
    color: #e5e7eb;
    font-size: clamp(17px, 2vw, 22px);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 28px 0;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    color: inherit;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(6px);
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 12px 20px;
    border-radius: 999px;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(90deg, var(--orange), var(--red));
    box-shadow: 0 14px 26px rgba(239, 68, 68, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 18px 34px rgba(239, 68, 68, 0.34);
}

.btn.secondary {
    color: #0f172a;
    background: #fff;
    box-shadow: 0 14px 26px rgba(255, 255, 255, 0.18);
}

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

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

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

.section {
    padding: 64px 0;
}

.section.alt {
    background: #fff;
}

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

.section.gradient {
    color: #fff;
    background: linear-gradient(120deg, var(--blue), var(--cyan), var(--teal));
}

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

.section-title {
    margin: 0;
    font-size: clamp(28px, 3.4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-desc {
    max-width: 740px;
    margin: 8px 0 0;
    color: var(--muted);
}

.dark .section-desc,
.gradient .section-desc {
    color: rgba(255, 255, 255, 0.78);
}

.more-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--blue);
    font-weight: 800;
}

.dark .more-link,
.gradient .more-link {
    color: #fff;
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: #fff;
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #1e293b, #0f172a);
}

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

.movie-card:hover .movie-thumb img {
    transform: scale(1.07);
}

.movie-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(37, 99, 235, 0.9);
    backdrop-filter: blur(6px);
}

.movie-score {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(249, 115, 22, 0.92);
}

.movie-body {
    padding: 16px;
}

.movie-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 800;
    color: #0f172a;
}

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

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #64748b;
    font-size: 12px;
}

.card-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    background: #f1f5f9;
}

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

.category-card {
    min-height: 178px;
    padding: 22px;
    border-radius: var(--radius);
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card:nth-child(3n) {
    background: linear-gradient(135deg, #16a34a, #14b8a6);
}

.category-card:nth-child(4n) {
    background: linear-gradient(135deg, #9333ea, #6366f1);
}

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

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

.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 58px 96px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.07);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    background: rgba(255, 255, 255, 0.13);
    transform: translateY(-2px);
}

.rank-no {
    font-size: 26px;
    font-weight: 900;
    color: #facc15;
    text-align: center;
}

.rank-thumb {
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    background: #1e293b;
}

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

.rank-title {
    margin: 0 0 4px;
    font-size: 17px;
    color: #fff;
    font-weight: 800;
}

.rank-meta {
    margin: 0;
    color: #cbd5e1;
    font-size: 13px;
}

.page-hero {
    padding: 58px 0;
    color: #fff;
    background:
        radial-gradient(circle at 15% 40%, rgba(6, 182, 212, 0.35), transparent 34%),
        linear-gradient(135deg, #0f172a, #1e40af 50%, #0f172a);
}

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

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

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 12px;
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--soft-shadow);
}

.filter-bar input,
.filter-bar select {
    height: 46px;
    width: 100%;
    padding: 0 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    outline: none;
    background: #fff;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.13);
}

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

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

.detail-hero {
    color: #fff;
    background:
        radial-gradient(circle at 25% 25%, rgba(6, 182, 212, 0.28), transparent 38%),
        linear-gradient(135deg, #020617, #0f172a 52%, #1e293b);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) 360px;
    gap: 32px;
    padding: 44px 0;
}

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

.player-box video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

.player-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.45), rgba(2, 6, 23, 0.78));
}

.player-cover.is-hidden {
    display: none;
}

.play-button {
    position: relative;
    z-index: 1;
    width: 88px;
    height: 88px;
    border-radius: 999px;
    color: #fff;
    font-size: 34px;
    background: linear-gradient(90deg, var(--orange), var(--red));
    box-shadow: 0 18px 34px rgba(239, 68, 68, 0.42);
}

.detail-panel {
    margin-top: 28px;
    padding: 28px;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--soft-shadow);
}

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

.breadcrumb a:hover {
    color: #fff;
}

.detail-title {
    margin: 0;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.detail-subtitle {
    margin: 16px 0 0;
    color: #dbeafe;
    font-size: 19px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.prose h2 {
    margin: 0 0 12px;
    font-size: 25px;
}

.prose p {
    margin: 0 0 18px;
    color: #334155;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.tag {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 700;
    background: #eff6ff;
}

.side-card {
    padding: 18px;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--soft-shadow);
}

.poster {
    overflow: hidden;
    border-radius: 18px;
    background: #0f172a;
}

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

.side-card h2 {
    margin: 18px 0 12px;
    font-size: 22px;
}

.reco-list {
    display: grid;
    gap: 12px;
}

.reco-item {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 15px;
    background: #f8fafc;
    transition: background 0.2s ease;
}

.reco-item:hover {
    background: #eff6ff;
}

.reco-item img {
    width: 84px;
    height: 58px;
    border-radius: 11px;
    object-fit: cover;
}

.reco-item strong {
    display: block;
    overflow: hidden;
    color: #0f172a;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reco-item span {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
}

.cta-panel {
    padding: 42px;
    border-radius: 28px;
    text-align: center;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

.cta-panel h2 {
    margin: 0 0 12px;
    font-size: clamp(30px, 4vw, 46px);
}

.cta-panel p {
    margin: 0 auto 22px;
    max-width: 700px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 18px;
}

.site-footer {
    padding: 44px 0 28px;
    color: #cbd5e1;
    background: linear-gradient(135deg, #0f172a, #1e293b, #0f172a);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 26px;
}

.footer-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 22px;
    font-weight: 900;
}

.footer-text {
    max-width: 560px;
    color: #94a3b8;
}

.footer-links {
    display: grid;
    gap: 8px;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.24);
    color: #94a3b8;
    font-size: 13px;
}

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

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

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

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

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

    .hero {
        height: auto;
        min-height: 560px;
    }

    .hero-content {
        padding: 80px 0 92px;
    }

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

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

    .rank-list {
        grid-template-columns: 1fr;
    }

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

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

    .footer-bottom {
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .header-inner {
        width: min(100% - 24px, 1220px);
    }

    .logo {
        font-size: 20px;
    }

    .section {
        padding: 46px 0;
    }

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

    .hero h1 {
        font-size: 38px;
    }

    .detail-panel,
    .side-card {
        padding: 20px;
    }

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

    .rank-thumb {
        height: 58px;
    }

    .btn {
        width: 100%;
    }
}
