:root {
    --cyan: #0891b2;
    --cyan-deep: #0e7490;
    --teal: #0f766e;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --white: #ffffff;
    --shadow: 0 22px 60px rgba(15, 23, 42, 0.18);
    --soft-shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--slate-800);
    background: linear-gradient(180deg, #f8fafc 0%, #eef7f8 44%, #f8fafc 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;
    color: var(--white);
    background: linear-gradient(90deg, rgba(14, 116, 144, 0.98), rgba(15, 118, 110, 0.98));
    box-shadow: 0 12px 32px rgba(8, 47, 73, 0.26);
    backdrop-filter: blur(18px);
}

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

.nav-shell {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 26px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--cyan-deep);
    background: linear-gradient(135deg, #ffffff, #cffafe);
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 10px 20px rgba(8, 47, 73, 0.18);
}

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

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

.desktop-nav a,
.mobile-panel a {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-panel a:hover,
.mobile-panel a.is-active {
    color: #cffafe;
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 274px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.nav-search input,
.mobile-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    color: var(--white);
    background: transparent;
}

.nav-search input::placeholder,
.mobile-search input::placeholder {
    color: rgba(207, 250, 254, 0.9);
}

.nav-search button,
.mobile-search button,
.hero-button,
.section-link,
.primary-button,
.secondary-button,
.player-button,
.search-submit {
    border: 0;
    cursor: pointer;
    font-weight: 800;
    border-radius: 999px;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button,
.mobile-search button {
    padding: 8px 14px;
    color: var(--cyan-deep);
    background: var(--white);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: var(--white);
    background: transparent;
    font-size: 28px;
    cursor: pointer;
}

.mobile-panel {
    padding: 0 0 18px;
}

.mobile-panel[hidden] {
    display: none;
}

.mobile-panel a {
    display: block;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.mobile-search {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    margin: 8px 0;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.16);
}

.hero-stage {
    position: relative;
    min-height: 680px;
    color: var(--white);
    overflow: hidden;
    background: var(--slate-950);
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.06) contrast(1.02);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.72) 44%, rgba(8, 145, 178, 0.38) 100%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 680px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: end;
    gap: 42px;
    padding: 120px 0 74px;
}

.hero-kicker,
.page-kicker,
.detail-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #ecfeff;
    background: rgba(8, 145, 178, 0.78);
    box-shadow: 0 12px 28px rgba(8, 145, 178, 0.24);
    font-weight: 800;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 18px 0 0;
    max-width: 780px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.02;
    letter-spacing: -0.055em;
}

.hero-copy h1 span {
    display: block;
    color: #a5f3fc;
}

.hero-copy p {
    max-width: 720px;
    margin: 22px 0 0;
    color: rgba(226, 232, 240, 0.92);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.8;
}

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

.hero-button,
.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 26px;
    color: var(--white);
    background: linear-gradient(135deg, var(--cyan), var(--teal));
    box-shadow: 0 18px 34px rgba(8, 145, 178, 0.36);
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 24px;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(14px);
}

.hero-button:hover,
.primary-button:hover,
.secondary-button:hover,
.section-link:hover,
.player-button:hover,
.search-submit:hover {
    transform: translateY(-2px);
}

.hero-panel {
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.44);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
}

.hero-panel h3 {
    margin: 0 0 16px;
    color: #cffafe;
    font-size: 18px;
}

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

.hero-mini {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.12);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-mini:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.18);
}

.hero-mini img {
    width: 78px;
    height: 104px;
    object-fit: cover;
    border-radius: 15px;
}

.hero-mini strong {
    display: block;
    margin-bottom: 6px;
    color: var(--white);
}

.hero-mini span {
    display: block;
    color: rgba(226, 232, 240, 0.78);
    font-size: 13px;
    line-height: 1.5;
}

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

.hero-dots button {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.38);
}

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

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

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

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

.section-title-row h2 {
    margin: 0;
    color: var(--slate-900);
    font-size: clamp(26px, 3vw, 36px);
    letter-spacing: -0.03em;
}

.section-title-row p {
    margin: 8px 0 0;
    color: var(--slate-600);
    line-height: 1.7;
}

.section-link {
    flex: 0 0 auto;
    padding: 11px 18px;
    color: var(--white);
    background: linear-gradient(135deg, var(--cyan), var(--teal));
    box-shadow: 0 12px 26px rgba(8, 145, 178, 0.22);
}

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

.movie-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(250px, 1fr);
    gap: 18px;
    overflow-x: auto;
    padding: 4px 4px 16px;
    scroll-snap-type: x mandatory;
}

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--soft-shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(8, 145, 178, 0.35);
    box-shadow: var(--shadow);
}

.rail-card {
    scroll-snap-align: start;
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, var(--slate-800), var(--cyan-deep));
}

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

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

.poster-year,
.poster-play {
    position: absolute;
    z-index: 2;
    color: var(--white);
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(8px);
}

.poster-year {
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.poster-play {
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(8, 145, 178, 0.88);
}

.movie-copy {
    padding: 18px;
}

.movie-copy h3 {
    margin: 0;
    color: var(--slate-900);
    font-size: 18px;
    line-height: 1.35;
}

.movie-copy h3 a:hover {
    color: var(--cyan-deep);
}

.movie-meta {
    margin: 8px 0 0;
    color: var(--cyan-deep);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.5;
}

.movie-line {
    margin: 10px 0 0;
    color: var(--slate-600);
    font-size: 14px;
    line-height: 1.65;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.tag-row span {
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--slate-700);
    background: #ecfeff;
    font-size: 12px;
    font-weight: 700;
}

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

.category-card {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    border-radius: 28px;
    color: var(--white);
    background: linear-gradient(135deg, var(--cyan-deep), var(--teal));
    box-shadow: var(--soft-shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:nth-child(2n) {
    background: linear-gradient(135deg, #0f766e, #115e59);
}

.category-card:nth-child(3n) {
    background: linear-gradient(135deg, #155e75, #0f766e);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.category-card h3 {
    margin: 0;
    font-size: 22px;
}

.category-card p {
    color: rgba(236, 254, 255, 0.88);
    line-height: 1.7;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 48px;
    border-radius: 34px;
    color: var(--white);
    background: radial-gradient(circle at top left, rgba(103, 232, 249, 0.38), transparent 36%), linear-gradient(135deg, var(--slate-950), var(--cyan-deep) 52%, var(--teal));
    box-shadow: var(--shadow);
}

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

.page-hero p,
.detail-info p {
    max-width: 820px;
    color: rgba(226, 232, 240, 0.92);
    line-height: 1.8;
}

.page-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.page-tabs a {
    padding: 9px 14px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.page-tabs a.is-active,
.page-tabs a:hover {
    background: rgba(255, 255, 255, 0.26);
}

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

.compact-card {
    position: relative;
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 14px;
    align-items: center;
    min-height: 104px;
    padding: 12px;
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.compact-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.compact-card img {
    width: 74px;
    height: 96px;
    object-fit: cover;
    border-radius: 15px;
}

.compact-card strong {
    display: block;
    color: var(--slate-900);
    line-height: 1.45;
}

.compact-card em {
    display: block;
    margin-top: 6px;
    color: var(--slate-600);
    font-size: 13px;
    font-style: normal;
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    color: var(--white);
    background: linear-gradient(135deg, #f97316, #ef4444);
    border-radius: 50%;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(239, 68, 68, 0.32);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 22px;
    color: var(--slate-600);
    font-weight: 700;
}

.breadcrumb a:hover {
    color: var(--cyan-deep);
}

.detail-hero {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 34px;
    align-items: center;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: 0 26px 70px rgba(2, 6, 23, 0.36);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #ecfeff;
    background: rgba(255, 255, 255, 0.14);
}

.player-section,
.text-panel,
.related-section,
.search-panel {
    margin-top: 38px;
    padding: 28px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--soft-shadow);
}

.player-section h2,
.text-panel h2,
.related-section h2,
.search-panel h2 {
    margin: 0 0 18px;
    color: var(--slate-900);
    font-size: 28px;
}

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

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

.player-mask {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    color: var(--white);
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.28));
}

.player-mask[hidden] {
    display: none;
}

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

.player-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
    color: var(--white);
    background: linear-gradient(135deg, var(--cyan), var(--teal));
    box-shadow: 0 18px 34px rgba(8, 145, 178, 0.36);
}

.player-status {
    margin-top: 12px;
    min-height: 24px;
    color: var(--slate-600);
    line-height: 1.6;
}

.text-panel p {
    color: var(--slate-700);
    font-size: 17px;
    line-height: 1.9;
}

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

.info-list div {
    padding: 16px;
    border-radius: 20px;
    background: #f8fafc;
}

.info-list strong {
    display: block;
    margin-bottom: 6px;
    color: var(--slate-900);
}

.search-form-large {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin-top: 22px;
}

.search-form-large input {
    width: 100%;
    padding: 15px 18px;
    border: 1px solid rgba(148, 163, 184, 0.48);
    border-radius: 999px;
    outline: 0;
    background: var(--white);
}

.search-submit {
    padding: 15px 24px;
    color: var(--white);
    background: linear-gradient(135deg, var(--cyan), var(--teal));
}

.empty-state {
    padding: 42px;
    text-align: center;
    color: var(--slate-600);
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.4fr;
    gap: 34px;
    padding: 48px 0;
}

.footer-grid h3 {
    margin: 0 0 16px;
    color: var(--white);
}

.footer-grid p {
    margin: 14px 0 0;
    line-height: 1.8;
}

.footer-grid a {
    display: block;
    margin: 10px 0;
    color: #cbd5e1;
}

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

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

    .menu-toggle {
        display: block;
    }

    .nav-search {
        margin-left: auto;
    }

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

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

    .hero-inner {
        grid-template-columns: 1fr;
        align-items: end;
    }

    .hero-panel {
        display: none;
    }
}

@media (max-width: 760px) {
    .nav-shell,
    .mobile-panel,
    .footer-grid,
    .page-container,
    .page-main {
        width: min(100% - 24px, 1180px);
    }

    .nav-search {
        display: none;
    }

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

    .hero-stage,
    .hero-inner {
        min-height: 620px;
    }

    .hero-inner {
        padding: 96px 0 70px;
    }

    .movie-grid,
    .compact-list,
    .info-list,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

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

    .page-hero,
    .detail-hero,
    .player-section,
    .text-panel,
    .related-section,
    .search-panel {
        padding: 22px;
        border-radius: 26px;
    }

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

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

    .search-form-large {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .movie-rail {
        grid-auto-columns: minmax(230px, 84vw);
    }

    .hero-copy h1,
    .hero-copy h2 {
        font-size: 40px;
    }
}
