:root {
    color-scheme: light;
    --primary: #0d9488;
    --primary-dark: #0f766e;
    --secondary: #06b6d4;
    --accent: #f59e0b;
    --rose: #f43f5e;
    --ink: #1f2937;
    --muted: #64748b;
    --line: #e5e7eb;
    --paper: #ffffff;
    --soft: #f8fafc;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, #0d9488, #06b6d4);
    box-shadow: 0 12px 30px rgba(15, 118, 110, 0.25);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.logo-icon {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #fbbf24;
    color: #0f766e;
    box-shadow: 0 10px 24px rgba(251, 191, 36, 0.35);
    transform: rotate(-8deg);
}

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

.nav-link,
.nav-dropdown > a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    font-weight: 700;
    opacity: 0.94;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.nav-dropdown.is-active > a,
.nav-dropdown:hover > a {
    color: #fde68a;
    opacity: 1;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 190px;
    padding: 8px;
    border-radius: 14px;
    background: #ffffff;
    color: #334155;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    font-weight: 700;
}

.nav-dropdown-menu a:hover {
    background: #ecfeff;
    color: var(--primary-dark);
}

.header-search {
    display: flex;
    align-items: center;
    min-width: 260px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.header-search input {
    min-width: 0;
    width: 100%;
    padding: 11px 14px;
    color: #ffffff;
    background: transparent;
    border: 0;
    outline: 0;
}

.header-search input::placeholder {
    color: rgba(255, 255, 255, 0.82);
}

.header-search button {
    padding: 11px 17px;
    border: 0;
    color: #0f766e;
    background: #ffffff;
    font-weight: 800;
}

.mobile-menu-button {
    display: none;
    margin-left: auto;
    border: 0;
    border-radius: 999px;
    padding: 9px 14px;
    color: #0f766e;
    background: #ffffff;
    font-weight: 800;
}

.mobile-menu {
    display: grid;
    gap: 10px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

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

.mobile-menu a,
.mobile-menu form {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.13);
    font-weight: 700;
}

.mobile-menu form {
    display: flex;
    gap: 8px;
}

.mobile-menu input {
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    color: #0f172a;
}

.mobile-menu button {
    padding: 10px 14px;
    border: 0;
    border-radius: 10px;
    background: #fbbf24;
    color: #0f766e;
    font-weight: 800;
}

.hero-section {
    position: relative;
    min-height: 500px;
    overflow: hidden;
    background: linear-gradient(90deg, #f97316, #ec4899, #f43f5e);
}

.hero-slide {
    display: none;
    min-height: 500px;
    position: relative;
    isolation: isolate;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.56), rgba(244, 63, 94, 0.35)), var(--hero-bg);
    background-position: center;
    background-size: cover;
    filter: saturate(1.05);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.18), transparent 30%), rgba(0, 0, 0, 0.12);
}

.hero-slide.is-active {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 420px;
    align-items: center;
    gap: 46px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0;
}

.hero-copy {
    color: #ffffff;
    max-width: 720px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.17);
    color: #fde68a;
    font-weight: 800;
    letter-spacing: 0.03em;
    backdrop-filter: blur(8px);
}

.hero-copy h1 {
    margin: 18px 0 16px;
    font-size: clamp(38px, 7vw, 68px);
    line-height: 1.02;
    font-weight: 900;
    text-wrap: balance;
}

.hero-copy p {
    max-width: 640px;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(18px, 2.4vw, 24px);
    line-height: 1.75;
}

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

.primary-button,
.ghost-button,
.text-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    background: #ffffff;
    color: #e11d48;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.22);
}

.primary-button:hover,
.ghost-button:hover,
.text-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.18);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(10px);
}

.text-button {
    min-height: 42px;
    color: #ffffff;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.hero-poster {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    border-radius: 28px;
    overflow: hidden;
    background: linear-gradient(135deg, #ccfbf1, #cffafe);
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.35);
    transform: rotate(2deg);
}

.hero-poster::before {
    content: "";
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 22px;
    z-index: 1;
    pointer-events: none;
}

.hero-poster img,
.movie-card-media img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.2s ease;
}

.cover-img.is-missing {
    opacity: 0;
}

.hero-controls {
    position: absolute;
    right: max(16px, calc((100% - 1180px) / 2));
    bottom: 28px;
    z-index: 3;
    display: flex;
    gap: 10px;
}

.hero-controls button {
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    font-size: 22px;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.section,
.page-hero,
.detail-layout,
.category-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.section {
    padding: 56px 0;
}

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

.section-title {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.2;
    font-weight: 900;
    color: #1f2937;
}

.section-kicker {
    color: var(--primary);
    font-weight: 900;
    margin-bottom: 6px;
}

.section-lead {
    margin-top: 8px;
    color: var(--muted);
    line-height: 1.8;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.09);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.16);
}

.movie-card-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #ccfbf1, #cffafe);
}

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

.movie-card-media::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: rgba(15, 23, 42, 0.34);
    transition: opacity 0.25s ease;
}

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

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(13, 148, 136, 0.92);
    box-shadow: 0 12px 30px rgba(13, 148, 136, 0.32);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-mark {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.corner-label,
.rank-badge {
    position: absolute;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

.corner-label {
    top: 10px;
    right: 10px;
    background: #f97316;
}

.rank-badge {
    left: 10px;
    top: 10px;
    background: #0f766e;
}

.movie-card-content {
    padding: 18px;
}

.movie-card-content h3 {
    margin: 0 0 9px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
}

.movie-card-content h3 a:hover {
    color: var(--primary-dark);
}

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

.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 14px;
}

.movie-tags span,
.detail-tags span,
.category-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: #ecfeff;
    color: #0e7490;
    font-size: 12px;
    font-weight: 800;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
}

.movie-meta span {
    padding: 4px 8px;
    border-radius: 8px;
    background: #f1f5f9;
}

.movie-card-wide {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    align-items: stretch;
}

.movie-card-wide .movie-card-media {
    aspect-ratio: auto;
    min-height: 122px;
}

.feature-band {
    background: linear-gradient(90deg, #ecfdf5, #ecfeff);
}

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

.category-card {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border-radius: 22px;
    color: #ffffff;
    background: linear-gradient(135deg, #0d9488, #06b6d4);
    box-shadow: 0 16px 36px rgba(13, 148, 136, 0.22);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:nth-child(2n) {
    background: linear-gradient(135deg, #f97316, #f43f5e);
}

.category-card:nth-child(3n) {
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.18);
}

.category-card strong {
    font-size: 24px;
    font-weight: 900;
}

.category-card span {
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.7;
}

.page-hero {
    margin-top: 34px;
    padding: 46px;
    border-radius: 28px;
    color: #ffffff;
    background: linear-gradient(90deg, #06b6d4, #0d9488, #10b981);
    box-shadow: var(--shadow);
}

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

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

.category-shell {
    padding: 42px 0 64px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 38px 0 0;
}

.pagination a,
.pagination span {
    min-width: 42px;
    padding: 10px 13px;
    border-radius: 12px;
    color: #334155;
    background: #ffffff;
    text-align: center;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
}

.pagination .is-current {
    color: #ffffff;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

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

.player-card,
.detail-card,
.side-card {
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.1);
    overflow: hidden;
}

.player-shell {
    position: relative;
    background: #000000;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.46));
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    cursor: pointer;
}

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

.play-overlay button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 999px;
    padding: 16px 26px;
    color: #0f766e;
    background: #ffffff;
    font-size: 18px;
    font-weight: 900;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
}

.detail-card {
    margin-top: 22px;
    padding: 28px;
}

.detail-card h1 {
    margin: 0 0 18px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.18;
    font-weight: 900;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-weight: 800;
}

.detail-section {
    padding-top: 24px;
    margin-top: 24px;
    border-top: 1px solid var(--line);
}

.detail-section h2 {
    margin: 0 0 12px;
    font-size: 23px;
    font-weight: 900;
}

.detail-section p {
    color: #475569;
    line-height: 1.95;
    font-size: 16px;
}

.detail-section .lead {
    color: #1f2937;
    font-weight: 800;
}

.review-box {
    padding: 20px;
    border-radius: 18px;
    background: linear-gradient(135deg, #fffbeb, #fff7ed);
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.side-card {
    position: sticky;
    top: 92px;
    padding: 20px;
}

.side-card h2 {
    margin: 0 0 18px;
    font-size: 22px;
    font-weight: 900;
}

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

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

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

.related-thumb {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(135deg, #ccfbf1, #cffafe);
}

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

.related-item strong {
    display: -webkit-box;
    margin-bottom: 8px;
    color: #1f2937;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-item span {
    color: #64748b;
    font-size: 13px;
}

.search-panel {
    padding: 24px;
    margin-bottom: 26px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.search-panel form {
    display: flex;
    gap: 12px;
}

.search-panel input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px 16px;
    outline-color: var(--secondary);
}

.search-panel button {
    border: 0;
    border-radius: 14px;
    padding: 0 24px;
    color: #ffffff;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    font-weight: 900;
}

.empty-state {
    padding: 46px 24px;
    border-radius: 24px;
    background: #ffffff;
    color: #64748b;
    text-align: center;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.site-footer {
    color: #cbd5e1;
    background: #0f172a;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 30px;
    padding: 42px 0;
}

.footer-logo {
    color: #ffffff;
    margin-bottom: 12px;
}

.site-footer p {
    max-width: 560px;
    margin: 0;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-content: flex-start;
}

.footer-links a {
    color: #ffffff;
    font-weight: 800;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    text-align: center;
    font-size: 14px;
}

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

    .mobile-menu-button {
        display: inline-flex;
    }

    .hero-slide.is-active {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

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

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

    .side-card {
        position: static;
    }
}

@media (max-width: 760px) {
    .header-inner {
        width: min(100% - 24px, 1180px);
    }

    .site-logo {
        font-size: 20px;
    }

    .hero-section,
    .hero-slide {
        min-height: 560px;
    }

    .hero-slide.is-active {
        padding: 42px 0;
    }

    .hero-actions,
    .section-header,
    .footer-inner,
    .search-panel form {
        flex-direction: column;
        align-items: stretch;
    }

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

    .movie-card-wide {
        grid-template-columns: 120px minmax(0, 1fr);
    }

    .movie-card-content {
        padding: 14px;
    }

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

    .page-hero {
        padding: 32px 24px;
    }

    .detail-card {
        padding: 22px;
    }

    .related-item {
        grid-template-columns: 96px minmax(0, 1fr);
    }
}

@media (max-width: 480px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .movie-card-wide {
        grid-template-columns: 1fr;
    }

    .movie-card-wide .movie-card-media {
        aspect-ratio: 16 / 10;
    }
}
