:root {
    --color-bg: #f7fafc;
    --color-bg-soft: #eef6fb;
    --color-text: #182231;
    --color-muted: #667085;
    --color-border: rgba(15, 23, 42, 0.10);
    --color-card: #ffffff;
    --color-cyan: #06b6d4;
    --color-blue: #2563eb;
    --color-teal: #0d9488;
    --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.10);
    --shadow-hover: 0 22px 60px rgba(8, 145, 178, 0.22);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--color-text);
    background: linear-gradient(180deg, #f8fbff 0%, #edf7fb 55%, #f7fafc 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.96), rgba(13, 148, 136, 0.96));
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.20);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.20);
    transition: transform 0.3s ease;
}

.brand:hover .brand-mark {
    transform: rotate(12deg) scale(1.06);
}

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

.main-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.88);
    font-weight: 650;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #ffffff;
    transform: translateY(-1px);
}

.header-search {
    width: 300px;
    display: flex;
    align-items: center;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.header-search input {
    width: 100%;
    min-width: 0;
    color: #ffffff;
    padding: 8px 12px;
    border: 0;
    outline: none;
    background: transparent;
}

.header-search input::placeholder {
    color: rgba(226, 247, 255, 0.88);
}

.header-search button {
    flex: 0 0 auto;
    color: #0f6674;
    font-weight: 700;
    padding: 8px 15px;
    border: 0;
    border-radius: 999px;
    background: #ffffff;
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
}

.mobile-menu-button span {
    width: 20px;
    height: 2px;
    margin: 4px auto;
    display: block;
    background: #ffffff;
    border-radius: 999px;
}

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

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

.mobile-panel a,
.mobile-panel form {
    color: #ffffff;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.mobile-panel form {
    display: flex;
    gap: 8px;
}

.mobile-panel input {
    flex: 1;
    min-width: 0;
    color: #ffffff;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    outline: none;
    background: rgba(255, 255, 255, 0.14);
}

.mobile-panel input::placeholder {
    color: rgba(255, 255, 255, 0.78);
}

.mobile-panel button {
    color: #0f6674;
    font-weight: 700;
    border: 0;
    border-radius: 999px;
    padding: 0 16px;
    background: #ffffff;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: #020617;
}

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 40%, rgba(6, 182, 212, 0.28), transparent 30%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.52) 52%, rgba(2, 6, 23, 0.24) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.10) 46%);
}

.hero-content {
    position: absolute;
    top: 50%;
    left: max(24px, calc((100% - 1180px) / 2));
    width: min(680px, calc(100% - 48px));
    transform: translateY(-50%);
    color: #ffffff;
}

.hero-kicker,
.section-kicker,
.detail-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 12px;
    color: var(--color-cyan);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1 {
    margin: 0 0 18px;
    font-size: clamp(40px, 6vw, 76px);
    line-height: 1.04;
    letter-spacing: -0.05em;
    text-shadow: 0 16px 42px rgba(0, 0, 0, 0.45);
}

.hero-content p {
    max-width: 610px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.detail-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-tags {
    margin-bottom: 28px;
}

.hero-tags span,
.detail-tags span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    color: #ffffff;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
}

.hero-actions,
.detail-info .primary-button {
    display: flex;
    align-items: center;
    gap: 14px;
}

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

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-cyan), var(--color-blue));
    box-shadow: 0 14px 36px rgba(6, 182, 212, 0.32);
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px) scale(1.02);
}

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

.ghost-button.light {
    color: #ffffff;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 52px;
    height: 52px;
    transform: translateY(-50%);
    color: #ffffff;
    font-size: 36px;
    line-height: 1;
    border: 1px solid rgba(255, 255, 255, 0.30);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.34);
    transform: translateY(-50%) scale(1.05);
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

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

.hero-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    transition: width 0.25s ease, background 0.25s ease;
}

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

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

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

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

.section-heading h2 {
    margin: 0;
    color: #102033;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.18;
    letter-spacing: -0.035em;
}

.section-link {
    color: var(--color-blue);
    font-weight: 800;
    white-space: nowrap;
}

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

.category-tile,
.category-panel-link {
    display: grid;
    gap: 18px;
    min-height: 100%;
    padding: 20px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.76);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.category-panel-link:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.category-poster-stack,
.category-panel-posters {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.category-poster-stack img,
.category-panel-posters img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
    background: linear-gradient(135deg, #164e63, #0f172a);
}

.category-tile h3,
.category-panel-text h2 {
    margin: 0 0 8px;
    font-size: 22px;
    line-height: 1.2;
}

.category-tile p,
.category-panel-text p {
    margin: 0;
    color: var(--color-muted);
    font-size: 14px;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--color-card);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #164e63, #0f172a);
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transform: scale(1.001);
    transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster-link img {
    transform: scale(1.06);
    filter: saturate(1.08) contrast(1.04);
}

.type-badge,
.rank-badge,
.play-chip {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    border-radius: 999px;
}

.type-badge {
    top: 12px;
    right: 12px;
    color: #ffffff;
    padding: 5px 10px;
    font-size: 12px;
    background: rgba(2, 6, 23, 0.58);
    backdrop-filter: blur(10px);
}

.rank-badge {
    top: 12px;
    left: 12px;
    width: 38px;
    height: 38px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444);
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.24);
}

.play-chip {
    left: 50%;
    bottom: 16px;
    color: #ffffff;
    padding: 9px 16px;
    opacity: 0;
    transform: translate(-50%, 16px);
    background: linear-gradient(135deg, var(--color-cyan), var(--color-blue));
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.movie-card-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.25;
}

.movie-card-body h3 a:hover {
    color: var(--color-blue);
}

.movie-meta,
.movie-line {
    margin: 0;
    color: var(--color-muted);
    font-size: 13px;
}

.movie-line {
    display: -webkit-box;
    min-height: 42px;
    margin-top: 9px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-list {
    margin-top: 12px;
}

.tag-list span {
    color: #0f6674;
    padding: 4px 8px;
    background: rgba(6, 182, 212, 0.10);
}

.page-main,
.detail-main {
    padding-bottom: 72px;
}

.page-hero {
    position: relative;
    margin-top: 28px;
    padding: 58px;
    color: #ffffff;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(103, 232, 249, 0.42), transparent 34%),
        linear-gradient(135deg, #1d4ed8, #0f766e 62%, #0f172a);
    box-shadow: var(--shadow-card);
}

.page-hero span {
    color: rgba(255, 255, 255, 0.74);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.page-hero h1 {
    margin: 12px 0 12px;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

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

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

.category-panel-link {
    grid-template-columns: 190px 1fr;
    align-items: center;
}

.category-panel-text span {
    color: var(--color-cyan);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.filter-section {
    padding-top: 46px;
}

.filter-heading {
    align-items: center;
}

.filter-tools {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.filter-tools input,
.filter-tools select {
    min-height: 44px;
    color: #102033;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    outline: none;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.filter-tools input {
    width: min(330px, 100%);
    padding: 0 17px;
}

.filter-tools select {
    padding: 0 14px;
}

.empty-state {
    margin: 28px 0 0;
    padding: 24px;
    color: var(--color-muted);
    text-align: center;
    border-radius: var(--radius-md);
    background: #ffffff;
    border: 1px solid var(--color-border);
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 28px 0 18px;
    color: var(--color-muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--color-blue);
    font-weight: 700;
}

.detail-hero {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 36px;
    padding: 34px;
    color: #ffffff;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.32), transparent 32%),
        linear-gradient(135deg, #0f172a, #123c69 55%, #0f766e);
    box-shadow: var(--shadow-card);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 22px;
    background: linear-gradient(135deg, #164e63, #0f172a);
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.35);
}

.detail-info {
    align-self: center;
}

.detail-info h1 {
    margin: 0 0 16px;
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1.06;
    letter-spacing: -0.045em;
}

.detail-one-line {
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 20px;
}

.detail-tags {
    margin-bottom: 28px;
}

.detail-tags span {
    color: #ffffff;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.player-section {
    margin-top: 30px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #000000;
    box-shadow: 0 22px 65px rgba(15, 23, 42, 0.22);
}

.movie-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    border: 0;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.22), rgba(2, 6, 23, 0.56));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-play-icon {
    width: 76px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-cyan), var(--color-blue));
    box-shadow: 0 18px 45px rgba(37, 99, 235, 0.38);
}

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

.detail-text-card {
    padding: 28px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
}

.detail-text-card h2 {
    margin: 0 0 14px;
    font-size: 28px;
    letter-spacing: -0.035em;
}

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

.related-section {
    width: 100%;
}

.site-footer {
    margin-top: 70px;
    color: #cbd5e1;
    background: linear-gradient(180deg, #1e293b, #0f172a);
}

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

.footer-logo {
    margin-bottom: 14px;
}

.footer-brand p {
    max-width: 520px;
    margin: 0;
    color: #94a3b8;
}

.footer-links {
    display: grid;
    gap: 10px;
    align-content: start;
}

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

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

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

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

    .mobile-menu-button {
        display: block;
    }

    .hero {
        height: 76vh;
        min-height: 560px;
    }

    .hero-content {
        top: 54%;
    }

    .hero-arrow {
        display: none;
    }

    .category-grid,
    .movie-grid,
    .search-grid,
    .category-panel-grid,
    .detail-content-grid,
    .footer-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-panel-link,
    .detail-hero {
        grid-template-columns: 1fr;
    }

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

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

    .filter-tools {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 620px) {
    .header-inner {
        width: min(100% - 24px, 1180px);
        height: 62px;
    }

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

    .hero {
        min-height: 520px;
    }

    .hero-content {
        left: 18px;
        width: calc(100% - 36px);
    }

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

    .primary-button,
    .ghost-button {
        width: 100%;
    }

    .content-section,
    .page-main,
    .detail-main {
        width: min(100% - 24px, 1180px);
    }

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

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

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

    .page-hero,
    .detail-hero {
        padding: 28px;
    }

    .filter-tools input,
    .filter-tools select {
        width: 100%;
    }
}
