* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #111827;
    background: #f8fafc;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.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 10px 30px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
}

.site-nav {
    max-width: 1180px;
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #0284c7, #06b6d4);
    box-shadow: 0 12px 24px rgba(2, 132, 199, 0.28);
}

.brand-text {
    font-size: 22px;
}

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

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

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

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: #0284c7;
    background: #e0f2fe;
}

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

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: #0f172a;
    border-radius: 999px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
    display: none;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px 18px;
}

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

.home-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 52%, #06b6d4 100%);
}

.hero-background {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.22), transparent 24%),
        radial-gradient(circle at 80% 0%, rgba(34, 211, 238, 0.26), transparent 28%),
        linear-gradient(135deg, rgba(2, 8, 23, 0.08), rgba(2, 8, 23, 0.26));
}

.hero-inner {
    position: relative;
    max-width: 1180px;
    min-height: 650px;
    margin: 0 auto;
    padding: 82px 24px 118px;
}

.hero-slide {
    position: absolute;
    inset: 82px 24px 118px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.72fr);
    align-items: center;
    gap: 44px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #bae6fd;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 70px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
    max-width: 720px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(17px, 2vw, 22px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.primary-button,
.ghost-button,
.panel-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: #0284c7;
    background: #ffffff;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
}

.ghost-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.68);
    background: rgba(255, 255, 255, 0.1);
}

.primary-button:hover,
.ghost-button:hover,
.panel-link:hover {
    transform: translateY(-2px);
}

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

.hero-tags {
    margin-top: 22px;
}

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

.hero-visual {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    box-shadow: 0 34px 70px rgba(15, 23, 42, 0.34);
    transform: rotate(1deg);
}

.hero-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 48%, rgba(15, 23, 42, 0.56));
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hero-visual:hover img {
    transform: scale(1.06);
}

.hero-dots {
    position: absolute;
    left: 24px;
    bottom: 52px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
}

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

.stats-panel {
    position: relative;
    z-index: 5;
    max-width: 1180px;
    margin: -58px auto 0;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.stats-panel div {
    border-radius: 24px;
    background: #ffffff;
    padding: 24px;
    text-align: center;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.1);
}

.stats-panel strong {
    display: block;
    color: #0f172a;
    font-size: 25px;
    letter-spacing: -0.04em;
}

.stats-panel span {
    color: #64748b;
    font-weight: 600;
}

.section-block {
    max-width: 1180px;
    margin: 0 auto;
    padding: 74px 24px;
}

.section-heading {
    margin-bottom: 28px;
}

.section-heading.centered {
    text-align: center;
}

.section-heading span {
    color: #0284c7;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-heading h2 {
    margin: 6px 0 0;
    color: #0f172a;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.05em;
}

.section-heading p {
    max-width: 680px;
    margin: 10px auto 0;
    color: #64748b;
    font-size: 17px;
}

.featured-grid,
.movie-grid,
.category-grid,
.overview-grid,
.small-card-grid {
    display: grid;
    gap: 22px;
}

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

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

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

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

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

.small-card-grid {
    grid-template-columns: repeat(6, 1fr);
}

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 24px 52px rgba(15, 23, 42, 0.16);
}

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

.compact-card .movie-poster {
    aspect-ratio: 16 / 10;
}

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

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

.card-category,
.card-year,
.rank-badge {
    position: absolute;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.card-category {
    top: 12px;
    right: 12px;
    padding: 8px 10px;
    background: rgba(2, 132, 199, 0.92);
}

.card-year {
    left: 12px;
    bottom: 12px;
    padding: 8px 10px;
    background: rgba(15, 23, 42, 0.74);
}

.rank-badge {
    top: 12px;
    left: 12px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f97316, #ef4444);
    box-shadow: 0 8px 18px rgba(239, 68, 68, 0.32);
}

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

.movie-card-body h2 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 18px;
    line-height: 1.35;
}

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

.movie-card-body p {
    min-height: 48px;
    margin: 0 0 12px;
    color: #64748b;
    font-size: 14px;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.tag-row {
    margin-top: 12px;
}

.tag-row span,
.detail-tags span {
    color: #475569;
    background: #f1f5f9;
}

.category-section {
    padding: 74px 24px;
    background: #eef6ff;
}

.category-section > div {
    max-width: 1180px;
    margin: 0 auto;
}

.category-tile,
.overview-card {
    position: relative;
    overflow: hidden;
    min-height: 240px;
    padding: 26px;
    border-radius: 28px;
    color: #ffffff;
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16);
}

.category-tile img,
.overview-card img {
    position: absolute;
    right: -26px;
    bottom: -34px;
    width: 190px;
    height: 240px;
    object-fit: cover;
    border-radius: 26px;
    opacity: 0.46;
    transform: rotate(8deg);
}

.category-icon,
.overview-card span {
    display: block;
    margin-bottom: 16px;
    font-size: 44px;
}

.category-tile strong,
.overview-card h2 {
    position: relative;
    z-index: 2;
    display: block;
    margin: 0 0 10px;
    font-size: 26px;
    line-height: 1.15;
}

.category-tile em,
.overview-card p,
.overview-card strong {
    position: relative;
    z-index: 2;
    display: block;
    max-width: 78%;
    color: rgba(255, 255, 255, 0.84);
    font-style: normal;
    font-weight: 700;
}

.gradient-blue {
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.gradient-red {
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.gradient-cyan {
    background: linear-gradient(135deg, #0284c7, #0e7490);
}

.gradient-purple {
    background: linear-gradient(135deg, #db2777, #7c3aed);
}

.gradient-green {
    background: linear-gradient(135deg, #059669, #0d9488);
}

.two-column-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 36px;
    align-items: start;
}

.ranking-panel,
.search-panel,
.filter-bar,
.player-card,
.story-card,
.side-card {
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.ranking-panel {
    position: sticky;
    top: 92px;
    padding: 24px;
}

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

.rank-row,
.ranking-line {
    display: grid;
    align-items: center;
    gap: 12px;
    border-radius: 16px;
    background: #f8fafc;
    transition: background 0.18s ease, transform 0.18s ease;
}

.rank-row {
    grid-template-columns: 34px 54px minmax(0, 1fr) auto;
    padding: 10px;
}

.rank-row:hover,
.ranking-line:hover {
    background: #e0f2fe;
    transform: translateX(3px);
}

.rank-row span,
.ranking-line span {
    color: #0284c7;
    font-weight: 900;
}

.rank-row img {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-row strong,
.ranking-line strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-row em,
.ranking-line em {
    color: #64748b;
    font-size: 13px;
    font-style: normal;
    font-weight: 700;
}

.panel-link {
    width: 100%;
    margin-top: 18px;
    color: #ffffff;
    background: #0284c7;
}

.page-hero {
    color: #ffffff;
    background: linear-gradient(135deg, #0284c7, #2563eb, #06b6d4);
}

.simple-hero,
.category-hero {
    padding: 88px 24px;
}

.simple-hero > div,
.category-hero > div {
    max-width: 1180px;
    margin: 0 auto;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 18px;
    margin-bottom: 28px;
    padding: 22px;
}

.search-field,
.select-field {
    display: grid;
    gap: 8px;
    color: #475569;
    font-weight: 800;
}

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

.search-field input,
.select-field select {
    height: 48px;
    padding: 0 16px;
}

.search-field input:focus,
.select-field select:focus,
.search-panel input:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.14);
}

.empty-state {
    margin-top: 20px;
    border-radius: 24px;
    background: #ffffff;
    padding: 42px;
    text-align: center;
    color: #64748b;
    font-weight: 800;
}

.ranking-top {
    margin-bottom: 30px;
}

.ranking-lines {
    display: grid;
    gap: 12px;
}

.ranking-line {
    grid-template-columns: 56px 72px minmax(0, 1fr) auto;
    padding: 12px 16px;
}

.ranking-line img {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    object-fit: cover;
}

.search-page {
    min-height: 560px;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 130px;
    gap: 14px;
    margin-bottom: 28px;
    padding: 22px;
}

.search-panel input {
    height: 54px;
    padding: 0 18px;
}

.search-panel button {
    border: 0;
    border-radius: 16px;
    color: #ffffff;
    background: #0284c7;
    font-weight: 900;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.22;
    filter: blur(10px) saturate(1.25);
    transform: scale(1.04);
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.92), rgba(2, 132, 199, 0.68));
}

.detail-inner {
    position: relative;
    max-width: 1180px;
    margin: 0 auto;
    padding: 42px 24px 86px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 34px;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 700;
}

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

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

.detail-poster {
    width: 100%;
    border-radius: 28px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    box-shadow: 0 34px 68px rgba(0, 0, 0, 0.36);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.84);
    font-weight: 800;
}

.detail-section {
    padding-bottom: 34px;
}

.player-card {
    overflow: hidden;
    padding: 18px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.82));
    display: grid;
    place-items: center;
    gap: 12px;
    cursor: pointer;
}

.player-overlay span {
    width: 86px;
    height: 86px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #0284c7;
    background: #ffffff;
    font-size: 30px;
    box-shadow: 0 24px 46px rgba(0, 0, 0, 0.3);
}

.player-overlay strong {
    font-size: 20px;
}

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

.player-card h2 {
    margin: 18px 8px 4px;
    color: #0f172a;
    font-size: 26px;
}

.player-card p {
    margin: 0 8px 8px;
    color: #64748b;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
    padding-top: 28px;
}

.story-card,
.side-card {
    padding: 28px;
}

.story-card h2,
.side-card h2 {
    margin: 0 0 14px;
    color: #0f172a;
    font-size: 24px;
}

.story-card p {
    margin: 0 0 24px;
    color: #334155;
    font-size: 17px;
}

.side-card {
    position: sticky;
    top: 92px;
}

.side-card dl {
    margin: 0;
    display: grid;
    gap: 12px;
}

.side-card dt {
    color: #64748b;
    font-size: 13px;
    font-weight: 900;
}

.side-card dd {
    margin: 0;
    color: #0f172a;
    font-weight: 800;
}

.side-card a {
    color: #0284c7;
}

.small-card {
    overflow: hidden;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.small-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.14);
}

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

.small-card span,
.small-card strong,
.small-card em {
    display: block;
    margin-left: 14px;
    margin-right: 14px;
}

.small-card span {
    margin-top: 14px;
    color: #0284c7;
    font-size: 12px;
    font-weight: 900;
}

.small-card strong {
    margin-top: 4px;
    color: #0f172a;
    line-height: 1.35;
}

.small-card em {
    margin-top: 4px;
    margin-bottom: 16px;
    color: #64748b;
    font-size: 13px;
    font-style: normal;
    font-weight: 700;
}

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

.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 54px 24px;
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 34px;
}

.footer-brand {
    color: #ffffff;
    font-size: 22px;
}

.footer-brand-block p {
    max-width: 520px;
    color: #94a3b8;
}

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

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

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

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    padding: 20px 24px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

[hidden] {
    display: none !important;
}

@media (max-width: 1050px) {
    .featured-grid,
    .movie-grid,
    .home-grid,
    .category-grid,
    .small-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .two-column-section,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .ranking-panel,
    .side-card {
        position: static;
    }
}

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

    .menu-toggle {
        display: flex;
    }

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

    .hero-inner {
        min-height: 760px;
        padding-bottom: 94px;
    }

    .hero-slide {
        inset: 54px 24px 92px;
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .hero-visual {
        max-width: 310px;
        margin: 0 auto;
    }

    .stats-panel {
        grid-template-columns: repeat(2, 1fr);
        margin-top: -34px;
    }

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

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

    .overview-grid,
    .filter-bar,
    .search-panel,
    .footer-inner {
        grid-template-columns: 1fr;
    }
}

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

    .brand-text {
        font-size: 19px;
    }

    .hero-inner,
    .section-block,
    .simple-hero,
    .category-hero,
    .detail-inner {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 36px;
    }

    .featured-grid,
    .movie-grid,
    .home-grid,
    .category-grid,
    .overview-grid,
    .small-card-grid,
    .stats-panel {
        grid-template-columns: 1fr;
    }

    .rank-row,
    .ranking-line {
        grid-template-columns: 38px 58px minmax(0, 1fr);
    }

    .rank-row em,
    .ranking-line em {
        display: none;
    }
}
