:root {
    --primary: #005bb3;
    --primary-light: #e6f1ff;
    --primary-dark: #004380;
    --secondary: #0284c7;
    --accent: #f59e0b;
    --text: #171717;
    --muted: #737373;
    --line: #e5e5e5;
    --panel: #ffffff;
    --soft: #fafafa;
    --dark: #171717;
    --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
    --shadow-medium: 0 4px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 30px -5px rgba(0, 0, 0, 0.08);
    --shadow-large: 0 10px 40px -10px rgba(0, 0, 0, 0.15), 0 20px 50px -10px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--soft);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(8px);
}

.nav-wrap {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 230px;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: var(--shadow-soft);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-copy strong {
    font-size: 20px;
    color: var(--text);
}

.brand-copy small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.nav-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.nav-link {
    color: #404040;
    font-weight: 600;
    transition: color 0.2s ease;
}

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

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

.nav-search input,
.filter-input,
.search-hero input {
    width: 260px;
    border: 1px solid #d4d4d4;
    border-radius: 12px;
    padding: 11px 14px;
    color: var(--text);
    background: #ffffff;
    outline: none;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.nav-search input:focus,
.filter-input:focus,
.search-hero input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 91, 179, 0.13);
}

.nav-search button,
.btn,
.hero-button,
.play-start,
.filter-button {
    border: 0;
    border-radius: 12px;
    padding: 11px 18px;
    color: #ffffff;
    background: var(--primary);
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.btn:hover,
.hero-button:hover,
.play-start:hover,
.filter-button.active,
.filter-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f5f5f5;
    color: #404040;
    cursor: pointer;
}

.hero {
    position: relative;
    min-height: 540px;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

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

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

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.08)), linear-gradient(0deg, rgba(0, 0, 0, 0.7), transparent 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 540px;
    display: flex;
    align-items: center;
}

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

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    padding: 7px 14px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    color: #bfdbfe;
    font-weight: 700;
}

.hero h1 {
    margin: 20px 0 16px;
    font-size: clamp(36px, 7vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 660px;
    margin: 0 0 24px;
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1.75;
}

.hero-meta,
.detail-meta,
.movie-meta,
.info-list,
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-meta span,
.detail-meta span,
.movie-meta span,
.info-list span,
.breadcrumbs a,
.breadcrumbs span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.13);
    color: inherit;
    font-size: 13px;
}

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

.hero-button.secondary {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.section {
    padding: 54px 0;
}

.section.soft {
    background: linear-gradient(135deg, var(--primary-light), #f0f9ff);
}

.section.dark {
    color: #ffffff;
    background: #171717;
}

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

.section-title {
    margin: 0;
    color: var(--text);
    font-size: clamp(24px, 4vw, 34px);
    line-height: 1.2;
}

.dark .section-title {
    color: #ffffff;
}

.section-subtitle {
    margin: 8px 0 0;
    color: var(--muted);
}

.dark .section-subtitle {
    color: #d4d4d4;
}

.view-more {
    color: var(--primary);
    font-weight: 700;
}

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

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

.movie-card {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(229, 229, 229, 0.75);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    border-color: rgba(0, 91, 179, 0.28);
    box-shadow: var(--shadow-large);
    transform: translateY(-4px);
}

.movie-card figure {
    position: relative;
    height: 250px;
    margin: 0;
    overflow: hidden;
    background: #e5e7eb;
}

.movie-grid.compact .movie-card figure {
    height: 210px;
}

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

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

.duration {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 8px;
    padding: 5px 8px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.72);
    font-size: 12px;
    font-weight: 700;
}

.play-dot {
    position: absolute;
    left: 12px;
    bottom: 12px;
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 91, 179, 0.86);
    box-shadow: var(--shadow-soft);
}

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

.movie-card h3 {
    min-height: 46px;
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card p {
    min-height: 44px;
    margin: 0 0 12px;
    color: #525252;
    font-size: 14px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta {
    color: #525252;
    font-size: 13px;
}

.movie-meta span {
    background: #f5f5f5;
}

.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.movie-tags span,
.tag {
    border-radius: 999px;
    padding: 5px 9px;
    color: var(--primary);
    background: var(--primary-light);
    font-size: 12px;
    font-weight: 700;
}

.movie-card-horizontal {
    display: flex;
    gap: 16px;
    padding: 12px;
}

.movie-card-horizontal figure {
    width: 160px;
    height: 100px;
    flex: 0 0 160px;
    border-radius: 12px;
}

.movie-card-horizontal h3 {
    min-height: auto;
    -webkit-line-clamp: 1;
}

.movie-card-horizontal p {
    min-height: auto;
}

.horizontal-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 300px;
    gap: 18px;
    overflow-x: auto;
    padding: 4px 0 16px;
    scrollbar-width: none;
}

.horizontal-scroll::-webkit-scrollbar {
    display: none;
}

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

.category-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    height: 150px;
    background: #e5e7eb;
}

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

.category-card-content {
    padding: 18px;
}

.category-card h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.category-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.page-hero {
    padding: 56px 0;
    color: #ffffff;
    background: radial-gradient(circle at 20% 10%, rgba(2, 132, 199, 0.52), transparent 36%), linear-gradient(135deg, #0f172a, #111827 62%, #003b73);
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(34px, 5vw, 58px);
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.7;
}

.filter-bar {
    position: sticky;
    top: 74px;
    z-index: 30;
    padding: 16px 0;
    background: rgba(250, 250, 250, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(8px);
}

.filter-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

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

.filter-button {
    color: var(--primary);
    background: #ffffff;
    border: 1px solid rgba(0, 91, 179, 0.25);
}

.filter-button.active,
.filter-button:hover {
    color: #ffffff;
}

.detail-hero {
    padding: 42px 0;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #111827 56%, #003b73);
}

.breadcrumbs {
    margin-bottom: 24px;
    color: #e5e7eb;
}

.breadcrumbs a,
.breadcrumbs span {
    background: rgba(255, 255, 255, 0.11);
}

.detail-grid {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 22px;
    box-shadow: var(--shadow-large);
}

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

.detail-copy h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.12;
}

.detail-copy p {
    margin: 20px 0 0;
    color: #e5e7eb;
    font-size: 17px;
    line-height: 1.75;
}

.detail-meta span {
    color: #ffffff;
}

.player-section {
    padding: 44px 0 20px;
    background: #0a0a0a;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000000;
    box-shadow: var(--shadow-large);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(0, 91, 179, 0.22), rgba(0, 0, 0, 0.68));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-start {
    width: 96px;
    height: 96px;
    border-radius: 999px;
    padding: 0;
    font-size: 34px;
}

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

.article-card,
.side-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.article-card h2,
.side-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.article-card p {
    margin: 0 0 18px;
    color: #404040;
    line-height: 1.86;
}

.info-list {
    margin-top: 18px;
}

.info-list span {
    color: #404040;
    background: #f5f5f5;
}

.side-card {
    position: sticky;
    top: 110px;
}

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

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

.rank-row {
    display: grid;
    grid-template-columns: 56px 72px minmax(0, 1fr) 90px 80px;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 91, 179, 0.32);
}

.rank-number {
    color: var(--accent);
    font-size: 20px;
    font-weight: 800;
    text-align: center;
}

.rank-row img {
    width: 72px;
    height: 54px;
    border-radius: 10px;
    object-fit: cover;
}

.rank-title {
    overflow: hidden;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-type,
.rank-score {
    color: #525252;
    font-size: 14px;
}

.search-hero {
    padding: 70px 0;
    text-align: center;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #005bb3);
}

.search-hero h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 56px);
}

.search-hero form {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
}

.search-hero input {
    width: min(520px, 100%);
}

.search-empty {
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    padding: 42px;
    text-align: center;
    color: var(--muted);
    background: #ffffff;
}

.site-footer {
    margin-top: 70px;
    color: #d4d4d4;
    background: #171717;
}

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

.footer-brand {
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 800;
}

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

.site-footer p {
    margin: 0;
    color: #a3a3a3;
    line-height: 1.7;
}

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

.site-footer a:hover {
    color: #60a5fa;
}

.footer-bottom {
    border-top: 1px solid #262626;
    padding: 18px;
    text-align: center;
    color: #a3a3a3;
}

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

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

    .side-card {
        position: static;
    }
}

@media (max-width: 780px) {
    .nav-wrap {
        min-height: 66px;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-panel {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 18px;
        border: 1px solid var(--line);
        border-radius: 16px;
        background: #ffffff;
        box-shadow: var(--shadow-large);
    }

    .nav-panel.open {
        display: flex;
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .nav-link {
        padding: 10px 12px;
        border-radius: 10px;
        background: #fafafa;
    }

    .nav-search,
    .search-hero form,
    .filter-wrap {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-search input,
    .filter-input,
    .search-hero input {
        width: 100%;
    }

    .hero,
    .hero-content {
        min-height: 620px;
    }

    .hero-copy {
        padding: 70px 0 110px;
    }

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

    .movie-card figure,
    .movie-grid.compact .movie-card figure {
        height: 190px;
    }

    .movie-card-horizontal {
        flex-direction: column;
    }

    .movie-card-horizontal figure {
        width: 100%;
        height: 190px;
        flex-basis: auto;
    }

    .rank-row {
        grid-template-columns: 42px 58px minmax(0, 1fr);
    }

    .rank-type,
    .rank-score {
        display: none;
    }
}

@media (max-width: 480px) {
    .container-custom {
        width: min(100% - 24px, 1280px);
    }

    .brand-copy small {
        display: none;
    }

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

    .hero h1,
    .detail-copy h1,
    .page-hero h1 {
        font-size: 34px;
    }
}
