* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    color: #1e293b;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 52%, #f1f5f9 100%);
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08), 0 12px 35px rgba(15, 23, 42, 0.06);
}

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

.site-nav {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-text {
    font-size: clamp(20px, 2vw, 28px);
    background: linear-gradient(90deg, #0891b2, #2563eb);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #0891b2, #2563eb);
    box-shadow: 0 10px 24px rgba(8, 145, 178, 0.28);
    font-size: 14px;
}

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

.nav-link,
.mobile-link {
    color: #475569;
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: #0891b2;
}

.menu-toggle {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    display: none;
    background: #ecfeff;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: #0f172a;
    border-radius: 99px;
}

.mobile-menu {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

.mobile-menu.is-open {
    display: grid;
    gap: 12px;
}

.mobile-link {
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
}

.home-shell,
.page-shell {
    padding: 32px 0 0;
}

.hero-slider {
    position: relative;
    min-height: clamp(500px, 62vw, 620px);
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    transform: scale(1.015);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.9) 0%, rgba(15, 23, 42, 0.58) 48%, rgba(15, 23, 42, 0.18) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.08));
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: inherit;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: end;
    gap: 42px;
    padding: clamp(30px, 5vw, 64px);
}

.hero-text {
    max-width: 760px;
    padding-bottom: 18px;
}

.hero-category,
.section-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 13px;
    border-radius: 999px;
    background: #0891b2;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(8, 145, 178, 0.26);
}

.hero-text h1 {
    margin: 18px 0 16px;
    color: #ffffff;
    font-size: clamp(34px, 6vw, 66px);
    line-height: 1.05;
    letter-spacing: -0.055em;
}

.hero-text p {
    max-width: 680px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.75;
}

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

.hero-tags span,
.detail-tags span,
.card-tags span {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    color: #0f766e;
    background: #ccfbf1;
}

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

.primary-button,
.ghost-button,
.search-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 13px;
    font-weight: 750;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.search-form button {
    color: #ffffff;
    background: linear-gradient(135deg, #0891b2, #2563eb);
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.24);
}

.primary-button:hover,
.search-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 42px rgba(37, 99, 235, 0.28);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.24);
}

.hero-cover {
    align-self: center;
    position: relative;
    display: block;
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #0f172a, #164e63);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.34);
}

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

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

.hero-cover span,
.play-glow {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 54px;
    text-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
    background: rgba(15, 23, 42, 0.18);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.hero-cover:hover span,
.movie-card:hover .play-glow {
    opacity: 1;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.5);
    cursor: pointer;
    transform: translateY(-50%);
    font-size: 36px;
    line-height: 1;
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    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: #ffffff;
}

.category-ribbon {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 22px 2px 6px;
}

.category-ribbon a,
.quick-links a,
.section-more {
    white-space: nowrap;
    color: #0e7490;
    background: #ecfeff;
    border: 1px solid #cffafe;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease;
}

.category-ribbon a:hover,
.quick-links a:hover,
.section-more:hover {
    color: #ffffff;
    background: #0891b2;
}

.content-section {
    margin-top: 58px;
}

.panel-section,
.glow-panel,
.side-search-card,
.category-card,
.detail-copy,
.watch-panel {
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.08);
}

.panel-section,
.glow-panel {
    padding: clamp(22px, 3vw, 34px);
}

.glow-panel {
    background: linear-gradient(135deg, #ecfeff 0%, #eff6ff 100%);
}

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

.section-title h2 {
    margin: 12px 0 0;
    color: #0f172a;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.section-title p {
    max-width: 680px;
    margin: 8px 0 0;
    color: #64748b;
    line-height: 1.7;
}

.grid {
    display: grid;
    gap: 22px;
}

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

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

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

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

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

.poster {
    position: relative;
    height: 245px;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #155e75);
}

.movie-card.large .poster {
    height: 310px;
}

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

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

.card-category,
.rank-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    background: #0891b2;
    box-shadow: 0 10px 22px rgba(8, 145, 178, 0.3);
}

.rank-badge {
    left: 12px;
    right: auto;
    min-width: 34px;
    background: #f97316;
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 8px;
    color: #1e293b;
    font-size: 18px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.movie-card:hover h3 {
    color: #0891b2;
}

.card-body p {
    margin: 0 0 12px;
    color: #64748b;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.meta-row span {
    padding: 5px 8px;
    border-radius: 8px;
    background: #f1f5f9;
}

.scroll-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(250px, 285px);
    gap: 18px;
    overflow-x: auto;
    padding: 4px 2px 18px;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.75fr);
    gap: 28px;
    align-items: start;
}

.vertical-list,
.ranking-list {
    display: grid;
    gap: 16px;
}

.movie-card.horizontal {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
}

.poster-horizontal {
    height: 170px;
}

.side-search-card {
    padding: 28px;
    background: linear-gradient(135deg, #ffffff, #ecfeff);
}

.side-search-card h2 {
    margin: 0 0 12px;
    font-size: 28px;
}

.side-search-card p {
    color: #64748b;
    line-height: 1.7;
}

.search-form,
.search-panel {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.search-form input,
.search-panel input {
    width: 100%;
    min-height: 48px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 0 14px;
    color: #0f172a;
    background: #ffffff;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-form input:focus,
.search-panel input:focus {
    border-color: #0891b2;
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.12);
}

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

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(135deg, #0f172a 0%, #164e63 52%, #2563eb 100%);
    color: #ffffff;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.18);
}

.page-hero {
    padding: clamp(34px, 6vw, 70px);
}

.page-hero span {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 800;
}

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

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

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

.breadcrumb a:hover {
    color: #0891b2;
}

.category-grid-page {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 34px;
}

.category-card {
    padding: 26px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

.category-card-main span {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #0891b2, #2563eb);
}

.category-card h2 {
    margin: 16px 0 10px;
    font-size: 26px;
}

.category-card p {
    margin: 0;
    color: #64748b;
    line-height: 1.7;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.category-samples a {
    padding: 7px 10px;
    border-radius: 999px;
    color: #0369a1;
    background: #e0f2fe;
    font-size: 13px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0;
}

.filter-bar button {
    border: 1px solid #cffafe;
    border-radius: 999px;
    padding: 10px 14px;
    color: #0e7490;
    background: #ecfeff;
    cursor: pointer;
    font-weight: 700;
}

.filter-bar button.is-active,
.filter-bar button:hover {
    color: #ffffff;
    background: #0891b2;
}

.empty-state {
    display: none;
    padding: 28px;
    text-align: center;
    color: #64748b;
    border-radius: 18px;
    background: #f8fafc;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: clamp(24px, 4vw, 48px);
    align-items: center;
    padding: clamp(28px, 5vw, 56px);
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 24px;
    background: #0f172a;
    box-shadow: 0 24px 55px rgba(0, 0, 0, 0.28);
}

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

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

.detail-one-line {
    max-width: 780px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
    line-height: 1.8;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.detail-meta span {
    padding: 7px 11px;
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.13);
}

.detail-info .primary-button {
    margin-top: 24px;
}

.watch-panel,
.detail-copy {
    margin-top: 34px;
    padding: clamp(22px, 4vw, 34px);
}

.watch-panel h2,
.detail-copy h2 {
    margin: 0 0 18px;
    color: #0f172a;
    font-size: 28px;
}

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

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.7));
    cursor: pointer;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.player-button {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0891b2, #2563eb);
    box-shadow: 0 18px 42px rgba(8, 145, 178, 0.34);
    font-size: 34px;
}

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

.detail-copy p {
    color: #475569;
    line-height: 1.9;
    font-size: 17px;
}

.site-footer {
    margin-top: 76px;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-inner {
    padding: 46px 0 28px;
}

.footer-main {
    display: grid;
    grid-template-columns: 1.4fr 0.7fr 0.7fr;
    gap: 32px;
}

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

.footer-about p {
    max-width: 560px;
    color: #94a3b8;
    line-height: 1.8;
}

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

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

.site-footer a {
    color: #cbd5e1;
}

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

.footer-bottom {
    margin-top: 32px;
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    color: #64748b;
    text-align: center;
}

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

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

    .hero-cover {
        display: none;
    }

    .detail-poster {
        width: min(320px, 100%);
    }
}

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

    .menu-toggle {
        display: block;
    }

    .three-grid,
    .four-grid,
    .two-grid,
    .split-section,
    .category-grid-page,
    .footer-main {
        grid-template-columns: 1fr;
    }

    .hero-arrow {
        display: none;
    }

    .hero-content {
        padding: 32px 24px 70px;
    }

    .section-title {
        display: block;
    }

    .section-more {
        display: inline-flex;
        margin-top: 16px;
    }

    .movie-card.horizontal {
        grid-template-columns: 140px minmax(0, 1fr);
    }

    .poster-horizontal {
        height: 160px;
    }
}

@media (max-width: 560px) {
    .site-nav,
    .footer-inner,
    .page-shell,
    .mobile-menu {
        width: min(100% - 22px, 1180px);
    }

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

    .hero-slider {
        border-radius: 20px;
    }

    .hero-text h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 34px;
    }

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

    .poster,
    .poster-horizontal,
    .movie-card.large .poster {
        height: 250px;
    }

    .search-form {
        display: grid;
    }

    .detail-hero,
    .page-hero,
    .panel-section,
    .glow-panel,
    .watch-panel,
    .detail-copy {
        border-radius: 20px;
    }
}
