:root {
    --pink: #ec4899;
    --red: #ef4444;
    --orange: #f97316;
    --purple: #8b5cf6;
    --blue: #3b82f6;
    --green: #22c55e;
    --dark: #111827;
    --muted: #6b7280;
    --soft: #fff7ed;
    --line: #f3f4f6;
    --shadow: 0 10px 30px rgba(17, 24, 39, 0.10);
    --shadow-strong: 0 25px 55px rgba(17, 24, 39, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--dark);
    background: #fff;
}

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

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

button,
input {
    font: inherit;
}

.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.94);
    box-shadow: 0 4px 18px rgba(17, 24, 39, 0.08);
    backdrop-filter: blur(14px);
}

.header-inner {
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 24px;
    font-weight: 900;
    color: transparent;
    background: linear-gradient(90deg, var(--pink), var(--red));
    background-clip: text;
    -webkit-background-clip: text;
    white-space: nowrap;
}

.brand-icon,
.footer-brand span {
    color: var(--red);
    background: none;
    animation: heartbeat 1.5s ease-in-out infinite;
}

.desktop-nav {
    display: flex;
    gap: 18px;
    align-items: center;
    margin-left: auto;
}

.desktop-nav a {
    font-weight: 700;
    color: #374151;
    transition: color 0.25s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: var(--red);
}

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

.header-search input,
.mobile-search input,
.hero-search-input,
.card-filter {
    width: 100%;
    border: 1px solid #fee2e2;
    border-radius: 999px;
    padding: 10px 16px;
    outline: none;
    background: #fff;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.hero-search-input:focus,
.card-filter:focus {
    border-color: var(--pink);
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.12);
}

.search-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 60;
    background: #fff;
    border-radius: 18px;
    box-shadow: var(--shadow-strong);
    overflow: hidden;
    display: none;
}

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

.search-panel a {
    display: block;
    padding: 11px 14px;
    border-bottom: 1px solid var(--line);
}

.search-panel a:hover {
    background: #fdf2f8;
    color: var(--red);
}

.search-panel small {
    display: block;
    color: var(--muted);
    margin-top: 2px;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    background: transparent;
    font-size: 28px;
    color: #374151;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    padding: 8px 16px 18px;
    border-top: 1px solid var(--line);
    animation: slideDown 0.25s ease-out;
}

.mobile-nav a {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    font-weight: 700;
}

.mobile-nav a:hover {
    color: var(--red);
    background: #fdf2f8;
}

.mobile-search {
    position: relative;
    margin-top: 8px;
}

.hero-section {
    min-height: 650px;
    background: radial-gradient(circle at 20% 20%, rgba(236, 72, 153, 0.22), transparent 32%),
        radial-gradient(circle at 80% 10%, rgba(249, 115, 22, 0.18), transparent 28%),
        linear-gradient(135deg, #ffedd5, #fdf2f8 52%, #f3e8ff);
    padding: 56px 0;
    overflow: hidden;
}

.hero-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 34px;
    align-items: stretch;
}

.hero-slider {
    position: relative;
    min-height: 540px;
    background: rgba(255, 255, 255, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.70);
    box-shadow: var(--shadow-strong);
    border-radius: 32px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 26px;
    padding: 54px;
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    transition: opacity 0.45s ease, transform 0.45s ease;
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.hero-copy {
    align-self: center;
    animation: slideUp 0.5s ease-out;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    color: var(--red);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 8px 20px rgba(236, 72, 153, 0.12);
    margin-bottom: 16px;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.03;
    letter-spacing: -0.05em;
    color: transparent;
    background: linear-gradient(90deg, var(--red), var(--pink), var(--orange));
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    animation: gradient 4s ease infinite;
}

.hero-copy p,
.page-hero p,
.detail-line {
    margin: 0 0 22px;
    color: #4b5563;
    font-size: 17px;
    line-height: 1.85;
}

.hero-tags,
.detail-tags,
.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.detail-tags span,
.movie-tags span,
.movie-meta span,
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
    background: #fff;
    color: #374151;
}

.hero-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    padding: 0 20px;
    font-weight: 900;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.btn.primary {
    color: #fff;
    background: linear-gradient(90deg, var(--pink), var(--red));
    box-shadow: 0 14px 24px rgba(239, 68, 68, 0.22);
}

.btn.soft {
    color: var(--red);
    background: #fff;
    box-shadow: var(--shadow);
}

.btn.ghost {
    color: #111827;
    background: rgba(255, 255, 255, 0.50);
    border: 1px solid rgba(255, 255, 255, 0.70);
}

.hero-poster {
    position: relative;
    min-height: 430px;
    border-radius: 28px;
    overflow: hidden;
    align-self: center;
    transform: rotate(1.5deg);
    box-shadow: var(--shadow-strong);
}

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

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

.hero-glow {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent);
}

.hero-controls {
    position: absolute;
    left: 54px;
    right: 54px;
    bottom: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: auto;
}

.hero-controls button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--red);
    font-size: 26px;
    font-weight: 900;
    box-shadow: var(--shadow);
    cursor: pointer;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px !important;
    height: 10px !important;
    padding: 0;
    background: rgba(255, 255, 255, 0.66) !important;
}

.hero-dot.active {
    width: 28px !important;
    border-radius: 999px !important;
    background: linear-gradient(90deg, var(--pink), var(--red)) !important;
}

.hero-search-card {
    position: relative;
    border-radius: 28px;
    padding: 28px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow);
    align-self: start;
}

.hero-search-card h2 {
    margin: 0 0 10px;
    font-size: 26px;
}

.hero-search-card p {
    color: var(--muted);
    line-height: 1.7;
}

.hero-search-results {
    top: 140px;
}

.quick-links {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.quick-links a {
    display: block;
    padding: 13px 16px;
    border-radius: 16px;
    background: linear-gradient(90deg, #fff, #fff7ed);
    font-weight: 800;
    box-shadow: 0 6px 18px rgba(17, 24, 39, 0.06);
}

.section-block {
    padding: 64px 0;
}

.warm-bg {
    background: linear-gradient(90deg, #ffedd5, #ffe4e6, #fdf2f8);
}

.soft-bg {
    background: linear-gradient(135deg, #fdf2f8, #fff7ed);
}

.section-title,
.toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: space-between;
    margin-bottom: 28px;
}

.section-title h2,
.toolbar h2,
.article-card h2,
.article-side h2 {
    margin: 0;
    font-size: 30px;
    line-height: 1.2;
}

.section-title h2,
.toolbar h2 {
    margin-right: auto;
    color: transparent;
    background: linear-gradient(90deg, var(--red), var(--pink));
    background-clip: text;
    -webkit-background-clip: text;
}

.section-title a {
    color: var(--red);
    font-weight: 900;
}

.title-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--pink), var(--red));
    box-shadow: var(--shadow);
    animation: bounceSlow 2s ease-in-out infinite;
}

.title-icon.blue {
    background: linear-gradient(135deg, var(--blue), var(--purple));
}

.title-icon.orange {
    background: linear-gradient(135deg, var(--orange), var(--red));
}

.title-icon.purple {
    background: linear-gradient(135deg, var(--purple), var(--pink));
}

.title-icon.green {
    background: linear-gradient(135deg, var(--green), var(--blue));
}

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

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

.movie-card {
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-strong);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #f3f4f6;
}

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

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

.cover-gradient {
    position: absolute;
    inset: auto 0 0;
    height: 44%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.70), transparent);
}

.hot-mark {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    background: var(--red);
    animation: bounceSlow 2s ease-in-out infinite;
}

.movie-body {
    padding: 18px;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}

.movie-meta span:first-child,
.rank-badge {
    color: #fff;
    background: linear-gradient(90deg, var(--pink), var(--red));
}

.movie-card h3 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.movie-card h3 a:hover {
    color: var(--red);
}

.movie-card p {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.movie-tags span {
    background: #fdf2f8;
    color: var(--red);
}

.two-column {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 34px;
}

.compact-title h2 {
    font-size: 26px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 42px 64px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 11px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(17, 24, 39, 0.06);
    transition: transform 0.25s ease;
}

.rank-row:hover {
    transform: translateX(6px);
}

.rank-number {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--orange), var(--red));
}

.rank-row img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 14px;
}

.rank-title {
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-heat {
    color: var(--muted);
    font-size: 13px;
}

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

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

.category-card:hover,
.category-overview:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-strong);
}

.category-card span {
    display: block;
    margin-bottom: 10px;
    font-size: 22px;
    font-weight: 900;
    color: var(--red);
}

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

.page-hero,
.detail-hero {
    padding: 64px 0;
    background: linear-gradient(135deg, #fff7ed, #fdf2f8, #f3e8ff);
}

.page-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 34px;
    align-items: center;
}

.feature-strip {
    display: grid;
    gap: 14px;
}

.feature-strip-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow);
}

.feature-strip-card img {
    width: 92px;
    height: 112px;
    border-radius: 16px;
    object-fit: cover;
}

.feature-strip-card span {
    color: var(--muted);
    font-size: 13px;
}

.feature-strip-card strong {
    display: block;
    margin-top: 6px;
    font-size: 18px;
}

.category-overview {
    position: relative;
    min-height: 240px;
    border-radius: 28px;
    overflow: hidden;
    color: #fff;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-overview img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.category-overview:hover img {
    transform: scale(1.08);
}

.category-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.18));
}

.category-overview div {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
}

.category-overview h2 {
    margin: 0 0 8px;
    font-size: 28px;
}

.category-overview p {
    margin: 0;
    line-height: 1.7;
}

.toolbar {
    gap: 18px;
}

.toolbar .card-filter {
    width: min(380px, 100%);
}

.detail-grid {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
    color: #4b5563;
    font-weight: 700;
}

.breadcrumb a {
    color: var(--red);
}

.poster-panel {
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-strong);
    transform: rotate(-1deg);
}

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

.detail-copy h1 {
    font-size: clamp(36px, 5vw, 60px);
}

.detail-tags span {
    background: #fff;
    color: var(--red);
}

.detail-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
}

.detail-stats span {
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    font-weight: 800;
}

.player-section {
    background: #111827;
    padding: 54px 0;
}

.player-wrap {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.32);
}

.movie-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
    justify-content: center;
    color: #fff;
    border: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.18));
    cursor: pointer;
}

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

.play-circle {
    width: 76px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding-left: 5px;
    font-size: 30px;
    color: #fff;
    background: linear-gradient(135deg, var(--pink), var(--red));
    box-shadow: 0 16px 32px rgba(239, 68, 68, 0.28);
}

.player-cover strong {
    font-size: 22px;
}

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

.article-card,
.article-side {
    padding: 28px;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow);
}

.article-card p {
    color: #374151;
    line-height: 1.9;
    font-size: 17px;
}

.article-side dl {
    display: grid;
    gap: 12px;
    margin: 20px 0 0;
}

.article-side dl div {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.article-side dt {
    color: var(--muted);
    font-weight: 800;
}

.article-side dd {
    margin: 0;
    font-weight: 800;
}

.article-side a {
    color: var(--red);
}

.site-footer {
    color: #fff;
    background: linear-gradient(90deg, #111827, #1f2937);
}

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

.site-footer p {
    color: #d1d5db;
    line-height: 1.8;
}

.site-footer h3 {
    margin: 0 0 14px;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a {
    color: #d1d5db;
}

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

.footer-bottom {
    text-align: center;
    color: #d1d5db;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 20px 16px;
    font-size: 14px;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
    75% { transform: scale(1.15); }
}

@keyframes bounceSlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes slideUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    0% { opacity: 0; transform: translateY(-20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
    .hero-shell,
    .page-hero-grid,
    .detail-content-grid,
    .two-column {
        grid-template-columns: 1fr;
    }

    .hero-search-card {
        align-self: stretch;
    }

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

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

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

    .menu-toggle {
        display: block;
    }

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

    .hero-section {
        padding: 28px 0;
        min-height: auto;
    }

    .hero-slider {
        min-height: 720px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 28px;
    }

    .hero-poster {
        min-height: 280px;
        transform: none;
    }

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

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

    .poster-panel {
        max-width: 360px;
        transform: none;
    }

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

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

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

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

    .brand {
        font-size: 21px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 34px;
    }

    .hero-slider {
        min-height: 700px;
        border-radius: 22px;
    }

    .hero-slide {
        padding: 22px;
    }

    .hero-actions,
    .page-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

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

    .rank-row {
        grid-template-columns: 34px 54px minmax(0, 1fr);
    }

    .rank-heat {
        display: none;
    }

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