html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: #e5edf8;
    background: linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.88);
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    backdrop-filter: blur(18px);
}

.nav-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    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;
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    color: #dbeafe;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    box-shadow: 0 18px 35px rgba(37, 99, 235, 0.36);
}

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

.nav-links a {
    padding: 10px 16px;
    border-radius: 12px;
    color: #cbd5e1;
    font-weight: 600;
    transition: 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
    background: #2563eb;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.28);
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.9);
}

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

.hero-slider {
    position: relative;
    min-height: 68vh;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.015);
    transition: opacity 0.6s ease, transform 1.2s ease;
    background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(15, 23, 42, 0.76) 42%, rgba(15, 23, 42, 0.22) 100%), var(--hero-image);
    background-position: center;
    background-size: cover;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.22) 48%, rgba(2, 6, 23, 0.66) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(760px, calc(100% - 48px));
    margin-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    padding-top: 16vh;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 14px;
    color: #facc15;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.hero-content h1,
.hero-content h2,
.page-hero h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.04;
    font-weight: 900;
    text-shadow: 0 16px 50px rgba(0, 0, 0, 0.45);
}

.hero-content p,
.page-hero p,
.watch-heading p {
    max-width: 720px;
    margin: 22px 0 0;
    color: #dbeafe;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.78;
}

.hero-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    border: 1px solid rgba(147, 197, 253, 0.26);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(30, 64, 175, 0.36);
    font-size: 13px;
    font-weight: 700;
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 800;
    transition: 0.22s ease;
}

.primary-button {
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    box-shadow: 0 18px 35px rgba(37, 99, 235, 0.34);
}

.primary-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 24px 45px rgba(37, 99, 235, 0.46);
}

.ghost-button {
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.26);
    background: rgba(15, 23, 42, 0.58);
}

.ghost-button:hover {
    color: #fff;
    border-color: rgba(96, 165, 250, 0.62);
    background: rgba(30, 64, 175, 0.36);
}

.hero-dots {
    position: absolute;
    z-index: 5;
    right: max(24px, calc((100vw - 1280px) / 2 + 24px));
    bottom: 42px;
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.55);
    transition: 0.22s ease;
}

.hero-dots button.is-active {
    width: 38px;
    background: #2563eb;
}

.section-shell,
.footer-shell,
.breadcrumb,
.watch-section {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
}

.section-shell {
    padding: 72px 0 0;
}

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

.section-heading h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 900;
}

.section-heading a {
    color: #60a5fa;
    font-weight: 800;
}

.compact-heading {
    margin-bottom: 20px;
}

.movie-grid {
    display: grid;
    gap: 24px;
}

.six-col {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

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

.movie-card {
    min-width: 0;
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(135deg, #172554, #0f172a);
    box-shadow: 0 20px 45px rgba(2, 6, 23, 0.46);
}

.movie-cover img,
.wide-thumb img,
.detail-poster img,
.ranking-item img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.movie-card:hover .movie-cover img,
.wide-card:hover img {
    transform: scale(1.08);
}

.cover-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 9px;
    border-radius: 999px;
    color: #fff;
    background: rgba(37, 99, 235, 0.92);
    font-size: 12px;
    font-weight: 800;
}

.movie-card-body h3 {
    margin: 14px 0 8px;
    color: #fff;
    font-size: 16px;
    line-height: 1.45;
    font-weight: 800;
}

.movie-card-body h3 a:hover,
.wide-content h3 a:hover,
.detail-content a:hover {
    color: #60a5fa;
}

.movie-card-body p,
.wide-content p,
.category-card-large p,
.site-footer p {
    color: #94a3b8;
    line-height: 1.7;
}

.movie-card-body p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0;
    overflow: hidden;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta,
.detail-meta-box {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    color: #cbd5e1;
    font-size: 13px;
}

.movie-meta span,
.detail-meta-box span {
    padding: 4px 8px;
    border-radius: 9px;
    background: rgba(30, 41, 59, 0.78);
}

.glow-panel {
    padding: 44px;
    margin-top: 72px;
    border: 1px solid rgba(59, 130, 246, 0.18);
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.22), rgba(8, 145, 178, 0.13));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 24px 55px rgba(2, 6, 23, 0.32);
}

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

.wide-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.66);
    transition: 0.22s ease;
}

.wide-card:hover {
    transform: translateY(-4px);
    border-color: rgba(96, 165, 250, 0.4);
    background: rgba(30, 41, 59, 0.76);
}

.wide-thumb {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.wide-content {
    padding: 16px;
}

.wide-content h3 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 18px;
    font-weight: 850;
}

.wide-content p {
    min-height: 50px;
    margin: 0;
    font-size: 14px;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.65fr);
    gap: 28px;
}

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

.category-tile,
.category-hero {
    position: relative;
    min-height: 150px;
    overflow: hidden;
    border-radius: 22px;
    background-image: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(15, 23, 42, 0.2)), var(--tile-image);
    background-position: center;
    background-size: cover;
    box-shadow: 0 20px 45px rgba(2, 6, 23, 0.32);
}

.category-tile {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 18px;
}

.category-tile span,
.category-hero span {
    color: #fff;
    font-size: 20px;
    font-weight: 900;
}

.category-tile small {
    margin-top: 8px;
    color: #dbeafe;
    line-height: 1.55;
}

.rank-panel,
.search-panel,
.detail-content,
.detail-poster,
.category-card-large {
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 20px 48px rgba(2, 6, 23, 0.28);
}

.rank-panel {
    padding: 24px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 15px;
    color: #cbd5e1;
    background: rgba(30, 41, 59, 0.58);
}

.rank-row:hover,
.ranking-item:hover {
    color: #fff;
    background: rgba(37, 99, 235, 0.32);
}

.rank-num {
    color: #facc15;
    font-weight: 900;
}

.rank-row em {
    color: #94a3b8;
    font-style: normal;
}

.page-hero {
    position: relative;
    overflow: hidden;
    min-height: 420px;
    display: flex;
    align-items: flex-end;
    padding: 90px max(24px, calc((100vw - 1280px) / 2 + 24px)) 70px;
    background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.34)), var(--page-image);
    background-position: center;
    background-size: cover;
}

.small-hero {
    min-height: 340px;
    background-image: radial-gradient(circle at top right, rgba(37, 99, 235, 0.32), transparent 34%), linear-gradient(135deg, #020617, #0f172a 62%, #172554);
}

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

.category-card-large {
    overflow: hidden;
}

.category-hero {
    display: flex;
    align-items: flex-end;
    min-height: 210px;
    padding: 24px;
    border-radius: 0;
}

.category-card-large > div {
    padding: 24px;
}

.category-card-large h2 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 24px;
    font-weight: 900;
}

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

.category-preview-links a {
    padding: 6px 10px;
    border-radius: 999px;
    color: #bfdbfe;
    background: rgba(30, 64, 175, 0.34);
    font-size: 13px;
    font-weight: 700;
}

.category-movie-grid {
    padding-bottom: 24px;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 70px 70px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 12px 16px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
}

.ranking-index {
    color: #facc15;
    font-size: 22px;
    font-weight: 900;
}

.ranking-item img {
    aspect-ratio: 2 / 3;
    border-radius: 12px;
}

.ranking-title {
    color: #fff;
    font-weight: 850;
}

.ranking-meta {
    color: #94a3b8;
    font-size: 14px;
}

.search-panel {
    padding: 28px;
}

.search-controls {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(160px, 0.25fr));
    gap: 14px;
    margin-bottom: 28px;
}

.search-controls input,
.search-controls select {
    min-height: 48px;
    width: 100%;
    padding: 0 15px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    color: #e2e8f0;
    outline: none;
    background: rgba(2, 6, 23, 0.58);
}

.search-controls input:focus,
.search-controls select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.24);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 34px 0 0;
    color: #94a3b8;
    font-size: 14px;
}

.breadcrumb a {
    color: #93c5fd;
}

.watch-section {
    padding-top: 28px;
}

.watch-heading {
    margin-bottom: 26px;
}

.watch-heading h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(32px, 5vw, 58px);
    font-weight: 900;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(96, 165, 250, 0.28);
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 30px 75px rgba(2, 6, 23, 0.62);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.18), rgba(2, 6, 23, 0.82));
    font-size: 18px;
    font-weight: 900;
}

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

.play-circle {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.46);
}

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

.detail-poster {
    height: fit-content;
    padding: 18px;
}

.detail-poster img {
    aspect-ratio: 2 / 3;
    border-radius: 18px;
}

.full-button {
    width: 100%;
    margin-top: 18px;
}

.detail-content {
    padding: 30px;
}

.detail-content h2 {
    margin: 34px 0 12px;
    color: #fff;
    font-size: 26px;
    font-weight: 900;
}

.detail-content h2:first-of-type {
    margin-top: 28px;
}

.detail-content p {
    color: #cbd5e1;
    font-size: 17px;
    line-height: 1.95;
}

.site-footer {
    margin-top: 86px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.72);
}

.footer-shell {
    padding: 42px 0;
}

.footer-shell p {
    max-width: 820px;
    margin: 14px 0 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin-top: 24px;
}

.footer-links a {
    color: #93c5fd;
    font-weight: 700;
}

.copyright {
    color: #64748b;
    font-size: 14px;
}

.empty-result {
    grid-column: 1 / -1;
    padding: 40px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 20px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.72);
    text-align: center;
}

@media (max-width: 1120px) {
    .six-col {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

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

@media (max-width: 760px) {
    .nav-shell {
        min-height: 64px;
        padding: 0 16px;
    }

    .menu-button {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 64px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid rgba(148, 163, 184, 0.14);
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.98);
        box-shadow: 0 24px 52px rgba(2, 6, 23, 0.45);
    }

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

    .hero-slider {
        min-height: 78vh;
    }

    .hero-content {
        width: calc(100% - 32px);
        margin-left: 16px;
        padding-top: 13vh;
    }

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

    .hero-dots {
        left: 16px;
        right: auto;
        bottom: 26px;
    }

    .section-shell,
    .footer-shell,
    .breadcrumb,
    .watch-section {
        width: calc(100% - 32px);
    }

    .section-shell {
        padding-top: 48px;
    }

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

    .six-col,
    .four-col,
    .wide-grid,
    .category-grid,
    .category-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .glow-panel,
    .search-panel,
    .detail-content {
        padding: 20px;
    }

    .page-hero {
        min-height: 320px;
        padding: 88px 16px 42px;
    }

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

    .ranking-item {
        grid-template-columns: 46px 54px minmax(0, 1fr);
    }

    .ranking-meta {
        grid-column: 3 / 4;
    }

    .player-shell {
        border-radius: 18px;
    }

    .play-circle {
        width: 68px;
        height: 68px;
    }
}

@media (max-width: 520px) {
    .six-col,
    .four-col,
    .wide-grid,
    .category-grid,
    .category-overview {
        grid-template-columns: 1fr;
    }

    .movie-card {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 14px;
        align-items: start;
    }

    .movie-cover {
        border-radius: 14px;
    }

    .movie-card-body h3 {
        margin-top: 2px;
    }
}
