:root {
    --dawn-50: #fff7ed;
    --dawn-100: #ffedd5;
    --dawn-300: #ffd699;
    --dawn-400: #ffc56b;
    --dawn-500: #ffb347;
    --dawn-600: #ff9f24;
    --dawn-700: #f58700;
    --morning-50: #f0f9ff;
    --morning-500: #0d96f8;
    --morning-600: #0276d4;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--gray-900);
    background: linear-gradient(180deg, var(--gray-50), var(--white));
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(6px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.header-inner {
    max-width: 1280px;
    height: 64px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--dawn-600);
}

.brand-text {
    font-size: 21px;
    white-space: nowrap;
}

.brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--dawn-500), var(--morning-500));
    box-shadow: 0 8px 18px rgba(255, 159, 36, 0.28);
}

.brand-mark span {
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 11px solid #fff;
    margin-left: 3px;
}

.desktop-nav,
.mobile-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

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

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

.header-search {
    position: relative;
    width: 260px;
}

.search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    pointer-events: none;
}

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 1px solid var(--gray-300);
    border-radius: 999px;
    padding: 10px 16px;
    color: var(--gray-800);
    background: #fff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    padding-left: 38px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--dawn-500);
    box-shadow: 0 0 0 3px rgba(255, 179, 71, 0.22);
}

.mobile-menu-button {
    display: none;
    border: 0;
    background: transparent;
    color: var(--gray-700);
    font-size: 26px;
    line-height: 1;
    padding: 8px;
}

.mobile-panel {
    border-top: 1px solid var(--gray-200);
    padding: 16px;
    background: #fff;
}

.mobile-panel[hidden] {
    display: none;
}

.mobile-search {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.mobile-search button,
.primary-button,
.secondary-button,
.player-button,
.filter-button {
    border: 0;
    border-radius: 999px;
    padding: 11px 20px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.player-button,
.filter-button {
    color: #fff;
    background: var(--dawn-600);
    box-shadow: 0 10px 26px rgba(255, 159, 36, 0.28);
}

.primary-button:hover,
.player-button:hover,
.filter-button:hover {
    transform: translateY(-1px);
    background: var(--dawn-700);
}

.secondary-button {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.32);
}

.secondary-button:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.26);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}

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

.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-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.44), rgba(0, 0, 0, 0.04));
}

.hero-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 16px 64px;
    color: #fff;
}

.hero-content h1 {
    max-width: 850px;
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 66px);
    line-height: 1.05;
    font-weight: 850;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 760px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.7;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.hero-meta span,
.detail-meta span,
.card-meta span,
.tag-list span,
.rank-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-meta span:first-child,
.card-meta span:first-child,
.detail-meta span:first-child {
    color: #fff;
    background: var(--dawn-500);
    padding: 5px 11px;
}

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

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

.hero-dot {
    width: 34px;
    height: 5px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.45);
    padding: 0;
}

.hero-dot.is-active {
    background: var(--dawn-500);
}

.main-section {
    padding: 48px 0;
}

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

.section-heading h2 {
    margin: 0;
    color: var(--gray-900);
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--gray-600);
    line-height: 1.7;
}

.section-link {
    color: var(--dawn-600);
    font-weight: 800;
    white-space: nowrap;
}

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

.movie-card {
    display: block;
    min-width: 0;
}

.movie-card figure {
    position: relative;
    aspect-ratio: 3 / 4;
    margin: 0 0 12px;
    border-radius: 18px;
    overflow: hidden;
    background: var(--gray-200);
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.25s ease;
}

.movie-card figure::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.62), transparent 56%);
    transition: opacity 0.25s ease;
}

.movie-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.movie-card:hover figure {
    box-shadow: var(--shadow-card-hover);
}

.movie-card:hover figure::after {
    opacity: 1;
}

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

.year-badge {
    position: absolute;
    right: 12px;
    top: 12px;
    z-index: 2;
    border-radius: 7px;
    padding: 4px 8px;
    color: #fff;
    background: var(--dawn-600);
    font-size: 13px;
    font-weight: 800;
}

.play-hover {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 2;
    transform: translateY(130%);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    transition: transform 0.25s ease;
}

.movie-card:hover .play-hover {
    transform: translateY(0);
}

.movie-card h3 {
    display: -webkit-box;
    margin: 0 0 6px;
    overflow: hidden;
    color: var(--gray-900);
    font-size: 17px;
    line-height: 1.35;
    font-weight: 800;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

.movie-card:hover h3 {
    color: var(--dawn-600);
}

.movie-card p {
    display: -webkit-box;
    min-height: 42px;
    margin: 0 0 10px;
    overflow: hidden;
    color: var(--gray-600);
    line-height: 1.55;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.card-meta span {
    color: var(--gray-600);
    background: var(--gray-100);
    padding: 4px 8px;
}

.movie-card.compact figure {
    border-radius: 14px;
    margin-bottom: 8px;
}

.movie-card.compact figure span {
    position: absolute;
    right: 8px;
    top: 8px;
    color: #fff;
    background: var(--dawn-600);
    border-radius: 6px;
    padding: 3px 7px;
    font-size: 12px;
    font-weight: 800;
}

.movie-card.compact h3 {
    font-size: 15px;
    -webkit-line-clamp: 1;
}

.movie-card.compact p {
    min-height: 0;
    margin: 0;
    color: var(--gray-500);
}

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

.category-card {
    display: block;
    padding: 24px;
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover);
}

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

.category-card p {
    margin: 0;
    color: var(--gray-600);
    line-height: 1.7;
}

.page-hero {
    color: #fff;
    background: linear-gradient(90deg, var(--dawn-500), var(--morning-500));
    padding: 62px 0;
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(34px, 4vw, 52px);
    line-height: 1.15;
}

.page-hero p {
    max-width: 820px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 19px;
    line-height: 1.75;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-card);
}

.filter-button {
    width: 100%;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 54px 88px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
}

.rank-number {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(135deg, var(--dawn-500), var(--dawn-700));
    font-weight: 900;
}

.rank-cover {
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    overflow: hidden;
    background: var(--gray-200);
}

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

.rank-item h2,
.rank-item h3 {
    margin: 0 0 8px;
    font-size: 19px;
}

.rank-item p {
    display: -webkit-box;
    margin: 0 0 9px;
    overflow: hidden;
    color: var(--gray-600);
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rank-meta span {
    padding: 4px 8px;
    color: var(--gray-600);
    background: var(--gray-100);
}

.detail-hero {
    padding: 40px 0;
    background: radial-gradient(circle at top left, rgba(255, 179, 71, 0.28), transparent 32%), linear-gradient(180deg, #101827, #111827);
    color: #fff;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: start;
}

.poster-card {
    border-radius: 22px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.26);
}

.poster-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

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

.breadcrumb a:hover {
    color: var(--dawn-300);
}

.detail-copy h1 {
    margin: 0 0 16px;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.detail-copy .lead {
    max-width: 860px;
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 19px;
    line-height: 1.75;
}

.detail-meta,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0;
}

.detail-meta span,
.tag-list span {
    padding: 5px 10px;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.12);
}

.player-section {
    padding: 44px 0 0;
    background: var(--gray-50);
}

.player-shell {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 24px 56px rgba(17, 24, 39, 0.24);
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.1));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
}

.player-button {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    font-size: 18px;
}

.content-card {
    margin-top: 28px;
    border-radius: 22px;
    padding: 28px;
    background: #fff;
    box-shadow: var(--shadow-card);
}

.content-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.content-card p {
    margin: 0 0 16px;
    color: var(--gray-700);
    line-height: 1.85;
}

.content-card p:last-child {
    margin-bottom: 0;
}

.search-empty {
    display: none;
    text-align: center;
    padding: 64px 20px;
    color: var(--gray-500);
}

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

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 46px 16px 24px;
}

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

.footer-brand {
    color: var(--dawn-400);
    font-size: 18px;
    margin-bottom: 14px;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 17px;
}

.site-footer p {
    margin: 0;
    color: var(--gray-400);
    line-height: 1.7;
}

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

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

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

.footer-bottom {
    margin-top: 34px;
    padding-top: 22px;
    border-top: 1px solid var(--gray-800);
    font-size: 14px;
}

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

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

    .filter-bar {
        grid-template-columns: 1.4fr 0.8fr 0.8fr auto;
        align-items: center;
    }
}

@media (min-width: 900px) {
    .hero {
        height: 70vh;
        min-height: 560px;
    }

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

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

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

@media (min-width: 1180px) {
    .movie-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

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

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

    .mobile-menu-button {
        display: block;
    }

    .mobile-nav {
        display: grid;
        gap: 8px;
        align-items: stretch;
    }

    .mobile-nav .nav-link {
        display: block;
        padding: 10px 0;
    }

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

    .rank-item {
        grid-template-columns: 42px 72px 1fr;
        gap: 12px;
    }
}

@media (max-width: 560px) {
    .hero {
        min-height: 520px;
    }

    .hero-content {
        padding-bottom: 58px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .primary-button,
    .secondary-button {
        text-align: center;
    }

    .movie-grid {
        gap: 16px;
    }

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

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