:root {
    --site-blue: #2563eb;
    --site-blue-dark: #1d4ed8;
    --site-orange: #ea580c;
    --site-red: #dc2626;
    --site-green: #16a34a;
    --site-gray: #111827;
    --site-muted: #6b7280;
    --site-soft: #f8fafc;
    --site-border: #e5e7eb;
    --site-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

body {
    min-height: 100vh;
    color: #111827;
    background: linear-gradient(180deg, #f9fafb 0%, #ffffff 48%, #f8fafc 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.header-inner,
.content-wrap,
.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.header-inner {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #1f2937;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #60a5fa);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
}

.brand-text {
    font-size: 1.25rem;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #374151;
    font-weight: 600;
}

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

.main-nav a:hover,
.main-nav a.is-active {
    color: var(--site-blue);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: #374151;
    background: #f3f4f6;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--site-border);
    padding: 12px 16px 18px;
    background: #ffffff;
}

.mobile-nav a {
    display: block;
    padding: 12px 0;
    color: #374151;
    font-weight: 700;
}

.hero-section {
    position: relative;
    height: 70vh;
    min-height: 540px;
    overflow: hidden;
    background: #020617;
}

.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 {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.48) 46%, rgba(0, 0, 0, 0.08) 100%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100% - 1280px) / 2));
    right: 24px;
    bottom: 72px;
    max-width: 760px;
    color: #ffffff;
}

.hero-tags,
.card-tags,
.meta-row,
.detail-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.detail-tags span {
    display: inline-flex;
    padding: 5px 13px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    font-size: 0.875rem;
}

.hero-title {
    margin-top: 16px;
    font-size: clamp(2.4rem, 6vw, 4.8rem);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.05em;
    text-shadow: 0 18px 36px rgba(0, 0, 0, 0.36);
}

.hero-desc {
    margin-top: 18px;
    max-width: 680px;
    color: #e5e7eb;
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.8;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 22px;
    color: rgba(255, 255, 255, 0.92);
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 26px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    color: #ffffff;
    background: var(--site-blue);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover {
    background: var(--site-blue-dark);
}

.btn-light {
    color: #111827;
    background: #ffffff;
}

.btn-ghost {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.36);
    background: rgba(255, 255, 255, 0.12);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.5);
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
}

.hero-arrow.prev {
    left: 18px;
}

.hero-arrow.next {
    right: 18px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.56);
    transition: width 0.25s ease, background 0.25s ease;
}

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

.section {
    padding: 70px 0;
}

.section.compact {
    padding: 44px 0;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--site-blue);
    font-size: 0.9rem;
    font-weight: 900;
}

.section-title {
    margin-top: 8px;
    color: #111827;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-desc,
.page-desc {
    margin-top: 10px;
    max-width: 780px;
    color: #6b7280;
    line-height: 1.8;
}

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

.movie-grid.dense {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

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

.movie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: var(--site-shadow);
}

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

.poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: #e5e7eb;
}

.movie-card.horizontal {
    border-radius: 16px;
}

.movie-card.horizontal a {
    display: grid;
    grid-template-columns: 190px 1fr;
}

.movie-card.horizontal .poster {
    aspect-ratio: 16 / 10;
    min-height: 126px;
}

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

.movie-card:hover .poster img,
.category-tile:hover img {
    transform: scale(1.07);
}

.poster-mask {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(0, 0, 0, 0);
    opacity: 0;
    transition: background 0.25s ease, opacity 0.25s ease;
}

.movie-card:hover .poster-mask {
    background: rgba(0, 0, 0, 0.28);
    opacity: 1;
}

.type-badge,
.rank-badge {
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 2;
    padding: 4px 9px;
    border-radius: 9px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.88);
    font-size: 0.78rem;
    font-weight: 800;
}

.rank-badge {
    left: 10px;
    right: auto;
    background: rgba(220, 38, 38, 0.9);
}

.card-body {
    padding: 16px;
}

.movie-title {
    color: #1f2937;
    font-size: 1.04rem;
    font-weight: 850;
    line-height: 1.35;
}

.movie-card:hover .movie-title {
    color: var(--site-blue);
}

.movie-desc {
    margin-top: 8px;
    min-height: 44px;
    color: #6b7280;
    font-size: 0.92rem;
    line-height: 1.55;
}

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

.card-tags span {
    padding: 3px 8px;
    border-radius: 999px;
    color: #2563eb;
    background: #dbeafe;
    font-size: 0.75rem;
    font-weight: 750;
}

.meta-row {
    margin-top: 13px;
    justify-content: space-between;
    color: #6b7280;
    font-size: 0.82rem;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    border-radius: 22px;
    color: #ffffff;
    background: #111827;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.16);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
    transition: transform 0.45s ease;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.88));
}

.category-tile-content {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 2;
}

.category-tile h2,
.category-tile h3 {
    font-size: 1.35rem;
    font-weight: 900;
}

.category-tile p {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.92rem;
    line-height: 1.65;
}

.page-hero {
    padding: 62px 0 36px;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 34%), linear-gradient(180deg, #ffffff, #f8fafc);
}

.page-hero h1 {
    max-width: 980px;
    color: #111827;
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: #6b7280;
    font-size: 0.92rem;
}

.breadcrumb a {
    color: #2563eb;
    font-weight: 750;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 12px;
    margin: 28px 0 30px;
    padding: 16px;
    border: 1px solid var(--site-border);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.search-input,
.filter-select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--site-border);
    border-radius: 14px;
    padding: 0 14px;
    color: #111827;
    background: #f9fafb;
    outline: none;
}

.search-input:focus,
.filter-select:focus {
    border-color: #93c5fd;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(147, 197, 253, 0.28);
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.9fr);
    gap: 30px;
    align-items: start;
}

.player-section {
    padding: 34px 0;
    background: #020617;
}

.player-shell {
    position: relative;
    overflow: hidden;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    border-radius: 22px;
    background: #000000;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.42), rgba(2, 6, 23, 0.88));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #2563eb;
    background: #ffffff;
    box-shadow: 0 20px 38px rgba(0, 0, 0, 0.32);
    font-size: 2rem;
}

.play-overlay strong {
    max-width: min(720px, calc(100% - 42px));
    font-size: clamp(1.3rem, 3vw, 2.6rem);
    line-height: 1.2;
    text-align: center;
}

.detail-card,
.side-card {
    border: 1px solid var(--site-border);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06);
}

.detail-card {
    padding: 28px;
}

.detail-card h2,
.side-card h2 {
    color: #111827;
    font-size: 1.45rem;
    font-weight: 900;
}

.detail-card p {
    margin-top: 16px;
    color: #374151;
    font-size: 1rem;
    line-height: 1.9;
}

.side-card {
    padding: 20px;
}

.info-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
    color: #4b5563;
}

.info-list li {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 10px;
}

.info-list strong {
    color: #111827;
}

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

.related-item {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 12px;
    align-items: center;
    border-radius: 14px;
    color: #111827;
}

.related-item img {
    width: 84px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
}

.related-item strong {
    display: block;
    font-size: 0.95rem;
    line-height: 1.4;
}

.related-item span {
    display: block;
    margin-top: 5px;
    color: #6b7280;
    font-size: 0.82rem;
}

.site-footer {
    margin-top: 70px;
    color: #d1d5db;
    background: #111827;
}

.footer-inner {
    padding: 48px 0 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 28px;
}

.footer-grid h3 {
    color: #ffffff;
    font-weight: 850;
    margin-bottom: 14px;
}

.footer-grid p,
.footer-grid a {
    color: #9ca3af;
    font-size: 0.92rem;
    line-height: 1.8;
}

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

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 34px;
    padding-top: 22px;
    border-top: 1px solid #1f2937;
    color: #6b7280;
    font-size: 0.9rem;
}

.back-top {
    color: #9ca3af;
}

.hidden-card {
    display: none !important;
}

.line-clamp-1,
.line-clamp-2,
.line-clamp-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
}

.line-clamp-1 {
    -webkit-line-clamp: 1;
}

.line-clamp-2 {
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    -webkit-line-clamp: 3;
}

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

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

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

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

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

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

    .hero-section {
        min-height: 580px;
        height: 76vh;
    }

    .hero-content {
        left: 18px;
        right: 18px;
        bottom: 64px;
    }

    .hero-arrow {
        display: none;
    }

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

    .movie-grid,
    .movie-grid.dense,
    .category-grid,
    .rank-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .search-panel {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 560px) {
    .header-inner,
    .content-wrap,
    .footer-inner,
    .player-shell {
        width: min(100% - 24px, 1280px);
    }

    .brand-text {
        font-size: 1.05rem;
    }

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

    .movie-card.horizontal a {
        grid-template-columns: 118px 1fr;
    }

    .movie-card.horizontal .poster {
        min-height: 118px;
    }

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

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