html {
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1c1917;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 46%, #f0fdfa 100%);
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(231, 229, 228, 0.9);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.header-inner {
    max-width: 1240px;
    margin: 0 auto;
    min-height: 72px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, #0284c7, #0d9488);
    box-shadow: 0 12px 28px rgba(2, 132, 199, 0.35);
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.desktop-nav > a,
.nav-dropdown > a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    color: #57534e;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

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

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    left: 0;
    top: calc(100% + 12px);
    width: 220px;
    padding: 10px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.16);
    border: 1px solid #e7e5e4;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.dropdown-panel a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: #57534e;
    font-size: 14px;
}

.dropdown-panel a:hover {
    color: #0284c7;
    background: #f0f9ff;
}

.header-search,
.mobile-search,
.quick-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.quick-search input,
.local-filter input {
    border: 1px solid #e7e5e4;
    background: #ffffff;
    color: #1c1917;
    outline: none;
    border-radius: 999px;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 220px;
    padding: 10px 16px;
}

.header-search input:focus,
.mobile-search input:focus,
.quick-search input:focus,
.local-filter input:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12);
}

.header-search button,
.mobile-search button,
.quick-search button {
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, #0284c7, #0d9488);
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 800;
}

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

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

.mobile-nav {
    display: none;
    max-width: 1240px;
    margin: 0 auto;
    padding: 10px 24px 24px;
    border-top: 1px solid #e7e5e4;
}

.mobile-nav.is-open {
    display: grid;
    gap: 10px;
}

.mobile-nav a {
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
    color: #44403c;
    font-weight: 700;
}

.mobile-search input {
    width: 100%;
    padding: 10px 16px;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 0.8s ease, transform 1.2s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0.68) 50%, rgba(0, 0, 0, 0.95));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 48px));
    margin: 0 auto 90px;
    max-width: 820px;
    color: #ffffff;
}

.eyebrow,
.card-category {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #0284c7, #0d9488);
    font-weight: 800;
    box-shadow: 0 10px 30px rgba(2, 132, 199, 0.25);
}

.eyebrow {
    padding: 8px 16px;
    margin-bottom: 18px;
    font-size: 14px;
}

.hero-content h1 {
    margin: 0 0 18px;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.06em;
    text-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

.hero-content p {
    margin: 0 0 24px;
    max-width: 720px;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(17px, 2.2vw, 22px);
}

.hero-meta,
.detail-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: inherit;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 700;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

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

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

.button-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #0284c7, #0d9488);
    box-shadow: 0 20px 45px rgba(2, 132, 199, 0.28);
}

.button-secondary {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.92);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.44);
    backdrop-filter: blur(12px);
    font-size: 42px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.68);
    transform: translateY(-2px);
}

.hero-prev {
    left: 28px;
}

.hero-next {
    right: 28px;
}

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

.hero-dots button {
    width: 32px;
    height: 5px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
}

.hero-dots button.is-active {
    background: #ffffff;
}

.quick-panel {
    width: min(1160px, calc(100% - 32px));
    margin: -38px auto 60px;
    position: relative;
    z-index: 20;
    padding: 20px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.15);
    display: flex;
    align-items: center;
    gap: 18px;
    justify-content: space-between;
}

.quick-search {
    flex: 1;
}

.quick-search input {
    flex: 1;
    min-height: 48px;
    padding: 0 18px;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-links a {
    display: inline-flex;
    padding: 12px 16px;
    border-radius: 999px;
    color: #0369a1;
    background: #f0f9ff;
    font-weight: 800;
}

main,
.page-main {
    width: 100%;
}

.section-block {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 72px;
}

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

.section-heading span {
    display: block;
    color: #0284c7;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 12px;
}

.section-heading h2 {
    margin: 4px 0 0;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.section-heading a {
    flex: 0 0 auto;
    color: #0284c7;
    font-weight: 900;
    padding: 10px 14px;
    border-radius: 999px;
    background: #f0f9ff;
}

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

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

.movie-card {
    background: #ffffff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(231, 229, 228, 0.78);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.16);
}

.card-cover {
    position: relative;
    display: block;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #0d9488);
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease;
}

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

.card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.48));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .card-cover::after {
    opacity: 1;
}

.card-year,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
    backdrop-filter: blur(12px);
}

.card-year {
    right: 12px;
    top: 12px;
    min-height: 28px;
    padding: 0 10px;
    background: rgba(0, 0, 0, 0.58);
    font-size: 12px;
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #f97316, #0284c7);
    font-size: 13px;
}

.card-body {
    padding: 18px;
}

.card-category {
    padding: 5px 10px;
    font-size: 12px;
    margin-bottom: 10px;
}

.card-body h2 {
    margin: 0 0 9px;
    font-size: 18px;
    line-height: 1.35;
    letter-spacing: -0.02em;
}

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

.card-body p {
    margin: 0;
    color: #57534e;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    margin-top: 14px;
    color: #57534e;
}

.card-meta span {
    background: #f5f5f4;
}

.movie-card-horizontal {
    display: grid;
    grid-template-columns: 260px 1fr;
}

.movie-card-horizontal .card-cover {
    height: 100%;
    min-height: 210px;
}

.movie-card-horizontal .card-body {
    padding: 24px;
}

.movie-card-horizontal .card-body h2 {
    font-size: 22px;
}

.accent-section,
.deep-section {
    padding: 34px;
    border-radius: 34px;
    background: linear-gradient(135deg, #f0f9ff, #f0fdfa);
    box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.08);
}

.horizontal-list {
    display: grid;
    gap: 20px;
}

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

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

.category-tile {
    position: relative;
    min-height: 250px;
    padding: 22px;
    overflow: hidden;
    border-radius: 28px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #0284c7 54%, #0d9488);
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.18);
}

.category-glow {
    position: absolute;
    width: 160px;
    height: 160px;
    right: -48px;
    top: -48px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    filter: blur(4px);
}

.category-covers {
    position: absolute;
    right: 18px;
    bottom: 18px;
    display: flex;
    align-items: flex-end;
}

.category-covers img {
    width: 76px;
    height: 104px;
    object-fit: cover;
    border-radius: 14px;
    border: 3px solid rgba(255, 255, 255, 0.76);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
    margin-left: -28px;
}

.category-tile strong {
    position: relative;
    z-index: 2;
    display: block;
    font-size: 24px;
    margin-bottom: 10px;
    letter-spacing: -0.03em;
}

.category-tile small {
    position: relative;
    z-index: 2;
    display: block;
    max-width: 78%;
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
}

.page-main {
    padding: 34px 0 1px;
}

.breadcrumb {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 18px;
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    align-items: center;
    color: #78716c;
    font-size: 14px;
}

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

.page-hero {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 42px;
    padding: 54px;
    border-radius: 36px;
    color: #ffffff;
    background: radial-gradient(circle at top right, rgba(20, 184, 166, 0.68), transparent 30%), linear-gradient(135deg, #0f172a, #0284c7 60%, #0d9488);
    box-shadow: 0 28px 90px rgba(15, 23, 42, 0.22);
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.1;
    letter-spacing: -0.05em;
}

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

.local-filter {
    margin-top: 24px;
    max-width: 560px;
}

.local-filter input {
    width: 100%;
    min-height: 50px;
    padding: 0 18px;
}

.ranking-list {
    display: grid;
    gap: 18px;
}

.detail-main {
    background: linear-gradient(180deg, #f8fafc, #ffffff);
}

.detail-hero {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 50px;
    padding: 34px;
    border-radius: 36px;
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 34px;
    background: #ffffff;
    border: 1px solid #e7e5e4;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.12);
}

.detail-cover {
    overflow: hidden;
    border-radius: 28px;
    min-height: 520px;
    background: linear-gradient(135deg, #0f172a, #0d9488);
}

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

.detail-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.1;
    letter-spacing: -0.05em;
}

.detail-info p {
    margin: 0 0 20px;
    color: #57534e;
    font-size: 19px;
}

.detail-meta {
    color: #44403c;
    margin-bottom: 18px;
}

.detail-meta span {
    background: #f5f5f4;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 26px;
}

.tag-list span {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    color: #0369a1;
    background: #f0f9ff;
    font-weight: 800;
    font-size: 13px;
}

.player-section {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 58px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
    aspect-ratio: 16 / 9;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.72));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-ring {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #0284c7, #0d9488);
    box-shadow: 0 20px 60px rgba(2, 132, 199, 0.45);
    font-size: 32px;
    padding-left: 5px;
}

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

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

.content-card {
    padding: 30px;
    border-radius: 28px;
    background: #ffffff;
    border: 1px solid #e7e5e4;
    box-shadow: 0 16px 50px rgba(15, 23, 42, 0.08);
}

.content-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
    letter-spacing: -0.03em;
}

.content-card p {
    margin: 0;
    color: #44403c;
    font-size: 16px;
}

.empty-state {
    margin: 36px 0;
    text-align: center;
    color: #78716c;
    font-weight: 800;
}

.site-footer {
    margin-top: 80px;
    color: #d6d3d1;
    background: linear-gradient(135deg, #0f172a, #1c1917);
}

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
}

.footer-brand {
    margin-bottom: 14px;
    color: #ffffff;
    font-size: 24px;
}

.site-footer p {
    margin: 0;
    max-width: 520px;
    color: #a8a29e;
}

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

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

.footer-links a {
    color: #a8a29e;
}

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

.footer-bottom {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 28px;
    color: #78716c;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

[hidden] {
    display: none !important;
}

@media (max-width: 1120px) {
    .header-search {
        display: none;
    }

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

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

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

    .mobile-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .hero {
        height: 72vh;
        min-height: 540px;
    }

    .hero-content {
        margin-bottom: 74px;
    }

    .hero-arrow {
        display: none;
    }

    .quick-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .quick-search {
        flex-direction: column;
        align-items: stretch;
    }

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

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

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

    .detail-cover {
        min-height: 420px;
    }

    .detail-content,
    .footer-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .header-inner {
        padding: 0 16px;
    }

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

    .hero {
        min-height: 600px;
    }

    .hero-content {
        width: calc(100% - 32px);
        margin-bottom: 82px;
    }

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

    .button,
    .quick-links a {
        width: 100%;
    }

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

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

    .page-hero,
    .detail-hero,
    .accent-section,
    .deep-section {
        padding: 24px;
        border-radius: 26px;
    }

    .detail-cover {
        min-height: 360px;
    }

    .player-shell {
        border-radius: 20px;
    }
}
