* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #111827;
    background: #f9fafb;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 8px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(14px);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: #111827;
}

.brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    color: #374151;
    font-size: 15px;
    font-weight: 600;
}

.desktop-nav a,
.mobile-nav a {
    transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: #0891b2;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 10px;
    color: #374151;
    background: #f3f4f6;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 8px 0 16px;
    border-top: 1px solid #e5e7eb;
}

.mobile-nav a {
    display: block;
    padding: 12px;
    border-radius: 10px;
    color: #374151;
    font-weight: 600;
}

.mobile-nav.open {
    display: block;
}

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #111827;
}

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

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

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

.hero-cover {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.08));
}

.hero-inner {
    position: absolute;
    inset: 0;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(640px, 100%);
    color: #ffffff;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    padding: 7px 13px;
    margin-bottom: 18px;
    border-radius: 999px;
    color: #ffffff;
    background: #2563eb;
    font-size: 14px;
    font-weight: 700;
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero p {
    margin: 0 0 22px;
    color: #e5e7eb;
    font-size: 19px;
    line-height: 1.8;
}

.hero-meta {
    margin-bottom: 30px;
    color: #d1d5db;
    font-size: 16px;
}

.hero-actions,
.detail-head,
.section-head,
.search-strip,
.footer-inner,
.detail-layout {
    display: flex;
}

.hero-actions {
    gap: 14px;
    flex-wrap: wrap;
}

.primary-btn,
.ghost-btn,
.home-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 28px;
    border: 0;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-btn,
.home-search button {
    color: #ffffff;
    background: #2563eb;
}

.primary-btn:hover,
.home-search button:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

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

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.26);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 6;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.45);
    font-size: 34px;
    line-height: 1;
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

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

.hero-arrow.prev {
    left: 24px;
}

.hero-arrow.next {
    right: 24px;
}

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

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

.hero-dots button.active {
    width: 36px;
    background: #ffffff;
}

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

.page-shell.narrow {
    width: min(980px, calc(100% - 32px));
}

.search-strip {
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 34px 0 18px;
    padding: 28px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}

.search-strip h2 {
    margin: 0 0 8px;
    font-size: 26px;
}

.search-strip p,
.section-head p,
.page-hero p,
.card-desc,
.category-tile p,
.footer-about p,
.text-block p {
    color: #6b7280;
    line-height: 1.75;
}

.home-search {
    display: flex;
    width: min(440px, 100%);
    gap: 10px;
}

.home-search input,
.local-search input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    color: #111827;
    background: #ffffff;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

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

.content-section {
    padding: 42px 0;
}

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

.section-head h2 {
    margin: 0 0 8px;
    font-size: 30px;
    line-height: 1.2;
}

.section-head p {
    margin: 0;
}

.section-more {
    color: #2563eb;
    font-weight: 800;
}

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

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

.scroll-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 290px;
    gap: 22px;
    overflow-x: auto;
    padding: 4px 4px 18px;
    scroll-snap-type: x proximity;
}

.scroll-row .movie-card {
    scroll-snap-align: start;
}

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

.poster-link {
    position: relative;
    display: block;
    height: 260px;
    overflow: hidden;
    background: #e5e7eb;
}

.movie-grid.compact .poster-link,
.search-grid .poster-link {
    height: 220px;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.58));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
    opacity: 1;
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.82);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-mark {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    font-size: 15px;
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
}

.card-body h3 a:hover {
    color: #2563eb;
}

.meta-line {
    margin: 0 0 10px;
    color: #6b7280;
    font-size: 13px;
}

.card-desc {
    display: -webkit-box;
    min-height: 48px;
    margin: 0;
    overflow: hidden;
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.page-main {
    background: #f9fafb;
}

.page-hero {
    color: #ffffff;
    background: linear-gradient(135deg, #1d4ed8, #0e7490);
}

.small-hero {
    padding: 56px 0;
}

.blue-hero {
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
}

.page-hero h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 50px);
    line-height: 1.1;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin-bottom: 18px;
    color: #6b7280;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #2563eb;
}

.breadcrumb.dark {
    color: #d1d5db;
}

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

.local-search {
    width: min(560px, 100%);
    margin-top: 24px;
}

.strong-search {
    width: min(760px, 100%);
}

.category-overview {
    padding: 46px 0;
}

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

.category-tile {
    overflow: hidden;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.13);
}

.tile-covers {
    display: grid;
    grid-template-columns: 1.25fr 1fr 1fr;
    height: 180px;
    gap: 3px;
    background: #e5e7eb;
}

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

.tile-body {
    padding: 22px;
}

.tile-body h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.tile-body p {
    margin: 0 0 18px;
}

.tile-body span {
    color: #2563eb;
    font-weight: 800;
}

.player-hero {
    padding: 24px 0 34px;
    background: radial-gradient(circle at top left, #1e3a8a, #030712 55%);
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000000;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
    aspect-ratio: 16 / 9;
}

.movie-player {
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    color: #ffffff;
    background: #000000;
    cursor: pointer;
}

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

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

.player-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.big-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 84px;
    height: 84px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.95);
    font-size: 34px;
    transform: translate(-50%, -50%);
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.4);
}

.detail-layout {
    align-items: flex-start;
    gap: 30px;
    padding: 34px 0 54px;
}

.detail-main {
    flex: 1 1 auto;
    min-width: 0;
}

.detail-side {
    width: 330px;
    flex: 0 0 330px;
}

.detail-card,
.side-card {
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.detail-card {
    padding: 28px;
}

.detail-head {
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

.detail-head h1 {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.2;
}

.detail-cat {
    flex: 0 0 auto;
    padding: 8px 12px;
    border-radius: 999px;
    color: #2563eb;
    background: #eff6ff;
    font-weight: 800;
}

.detail-meta,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.detail-meta span {
    color: #4b5563;
}

.tag-list span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #0e7490;
    background: #ecfeff;
    font-size: 13px;
    font-weight: 700;
}

.text-block {
    padding-top: 22px;
    margin-top: 22px;
    border-top: 1px solid #e5e7eb;
}

.text-block h2,
.side-card h2 {
    margin: 0 0 12px;
    font-size: 20px;
}

.text-block p {
    margin: 0;
    color: #374151;
    font-size: 16px;
}

.side-card {
    position: sticky;
    top: 86px;
    padding: 20px;
}

.mini-card {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid #e5e7eb;
}

.mini-card:first-of-type {
    border-top: 0;
}

.mini-card img {
    width: 112px;
    height: 72px;
    flex: 0 0 auto;
    border-radius: 10px;
    object-fit: cover;
    background: #e5e7eb;
}

.mini-card strong {
    display: -webkit-box;
    overflow: hidden;
    color: #111827;
    font-size: 14px;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.mini-card em {
    display: block;
    margin-top: 6px;
    color: #6b7280;
    font-size: 12px;
    font-style: normal;
}

.mini-card:hover strong {
    color: #2563eb;
}

.related-bottom {
    padding-bottom: 0;
}

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

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

.footer-brand {
    color: #ffffff;
    margin-bottom: 16px;
}

.site-footer h3 {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: 16px;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer li + li {
    margin-top: 10px;
}

.site-footer a:hover {
    color: #22d3ee;
}

.footer-copy {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0;
    border-top: 1px solid #1f2937;
    color: #9ca3af;
    font-size: 14px;
}

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

    .detail-layout {
        display: block;
    }

    .detail-side {
        width: auto;
        margin-top: 28px;
    }

    .side-card {
        position: static;
    }
}

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

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

    .hero {
        height: 520px;
    }

    .hero-arrow {
        display: none;
    }

    .hero p {
        font-size: 16px;
    }

    .search-strip,
    .section-head,
    .detail-head {
        display: block;
    }

    .home-search {
        margin-top: 18px;
    }

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

    .poster-link,
    .movie-grid.compact .poster-link,
    .search-grid .poster-link {
        height: 210px;
    }

    .detail-cat {
        display: inline-flex;
        margin-top: 14px;
    }

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

@media (max-width: 520px) {
    .brand,
    .footer-brand {
        font-size: 18px;
    }

    .hero {
        height: 500px;
    }

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

    .hero-actions,
    .home-search {
        display: block;
    }

    .ghost-btn,
    .primary-btn,
    .home-search button {
        width: 100%;
        margin-top: 10px;
    }

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

    .poster-link,
    .movie-grid.compact .poster-link,
    .search-grid .poster-link {
        height: 260px;
    }

    .tile-covers {
        height: 150px;
    }

    .detail-card {
        padding: 20px;
    }

    .big-play {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }
}
