html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: #111827;
    background: #f8fafc;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.menu-open {
    overflow: hidden;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 170px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 999px;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 16px 40px rgba(6, 182, 212, 0.35);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 24px;
    color: transparent;
    background: linear-gradient(90deg, #0891b2, #2563eb);
    background-clip: text;
    -webkit-background-clip: text;
}

.brand-text em {
    margin-top: 4px;
    font-size: 12px;
    font-style: normal;
    color: #64748b;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    color: #334155;
    font-weight: 700;
}

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

.main-nav a:hover {
    color: #0891b2;
}

.search-wrap {
    position: relative;
    margin-left: auto;
    width: min(320px, 32vw);
}

.search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.search-input,
.large-search input,
.library-toolbar input,
.library-toolbar select {
    width: 100%;
    border: 0;
    outline: 0;
    color: #0f172a;
    background: transparent;
}

.search-input {
    padding: 8px 6px 8px 14px;
}

.search-button,
.large-search button,
.filter-bar button,
.category-filter-row button,
.primary-btn,
.ghost-btn,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.search-button {
    padding: 8px 16px;
    color: #ffffff;
    background: linear-gradient(90deg, #06b6d4, #2563eb);
}

.search-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    max-height: 420px;
    overflow: auto;
    padding: 8px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.search-result {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 12px;
    padding: 8px;
    border-radius: 14px;
}

.search-result:hover {
    background: #ecfeff;
}

.search-result img {
    width: 52px;
    height: 68px;
    border-radius: 10px;
}

.search-result strong {
    display: block;
    color: #0f172a;
}

.search-result span {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #0f172a;
    background: #e0f2fe;
}

.mobile-nav {
    padding: 8px 24px 20px;
    display: grid;
    gap: 10px;
}

.mobile-nav a {
    padding: 12px 16px;
    border-radius: 14px;
    color: #0f172a;
    background: #f1f5f9;
    font-weight: 700;
}

.hero-carousel {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 25%, rgba(6, 182, 212, 0.55), transparent 36%), linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.78), rgba(2, 6, 23, 0.25)), linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    min-height: 640px;
    margin: 0 auto;
    padding: 110px 24px 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.hero-kicker {
    display: inline-flex;
    margin-bottom: 18px;
    padding: 8px 14px;
    color: #cffafe;
    background: rgba(8, 145, 178, 0.28);
    border: 1px solid rgba(103, 232, 249, 0.35);
    border-radius: 999px;
    backdrop-filter: blur(12px);
}

.hero-content h1 {
    max-width: 850px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-content h2 {
    margin-top: 20px;
    font-size: clamp(26px, 3.4vw, 46px);
    font-weight: 900;
    color: #67e8f9;
}

.hero-content p {
    max-width: 760px;
    margin-top: 18px;
    color: #e0f2fe;
    font-size: 18px;
    line-height: 1.8;
}

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

.primary-btn {
    padding: 14px 26px;
    color: #ffffff;
    background: linear-gradient(90deg, #06b6d4, #2563eb);
    box-shadow: 0 18px 45px rgba(37, 99, 235, 0.36);
}

.ghost-btn {
    padding: 13px 24px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.search-button:hover {
    transform: translateY(-2px);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
}

.hero-dot.active {
    width: 36px;
    background: #22d3ee;
}

.quick-search-panel,
.content-section,
.site-footer {
    max-width: 1280px;
    margin: 0 auto;
    padding: 58px 24px;
}

.quick-search-panel {
    margin-top: -58px;
    position: relative;
    z-index: 10;
    padding-top: 0;
    padding-bottom: 24px;
}

.large-search {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: #ffffff;
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
}

.large-search input {
    padding: 14px 18px;
    font-size: 17px;
}

.large-search button {
    padding: 0 28px;
    min-width: 132px;
    color: #ffffff;
    background: linear-gradient(90deg, #06b6d4, #2563eb);
}

.quick-tags {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-tags a,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
}

.quick-tags a {
    padding: 8px 14px;
    color: #0e7490;
    background: #ecfeff;
    font-weight: 700;
}

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

.section-head h2 {
    font-size: clamp(28px, 3.2vw, 42px);
    color: #0f172a;
    font-weight: 900;
}

.section-head p {
    margin-top: 8px;
    color: #64748b;
}

.section-more {
    padding: 10px 18px;
    color: #0e7490;
    background: #ecfeff;
}

.movie-grid,
.category-grid,
.category-panel-grid,
.related-grid {
    display: grid;
    gap: 22px;
}

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

.compact-grid,
.ranking-page-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img {
    transition: transform 0.35s ease;
}

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

.score,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 900;
}

.score {
    right: 12px;
    top: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(8, 145, 178, 0.92);
}

.rank-badge {
    left: 12px;
    top: 12px;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

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

.movie-card h3 {
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
    color: #0f172a;
}

.movie-card h3 a:hover {
    color: #0891b2;
}

.movie-meta,
.movie-line {
    margin-top: 8px;
    color: #64748b;
    font-size: 14px;
}

.movie-line {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
    line-height: 1.5;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-row span {
    padding: 5px 9px;
    color: #0891b2;
    background: #ecfeff;
    font-size: 12px;
    font-weight: 700;
}

.dark-band {
    max-width: none;
    margin: 34px 0;
    padding-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    padding-right: max(24px, calc((100vw - 1280px) / 2 + 24px));
    background: linear-gradient(135deg, #020617, #0f172a 48%, #164e63);
}

.dark-band .section-head h2,
.dark-band .movie-card h3 {
    color: #ffffff;
}

.dark-band .section-head p {
    color: #bae6fd;
}

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

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

.category-tile,
.category-panel {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    border-radius: 28px;
    color: #ffffff;
    background: #0f172a;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}

.category-tile::after,
.category-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.18));
}

.category-tile img {
    position: absolute;
    inset: 0;
    transition: transform 0.35s ease;
}

.category-tile:hover img {
    transform: scale(1.08);
}

.category-tile span,
.category-tile em {
    position: relative;
    z-index: 1;
    display: block;
    padding: 0 22px;
}

.category-tile span {
    margin-top: 128px;
    font-size: 24px;
    font-weight: 900;
}

.category-tile em {
    margin-top: 8px;
    color: #bae6fd;
    font-style: normal;
    line-height: 1.5;
}

.sub-hero {
    padding: 88px 24px 72px;
    color: #ffffff;
    text-align: center;
    background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.42), transparent 28%), linear-gradient(135deg, #020617, #0f172a 48%, #0891b2);
}

.sub-hero h1 {
    font-size: clamp(34px, 4.5vw, 60px);
    font-weight: 900;
    letter-spacing: -0.03em;
}

.sub-hero p {
    max-width: 760px;
    margin: 16px auto 0;
    color: #dff7ff;
    line-height: 1.8;
}

.sub-hero span {
    display: inline-flex;
    margin-bottom: 12px;
    color: #67e8f9;
    font-weight: 800;
}

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

.category-panel {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    min-height: 300px;
}

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

.category-panel-text {
    position: relative;
    z-index: 2;
    padding: 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.category-panel-text h2 {
    font-size: 34px;
    font-weight: 900;
}

.category-panel-text p {
    margin-top: 12px;
    color: #bae6fd;
    line-height: 1.8;
}

.category-panel-text span {
    margin-top: 24px;
    font-weight: 900;
    color: #67e8f9;
}

.filter-bar,
.category-filter-row,
.library-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.filter-bar button,
.category-filter-row button {
    padding: 10px 16px;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid #cbd5e1;
}

.filter-bar button.active,
.category-filter-row button.active {
    color: #ffffff;
    background: linear-gradient(90deg, #06b6d4, #2563eb);
    border-color: transparent;
}

.library-toolbar {
    padding: 14px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.library-toolbar input,
.library-toolbar select {
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
}

.library-toolbar input {
    flex: 1 1 360px;
}

.library-toolbar select {
    flex: 0 0 180px;
}

.movie-detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    filter: blur(8px);
    transform: scale(1.08);
    opacity: 0.52;
}

.detail-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.97), rgba(15, 23, 42, 0.78)), radial-gradient(circle at 20% 20%, rgba(6, 182, 212, 0.44), transparent 32%);
}

.detail-wrap {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 76px 24px;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 42px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 28px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.42);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #bae6fd;
    font-weight: 700;
}

.detail-info h1 {
    margin-top: 18px;
    font-size: clamp(36px, 5vw, 68px);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.detail-one-line {
    max-width: 820px;
    margin-top: 16px;
    color: #e0f2fe;
    font-size: 19px;
    line-height: 1.8;
}

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

.detail-meta span {
    padding: 8px 12px;
    color: #cffafe;
    background: rgba(8, 145, 178, 0.2);
    border: 1px solid rgba(103, 232, 249, 0.28);
}

.detail-tags span {
    color: #cffafe;
    background: rgba(255, 255, 255, 0.12);
}

.detail-info .primary-btn {
    margin-top: 30px;
}

.detail-section {
    padding-top: 48px;
}

.player-panel {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #020617;
    box-shadow: 0 28px 70px rgba(2, 6, 23, 0.22);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #ffffff;
    border: 0;
    background: radial-gradient(circle, rgba(8, 145, 178, 0.28), rgba(2, 6, 23, 0.76));
    cursor: pointer;
}

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

.play-symbol {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 20px 50px rgba(6, 182, 212, 0.42);
    font-size: 34px;
}

.player-cover strong {
    font-size: 24px;
}

.detail-copy {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    padding-top: 12px;
}

.detail-copy article {
    padding: 28px;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

.detail-copy h2 {
    color: #0f172a;
    font-size: 26px;
    font-weight: 900;
}

.detail-copy p {
    margin-top: 14px;
    color: #475569;
    line-height: 1.9;
}

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

.related-card {
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.related-card a {
    display: block;
}

.related-card img {
    aspect-ratio: 2 / 3;
}

.related-card span {
    display: block;
    padding: 12px;
    color: #0f172a;
    font-weight: 800;
    line-height: 1.4;
}

.site-footer {
    margin-top: 40px;
    color: #cbd5e1;
    background: #020617;
    max-width: none;
    padding-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    padding-right: max(24px, calc((100vw - 1280px) / 2 + 24px));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 32px;
}

.footer-grid strong {
    display: block;
    color: #ffffff;
    margin-bottom: 10px;
    font-size: 18px;
}

.footer-grid p {
    line-height: 1.8;
}

.footer-grid a:hover {
    color: #67e8f9;
}

.footer-bottom {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    color: #94a3b8;
    text-align: center;
}

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

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

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

@media (max-width: 920px) {
    .header-inner {
        gap: 12px;
    }

    .main-nav,
    .search-wrap {
        display: none;
    }

    .mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

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

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

    .detail-poster {
        max-width: 320px;
    }

    .detail-copy,
    .footer-grid,
    .category-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .header-inner {
        padding: 12px 16px;
    }

    .brand-text strong {
        font-size: 20px;
    }

    .hero-content {
        padding: 72px 18px 78px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .large-search {
        flex-direction: column;
        align-items: stretch;
    }

    .large-search button {
        min-height: 48px;
    }

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

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

    .movie-card h3 {
        font-size: 16px;
    }

    .content-section,
    .quick-search-panel,
    .site-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .sub-hero {
        padding: 64px 16px 56px;
    }

    .detail-wrap {
        padding: 52px 16px;
    }

    .play-symbol {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }
}

@media (max-width: 460px) {
    .movie-grid,
    .compact-grid,
    .ranking-list,
    .ranking-page-grid,
    .category-grid,
    .category-panel-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }
}
