:root {
    --ocean-deep: #0a4a6b;
    --ocean-blue: #1a7fa0;
    --ocean-light: #4fb3d4;
    --sand-light: #f5ebe0;
    --sand-warm: #e3d5ca;
    --coral-accent: #ff6b6b;
    --coral-light: #ff9999;
    --seafoam: #88d4ab;
    --sunset-orange: #ff9f1c;
    --cloud-white: #ffffff;
    --mist-gray: #f8f9fa;
    --charcoal: #2c3e50;
    --text-dark: #1a1a1a;
    --text-gray: #6c757d;
    --shadow-ocean: 0 4px 20px rgba(10, 74, 107, 0.15);
    --shadow-ocean-lg: 0 16px 45px rgba(10, 74, 107, 0.25);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(10, 74, 107, 0.94);
    color: #ffffff;
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 24px rgba(10, 74, 107, 0.24);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.site-logo b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--ocean-deep);
    background: var(--seafoam);
    font-size: 14px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.desktop-nav a,
.mobile-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.86);
    transition: background 0.25s ease, color 0.25s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

.header-search {
    width: 300px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.header-search input {
    width: 100%;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
    padding: 10px 14px;
}

.header-search input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.header-search button {
    border: 0;
    padding: 10px 16px;
    color: #ffffff;
    background: var(--coral-accent);
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #ffffff;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    padding: 0 16px 16px;
}

.hero-carousel {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: var(--ocean-deep);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    background-position: center;
    background-size: cover;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(10, 74, 107, 0.58), rgba(10, 74, 107, 0.12));
}

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

.hero-copy {
    max-width: 720px;
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--seafoam);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-main h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.05;
}

.hero-copy p {
    max-width: 680px;
    margin: 22px 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 20px;
}

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

.hero-tags span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 13px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(4px);
}

.hero-tags span:first-child,
.detail-tags span:first-child {
    background: var(--coral-accent);
}

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

.primary-button,
.ghost-button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 12px;
    font-weight: 700;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.primary-button {
    color: #ffffff;
    background: var(--coral-accent);
    box-shadow: 0 10px 28px rgba(255, 107, 107, 0.3);
}

.primary-button:hover,
.header-search button:hover {
    background: var(--coral-light);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(4px);
}

.primary-button:hover,
.ghost-button:hover,
.movie-card:hover,
.category-card:hover,
.top-rank-card:hover {
    transform: translateY(-4px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    font-size: 42px;
    line-height: 1;
    backdrop-filter: blur(6px);
    transform: translateY(-50%);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 30px;
    z-index: 6;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
}

.hero-dots button {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: #ffffff;
}

.hero-search {
    position: absolute;
    left: 50%;
    bottom: 72px;
    z-index: 6;
    display: flex;
    width: min(640px, calc(100% - 32px));
    overflow: hidden;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-ocean-lg);
    transform: translateX(-50%);
}

.hero-search input {
    flex: 1;
    border: 0;
    outline: 0;
    padding: 18px 20px;
    background: transparent;
}

.hero-search button {
    border: 0;
    padding: 0 26px;
    color: #ffffff;
    background: var(--ocean-blue);
    font-weight: 700;
}

.main-layout,
.page-main {
    padding: 54px 0;
}

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

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

.section-heading h2,
.aside-card h2,
.detail-panel h2,
.site-footer h2 {
    margin: 0;
    color: var(--ocean-deep);
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.2;
}

.text-link {
    min-height: 40px;
    color: var(--ocean-blue);
    background: rgba(26, 127, 160, 0.1);
}

.text-link.light {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

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

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

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-ocean);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    box-shadow: var(--shadow-ocean-lg);
}

.movie-card-cover {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: linear-gradient(135deg, var(--ocean-blue), var(--ocean-light));
}

.movie-card-wide .movie-card-cover {
    aspect-ratio: 16 / 10;
}

.movie-card-small .movie-card-cover {
    aspect-ratio: 3 / 4;
}

.movie-card-cover img,
.category-thumbs img,
.top-rank-card img,
.ranking-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.movie-card-cover img {
    transition: transform 0.55s ease;
}

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

.movie-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.1));
    transition: opacity 0.3s ease;
}

.movie-card:hover .movie-card-overlay {
    opacity: 1;
}

.play-badge,
.player-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 107, 107, 0.92);
    font-size: 28px;
    box-shadow: 0 12px 30px rgba(255, 107, 107, 0.36);
}

.movie-card-year {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 9px;
    border-radius: 8px;
    color: #ffffff;
    background: rgba(26, 127, 160, 0.92);
    font-size: 12px;
    font-weight: 700;
}

.movie-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 9px;
    padding: 15px;
}

.movie-card-body strong {
    display: -webkit-box;
    min-height: 44px;
    overflow: hidden;
    color: var(--text-dark);
    font-size: 16px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card-body em {
    display: -webkit-box;
    min-height: 42px;
    overflow: hidden;
    color: var(--text-gray);
    font-size: 14px;
    font-style: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.movie-card-meta span,
.movie-card-tags {
    padding: 5px 8px;
    border-radius: 8px;
    background: var(--sand-warm);
}

.movie-card-meta span:last-child {
    background: rgba(79, 179, 212, 0.2);
}

.white-panel,
.aside-card,
.detail-panel,
.filter-panel,
.category-card {
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-ocean);
}

.white-panel {
    padding: 28px;
}

.horizontal-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 220px;
    gap: 18px;
    overflow-x: auto;
    padding: 4px 2px 18px;
    scrollbar-width: thin;
}

.ranking-panel {
    padding: 32px;
    border-radius: 28px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sunset-orange), var(--coral-accent));
    box-shadow: var(--shadow-ocean-lg);
}

.ranking-panel .section-heading h2,
.ranking-panel .eyebrow {
    color: #ffffff;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 48px 72px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    color: var(--text-dark);
    background: rgba(255, 255, 255, 0.92);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.ranking-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #ffffff;
    background: var(--ocean-blue);
    font-weight: 800;
}

.ranking-item img {
    height: 88px;
    border-radius: 12px;
}

.ranking-copy {
    min-width: 0;
}

.ranking-copy strong,
.ranking-copy em,
.ranking-copy span {
    display: block;
}

.ranking-copy strong {
    overflow: hidden;
    color: var(--ocean-deep);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-copy em {
    display: -webkit-box;
    overflow: hidden;
    color: var(--text-gray);
    font-size: 13px;
    font-style: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ranking-copy span {
    margin-top: 6px;
    color: var(--text-gray);
    font-size: 12px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 34px;
    padding: 54px;
    border-radius: 30px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--ocean-deep), var(--ocean-blue), var(--ocean-light));
    box-shadow: var(--shadow-ocean-lg);
}

.compact-hero h1,
.ranking-hero h1 {
    margin: 0 0 14px;
}

.compact-hero p,
.ranking-hero p {
    max-width: 780px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

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

.breadcrumb a {
    color: var(--ocean-blue);
}

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

.category-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 22px;
    overflow: hidden;
    padding: 18px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    box-shadow: var(--shadow-ocean-lg);
}

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.category-thumbs img {
    height: 96px;
    border-radius: 12px;
    background: var(--ocean-light);
}

.category-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.category-copy strong {
    color: var(--ocean-deep);
    font-size: 24px;
}

.category-copy em {
    color: var(--text-gray);
    font-style: normal;
}

.category-copy span:last-child {
    color: var(--coral-accent);
    font-weight: 700;
}

.filter-panel {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 28px;
    padding: 20px;
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--text-gray);
    font-size: 14px;
    font-weight: 700;
}

.filter-panel input,
.filter-panel select {
    min-height: 46px;
    width: 100%;
    border: 1px solid rgba(10, 74, 107, 0.15);
    border-radius: 12px;
    outline: 0;
    padding: 0 14px;
    color: var(--text-dark);
    background: var(--mist-gray);
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--ocean-light);
    box-shadow: 0 0 0 3px rgba(79, 179, 212, 0.18);
}

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

.top-rank-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.16);
    transition: transform 0.25s ease, background 0.25s ease;
}

.top-rank-card:hover {
    background: rgba(255, 255, 255, 0.24);
}

.top-rank-card img {
    aspect-ratio: 16 / 10;
    border-radius: 16px;
}

.top-rank-card strong,
.top-rank-card em {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
}

.top-rank-card strong {
    font-size: 18px;
    -webkit-line-clamp: 1;
}

.top-rank-card em {
    color: rgba(255, 255, 255, 0.78);
    font-style: normal;
    -webkit-line-clamp: 2;
}

.detail-page {
    background: var(--sand-light);
}

.player-stage {
    padding: 34px 0;
    background: #000000;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000000;
    box-shadow: var(--shadow-ocean-lg);
    aspect-ratio: 16 / 9;
}

.movie-player,
.player-cover,
.player-poster,
.player-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.movie-player {
    z-index: 1;
    background: #000000;
}

.player-cover {
    z-index: 3;
    border: 0;
    padding: 0;
    color: #ffffff;
    background: transparent;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-poster {
    background-position: center;
    background-size: cover;
    transform: scale(1.02);
}

.player-shade {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.74));
}

.player-button {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 86px;
    height: 86px;
    font-size: 38px;
    transform: translate(-50%, -50%);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 34px;
    padding: 42px 0 64px;
}

.detail-main h1 {
    margin-bottom: 18px;
    color: var(--ocean-deep);
    font-size: clamp(34px, 4vw, 52px);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 12px;
    color: var(--text-gray);
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(10, 74, 107, 0.08);
}

.detail-tags {
    margin-bottom: 24px;
}

.detail-tags span {
    color: var(--ocean-deep);
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(10, 74, 107, 0.08);
}

.detail-panel {
    margin-bottom: 22px;
    padding: 26px;
}

.detail-panel h2 {
    margin-bottom: 12px;
    font-size: 24px;
}

.detail-panel p {
    margin: 0;
    color: var(--text-gray);
    font-size: 17px;
}

.accent-panel {
    background: var(--sand-warm);
}

.accent-panel p {
    color: var(--text-dark);
}

.detail-aside {
    min-width: 0;
}

.aside-card {
    position: sticky;
    top: 96px;
    padding: 22px;
}

.aside-recommend {
    display: grid;
    gap: 16px;
    margin-top: 16px;
}

.aside-recommend .movie-card-cover {
    aspect-ratio: 16 / 10;
}

.site-footer {
    color: rgba(255, 255, 255, 0.82);
    background: var(--ocean-deep);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 28px;
    padding: 44px 0;
}

.footer-logo {
    display: block;
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 24px;
}

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

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

.footer-links a:hover {
    color: var(--seafoam);
}

.footer-bottom {
    padding: 18px;
    text-align: center;
    color: rgba(255, 255, 255, 0.68);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

[hidden] {
    display: none !important;
}

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

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

    .aside-card {
        position: static;
    }
}

@media (max-width: 900px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .mobile-toggle {
        display: block;
        margin-left: auto;
    }

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

    .hero-carousel {
        height: 540px;
    }

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

    .hero-copy p {
        font-size: 17px;
    }

    .hero-arrow {
        display: none;
    }

    .movie-grid,
    .movie-grid-large,
    .ranking-grid,
    .ranking-list-page,
    .category-grid,
    .top-rank-grid,
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

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

    .site-logo {
        font-size: 19px;
    }

    .hero-carousel {
        height: 560px;
    }

    .hero-content {
        align-items: flex-start;
        padding-top: 72px;
    }

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

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

    .hero-search input,
    .hero-search button {
        min-height: 50px;
        width: 100%;
    }

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

    .movie-grid,
    .movie-grid-large,
    .ranking-grid,
    .ranking-list-page,
    .category-grid,
    .top-rank-grid,
    .footer-grid,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .white-panel,
    .ranking-panel,
    .page-hero,
    .detail-panel,
    .filter-panel {
        padding: 22px;
        border-radius: 20px;
    }

    .horizontal-scroll {
        grid-auto-columns: 78%;
    }

    .ranking-item {
        grid-template-columns: 42px 66px 1fr;
    }

    .player-stage {
        padding: 16px 0;
    }

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

    .detail-layout {
        padding-top: 28px;
    }
}
