
:root {
    --primary-50: #f0f9ff;
    --primary-100: #e0f2fe;
    --primary-400: #38bdf8;
    --primary-500: #0ea5e9;
    --primary-600: #0284c7;
    --primary-700: #0369a1;
    --primary-800: #075985;
    --accent-50: #fffbeb;
    --accent-100: #fef3c7;
    --accent-500: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.10);
    --shadow-lg: 0 16px 34px rgba(15, 23, 42, 0.16);
    --shadow-xl: 0 25px 55px rgba(15, 23, 42, 0.22);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--gray-900);
    background: linear-gradient(180deg, var(--gray-50), var(--white));
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    line-height: 1.65;
}

body.no-scroll {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.88);
}

.nav-shell {
    max-width: 1280px;
    height: 72px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 26px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-800));
    box-shadow: 0 10px 22px rgba(2, 132, 199, 0.28);
    font-size: 14px;
}

.brand-text {
    font-size: 22px;
    color: var(--gray-900);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-link,
.mobile-link {
    color: var(--gray-700);
    font-weight: 700;
    transition: color 0.2s ease;
}

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

.header-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    padding: 4px;
    min-width: 315px;
}

.header-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 9px 13px;
    color: var(--gray-800);
    background: transparent;
}

.header-search button,
.search-box button {
    border: 0;
    border-radius: 999px;
    padding: 9px 18px;
    color: var(--white);
    background: var(--primary-600);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button:hover,
.search-box button:hover {
    background: var(--primary-700);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    border: 0;
    color: var(--gray-800);
    background: transparent;
    font-size: 28px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    padding: 10px 24px 22px;
    border-top: 1px solid var(--gray-200);
    background: var(--white);
}

.mobile-panel a {
    display: block;
    padding: 11px 0;
}

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

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

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

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.04));
}

.hero-content {
    position: relative;
    z-index: 5;
    max-width: 1280px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 720px;
    color: var(--white);
}

.hero-copy h1 {
    margin: 0 0 12px;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.055em;
}

.hero-panel {
    display: none;
}

.hero-panel.active {
    display: block;
}

.hero-panel h2 {
    margin: 0 0 14px;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.1;
}

.hero-panel p {
    max-width: 640px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.hero-meta,
.detail-meta,
.category-pills,
.card-tags,
.footer-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-meta {
    margin-bottom: 28px;
}

.hero-meta span,
.category-pills span,
.card-tags span,
.footer-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 13px;
    font-weight: 700;
}

.hero-meta span:first-child {
    color: var(--white);
    background: var(--primary-600);
}

.hero-meta span:not(:first-child) {
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
}

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

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

.btn-primary {
    color: var(--white);
    background: var(--primary-600);
    box-shadow: 0 16px 32px rgba(2, 132, 199, 0.28);
}

.btn-primary:hover {
    background: var(--primary-700);
    transform: translateY(-2px) scale(1.01);
}

.btn-secondary {
    color: var(--primary-700);
    background: var(--primary-50);
}

.btn-secondary:hover {
    background: var(--primary-100);
    transform: translateY(-2px);
}

.btn-light {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(12px);
}

.hero-controls {
    position: absolute;
    right: 40px;
    bottom: 34px;
    z-index: 8;
    display: flex;
    gap: 10px;
}

.hero-controls button {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    cursor: pointer;
}

.hero-controls button:hover {
    background: rgba(255, 255, 255, 0.30);
}

main,
.section-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 72px 24px;
}

.home-main {
    display: grid;
    gap: 82px;
}

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

.section-head h2,
.page-hero h1,
.detail-card h1 {
    margin: 0;
    color: var(--gray-900);
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-head p,
.page-hero p,
.detail-card p,
.movie-info p,
.poster-card p {
    color: var(--gray-600);
}

.section-head a {
    color: var(--primary-600);
    font-weight: 800;
    white-space: nowrap;
}

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

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

.movie-card,
.poster-card,
.compact-card,
.category-card {
    background: var(--white);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover,
.poster-card:hover,
.compact-card:hover,
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.movie-thumb,
.poster-frame,
.compact-thumb {
    position: relative;
    overflow: hidden;
    background: var(--gray-200);
}

.movie-thumb {
    aspect-ratio: 16 / 9;
}

.poster-frame {
    aspect-ratio: 2 / 3;
}

.compact-thumb {
    width: 136px;
    height: 86px;
    flex: 0 0 136px;
    border-radius: 14px;
}

.movie-thumb img,
.poster-frame img,
.compact-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.corner-label,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 8px;
    padding: 4px 9px;
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.70);
    backdrop-filter: blur(8px);
}

.corner-label {
    top: 12px;
    right: 12px;
}

.rank-badge {
    top: 12px;
    left: 12px;
    background: var(--primary-600);
}

.play-hover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    background: rgba(0, 0, 0, 0.0);
    font-size: 42px;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease;
}

.movie-card:hover .play-hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.36);
}

.movie-info {
    padding: 20px;
}

.movie-info h3,
.poster-card h3,
.compact-card h3,
.category-card h2 {
    margin: 0;
    color: var(--gray-900);
    transition: color 0.2s ease;
}

.movie-info h3 {
    font-size: 20px;
    line-height: 1.25;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.movie-info p,
.poster-card p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--gray-500);
    font-size: 14px;
}

.card-tags {
    margin-top: 12px;
}

.card-tags span,
.category-pills span,
.footer-tags span {
    color: var(--gray-700);
    background: var(--gray-100);
}

.poster-card {
    display: block;
    padding-bottom: 14px;
}

.poster-card h3,
.poster-card p {
    padding: 0 12px;
}

.poster-card h3 {
    margin-top: 12px;
    font-size: 16px;
    line-height: 1.35;
}

.poster-card p {
    margin: 6px 0 0;
    font-size: 13px;
}

.gradient-panel {
    padding: 34px;
    border-radius: 30px;
    background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
}

.dark-panel {
    margin: 0 -24px;
    padding: 52px 24px;
    color: var(--white);
    background: linear-gradient(135deg, var(--gray-900), #0f172a 52%, var(--primary-800));
}

.dark-panel .section-head h2,
.dark-panel .section-head p,
.dark-panel .section-head a {
    color: var(--white);
}

.page-hero {
    color: var(--white);
    background: linear-gradient(120deg, var(--primary-600), var(--primary-800));
}

.page-hero .section-wrap {
    padding-top: 58px;
    padding-bottom: 58px;
}

.page-hero h1,
.page-hero p {
    color: var(--white);
}

.breadcrumb {
    display: inline-flex;
    align-items: center;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 700;
}

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

.category-card {
    padding: 28px;
    border: 1px solid var(--gray-200);
}

.category-card h2 {
    font-size: 24px;
}

.category-card p {
    color: var(--gray-600);
}

.category-pills {
    margin-top: 18px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 28px;
}

.filter-button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: var(--gray-700);
    background: var(--gray-100);
    cursor: pointer;
}

.filter-button.active,
.filter-button:hover {
    color: var(--white);
    background: var(--primary-600);
}

.rank-layout,
.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 30px;
}

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

.compact-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px;
}

.compact-card h3 {
    font-size: 17px;
    line-height: 1.35;
}

.compact-card p {
    margin: 5px 0 0;
    color: var(--gray-500);
    font-size: 14px;
}

.sidebar-box {
    position: sticky;
    top: 98px;
    padding: 24px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.sidebar-box h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

.sidebar-links {
    display: grid;
    gap: 12px;
}

.sidebar-links a {
    color: var(--gray-700);
    font-weight: 700;
}

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

.detail-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 34px 24px 72px;
}

.player-shell {
    overflow: hidden;
    border-radius: 18px;
    background: #000000;
    box-shadow: var(--shadow-xl);
}

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

.player-stage video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.26);
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-start {
    width: 84px;
    height: 84px;
    border: 0;
    border-radius: 50%;
    color: var(--primary-700);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-lg);
    font-size: 34px;
    cursor: pointer;
}

.player-message {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 5;
    display: none;
    border-radius: 999px;
    padding: 8px 13px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.62);
    font-size: 14px;
}

.player-message.show {
    display: inline-flex;
}

.detail-card {
    margin-top: 24px;
    padding: 30px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.detail-meta {
    margin: 18px 0 24px;
}

.detail-meta span {
    border-radius: 999px;
    padding: 7px 14px;
    color: var(--gray-700);
    background: var(--gray-100);
    font-weight: 800;
}

.detail-card h2 {
    margin: 28px 0 10px;
    font-size: 24px;
}

.detail-card p {
    margin: 0 0 12px;
}

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

.search-panel {
    padding: 30px;
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.search-box {
    display: flex;
    gap: 12px;
}

.search-box input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: 13px 16px;
    outline: none;
}

.search-status {
    margin: 18px 0 0;
    color: var(--gray-600);
}

.site-footer {
    color: var(--gray-300);
    background: var(--gray-900);
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 52px 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 36px;
}

.footer-brand {
    color: var(--white);
    font-size: 22px;
}

.footer-about p {
    max-width: 620px;
    color: var(--gray-400);
}

.footer-tags span {
    color: var(--gray-200);
    background: rgba(255, 255, 255, 0.08);
}

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

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer li {
    margin-bottom: 9px;
}

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

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

.footer-bottom {
    border-top: 1px solid var(--gray-800);
    padding: 20px 24px;
    color: var(--gray-500);
    text-align: center;
}

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

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

    .mobile-panel {
        display: block;
    }

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

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

    .sidebar-box {
        position: static;
    }
}

@media (max-width: 720px) {
    .nav-shell {
        height: 64px;
        padding: 0 16px;
    }

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

    .hero {
        height: 72vh;
        min-height: 560px;
    }

    .hero-content {
        padding: 0 18px;
    }

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

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

    main,
    .section-wrap,
    .detail-main {
        padding-left: 16px;
        padding-right: 16px;
    }

    .section-head {
        display: block;
    }

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

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

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

    .gradient-panel,
    .detail-card,
    .search-panel {
        padding: 22px;
        border-radius: 20px;
    }

    .compact-thumb {
        width: 110px;
        height: 74px;
        flex-basis: 110px;
    }

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

    .search-box {
        flex-direction: column;
    }
}
