*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    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;
}

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

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

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: 50;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 1px 12px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    color: #111827;
    white-space: nowrap;
}

.logo-mark {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #ffffff;
    background: linear-gradient(135deg, #059669, #14b8a6);
    box-shadow: 0 10px 24px rgba(5, 150, 105, 0.28);
}

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

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

.nav-links a:hover,
.nav-links a.active {
    color: #059669;
}

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

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: currentColor;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    border-top: 1px solid #e5e7eb;
    padding: 12px 0 16px;
}

.mobile-nav a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: #374151;
    font-weight: 650;
}

.mobile-nav a:hover {
    background: #f3f4f6;
    color: #059669;
}

.hero-carousel {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    background: linear-gradient(135deg, #059669, #0f766e 52%, #0891b2);
}

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

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: overlay;
    opacity: 0.82;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.14));
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 520px;
    display: flex;
    align-items: center;
    max-width: 760px;
    color: #ffffff;
    padding: 72px 0;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
    font-weight: 700;
    backdrop-filter: blur(10px);
}

.hero-content h1 {
    margin: 0 0 18px;
    font-size: clamp(40px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p {
    margin: 0 0 28px;
    max-width: 680px;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
}

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

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

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    color: #047857;
    background: #ffffff;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}

.button-primary:hover {
    background: #f3f4f6;
}

.button-ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
}

.button-ghost:hover {
    background: rgba(255, 255, 255, 0.22);
}

.hero-search {
    display: grid;
    grid-template-columns: 1fr auto;
    width: min(620px, 100%);
    overflow: hidden;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.hero-search input {
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 14px 18px;
    color: #111827;
    background: transparent;
}

.hero-search button {
    border: 0;
    padding: 0 20px;
    color: #ffffff;
    background: #059669;
    font-weight: 800;
}

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

.hero-control:hover {
    background: rgba(255, 255, 255, 0.3);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

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

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

.section {
    padding: 64px 0;
}

.section-soft {
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
}

.section-white {
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
}

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

.section-title {
    margin: 0 0 8px;
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.2;
    color: #111827;
}

.section-desc {
    margin: 0;
    color: #6b7280;
}

.text-link {
    color: #059669;
    font-weight: 800;
}

.grid {
    display: grid;
    gap: 24px;
}

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

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

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

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

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.15);
}

.poster {
    position: relative;
    overflow: hidden;
    background: #d1d5db;
}

.poster-wide {
    aspect-ratio: 16 / 9;
}

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

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

.card:hover .poster img,
.feature-row:hover .poster img,
.rank-card:hover .poster img,
.related-card:hover .poster img {
    transform: scale(1.08);
}

.play-badge {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 34px;
    background: rgba(0, 0, 0, 0);
    opacity: 0;
    transition: opacity 0.25s ease, background 0.25s ease;
}

.card:hover .play-badge,
.feature-row:hover .play-badge,
.rank-card:hover .play-badge,
.related-card:hover .play-badge {
    opacity: 1;
    background: rgba(0, 0, 0, 0.34);
}

.type-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #047857;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.card-body {
    padding: 18px;
}

.card-title {
    margin: 0 0 8px;
    color: #111827;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 800;
}

.card:hover .card-title {
    color: #059669;
}

.card-text {
    margin: 0 0 12px;
    color: #6b7280;
    font-size: 14px;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: #6b7280;
    font-size: 13px;
}

.meta span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
}

.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 0 10px;
    border-radius: 999px;
    color: #047857;
    background: #ecfdf5;
    font-size: 13px;
    font-weight: 750;
}

.category-card {
    display: block;
    padding: 22px;
    border: 2px solid transparent;
    border-radius: 18px;
    text-align: center;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: #a7f3d0;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.category-icon {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #059669, #14b8a6);
}

.category-card h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

.category-card p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.feature-row {
    display: grid;
    grid-template-columns: minmax(280px, 42%) 1fr;
    gap: 28px;
    overflow: hidden;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.feature-row:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.14);
}

.feature-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 26px 28px 26px 0;
}

.feature-content h3 {
    margin: 0 0 12px;
    font-size: 28px;
    line-height: 1.25;
}

.feature-content p {
    margin: 0 0 18px;
    color: #4b5563;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 52px 126px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.rank-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.rank-num {
    color: #059669;
    font-size: 24px;
    font-weight: 900;
    text-align: center;
}

.rank-card .poster {
    border-radius: 14px;
}

.rank-info h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

.rank-info p {
    margin: 0 0 8px;
    color: #6b7280;
    font-size: 14px;
}

.rank-action {
    color: #059669;
    font-weight: 850;
    white-space: nowrap;
}

.page-hero {
    padding: 64px 0;
    color: #ffffff;
    background: linear-gradient(135deg, #064e3b, #059669 52%, #0891b2);
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 52px);
    line-height: 1.12;
}

.page-hero p {
    margin: 0;
    max-width: 760px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 17px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto auto;
    gap: 12px;
    margin-bottom: 28px;
    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%;
    min-height: 44px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 0 14px;
    color: #111827;
    background: #ffffff;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.14);
}

.filter-reset {
    min-height: 44px;
    border: 0;
    border-radius: 12px;
    padding: 0 16px;
    color: #ffffff;
    background: #059669;
    font-weight: 800;
}

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

.movie-card.is-hidden {
    display: none;
}

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

.player-wrap {
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    box-shadow: 0 24px 56px rgba(15, 23, 42, 0.22);
}

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

.movie-player video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #020617;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.22);
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-play-button {
    display: inline-flex;
    width: 76px;
    height: 76px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #047857;
    background: #ffffff;
    font-size: 30px;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24);
}

.detail-card {
    margin-top: 24px;
    padding: 28px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.detail-card h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 5vw, 46px);
    line-height: 1.15;
}

.detail-card h2,
.sidebar h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

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

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

.detail-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.detail-cover-body {
    padding: 18px;
}

.sidebar {
    display: grid;
    gap: 22px;
}

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

.related-card {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.related-card .poster {
    border-radius: 12px;
}

.related-card h3 {
    margin: 0 0 6px;
    font-size: 15px;
    line-height: 1.35;
}

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

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

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
    padding: 48px 0;
}

.site-footer h2,
.site-footer h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.site-footer p,
.site-footer li {
    color: #cbd5e1;
    font-size: 14px;
}

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

.footer-links a:hover {
    color: #6ee7b7;
}

.footer-bottom {
    border-top: 1px solid #1f2937;
    padding: 22px 0;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}

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

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

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

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

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

    .sidebar {
        grid-template-columns: 300px 1fr;
    }
}

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

    .nav-toggle {
        display: inline-block;
    }

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

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

    .hero-control {
        display: none;
    }

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

    .hero-search button {
        min-height: 44px;
    }

    .section-head {
        display: block;
    }

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

    .feature-row {
        grid-template-columns: 1fr;
    }

    .feature-content {
        padding: 0 22px 24px;
    }

    .rank-card {
        grid-template-columns: 42px 92px 1fr;
    }

    .rank-action {
        display: none;
    }

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

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

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

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

    .logo {
        font-size: 20px;
    }

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

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .grid-3,
    .grid-4,
    .grid-5,
    .movie-grid {
        grid-template-columns: 1fr;
    }

    .rank-card {
        grid-template-columns: 38px 84px 1fr;
        gap: 12px;
        padding: 12px;
    }

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