* {
    box-sizing: border-box;
}

:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --slate: #0f172a;
    --slate-soft: #1e293b;
    --cyan: #06b6d4;
    --cyan-dark: #0891b2;
    --blue: #2563eb;
    --orange: #f97316;
    --radius: 18px;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

body.is-menu-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    color: #ffffff;
    background: linear-gradient(90deg, #0f172a 0%, #1e293b 55%, #0f172a 100%);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.3);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.brand-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #22d3ee, #2563eb);
    box-shadow: 0 12px 28px rgba(6, 182, 212, 0.32);
    transition: transform 0.25s ease;
}

.brand:hover .brand-icon {
    transform: scale(1.08) rotate(-3deg);
}

.brand-text strong,
.footer-brand {
    display: block;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.brand-text small {
    display: block;
    color: #cbd5e1;
    font-size: 12px;
    margin-top: -2px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-weight: 650;
    white-space: nowrap;
}

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

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: #67e8f9;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #ffffff;
    border-radius: 10px;
}

.mobile-nav {
    display: none;
    padding: 14px 24px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: #0f172a;
}

.mobile-nav a {
    display: block;
    padding: 11px 0;
    font-weight: 650;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.24), transparent 36%), linear-gradient(135deg, #0f172a 0%, #1e293b 48%, #164e63 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.72), rgba(8, 145, 178, 0.45));
    z-index: 1;
}

.hero-glow {
    position: absolute;
    width: 520px;
    height: 520px;
    right: -170px;
    top: -120px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.2);
    filter: blur(20px);
}

.hero-slider {
    position: relative;
    z-index: 2;
    min-height: 620px;
}

.hero-slide {
    display: none;
    min-height: 620px;
    align-items: center;
    gap: 52px;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.74fr);
    padding: 72px 0;
}

.hero-slide.is-active {
    display: grid;
    animation: heroFade 0.58s ease both;
}

@keyframes heroFade {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    color: #cffafe;
    background: rgba(6, 182, 212, 0.18);
    border: 1px solid rgba(103, 232, 249, 0.26);
    font-size: 14px;
    font-weight: 700;
}

.hero h1,
.hero h2 {
    margin: 22px 0 18px;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.07em;
}

.hero p {
    max-width: 720px;
    margin: 0 0 26px;
    color: #dbeafe;
    font-size: 18px;
}

.hero-actions,
.hero-tags,
.hero-search {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.hero-search {
    margin: 24px 0 20px;
    padding: 8px;
    max-width: 660px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
}

.hero-search input {
    flex: 1 1 260px;
    min-width: 0;
    color: #ffffff;
    padding: 12px 16px;
    border: 0;
    outline: 0;
    background: transparent;
}

.hero-search input::placeholder {
    color: #cbd5e1;
}

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

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.26);
}

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

.hero-tags a,
.hero-tags span {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #e0f2fe;
    font-size: 13px;
}

.hero-poster-wrap {
    position: relative;
}

.hero-poster {
    overflow: hidden;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.hero-poster-info {
    position: absolute;
    left: -26px;
    bottom: 28px;
    width: min(320px, 88%);
    padding: 18px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
}

.hero-poster-info strong {
    display: block;
    font-size: 20px;
}

.hero-poster-info small {
    color: #a5f3fc;
}

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

.hero-dot {
    width: 38px;
    height: 5px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    cursor: pointer;
}

.hero-dot.is-active {
    background: #22d3ee;
}

.main-wrap {
    padding: 58px 0;
}

.content-section {
    margin-bottom: 62px;
}

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

.section-heading h2,
.page-heading h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
    letter-spacing: -0.05em;
}

.section-heading p,
.page-heading p,
.detail-title p {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-more {
    color: var(--cyan-dark);
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    transition: transform 0.36s ease;
}

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

.poster-badge,
.poster-play,
.rank-num {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 800;
}

.poster-badge {
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(8, 145, 178, 0.88);
    font-size: 12px;
}

.poster-play {
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.86);
    transform: translate(-50%, -50%) scale(0.82);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

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

.movie-title {
    display: block;
    min-height: 54px;
    font-size: 18px;
    font-weight: 850;
    line-height: 1.45;
}

.movie-card-body p {
    min-height: 46px;
    margin: 9px 0 12px;
    color: var(--muted);
    font-size: 14px;
}

.movie-meta,
.tag-row,
.info-row,
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.movie-meta span,
.tag-row span,
.info-row span,
.category-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: #ecfeff;
    color: #0e7490;
    font-size: 12px;
    font-weight: 750;
}

.category-pill {
    margin-top: 12px;
    background: #f1f5f9;
    color: #475569;
}

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

.category-tile {
    min-height: 180px;
    padding: 22px;
    border-radius: 22px;
    color: #ffffff;
    background: linear-gradient(135deg, #1e293b, #0891b2);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
}

.category-tile strong {
    display: block;
    font-size: 22px;
    margin-bottom: 12px;
}

.category-tile span {
    color: #cffafe;
}

.breadcrumb {
    margin-bottom: 22px;
    color: #64748b;
    font-size: 14px;
}

.breadcrumb a {
    color: #0891b2;
    font-weight: 700;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}

.player-card,
.detail-card,
.side-card,
.search-panel {
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
}

.player-card {
    overflow: hidden;
    background: #020617;
}

.player-box {
    position: relative;
    background: #020617;
}

.player-box video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #020617;
}

.player-mask {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: rgba(2, 6, 23, 0.36);
}

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

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

.player-start {
    position: relative;
    z-index: 5;
    width: 92px;
    height: 92px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 24px 50px rgba(6, 182, 212, 0.34);
    font-size: 34px;
    cursor: pointer;
}

.detail-card {
    padding: 28px;
    margin-top: 24px;
}

.detail-title {
    margin-bottom: 20px;
}

.detail-title h1 {
    margin-bottom: 10px;
}

.detail-body h2,
.side-card h2 {
    margin: 26px 0 10px;
    font-size: 24px;
}

.detail-body p {
    color: #334155;
    margin: 0 0 16px;
}

.side-card {
    padding: 22px;
    margin-bottom: 22px;
}

.horizontal-list {
    display: grid;
    gap: 14px;
}

.horizontal-card {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #f8fafc;
    transition: background 0.2s ease, transform 0.2s ease;
}

.horizontal-card:hover {
    transform: translateX(4px);
    background: #ecfeff;
}

.horizontal-card img {
    width: 74px;
    aspect-ratio: 4 / 5;
    border-radius: 12px;
    object-fit: cover;
}

.horizontal-card strong {
    display: block;
    color: #0f172a;
    line-height: 1.35;
}

.horizontal-card small {
    color: #64748b;
}

.rank-list {
    display: grid;
    gap: 16px;
}

.rank-item {
    position: relative;
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.rank-item img {
    width: 110px;
    aspect-ratio: 4 / 5;
    border-radius: 14px;
    object-fit: cover;
}

.rank-num {
    left: 20px;
    top: 20px;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.rank-info h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.rank-info p {
    margin: 0 0 10px;
    color: #64748b;
}

.heat {
    color: #f97316;
    font-weight: 900;
    white-space: nowrap;
}

.search-panel {
    padding: 22px;
    margin-bottom: 28px;
}

.search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px 160px auto;
    gap: 12px;
}

.search-form input,
.search-form select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
    background: #ffffff;
    outline: 0;
}

.search-form input:focus,
.search-form select:focus {
    border-color: #06b6d4;
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.13);
}

.empty-result {
    padding: 36px;
    border-radius: 18px;
    color: #64748b;
    text-align: center;
    background: #ffffff;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr repeat(3, 1fr);
    gap: 34px;
    padding: 46px 0;
}

.footer-grid p {
    color: #94a3b8;
}

.footer-grid h3 {
    color: #ffffff;
    margin: 0 0 12px;
}

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

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

.footer-bottom {
    padding: 18px 0;
    text-align: center;
    color: #94a3b8;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
}

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

    .menu-toggle {
        display: block;
    }

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

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

    .hero-poster-wrap {
        max-width: 420px;
    }

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

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

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

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

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

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

    .brand-text small {
        display: none;
    }

    .hero,
    .hero-slider,
    .hero-slide {
        min-height: auto;
    }

    .hero-slide {
        padding: 46px 0 86px;
    }

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

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

    .hero-search {
        border-radius: 24px;
    }

    .hero-search input,
    .hero-search .btn {
        flex: 1 1 100%;
        width: 100%;
    }

    .movie-grid,
    .category-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .section-heading,
    .page-heading {
        display: block;
    }

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

    .rank-item {
        grid-template-columns: 86px minmax(0, 1fr);
    }

    .rank-item img {
        width: 86px;
    }

    .heat {
        grid-column: 2;
    }

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

    .mobile-nav.is-open {
        grid-template-columns: 1fr;
    }
}
