* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #f5f7fb;
    color: #111827;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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;
    color: #ffffff;
    background: linear-gradient(90deg, #2563eb 0%, #1d4ed8 48%, #1e3a8a 100%);
    box-shadow: 0 12px 30px rgba(30, 64, 175, 0.24);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #f97316;
    box-shadow: 0 10px 20px rgba(249, 115, 22, 0.35);
    font-size: 18px;
    font-weight: 800;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-copy strong {
    font-size: 20px;
    letter-spacing: 0.5px;
}

.brand-copy small {
    color: #bfdbfe;
    font-size: 12px;
    margin-top: 4px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 15px;
}

.site-nav a {
    color: rgba(255, 255, 255, 0.88);
    transition: color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: #fdba74;
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
}

.hero-slider {
    position: relative;
    height: 430px;
    overflow: hidden;
    background: linear-gradient(135deg, #111827 0%, #1d4ed8 48%, #0f172a 100%);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.85s ease;
}

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

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

.image-missing {
    opacity: 0 !important;
}

.hero-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.58) 44%, rgba(0, 0, 0, 0.15) 100%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    color: #facc15;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.eyebrow.dark {
    color: #2563eb;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0 0 14px;
    font-size: clamp(32px, 6vw, 56px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -1px;
}

.hero-copy h2 {
    font-size: clamp(28px, 5vw, 48px);
}

.hero-copy p {
    max-width: 620px;
    margin: 0 0 22px;
    color: #e5e7eb;
    font-size: 18px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
}

.hero-meta span {
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    padding: 6px 12px;
    backdrop-filter: blur(8px);
}

.hero-actions,
.section-heading,
.filter-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 10px;
    border: 0;
    padding: 0 20px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn.primary {
    color: #ffffff;
    background: #f97316;
    box-shadow: 0 12px 22px rgba(249, 115, 22, 0.3);
}

.btn.primary:hover {
    background: #ea580c;
}

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

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

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

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

.home-search {
    margin-top: -34px;
    position: relative;
    z-index: 2;
}

.search-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 26px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

.search-panel h2,
.section-heading h2,
.page-hero h1,
.story-card h2,
.tag-card h2 {
    margin: 0;
    color: #111827;
    line-height: 1.2;
}

.search-form {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.search-form input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 46px;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    padding: 0 14px;
    background: #ffffff;
    color: #111827;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

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

.search-form input {
    max-width: 480px;
}

.section-block {
    margin-top: 48px;
}

.tinted-block {
    padding: 32px;
    border-radius: 24px;
    background: linear-gradient(120deg, #eff6ff 0%, #ecfdf5 100%);
}

.section-heading {
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-heading h2 {
    font-size: clamp(24px, 4vw, 34px);
}

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

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

.compact-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 18px;
}

.movie-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: radial-gradient(circle at top left, #60a5fa 0%, #1d4ed8 38%, #0f172a 100%);
}

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

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

.poster-shine {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.58) 100%);
}

.poster-year,
.poster-type,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 9px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.poster-year {
    right: 10px;
    top: 10px;
    background: rgba(37, 99, 235, 0.92);
}

.poster-type {
    left: 10px;
    bottom: 10px;
    background: rgba(249, 115, 22, 0.92);
}

.rank-badge {
    left: 10px;
    top: 10px;
    min-width: 28px;
    text-align: center;
    background: #ef4444;
}

.movie-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
}

.movie-card-body strong {
    color: #111827;
    font-size: 16px;
    line-height: 1.35;
}

.movie-card-body em {
    min-height: 44px;
    color: #6b7280;
    font-style: normal;
    font-size: 13px;
    line-height: 1.5;
}

.movie-meta {
    color: #64748b;
    font-size: 12px;
}

.tag-line,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-line span,
.detail-tags span,
.chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 700;
}

.category-grid,
.category-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
}

.category-tile,
.category-card-large {
    display: flex;
    flex-direction: column;
    min-height: 180px;
    gap: 12px;
    border-radius: 18px;
    padding: 22px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover,
.category-card-large:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 42px rgba(15, 23, 42, 0.13);
}

.category-tile > span,
.category-card-large > span {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 900;
    font-size: 18px;
}

.category-tile strong,
.category-card-large strong {
    color: #111827;
    font-size: 20px;
}

.category-tile em,
.category-card-large em {
    color: #64748b;
    font-style: normal;
    font-size: 14px;
}

.category-tile small,
.category-card-large small {
    color: #2563eb;
    font-weight: 800;
}

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

.category-orange > span,
.category-orange.category-hero {
    background: linear-gradient(135deg, #f97316, #c2410c);
}

.category-purple > span,
.category-purple.category-hero {
    background: linear-gradient(135deg, #7c3aed, #4c1d95);
}

.category-red > span,
.category-red.category-hero {
    background: linear-gradient(135deg, #ef4444, #991b1b);
}

.category-pink > span,
.category-pink.category-hero {
    background: linear-gradient(135deg, #ec4899, #9d174d);
}

.category-green > span,
.category-green.category-hero {
    background: linear-gradient(135deg, #22c55e, #166534);
}

.category-teal > span,
.category-teal.category-hero {
    background: linear-gradient(135deg, #14b8a6, #0f766e);
}

.category-gray > span,
.category-gray.category-hero {
    background: linear-gradient(135deg, #475569, #0f172a);
}

.site-footer {
    margin-top: 70px;
    background: #111827;
    color: #d1d5db;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr 1fr;
    gap: 32px;
    padding: 46px 0;
}

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

.site-footer p,
.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
    color: #9ca3af;
    font-size: 14px;
}

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

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 0;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
}

.page-main {
    padding-top: 28px;
}

.page-hero {
    overflow: hidden;
    border-radius: 26px;
    padding: 42px;
    background: linear-gradient(120deg, #ffffff 0%, #eff6ff 100%);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.page-hero h1 {
    font-size: clamp(30px, 5vw, 46px);
}

.page-hero p {
    max-width: 760px;
    margin: 14px 0 0;
    color: #64748b;
    font-size: 17px;
}

.category-hero,
.ranking-hero,
.search-hero {
    color: #ffffff;
}

.category-hero h1,
.category-hero p,
.ranking-hero h1,
.ranking-hero p,
.search-hero h1,
.search-hero p {
    color: #ffffff;
}

.ranking-hero,
.search-hero {
    background: linear-gradient(135deg, #1d4ed8 0%, #0f172a 100%);
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #64748b;
    font-size: 14px;
}

.breadcrumb a {
    color: #2563eb;
    font-weight: 700;
}

.filter-panel {
    margin-top: 24px;
    border-radius: 20px;
    padding: 22px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.filter-row {
    align-items: flex-end;
}

.filter-row.three label {
    flex-basis: 33.33%;
}

.filter-panel label {
    flex: 1;
}

.filter-panel label span {
    display: block;
    margin-bottom: 8px;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

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

.chip {
    border: 0;
    cursor: pointer;
    padding: 8px 12px;
    transition: color 0.2s ease, background 0.2s ease;
}

.chip.is-active,
.chip:hover {
    color: #ffffff;
    background: #2563eb;
}

.empty-state {
    display: none;
    margin: 30px 0 0;
    border-radius: 16px;
    padding: 24px;
    background: #ffffff;
    color: #64748b;
    text-align: center;
}

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

.watch-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
    gap: 24px;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    aspect-ratio: 16 / 9;
    box-shadow: 0 26px 60px rgba(2, 6, 23, 0.28);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    padding: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.18) 0%, rgba(0, 0, 0, 0.78) 72%);
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-overlay img {
    position: absolute;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.36;
}

.play-circle {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #f97316;
    box-shadow: 0 18px 38px rgba(249, 115, 22, 0.36);
    font-size: 28px;
}

.player-overlay strong {
    max-width: 80%;
    font-size: clamp(20px, 4vw, 34px);
    text-align: center;
}

.detail-card {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 18px;
    align-self: start;
    border-radius: 24px;
    padding: 18px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.09);
}

.detail-poster {
    width: 132px;
    aspect-ratio: 3 / 4;
    border-radius: 16px;
    object-fit: cover;
    background: linear-gradient(135deg, #1d4ed8, #0f172a);
}

.detail-info h1 {
    margin: 0 0 12px;
    font-size: 26px;
    line-height: 1.2;
}

.detail-info p {
    margin: 0 0 16px;
    color: #64748b;
}

.detail-info dl {
    margin: 0;
    display: grid;
    gap: 10px;
}

.detail-info dl div {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 10px;
}

.detail-info dt {
    color: #94a3b8;
}

.detail-info dd {
    margin: 0;
    color: #111827;
    font-weight: 700;
}

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

.story-card,
.tag-card {
    border-radius: 24px;
    padding: 28px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.story-card h2,
.tag-card h2 {
    margin-bottom: 14px;
    font-size: 24px;
}

.story-card h2:not(:first-child),
.tag-card h2:not(:first-child) {
    margin-top: 26px;
}

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

.related-block {
    margin-top: 38px;
}

.movie-card.is-hidden {
    display: none;
}

@media (max-width: 960px) {
    .site-nav {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        border-radius: 18px;
        padding: 12px;
        background: #1e3a8a;
        box-shadow: 0 22px 48px rgba(15, 23, 42, 0.24);
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a {
        width: 100%;
        padding: 11px 12px;
        border-radius: 12px;
    }

    .site-nav a:hover,
    .site-nav a.active {
        background: rgba(255, 255, 255, 0.1);
    }

    .menu-toggle {
        display: inline-flex;
    }

    .hero-slider {
        height: 500px;
    }

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

    .search-panel,
    .search-form,
    .filter-row,
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .search-form input {
        max-width: none;
    }

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

    .filter-row.three label {
        flex-basis: auto;
    }
}

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

    .brand {
        min-width: auto;
    }

    .brand-copy small {
        display: none;
    }

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

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

    .hero-slider {
        height: 540px;
    }

    .hero-meta span {
        font-size: 12px;
    }

    .page-hero,
    .tinted-block,
    .story-card,
    .tag-card {
        padding: 22px;
        border-radius: 20px;
    }

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

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

    .movie-card-body em {
        display: none;
    }

    .detail-card {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .detail-poster {
        width: 96px;
    }

    .detail-info h1 {
        font-size: 21px;
    }

    .play-circle {
        width: 62px;
        height: 62px;
        font-size: 22px;
    }
}
