:root {
    --primary-50: #e6f7f7;
    --primary-100: #b3e6e6;
    --primary-400: #1ab0b0;
    --primary-500: #009999;
    --primary-600: #007a7a;
    --primary-700: #005b5b;
    --secondary-50: #f0f4f8;
    --secondary-100: #d9e2ec;
    --secondary-200: #bcccdc;
    --secondary-300: #9fb3c8;
    --secondary-500: #627d98;
    --secondary-600: #486581;
    --secondary-700: #334e68;
    --secondary-900: #102a43;
    --accent-500: #f97316;
    --white: #ffffff;
    --black: #000000;
    --shadow-soft: 0 10px 30px rgba(16, 42, 67, 0.10);
    --shadow-hover: 0 20px 40px rgba(16, 42, 67, 0.18);
    --radius-lg: 18px;
    --radius-md: 12px;
    --header-height: 74px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    color: var(--secondary-900);
    background: var(--secondary-50);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
    box-shadow: 0 4px 18px rgba(16, 42, 67, 0.10);
}

.nav-bar {
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
    box-shadow: 0 10px 20px rgba(0, 153, 153, 0.25);
    transition: transform 0.2s ease;
}

.brand:hover .brand-mark,
.footer-logo:hover .brand-mark {
    transform: scale(1.08);
}

.brand-text {
    display: grid;
    gap: 1px;
}

.brand-name {
    font-size: 20px;
    letter-spacing: -0.02em;
}

.brand-subtitle {
    font-size: 12px;
    font-weight: 600;
    color: var(--secondary-600);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    font-weight: 650;
    color: var(--secondary-700);
}

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

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

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: var(--secondary-100);
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: var(--secondary-900);
}

.mobile-menu {
    display: none;
    padding: 0 16px 18px;
    border-top: 1px solid var(--secondary-100);
    background: var(--white);
}

.mobile-menu a {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--secondary-700);
    font-weight: 650;
}

.mobile-menu a:hover {
    background: var(--secondary-50);
    color: var(--primary-600);
}

.mobile-menu.is-open {
    display: block;
}

.hero {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: var(--secondary-900);
}

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

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

.hero-image {
    position: absolute;
    inset: 0;
}

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

.hero-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.90), rgba(0, 0, 0, 0.46) 54%, rgba(0, 0, 0, 0.16));
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding: 84px 0;
}

.hero-copy {
    width: min(760px, 100%);
    color: var(--white);
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 999px;
    background: rgba(0, 153, 153, 0.90);
    color: var(--white);
    font-weight: 750;
    font-size: 14px;
}

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

.hero p {
    max-width: 720px;
    color: var(--secondary-200);
    font-size: clamp(17px, 2vw, 21px);
}

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

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-meta span,
.detail-tags span,
.wide-tags span {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: inherit;
    font-size: 13px;
    font-weight: 650;
}

.hero-dots {
    position: absolute;
    z-index: 4;
    right: 36px;
    bottom: 34px;
    display: flex;
    align-items: center;
    gap: 9px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.50);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
    width: 32px;
    background: var(--primary-500);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 24px;
    border: 0;
    border-radius: 12px;
    font-weight: 750;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary {
    color: var(--white);
    background: var(--primary-500);
    box-shadow: 0 14px 24px rgba(0, 153, 153, 0.28);
}

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

.btn-secondary {
    color: var(--secondary-900);
    background: var(--secondary-100);
}

.btn-ghost {
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.section {
    padding: 72px 0;
}

.section.soft {
    background: linear-gradient(135deg, var(--primary-50), var(--secondary-100));
}

.section.dark {
    color: var(--white);
    background: var(--secondary-900);
}

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

.section-head h2,
.page-title h1,
.detail-title h1 {
    margin: 0 0 8px;
    color: var(--secondary-900);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.16;
    letter-spacing: -0.035em;
}

.section.dark .section-head h2,
.section.dark .section-head p,
.section.dark .rank-row,
.section.dark .rank-arrow {
    color: var(--white);
}

.section-head p,
.page-title p,
.detail-title p {
    margin: 0;
    color: var(--secondary-600);
}

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.card-link {
    display: block;
    height: 100%;
}

.poster-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--secondary-200);
}

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

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

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.0);
    transition: background 0.25s ease;
}

.movie-card:hover .poster-wrap::after {
    background: rgba(0, 0, 0, 0.38);
}

.poster-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--white);
    font-size: 12px;
    font-weight: 750;
}

.region-badge {
    left: 12px;
    background: var(--primary-500);
}

.year-badge {
    right: 12px;
    background: rgba(0, 0, 0, 0.70);
}

.poster-play {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--primary-600);
    background: rgba(255, 255, 255, 0.92);
    transform: translate(-50%, -50%) scale(0.82);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
    padding: 18px;
}

.card-body h3 {
    display: -webkit-box;
    margin: 0 0 8px;
    overflow: hidden;
    color: var(--secondary-900);
    font-size: 18px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

.movie-card:hover h3 {
    color: var(--primary-600);
}

.card-body p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--secondary-600);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--secondary-500);
    font-size: 13px;
}

.horizontal-scroll {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding: 4px 2px 18px;
    scrollbar-width: none;
}

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

.horizontal-scroll .movie-card {
    width: 330px;
    flex: 0 0 330px;
}

.wide-list {
    display: grid;
    gap: 22px;
}

.wide-card {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.wide-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

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

.wide-poster span {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 5px 12px;
    border-radius: 999px;
    color: var(--white);
    background: var(--accent-500);
    font-size: 12px;
    font-weight: 800;
}

.wide-content {
    align-self: center;
    padding: 22px 24px 22px 0;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--primary-600);
    font-size: 14px;
    font-weight: 750;
}

.wide-content h3 {
    margin: 0 0 10px;
    font-size: 24px;
    line-height: 1.25;
}

.wide-content p:not(.eyebrow) {
    margin: 0 0 14px;
    color: var(--secondary-600);
}

.wide-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wide-tags span,
.detail-tags span {
    background: var(--primary-50);
    color: var(--primary-700);
}

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

.category-card {
    position: relative;
    min-height: 180px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--secondary-900);
    box-shadow: var(--shadow-soft);
}

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

.category-card:hover img {
    opacity: 0.55;
}

.category-card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: 20px;
    color: var(--white);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 6px;
    font-size: 22px;
}

.category-card p {
    margin: 0;
    color: var(--secondary-200);
    font-size: 14px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 56px 82px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.10);
    transition: transform 0.2s ease, background 0.2s ease;
}

.rank-row:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.16);
}

.rank-number {
    color: var(--primary-400);
    font-size: 24px;
    font-weight: 900;
}

.rank-row img {
    width: 82px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--secondary-200);
}

.rank-info {
    display: grid;
    gap: 3px;
}

.rank-info strong {
    color: inherit;
    font-size: 16px;
}

.rank-info em {
    color: var(--secondary-300);
    font-style: normal;
    font-size: 13px;
}

.rank-arrow {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(0, 153, 153, 0.20);
    color: var(--primary-400);
    font-weight: 750;
}

.page-hero {
    padding: 76px 0 48px;
    background: linear-gradient(135deg, var(--primary-50), var(--white));
}

.page-title {
    width: min(760px, 100%);
}

.page-title h1 {
    color: var(--secondary-900);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(140px, 0.6fr)) auto;
    gap: 14px;
    align-items: end;
    margin: 28px 0 32px;
    padding: 18px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.search-field {
    display: grid;
    gap: 7px;
    color: var(--secondary-700);
    font-size: 13px;
    font-weight: 750;
}

.search-field input,
.search-field select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--secondary-200);
    border-radius: 12px;
    color: var(--secondary-900);
    background: var(--white);
    outline: none;
}

.search-field input:focus,
.search-field select:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(0, 153, 153, 0.12);
}

.is-filtered {
    display: none !important;
}

.detail-hero {
    padding: 56px 0;
    background: linear-gradient(135deg, var(--secondary-900), var(--primary-700));
    color: var(--white);
}

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

.breadcrumb a:hover {
    color: var(--white);
}

.detail-title h1 {
    max-width: 960px;
    color: var(--white);
}

.detail-title p {
    max-width: 820px;
    color: var(--secondary-200);
    font-size: 18px;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: var(--black);
    box-shadow: var(--shadow-hover);
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: var(--black);
}

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    padding: 0;
    color: var(--white);
    background: var(--black);
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.22s ease;
}

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

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.20));
}

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

.big-play {
    position: relative;
    z-index: 2;
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--primary-600);
    background: rgba(255, 255, 255, 0.94);
    font-size: 34px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.30);
}

.detail-card {
    margin-top: 26px;
    padding: 28px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.detail-card h2,
.side-card h2 {
    margin: 0 0 14px;
    color: var(--secondary-900);
    font-size: 24px;
}

.detail-card p {
    margin: 0 0 16px;
    color: var(--secondary-700);
}

.side-card {
    position: sticky;
    top: calc(var(--header-height) + 24px);
    padding: 22px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.side-meta {
    display: grid;
    gap: 10px;
    margin: 0 0 18px;
}

.side-meta div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--secondary-100);
}

.side-meta dt {
    color: var(--secondary-500);
    font-weight: 750;
}

.side-meta dd {
    margin: 0;
    color: var(--secondary-900);
    text-align: right;
}

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

.site-footer {
    margin-top: 72px;
    color: var(--secondary-100);
    background: var(--secondary-900);
}

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

.footer-logo {
    margin-bottom: 16px;
    color: var(--white);
}

.footer-brand p {
    max-width: 560px;
    color: var(--secondary-300);
}

.site-footer h2 {
    margin: 0 0 16px;
    color: var(--white);
    font-size: 17px;
}

.site-footer ul {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer a {
    color: var(--secondary-300);
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: var(--primary-400);
}

.footer-bottom {
    padding: 20px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    color: var(--secondary-300);
    text-align: center;
    font-size: 14px;
}

@media (max-width: 1100px) {
    .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;
    }

    .side-card {
        position: static;
    }

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

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

    .menu-button {
        display: block;
    }

    .hero,
    .hero-content {
        min-height: 68vh;
    }

    .section-head {
        display: grid;
    }

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

    .wide-card {
        grid-template-columns: 1fr;
    }

    .wide-content {
        padding: 0 20px 22px;
    }

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

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

    .brand-name {
        font-size: 17px;
    }

    .brand-subtitle {
        display: none;
    }

    .hero-actions {
        display: grid;
    }

    .hero-dots {
        right: 18px;
        bottom: 18px;
    }

    .section {
        padding: 54px 0;
    }

    .movie-grid,
    .category-grid,
    .related-grid,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .horizontal-scroll .movie-card {
        width: 280px;
        flex-basis: 280px;
    }

    .rank-row {
        grid-template-columns: 42px 66px 1fr;
    }

    .rank-arrow {
        display: none;
    }

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

    .detail-card,
    .side-card {
        padding: 20px;
    }
}
