* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #111827;
    background: #f9fafb;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    backdrop-filter: blur(8px);
}

.navbar {
    width: min(100% - 32px, 1280px);
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.02em;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #14b8a6, #0f766e);
    box-shadow: 0 10px 18px rgba(20, 184, 166, 0.25);
}

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

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

.nav-links a:hover {
    color: #0d9488;
}

.mobile-toggle {
    display: none;
    border: 0;
    color: #374151;
    background: transparent;
    font-size: 24px;
}

.mobile-panel {
    display: none;
    width: min(100% - 32px, 1280px);
    margin: 0 auto;
    padding: 8px 0 16px;
    border-top: 1px solid #e5e7eb;
}

.mobile-panel a {
    display: block;
    padding: 10px 0;
    color: #374151;
    font-weight: 600;
}

main {
    min-height: 70vh;
}

.page-shell {
    width: min(100% - 32px, 1280px);
    margin: 0 auto;
    padding: 104px 0 48px;
}

.hero-wrap {
    width: min(100% - 32px, 1280px);
    margin: 0 auto;
    padding: 92px 0 36px;
}

.hero-carousel {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    border-radius: 24px;
    background: #111827;
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.18);
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.06));
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: clamp(28px, 6vw, 72px);
}

.hero-copy {
    width: min(620px, 100%);
    color: #ffffff;
}

.hero-badge,
.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 12px;
    color: #ffffff;
    background: rgba(20, 184, 166, 0.92);
    font-size: 14px;
    font-weight: 700;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 18px 0 16px;
    font-size: clamp(36px, 7vw, 72px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-copy p {
    margin: 0 0 30px;
    color: #e5e7eb;
    font-size: clamp(17px, 2vw, 22px);
    max-width: 680px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 18px;
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    background: #0d9488;
    font-weight: 800;
    box-shadow: 0 12px 22px rgba(13, 148, 136, 0.24);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    background: #0f766e;
    box-shadow: 0 18px 30px rgba(13, 148, 136, 0.28);
}

.btn.ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: none;
    backdrop-filter: blur(8px);
}

.btn.ghost:hover {
    background: rgba(255, 255, 255, 0.28);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-50%);
    backdrop-filter: blur(8px);
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.32);
}

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

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

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 26px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    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 {
    margin-bottom: 64px;
}

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

.section h2,
.page-title {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    color: #111827;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-lead,
.page-lead {
    max-width: 760px;
    margin: 12px 0 0;
    color: #4b5563;
    font-size: 17px;
}

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

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

.movie-card {
    display: block;
    overflow: hidden;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 4px 6px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.16);
}

.poster {
    position: relative;
    height: 224px;
    overflow: hidden;
    background: linear-gradient(135deg, #0f766e, #111827);
}

.movie-grid.compact .poster {
    height: 190px;
}

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

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

.poster-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 16px;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.78));
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.card-body {
    padding: 16px;
}

.card-title {
    margin: 0 0 10px;
    color: #111827;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 800;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

.movie-card:hover .card-title {
    color: #0d9488;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #6b7280;
    font-size: 14px;
}

.featured-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    gap: 24px;
}

.featured-main,
.featured-side {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    color: #ffffff;
    background: #111827;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.16);
}

.featured-main {
    min-height: 440px;
}

.featured-side {
    min-height: 208px;
}

.featured-main img,
.featured-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.featured-main:hover img,
.featured-side:hover img {
    transform: scale(1.05);
}

.featured-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.82));
}

.featured-text {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 28px;
}

.featured-text h3 {
    margin: 10px 0 8px;
    font-size: 26px;
    line-height: 1.2;
}

.featured-text p {
    margin: 0;
    color: #e5e7eb;
}

.side-stack {
    display: grid;
    gap: 24px;
}

.scroller {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding: 4px 0 16px;
    scrollbar-width: none;
}

.scroller::-webkit-scrollbar {
    display: none;
}

.scroll-card {
    flex: 0 0 288px;
}

.scroll-controls {
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 12px;
    color: #111827;
    background: #f3f4f6;
    transition: background 0.2s ease, color 0.2s ease;
}

.icon-btn:hover {
    color: #0d9488;
    background: #e5e7eb;
}

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

.category-card {
    display: block;
    padding: 22px;
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff, #f0fdfa);
    border: 1px solid #ccfbef;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.12);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 8px;
    color: #134e4a;
    font-size: 22px;
}

.category-card p {
    margin: 0 0 12px;
    color: #4b5563;
}

.count {
    color: #0f766e;
    font-weight: 900;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 58px 92px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 24px rgba(15, 23, 42, 0.12);
}

.rank-number {
    color: #0d9488;
    font-size: 24px;
    font-weight: 900;
    text-align: center;
}

.rank-poster {
    height: 62px;
    overflow: hidden;
    border-radius: 12px;
    background: #111827;
}

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

.rank-title {
    margin: 0 0 4px;
    color: #111827;
    font-size: 18px;
    font-weight: 850;
}

.rank-desc {
    margin: 0;
    color: #6b7280;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, minmax(140px, 1fr));
    gap: 14px;
    margin: 26px 0 30px;
    padding: 18px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    color: #111827;
    background: #ffffff;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.16);
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 24px;
}

.breadcrumbs a {
    color: #0d9488;
    font-weight: 700;
}

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

.player-card,
.detail-card,
.sidebar-card {
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

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

.player-box video {
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.1), rgba(17, 24, 39, 0.76));
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-button {
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(13, 148, 136, 0.92);
    font-size: 34px;
    box-shadow: 0 20px 38px rgba(13, 148, 136, 0.36);
    transition: transform 0.2s ease, background 0.2s ease;
}

.play-button:hover {
    transform: scale(1.06);
    background: #0f766e;
}

.player-info,
.detail-card,
.sidebar-card {
    padding: 26px;
}

.player-info h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #4b5563;
    margin-bottom: 16px;
}

.meta-line span {
    padding: 5px 10px;
    border-radius: 999px;
    background: #f0fdfa;
    color: #0f766e;
    font-weight: 750;
}

.detail-card h2,
.sidebar-card h2 {
    margin: 0 0 14px;
    color: #111827;
    font-size: 24px;
    font-weight: 900;
}

.detail-card p {
    margin: 0 0 18px;
    color: #374151;
    font-size: 17px;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.tag-cloud span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #134e4a;
    background: #ccfbef;
    font-size: 14px;
    font-weight: 750;
}

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

.related-item {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    background: #f9fafb;
    transition: background 0.2s ease;
}

.related-item:hover {
    background: #f0fdfa;
}

.related-item img {
    width: 76px;
    height: 54px;
    object-fit: cover;
    border-radius: 10px;
}

.related-title {
    margin: 0 0 3px;
    color: #111827;
    font-weight: 800;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.related-meta {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
}

.site-footer {
    color: #d1d5db;
    background: #111827;
}

.footer-inner {
    width: min(100% - 32px, 1280px);
    margin: 0 auto;
    padding: 46px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 36px;
    padding-bottom: 30px;
    border-bottom: 1px solid #1f2937;
}

.footer-grid h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.footer-grid p,
.footer-grid li {
    color: #9ca3af;
}

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

.footer-grid a:hover {
    color: #2dd4bf;
}

.copyright {
    margin: 24px 0 0;
    color: #9ca3af;
    text-align: center;
    font-size: 14px;
}

.empty-state {
    display: none;
    padding: 34px;
    border-radius: 18px;
    color: #4b5563;
    background: #ffffff;
    text-align: center;
}

.empty-state.is-visible {
    display: block;
}

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

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

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

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

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

    .hero-wrap,
    .page-shell {
        width: min(100% - 24px, 1280px);
    }

    .hero-carousel,
    .hero-slide img {
        min-height: 620px;
    }

    .hero-arrow {
        display: none;
    }

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

    .featured-layout,
    .footer-grid,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 42px 74px minmax(0, 1fr);
    }

    .rank-item .btn {
        grid-column: 2 / 4;
    }
}

@media (max-width: 520px) {
    .navbar {
        width: min(100% - 20px, 1280px);
    }

    .logo {
        font-size: 18px;
    }

    .hero-content {
        align-items: flex-end;
        padding: 26px;
    }

    .hero-carousel,
    .hero-slide img {
        min-height: 560px;
        border-radius: 18px;
    }

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

    .poster,
    .movie-grid.compact .poster {
        height: 240px;
    }

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

    .rank-item {
        grid-template-columns: 36px 72px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .player-info,
    .detail-card,
    .sidebar-card {
        padding: 20px;
    }
}
