* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: #e2e8f0;
    background: radial-gradient(circle at 20% 0%, rgba(16, 185, 129, 0.16), transparent 30%), linear-gradient(135deg, #0f172a 0%, #1e293b 48%, #0f172a 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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-shell {
    min-height: 100vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(51, 65, 85, 0.7);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(14px);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
}

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

.brand:hover strong,
.brand:hover small {
    color: #6ee7b7;
}

.brand-mark {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 0 32px rgba(16, 185, 129, 0.35);
    font-size: 14px;
    line-height: 1;
}

.brand-mark.small {
    width: 28px;
    height: 28px;
    border-radius: 11px;
    font-size: 11px;
}

.brand-copy {
    display: grid;
    gap: 2px;
}

.brand-copy strong,
.footer-brand strong {
    color: #ffffff;
    font-size: 20px;
    line-height: 1.1;
    transition: color 0.2s ease;
}

.brand-copy small {
    color: #94a3b8;
    font-size: 12px;
    transition: color 0.2s ease;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link,
.mobile-link {
    color: #cbd5e1;
    border-radius: 12px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
    padding: 10px 16px;
}

.nav-link:hover,
.nav-link.is-current,
.mobile-link:hover,
.mobile-link.is-current {
    color: #34d399;
    background: rgba(30, 41, 59, 0.78);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #cbd5e1;
    background: rgba(30, 41, 59, 0.7);
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 12px 0 16px;
    border-top: 1px solid rgba(51, 65, 85, 0.6);
}

.mobile-nav.is-open {
    display: grid;
    gap: 8px;
}

.mobile-link {
    padding: 12px 14px;
}

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #0f172a 0%, rgba(15, 23, 42, 0.78) 48%, rgba(15, 23, 42, 0.1) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    height: 100%;
    padding-bottom: 64px;
}

.hero-copy {
    width: min(680px, 100%);
}

.hero-kicker,
.section-kicker,
.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #34d399;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.hero h1,
.hero h2 {
    margin: 0 0 18px;
    color: #ffffff;
    font-size: clamp(40px, 6vw, 64px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

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

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    color: #d1fae5;
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(52, 211, 153, 0.25);
    font-size: 14px;
    font-weight: 700;
}

.pill.soft {
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(148, 163, 184, 0.2);
}

.hero p {
    margin: 0 0 28px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.75;
}

.hero-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 14px;
    color: #ffffff;
    background: #10b981;
    font-weight: 800;
    box-shadow: 0 16px 36px rgba(16, 185, 129, 0.24);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(16, 185, 129, 0.34);
}

.btn.secondary {
    color: #cbd5e1;
    background: rgba(30, 41, 59, 0.82);
    box-shadow: none;
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.btn.secondary:hover {
    color: #34d399;
    background: rgba(30, 41, 59, 0.95);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.38);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.main-space {
    padding: 64px 0;
}

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

.section-head,
.page-head {
    margin-bottom: 28px;
}

.section-head h2,
.page-head h1 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.section-head p,
.page-head p {
    margin: 0;
    max-width: 760px;
    color: #94a3b8;
    line-height: 1.8;
}

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

.movie-grid.small-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

.card {
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.52);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.movie-card:hover .card {
    transform: translateY(-6px);
    border-color: rgba(52, 211, 153, 0.55);
    background: rgba(30, 41, 59, 0.72);
    box-shadow: 0 22px 50px rgba(16, 185, 129, 0.13);
}

.card-poster {
    position: relative;
    height: 260px;
    overflow: hidden;
    background: #020617;
}

.movie-card--small .card-poster {
    height: 176px;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.35), transparent);
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(16, 185, 129, 0.9);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
    transition: opacity 0.25s ease, transform 0.25s ease;
    box-shadow: 0 18px 46px rgba(16, 185, 129, 0.28);
}

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

.badge {
    position: absolute;
    top: 12px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 9px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.badge-year {
    left: 12px;
    background: rgba(16, 185, 129, 0.9);
}

.badge-genre {
    right: 12px;
    background: rgba(15, 23, 42, 0.88);
}

.poster-region {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    display: inline-flex;
    width: fit-content;
    max-width: calc(100% - 24px);
    padding: 5px 9px;
    border-radius: 9px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.72);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    backdrop-filter: blur(10px);
}

.card-body {
    display: grid;
    gap: 10px;
    padding: 18px;
}

.movie-card--small .card-body {
    padding: 14px;
}

.card-body h3 {
    margin: 0;
    color: #ffffff;
    font-size: 17px;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.movie-card:hover h3 {
    color: #34d399;
}

.card-body p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0;
    overflow: hidden;
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.card-meta span {
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
}

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

.category-card {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 22px;
    background: rgba(30, 41, 59, 0.55);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(52, 211, 153, 0.55);
    box-shadow: 0 22px 54px rgba(16, 185, 129, 0.14);
}

.category-card img {
    width: 100%;
    height: 100%;
    min-height: 210px;
    object-fit: cover;
    opacity: 0.55;
    transition: transform 0.5s ease, opacity 0.3s ease;
}

.category-card:hover img {
    transform: scale(1.06);
    opacity: 0.72;
}

.category-card-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.4), transparent);
}

.category-card h2 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: 24px;
}

.category-card p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.6;
}

.filter-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 26px 0 34px;
    padding: 16px;
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.46);
}

.search-box {
    display: flex;
    align-items: center;
    flex: 1 1 360px;
    gap: 10px;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(71, 85, 105, 0.78);
    border-radius: 14px;
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.75);
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    color: #e2e8f0;
    background: transparent;
}

.search-box input::placeholder {
    color: #64748b;
}

.filter-selects {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-select {
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(71, 85, 105, 0.78);
    border-radius: 14px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.88);
    outline: 0;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 82px 74px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.5);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: rgba(52, 211, 153, 0.55);
    background: rgba(30, 41, 59, 0.74);
}

.rank-number {
    color: #34d399;
    font-weight: 900;
    letter-spacing: 0.05em;
}

.rank-cover {
    width: 64px;
    height: 84px;
    overflow: hidden;
    border-radius: 12px;
    background: #020617;
}

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

.rank-main {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.rank-main strong {
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-main em {
    color: #94a3b8;
    font-style: normal;
    font-size: 14px;
    line-height: 1.6;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-side {
    color: #94a3b8;
    white-space: nowrap;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.85fr);
    gap: 30px;
}

.detail-main,
.related-box,
.info-panel {
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 20px;
    background: rgba(30, 41, 59, 0.52);
}

.detail-main {
    overflow: hidden;
}

.player-shell {
    position: relative;
    overflow: hidden;
    background: #000000;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.08));
}

.player-shell.is-active .player-cover {
    display: none;
}

.player-button {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(16, 185, 129, 0.92);
    font-size: 30px;
    cursor: pointer;
    box-shadow: 0 22px 58px rgba(16, 185, 129, 0.32);
    transition: transform 0.2s ease, background 0.2s ease;
}

.player-button:hover {
    transform: scale(1.06);
    background: #059669;
}

.detail-copy {
    padding: 28px;
}

.detail-copy h1 {
    margin: 0 0 18px;
    color: #ffffff;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.16;
    letter-spacing: -0.03em;
}

.detail-copy h2,
.related-box h2,
.info-panel h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 22px;
}

.detail-block {
    margin-top: 26px;
}

.detail-block p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.9;
    text-align: justify;
}

.detail-block .highlight {
    color: #34d399;
    font-weight: 700;
}

.review-box {
    padding: 18px;
    border: 1px solid rgba(51, 65, 85, 0.7);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.45);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-cloud span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.62);
    font-size: 14px;
}

.related-box,
.info-panel {
    padding: 22px;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    color: #94a3b8;
    font-size: 14px;
}

.breadcrumb a {
    color: #34d399;
}

.site-footer {
    margin-top: 80px;
    border-top: 1px solid rgba(51, 65, 85, 0.72);
    background: rgba(15, 23, 42, 0.8);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr 1fr;
    gap: 34px;
    padding: 42px 0;
}

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

.site-footer p {
    margin: 14px 0 0;
    color: #94a3b8;
    line-height: 1.8;
}

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

.footer-links a {
    color: #94a3b8;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #34d399;
}

.footer-bottom {
    padding: 18px 16px 26px;
    color: #64748b;
    text-align: center;
    font-size: 14px;
}

.empty-state {
    display: none;
    padding: 34px;
    border: 1px solid rgba(51, 65, 85, 0.7);
    border-radius: 18px;
    color: #94a3b8;
    text-align: center;
    background: rgba(15, 23, 42, 0.48);
}

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

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

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

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

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

    .mobile-toggle {
        display: inline-grid;
        place-items: center;
    }

    .hero {
        height: 560px;
    }

    .hero-content {
        padding-bottom: 88px;
    }

    .hero-dots {
        left: 24px;
        right: auto;
        bottom: 34px;
    }

    .movie-grid,
    .movie-grid.small-grid,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .filter-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-selects {
        display: grid;
        grid-template-columns: 1fr;
    }

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

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

    .rank-cover,
    .rank-side {
        display: none;
    }
}

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

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

    .brand-copy small {
        font-size: 11px;
    }

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

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

    .card-poster,
    .movie-card--small .card-poster {
        height: 245px;
    }

    .detail-copy {
        padding: 20px;
    }
}
