* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #1f2937;
    background: #f8fafc;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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: 100;
    color: #ffffff;
    background: linear-gradient(90deg, #0d9488 0%, #0891b2 100%);
    box-shadow: 0 12px 30px rgba(15, 118, 110, 0.25);
}

.header-inner {
    max-width: 1180px;
    height: 66px;
    margin: 0 auto;
    padding: 0 18px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.brand {
    flex: 0 0 auto;
}

.brand-icon {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    color: #0f766e;
    background: #fcd34d;
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(252, 211, 77, 0.35);
    transition: transform 0.25s ease;
}

.brand:hover .brand-icon {
    transform: rotate(12deg) scale(1.05);
}

.brand-name {
    font-size: 24px;
}

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

.nav-link {
    font-weight: 700;
    opacity: 0.92;
    padding: 22px 0;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fcd34d;
    opacity: 1;
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: 100%;
    left: -20px;
    width: 210px;
    padding: 10px 0;
    color: #1f2937;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.16);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.22s ease;
}

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

.dropdown-panel a {
    display: block;
    padding: 10px 18px;
    font-weight: 650;
    transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-panel a:hover {
    color: #0d9488;
    background: #ecfeff;
}

.header-search {
    position: relative;
    width: 268px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.search-panel input,
.catalog-toolbar input,
.catalog-toolbar select {
    width: 100%;
    border: 0;
    outline: 0;
    border-radius: 999px;
    padding: 11px 16px;
    color: #1f2937;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.header-search button,
.mobile-search button,
.search-panel button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: #ffffff;
    background: #f97316;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.search-panel button:hover {
    transform: translateY(-1px);
    background: #ea580c;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    background: #ffffff;
    border-radius: 2px;
}

.mobile-panel {
    display: none;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 18px 18px;
}

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

.mobile-panel nav {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.mobile-panel nav a {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
}

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

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

.hero {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(90deg, #f97316 0%, #ec4899 50%, #f43f5e 100%);
}

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

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(1.12) contrast(1.04);
    transform: scale(1.04);
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 40%, rgba(255, 255, 255, 0.2), transparent 28%),
        linear-gradient(90deg, rgba(7, 15, 24, 0.92), rgba(12, 24, 35, 0.65) 48%, rgba(244, 63, 94, 0.62));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1180px;
    min-height: 520px;
    margin: 0 auto;
    padding: 76px 18px 58px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.6fr);
    gap: 34px;
    align-items: center;
}

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

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 7px 14px;
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    backdrop-filter: blur(10px);
    font-weight: 800;
}

.hero h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 66px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
    text-shadow: 0 8px 30px rgba(0, 0, 0, 0.26);
}

.hero p {
    max-width: 720px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(18px, 2.5vw, 24px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 22px;
    border: 0;
    border-radius: 999px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    background: #fff7ed;
    box-shadow: 0 20px 42px rgba(255, 255, 255, 0.26);
}

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

.btn-ghost:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.22);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
    aspect-ratio: 3 / 4;
}

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

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(15, 23, 42, 0.78));
}

.hero-poster-title {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
    z-index: 2;
    font-weight: 900;
    font-size: 22px;
}

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

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

.hero-dot.active {
    background: #ffffff;
}

.page-hero,
.category-hero,
.search-hero {
    color: #ffffff;
    background:
        radial-gradient(circle at top right, rgba(252, 211, 77, 0.32), transparent 24%),
        linear-gradient(90deg, #0f766e 0%, #0891b2 100%);
}

.page-hero-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 64px 18px;
}

.page-hero h1,
.category-hero h1,
.search-hero h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.12;
    font-weight: 900;
}

.page-hero p,
.category-hero p,
.search-hero p {
    max-width: 780px;
    margin: 16px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

.section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 54px 18px;
}

.section-soft {
    max-width: none;
    background: linear-gradient(90deg, #ecfdf5 0%, #ecfeff 100%);
}

.section-soft .section {
    padding-top: 54px;
    padding-bottom: 54px;
}

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

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.section-icon {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    color: #ffffff;
    background: #f97316;
    border-radius: 14px;
    box-shadow: 0 12px 26px rgba(249, 115, 22, 0.25);
}

.section-link {
    color: #0d9488;
    font-weight: 900;
}

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

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

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.16);
}

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

.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);
}

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

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

.cover-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 5px 10px;
    color: #ffffff;
    background: #f97316;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(249, 115, 22, 0.28);
}

.cover-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.82);
    border-radius: 999px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.92);
    transition: all 0.25s ease;
    backdrop-filter: blur(8px);
}

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

.movie-card-body {
    padding: 16px;
}

.movie-card h3,
.list-card h3 {
    margin: 0;
    color: #1f2937;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
    transition: color 0.2s ease;
}

.movie-card:hover h3,
.list-card:hover h3 {
    color: #0d9488;
}

.movie-card p,
.list-card p {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 14px;
}

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

.movie-meta span {
    max-width: 100%;
    padding: 4px 9px;
    background: #f1f5f9;
    border-radius: 999px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.list-card {
    display: flex;
    overflow: hidden;
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.list-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 46px rgba(15, 23, 42, 0.14);
}

.list-cover {
    flex: 0 0 210px;
    background: linear-gradient(135deg, #d1fae5, #ccfbf1);
}

.list-cover img {
    width: 100%;
    height: 132px;
    object-fit: cover;
}

.list-content {
    min-width: 0;
    padding: 18px;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 170px;
    padding: 24px;
    color: #ffffff;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.22), transparent 32%),
        linear-gradient(135deg, #0d9488, #0891b2);
    border-radius: 24px;
    box-shadow: 0 18px 42px rgba(13, 148, 136, 0.2);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 60px rgba(13, 148, 136, 0.28);
}

.category-tile h2,
.category-tile h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 900;
}

.category-tile p {
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.84);
}

.rank-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
}

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

.rank-item {
    counter-increment: rank;
    display: grid;
    grid-template-columns: 56px 88px 1fr;
    align-items: center;
    gap: 14px;
    padding: 12px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

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

.rank-thumb {
    overflow: hidden;
    width: 88px;
    height: 58px;
    border-radius: 14px;
    background: #ccfbf1;
}

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

.rank-info h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 900;
    color: #1f2937;
}

.rank-info p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
}

.catalog-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px;
    gap: 12px;
    margin-bottom: 24px;
    padding: 14px;
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.catalog-empty {
    display: none;
    padding: 30px;
    text-align: center;
    color: #64748b;
    background: #ffffff;
    border-radius: 22px;
}

.breadcrumb {
    max-width: 1180px;
    margin: 0 auto;
    padding: 22px 18px 0;
    color: #64748b;
    font-size: 14px;
}

.breadcrumb a {
    color: #0d9488;
    font-weight: 800;
}

.detail-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 18px 60px;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 30px;
    align-items: start;
    margin-bottom: 34px;
}

.player-card {
    position: relative;
    overflow: hidden;
    background: #020617;
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.32);
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.08), rgba(15, 23, 42, 0.42)),
        rgba(15, 23, 42, 0.26);
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-overlay span {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    padding-left: 6px;
    color: #be123c;
    background: #ffffff;
    border-radius: 999px;
    font-size: 34px;
    box-shadow: 0 20px 50px rgba(255, 255, 255, 0.24);
    transition: transform 0.22s ease;
}

.player-overlay:hover span {
    transform: scale(1.08);
}

.detail-side {
    overflow: hidden;
    background: #ffffff;
    border-radius: 28px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.1);
}

.detail-side img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: #ccfbf1;
}

.detail-side-body {
    padding: 20px;
}

.detail-side h1 {
    margin: 0;
    font-size: 30px;
    line-height: 1.18;
    font-weight: 900;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.detail-tags span {
    padding: 6px 10px;
    color: #0f766e;
    background: #ccfbf1;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.detail-copy {
    display: grid;
    gap: 22px;
}

.content-card {
    padding: 28px;
    background: #ffffff;
    border-radius: 28px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.content-card h2 {
    margin: 0 0 12px;
    color: #1f2937;
    font-size: 26px;
    font-weight: 900;
}

.content-card p {
    margin: 0;
    color: #475569;
    font-size: 17px;
}

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

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

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

.compact-card img {
    width: 100%;
    aspect-ratio: 16 / 11;
    object-fit: cover;
    background: #ccfbf1;
}

.compact-card span {
    display: block;
    padding: 11px;
    color: #1f2937;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-panel {
    display: flex;
    gap: 12px;
    max-width: 760px;
    margin-top: 24px;
}

.search-panel input {
    min-height: 52px;
}

.search-results {
    display: grid;
    gap: 22px;
}

.hidden-card {
    display: none !important;
}

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

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

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

    .hero-poster {
        max-width: 320px;
    }

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

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

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

@media (max-width: 760px) {
    .brand-name {
        font-size: 20px;
    }

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

    .hero-content {
        padding-top: 48px;
    }

    .hero-poster {
        display: none;
    }

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

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

    .list-card {
        display: block;
    }

    .list-cover {
        width: 100%;
    }

    .catalog-toolbar,
    .search-panel {
        grid-template-columns: 1fr;
        display: grid;
    }

    .detail-shell {
        padding-top: 18px;
    }

    .detail-side h1 {
        font-size: 26px;
    }

    .content-card {
        padding: 22px;
    }

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

    .rank-item {
        grid-template-columns: 42px 78px 1fr;
    }
}

@media (max-width: 460px) {
    .header-inner {
        height: 60px;
    }

    .brand-icon {
        width: 32px;
        height: 32px;
    }

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

    .hero h1 {
        font-size: 36px;
    }

    .hero p,
    .page-hero p {
        font-size: 16px;
    }
}