:root {
    --primary: #0f766e;
    --primary-soft: #ccfbf1;
    --accent: #0891b2;
    --dark: #0f172a;
    --text: #1f2937;
    --muted: #64748b;
    --line: #e2e8f0;
    --card: #ffffff;
    --bg: #f8fafc;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    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.96);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.06);
}

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
}

.logo-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(8, 145, 178, 0.28);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.logo-text strong {
    font-size: 21px;
    color: var(--dark);
    letter-spacing: -0.03em;
}

.logo-text em {
    font-size: 12px;
    color: var(--muted);
    font-style: normal;
}

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

.nav-links a {
    font-weight: 700;
    color: #475569;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    background: #f1f5f9;
    border-radius: 999px;
}

.header-search input {
    width: 190px;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 8px 10px;
    color: var(--dark);
}

.header-search button,
.primary-btn,
.ghost-btn,
.search-page-form button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.primary-btn,
.search-page-form button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 12px 22px rgba(8, 145, 178, 0.18);
}

.header-search button {
    padding: 8px 16px;
}

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
}

.ghost-btn {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.12);
}

.primary-btn:hover,
.ghost-btn:hover,
.header-search button:hover,
.search-page-form button:hover {
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--dark);
    background: #ffffff;
}

.hero-carousel {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-slide > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.08);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 75% 35%, rgba(20, 184, 166, 0.35), transparent 34%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.78) 42%, rgba(15, 23, 42, 0.25) 100%);
}

.hero-content {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: center;
    gap: 54px;
    min-height: 680px;
    padding-top: 64px;
    padding-bottom: 64px;
    color: #ffffff;
}

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

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy .eyebrow {
    color: #99f6e4;
}

.hero-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 74px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero-copy p {
    margin: 0;
    max-width: 650px;
    color: #dbeafe;
    font-size: 19px;
    line-height: 1.8;
}

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

.hero-tags {
    margin: 24px 0 28px;
}

.hero-tags span,
.detail-tags span,
.movie-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    color: #0f766e;
    background: #ccfbf1;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

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

.hero-poster {
    position: relative;
    display: block;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
    aspect-ratio: 3 / 4;
    transform: rotate(2deg);
}

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

.hero-poster span {
    position: absolute;
    right: 18px;
    bottom: 18px;
    padding: 8px 16px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.78);
    border-radius: 999px;
    font-weight: 800;
}

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

.hero-dot {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
}

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

.stats-section {
    margin-top: -42px;
    position: relative;
    z-index: 2;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-card {
    padding: 28px;
    color: var(--dark);
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-card strong {
    display: block;
    font-size: 36px;
    color: var(--primary);
}

.stat-card span {
    color: var(--muted);
    font-weight: 700;
}

.section-block {
    padding: 76px 0;
    background: #ffffff;
}

.section-light {
    background: #f1f5f9;
}

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

.section-heading h2,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    color: var(--dark);
    letter-spacing: -0.04em;
}

.section-heading h2 {
    font-size: clamp(28px, 4vw, 42px);
}

.section-heading a {
    color: var(--primary);
    font-weight: 900;
}

.section-heading-dark h2,
.section-heading-dark a {
    color: #ffffff;
}

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

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

.category-tile {
    position: relative;
    min-height: 220px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    overflow: hidden;
    color: #ffffff;
    border-radius: var(--radius);
    box-shadow: 0 15px 34px rgba(15, 23, 42, 0.12);
}

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

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.86));
}

.category-tile span,
.category-tile p {
    position: relative;
    z-index: 1;
}

.category-tile span {
    font-size: 22px;
    font-weight: 900;
}

.category-tile p {
    margin: 8px 0 0;
    color: #e2e8f0;
    font-size: 13px;
    line-height: 1.65;
}

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

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

.movie-card {
    overflow: hidden;
    background: var(--card);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0f172a;
}

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

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

.movie-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 46px;
    background: rgba(15, 23, 42, 0.15);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.movie-card:hover .movie-play {
    opacity: 1;
}

.movie-year {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.76);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.movie-info {
    padding: 18px;
}

.movie-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 9px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
}

.movie-info h3 {
    margin: 0 0 9px;
    color: var(--dark);
    font-size: 18px;
    line-height: 1.35;
}

.movie-info h3 a:hover {
    color: var(--primary);
}

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

.movie-card-compact .movie-info p {
    min-height: 0;
}

.rank-strip {
    padding: 76px 0;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #134e4a 55%, #0e7490);
}

.rank-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.rank-grid a {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 4px 12px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
}

.rank-grid span {
    grid-row: span 2;
    color: #99f6e4;
    font-weight: 900;
}

.rank-grid strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-grid em {
    color: #cbd5e1;
    font-style: normal;
    font-size: 13px;
}

.page-hero {
    color: #ffffff;
    background: radial-gradient(circle at 74% 25%, rgba(20, 184, 166, 0.42), transparent 30%), linear-gradient(135deg, #0f172a, #0f766e);
}

.small-hero {
    padding: 72px 0;
}

.page-hero h1 {
    color: #ffffff;
    font-size: clamp(36px, 5vw, 58px);
}

.page-hero p:not(.section-kicker) {
    max-width: 780px;
    margin: 16px 0 0;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

.filter-panel {
    position: sticky;
    top: 76px;
    z-index: 20;
    background: rgba(248, 250, 252, 0.96);
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
    backdrop-filter: blur(14px);
}

.filter-inner {
    display: flex;
    gap: 14px;
    padding: 18px 0;
}

.filter-inner input,
.filter-inner select {
    border: 1px solid var(--line);
    outline: 0;
    background: #ffffff;
    border-radius: 16px;
    padding: 13px 16px;
}

.filter-inner input {
    flex: 1;
}

.search-page-form button {
    padding: 0 24px;
}

.ranking-list {
    display: grid;
    gap: 18px;
}

.rank-card {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 18px;
    align-items: stretch;
}

.rank-number {
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 20px;
    font-size: 24px;
    font-weight: 900;
}

.rank-card .movie-card {
    display: grid;
    grid-template-columns: 260px 1fr;
}

.rank-card .movie-cover {
    aspect-ratio: auto;
    min-height: 170px;
}

.detail-hero {
    padding: 36px 0 70px;
    color: #ffffff;
    background: radial-gradient(circle at 84% 20%, rgba(20, 184, 166, 0.35), transparent 31%), linear-gradient(135deg, #0f172a, #134e4a);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    color: #cbd5e1;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #99f6e4;
}

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

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    aspect-ratio: 3 / 4;
    box-shadow: var(--shadow);
}

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

.detail-copy h1 {
    color: #ffffff;
    font-size: clamp(34px, 5vw, 62px);
}

.detail-intro {
    max-width: 850px;
    margin: 18px 0 24px;
    color: #dbeafe;
    font-size: 19px;
    line-height: 1.85;
}

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

.detail-meta div {
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 16px;
}

.detail-meta dt {
    color: #99f6e4;
    font-size: 12px;
    font-weight: 900;
}

.detail-meta dd {
    margin: 5px 0 0;
    color: #ffffff;
}

.player-section {
    padding: 58px 0;
    background: #0f172a;
}

.player-section h2 {
    margin: 0 0 18px;
    color: #ffffff;
    font-size: 28px;
}

.player-box {
    position: relative;
    overflow: hidden;
    background: #000000;
    border-radius: 28px;
    aspect-ratio: 16 / 9;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.72));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-overlay button {
    width: 82px;
    height: 82px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 18px 40px rgba(8, 145, 178, 0.38);
    font-size: 34px;
    cursor: pointer;
}

.player-overlay strong {
    font-size: 28px;
}

.player-overlay span {
    color: #cbd5e1;
}

.article-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 34px;
}

.article-grid article,
.article-grid aside {
    padding: 30px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.article-grid h2 {
    margin: 0 0 14px;
    color: var(--dark);
    font-size: 26px;
}

.article-grid p {
    margin: 0 0 24px;
    color: #475569;
    font-size: 17px;
    line-height: 2;
}

.side-links {
    display: grid;
    gap: 12px;
}

.side-links a {
    display: grid;
    gap: 4px;
    padding: 14px;
    background: #f8fafc;
    border-radius: 16px;
}

.side-links span {
    color: var(--dark);
    font-weight: 900;
}

.side-links em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

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

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

.footer-logo {
    display: inline-flex;
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
}

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

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

.site-footer ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer a:hover {
    color: #99f6e4;
}

.footer-bottom {
    padding: 18px;
    text-align: center;
    color: #94a3b8;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

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

.empty-state {
    grid-column: 1 / -1;
    padding: 40px;
    color: var(--muted);
    text-align: center;
    background: #ffffff;
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

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

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

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

    .hero-poster {
        display: none;
    }

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

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

    .header-inner {
        min-height: 66px;
    }

    .nav-links {
        position: fixed;
        left: 12px;
        right: 12px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px;
        background: #ffffff;
        border: 1px solid var(--line);
        border-radius: 20px;
        box-shadow: var(--shadow);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 12px;
        border-radius: 14px;
    }

    .nav-links a:hover,
    .nav-links a.active {
        background: #f0fdfa;
    }

    .menu-toggle {
        display: inline-grid;
        place-items: center;
        margin-left: auto;
    }

    .logo-text strong {
        font-size: 18px;
    }

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

    .hero-content {
        padding-top: 42px;
        padding-bottom: 84px;
    }

    .hero-copy h1 {
        font-size: 38px;
    }

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

    .stats-section {
        margin-top: 0;
        padding-top: 18px;
        background: #ffffff;
    }

    .stats-grid,
    .category-grid,
    .category-grid-large,
    .movie-grid,
    .rank-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .section-block,
    .rank-strip {
        padding: 48px 0;
    }

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

    .filter-panel {
        top: 66px;
    }

    .filter-inner {
        flex-direction: column;
    }

    .rank-card,
    .rank-card .movie-card,
    .detail-layout,
    .detail-meta {
        grid-template-columns: 1fr;
    }

    .rank-number {
        min-height: 58px;
    }

    .detail-poster {
        max-width: 270px;
    }

    .player-overlay strong {
        font-size: 20px;
    }
}
