:root {
    --primary: #0284c7;
    --primary-dark: #0369a1;
    --primary-soft: #f0f9ff;
    --secondary-soft: #f0fdf4;
    --accent: #f97316;
    --text-main: #111827;
    --text-muted: #6b7280;
    --page-bg: #f9fafb;
    --card-bg: #ffffff;
    --border: #e5e7eb;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --shadow-strong: 0 20px 55px rgba(15, 23, 42, 0.18);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text-main);
    background: var(--page-bg);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
}

.nav-shell {
    width: min(100% - 32px, 1280px);
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    white-space: nowrap;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), #38bdf8);
    box-shadow: 0 10px 25px rgba(2, 132, 199, 0.28);
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
    font-size: 15px;
    color: #374151;
}

.nav-links a {
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #374151;
    background: #f3f4f6;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: currentColor;
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--border);
    background: #ffffff;
}

.mobile-panel.open {
    display: block;
}

.mobile-panel a {
    display: block;
    width: min(100% - 32px, 1280px);
    margin: 0 auto;
    padding: 11px 0;
    color: #374151;
}

.hero-section {
    padding: 32px 0 0;
}

.hero-slider {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    border-radius: 24px;
    background: #111827;
    box-shadow: var(--shadow-strong);
}

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

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.05));
}

.hero-content {
    position: absolute;
    inset: auto 0 0;
    z-index: 2;
    max-width: 760px;
    padding: 48px;
    color: #ffffff;
}

.hero-kicker,
.card-badge,
.detail-category,
.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-kicker {
    padding: 5px 13px;
    background: var(--primary);
    margin-bottom: 14px;
}

.hero-title {
    margin: 0 0 16px;
    font-size: clamp(34px, 6vw, 62px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-text {
    margin: 0 0 24px;
    color: #e5e7eb;
    font-size: 18px;
    max-width: 680px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.btn-primary,
.btn-ghost,
.btn-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    border: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    color: #ffffff;
    background: var(--primary);
    box-shadow: 0 15px 28px rgba(2, 132, 199, 0.3);
}

.btn-primary:hover,
.btn-soft:hover,
.btn-ghost:hover {
    transform: translateY(-2px);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

.btn-soft {
    color: var(--primary-dark);
    background: var(--primary-soft);
}

.hero-search {
    display: flex;
    width: min(100%, 520px);
    margin-top: 22px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 14px 18px;
    color: var(--text-main);
    background: transparent;
}

.hero-search button {
    border: 0;
    padding: 0 20px;
    color: #ffffff;
    background: var(--primary);
    font-weight: 800;
}

.hero-control {
    position: absolute;
    z-index: 3;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.5);
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.72);
}

.hero-control.prev {
    left: 18px;
}

.hero-control.next {
    right: 18px;
}

.hero-dots {
    position: absolute;
    right: 32px;
    bottom: 32px;
    z-index: 3;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    transition: width 0.2s ease, background 0.2s ease;
}

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

.section-block {
    padding-top: 64px;
}

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

.section-title {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.section-desc {
    margin: 8px 0 0;
    color: var(--text-muted);
    max-width: 720px;
}

.section-link {
    color: var(--primary);
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

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

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

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

.movie-card a {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 16px;
    background: var(--card-bg);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-poster {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #e5e7eb;
}

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

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

.card-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.56), transparent 55%);
    transition: opacity 0.25s ease;
}

.movie-card a:hover .card-poster::after {
    opacity: 1;
}

.card-badge {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 2;
    padding: 4px 8px;
    color: #ffffff;
    background: var(--primary);
}

.card-type {
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 2;
    padding: 4px 8px;
    border-radius: 8px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.68);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.card-body {
    padding: 16px;
}

.card-title {
    min-height: 48px;
    margin: 0 0 9px;
    font-size: 16px;
    line-height: 1.45;
    font-weight: 800;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card a:hover .card-title {
    color: var(--primary);
}

.card-summary {
    min-height: 42px;
    margin: 0 0 12px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--text-muted);
    font-size: 12px;
}

.feature-card {
    position: relative;
    min-height: 500px;
    overflow: hidden;
    border-radius: 24px;
    color: #ffffff;
    background: #111827;
    box-shadow: var(--shadow-strong);
}

.feature-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.feature-card:hover img {
    transform: scale(1.05);
}

.feature-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.55), transparent);
}

.feature-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    padding: 72px 64px;
}

.feature-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.feature-labels span {
    display: inline-flex;
    padding: 5px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--primary);
    font-size: 13px;
    font-weight: 800;
}

.feature-labels span:first-child {
    background: var(--accent);
}

.feature-content h2 {
    margin: 0 0 16px;
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.05;
}

.feature-content p {
    margin: 0 0 26px;
    color: #e5e7eb;
    font-size: 18px;
}

.gradient-panel {
    padding: 32px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--primary-soft), var(--secondary-soft));
}

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

.rank-item {
    display: grid;
    grid-template-columns: 64px 1fr 86px;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

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

.rank-number {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--primary);
    background: var(--primary-soft);
    font-size: 26px;
    font-weight: 900;
}

.rank-info h3 {
    margin: 0 0 6px;
    font-size: 17px;
}

.rank-info p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rank-poster {
    width: 86px;
    height: 86px;
    overflow: hidden;
    border-radius: 12px;
    background: #e5e7eb;
}

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

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

.category-card {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    padding: 24px;
    border-radius: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, var(--primary));
    box-shadow: var(--shadow);
}

.category-card:nth-child(even) {
    background: linear-gradient(135deg, #0f172a, #16a34a);
}

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

.category-card::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 150px;
    height: 150px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
}

.category-card h2,
.category-card h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 12px;
    font-size: 24px;
}

.category-card p {
    position: relative;
    z-index: 1;
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.82);
}

.category-card span {
    position: relative;
    z-index: 1;
    display: inline-flex;
    font-size: 14px;
    font-weight: 800;
}

.page-hero {
    padding: 48px 0 20px;
}

.page-hero-card {
    padding: 42px;
    border-radius: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #075985 55%, #0284c7);
    box-shadow: var(--shadow-strong);
}

.page-hero-card h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 4vw, 46px);
    line-height: 1.15;
}

.page-hero-card p {
    margin: 0;
    max-width: 760px;
    color: #dbeafe;
}

.filter-box {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 24px 0;
    padding: 14px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

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

.filter-box input:focus,
.filter-box select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--text-muted);
    font-size: 14px;
}

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

.detail-layout {
    padding: 32px 0 0;
}

.detail-card {
    overflow: hidden;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.player-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.18));
}

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

.play-ring {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(2, 132, 199, 0.94);
    box-shadow: 0 20px 45px rgba(2, 132, 199, 0.38);
    transition: transform 0.2s ease;
}

.player-cover:hover .play-ring {
    transform: scale(1.08);
}

.player-message {
    position: absolute;
    left: 50%;
    bottom: 18px;
    z-index: 3;
    display: none;
    padding: 10px 14px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(220, 38, 38, 0.88);
    transform: translateX(-50%);
    font-size: 14px;
}

.player-message.is-visible {
    display: block;
}

.detail-content {
    padding: 32px;
}

.detail-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.detail-head h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.18;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--text-muted);
    font-size: 14px;
}

.detail-category {
    padding: 7px 14px;
    color: var(--primary-dark);
    background: var(--primary-soft);
    white-space: nowrap;
}

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

.detail-section h2,
.detail-section h3 {
    margin: 0 0 10px;
    font-size: 20px;
}

.detail-section p {
    margin: 0;
    color: #374151;
}

.review-box {
    padding: 22px;
    border-radius: 16px;
    background: #f3f4f6;
}

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

.tag-cloud span {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    color: #374151;
    background: #f3f4f6;
    font-size: 14px;
    transition: color 0.2s ease, background 0.2s ease;
}

.tag-cloud span:hover {
    color: var(--primary-dark);
    background: var(--primary-soft);
}

.prev-next {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 32px;
}

.prev-next a {
    padding: 18px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.prev-next small {
    display: block;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.prev-next strong {
    display: block;
    color: var(--primary-dark);
}

.empty-state {
    display: none;
    padding: 28px;
    border-radius: 18px;
    color: var(--text-muted);
    text-align: center;
    background: #ffffff;
}

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

.site-footer {
    margin-top: 80px;
    color: #d1d5db;
    background: #111827;
}

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

.footer-title {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 800;
}

.footer-text {
    max-width: 580px;
    margin: 0;
    color: #9ca3af;
    font-size: 14px;
}

.footer-links {
    display: grid;
    gap: 8px;
    color: #9ca3af;
    font-size: 14px;
}

.footer-links a:hover {
    color: #38bdf8;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 0;
    color: #9ca3af;
    font-size: 13px;
}

@media (max-width: 1080px) {
    .movie-grid,
    .movie-grid.compact {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

    .nav-toggle {
        display: block;
    }

    .hero-slider {
        height: 66vh;
        min-height: 520px;
        border-radius: 20px;
    }

    .hero-content {
        padding: 28px;
    }

    .hero-control {
        display: none;
    }

    .hero-dots {
        right: 24px;
        bottom: 22px;
    }

    .section-head {
        display: block;
    }

    .section-link {
        display: inline-flex;
        margin-top: 10px;
    }

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

    .ranking-list {
        grid-template-columns: 1fr;
    }

    .feature-content {
        padding: 48px 30px;
    }

    .feature-card {
        min-height: 420px;
    }

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

    .detail-head {
        display: block;
    }

    .detail-category {
        margin-top: 14px;
    }

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

@media (max-width: 560px) {
    .container,
    .nav-shell,
    .mobile-panel a {
        width: min(100% - 24px, 1280px);
    }

    .brand {
        font-size: 18px;
    }

    .hero-section {
        padding-top: 18px;
    }

    .hero-slider {
        min-height: 560px;
    }

    .hero-title {
        font-size: 34px;
    }

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

    .hero-search {
        border-radius: 18px;
        flex-direction: column;
    }

    .hero-search button {
        min-height: 44px;
    }

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

    .category-cards {
        grid-template-columns: 1fr;
    }

    .gradient-panel,
    .page-hero-card,
    .detail-content {
        padding: 22px;
    }

    .rank-item {
        grid-template-columns: 48px 1fr 64px;
        gap: 12px;
    }

    .rank-number {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .rank-poster {
        width: 64px;
        height: 64px;
    }

    .prev-next {
        grid-template-columns: 1fr;
    }
}
