:root {
    --site-teal: #0d9488;
    --site-cyan: #0891b2;
    --site-blue: #2563eb;
    --site-dark: #0f172a;
    --site-muted: #64748b;
    --site-line: #e2e8f0;
    --site-soft: #f8fafc;
    --site-card: #ffffff;
    --site-radius: 24px;
    --site-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: #0f172a;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 44%, #f8fafc 100%);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, #0d9488 0%, #0891b2 48%, #2563eb 100%);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.header-inner {
    width: min(1220px, calc(100% - 32px));
    min-height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
}

.logo-mark {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    font-weight: 900;
    letter-spacing: -0.05em;
}

.logo-title {
    display: block;
    font-size: 22px;
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.logo-subtitle {
    display: block;
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 12px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.site-nav a,
.mobile-menu a {
    color: #ffffff;
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 14px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.mobile-menu a:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-search {
    position: relative;
}

.header-search input {
    width: 235px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 14px;
    padding: 0 42px 0 16px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    outline: none;
    backdrop-filter: blur(12px);
}

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

.header-search button,
.menu-toggle {
    border: 0;
    cursor: pointer;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 14px;
}

.header-search button {
    position: absolute;
    right: 4px;
    top: 4px;
    width: 34px;
    height: 34px;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    font-size: 22px;
}

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

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

.container {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
}

.main-space {
    padding: 42px 0 72px;
}

.hero-wrap {
    width: min(1220px, calc(100% - 32px));
    margin: 28px auto 58px;
}

.hero-carousel {
    position: relative;
    overflow: hidden;
    min-height: 550px;
    border-radius: 34px;
    background: #0f172a;
    box-shadow: var(--site-shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
    transform: scale(1.02);
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.72) 38%, rgba(15, 23, 42, 0.18) 100%), var(--hero-image);
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 550px;
    display: grid;
    grid-template-columns: 1.02fr 0.72fr;
    gap: 32px;
    align-items: center;
    padding: clamp(28px, 5vw, 72px);
}

.hero-label,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    color: #ccfbf1;
    background: rgba(20, 184, 166, 0.18);
    border: 1px solid rgba(153, 246, 228, 0.26);
    font-size: 13px;
    font-weight: 800;
}

.hero-content h1,
.hero-content h2 {
    max-width: 760px;
    margin: 18px 0 18px;
    color: #ffffff;
    font-size: clamp(36px, 6vw, 70px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-content p {
    max-width: 690px;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

.hero-meta,
.detail-meta,
.card-meta,
.rank-meta,
.library-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

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

.hero-meta span {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.18);
}

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

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

.button {
    color: #ffffff;
    background: linear-gradient(135deg, #14b8a6, #0891b2);
    box-shadow: 0 18px 30px rgba(8, 145, 178, 0.28);
}

.button:hover,
.button-ghost:hover,
.button-soft:hover {
    transform: translateY(-2px);
}

.button-ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.button-soft {
    color: #0f766e;
    background: #ccfbf1;
}

.hero-poster {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

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

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

.hero-controls {
    position: absolute;
    left: clamp(28px, 5vw, 72px);
    bottom: 24px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-control,
.hero-dot {
    border: 0;
    cursor: pointer;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.hero-control {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 22px;
}

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

.hero-dot {
    width: 34px;
    height: 8px;
    border-radius: 999px;
    opacity: 0.55;
}

.hero-dot.is-active {
    opacity: 1;
    background: #14b8a6;
}

.hero-search-panel {
    margin-top: -28px;
    position: relative;
    z-index: 4;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 20px 46px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(16px);
}

.hero-search-panel form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.hero-search-panel input,
.filter-input,
.filter-select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--site-line);
    border-radius: 16px;
    padding: 0 16px;
    color: #0f172a;
    background: #ffffff;
    outline: none;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.quick-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: #0f766e;
    background: #ecfeff;
    font-size: 13px;
    font-weight: 800;
}

.section {
    margin-top: 56px;
}

.section-panel {
    padding: clamp(24px, 4vw, 42px);
    border-radius: 30px;
    background: linear-gradient(135deg, #f0fdfa, #ecfeff);
}

.section-panel.blue {
    background: linear-gradient(135deg, #eff6ff, #ecfeff 50%, #f0fdfa);
}

.section-panel.amber {
    background: linear-gradient(135deg, #fffbeb, #fff7ed);
}

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

.section-head h2,
.page-title h1,
.detail-title h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.04em;
}

.section-head p,
.page-title p,
.detail-title p {
    margin: 8px 0 0;
    color: var(--site-muted);
    line-height: 1.75;
}

.text-link {
    color: var(--site-teal);
    font-weight: 900;
}

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

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

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 22px;
    background: var(--site-card);
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #0f172a;
}

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

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

.play-badge {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.18);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.play-badge span {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(10px);
    font-size: 24px;
}

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

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.card-body p {
    margin: 0 0 14px;
    color: var(--site-muted);
    font-size: 14px;
    line-height: 1.65;
}

.line-clamp-2,
.line-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    -webkit-line-clamp: 3;
}

.card-meta {
    margin-top: auto;
}

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

.horizontal-card {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 18px;
    align-items: stretch;
    padding: 12px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.horizontal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 42px rgba(15, 23, 42, 0.16);
}

.horizontal-card .card-cover {
    border-radius: 18px;
    height: 100%;
}

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

.category-card {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    border-radius: 28px;
    color: #ffffff;
    background: radial-gradient(circle at 30% 10%, rgba(255, 255, 255, 0.32), transparent 24%), linear-gradient(135deg, #0d9488, #0891b2 58%, #2563eb);
    box-shadow: 0 18px 36px rgba(8, 145, 178, 0.18);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 26px 46px rgba(8, 145, 178, 0.25);
}

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

.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.65;
}

.category-card strong {
    margin-top: 20px;
    font-size: 14px;
}

.page-title {
    padding: 52px 0 24px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--site-muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--site-teal);
    font-weight: 800;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 160px 160px;
    gap: 12px;
    margin: 24px 0;
    padding: 16px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 64px 168px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
}

.rank-number {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, #14b8a6, #0891b2);
    font-size: 22px;
    font-weight: 900;
}

.rank-cover {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 18px;
    background: #0f172a;
}

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

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

.rank-info p {
    margin: 0 0 10px;
    color: var(--site-muted);
    line-height: 1.65;
}

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

.library-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 16px 18px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.library-row h2,
.library-row h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.detail-hero {
    padding: 44px 0 42px;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(8, 145, 178, 0.82)), var(--detail-cover);
    background-size: cover;
    background-position: center;
}

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

.detail-poster {
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    aspect-ratio: 16 / 10;
}

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

.detail-title h1 {
    color: #ffffff;
    font-size: clamp(36px, 6vw, 64px);
}

.detail-title p {
    color: #dbeafe;
    font-size: 18px;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
    padding-top: 42px;
}

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

.content-card h2,
.side-card h2 {
    margin: 0 0 16px;
    font-size: 26px;
    letter-spacing: -0.03em;
}

.content-card p {
    margin: 0 0 18px;
    color: #334155;
    line-height: 1.9;
    font-size: 16px;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud span,
.tag-cloud a {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    color: #0f766e;
    background: #ecfeff;
    font-size: 13px;
    font-weight: 800;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #020617;
    box-shadow: var(--site-shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.72));
    transition: opacity 0.25s ease;
}

.player-shell.is-playing .player-overlay {
    opacity: 0;
    pointer-events: none;
}

.player-button {
    width: 88px;
    height: 88px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #14b8a6, #2563eb);
    font-size: 34px;
    cursor: pointer;
    box-shadow: 0 18px 40px rgba(8, 145, 178, 0.34);
}

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

.side-link {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 12px;
    padding: 10px;
    border-radius: 18px;
    background: #f8fafc;
    transition: background 0.2s ease, transform 0.2s ease;
}

.side-link:hover {
    background: #ecfeff;
    transform: translateX(3px);
}

.side-link img {
    width: 92px;
    height: 58px;
    border-radius: 12px;
    object-fit: cover;
}

.side-link strong {
    display: block;
    margin-bottom: 4px;
}

.side-link span {
    color: var(--site-muted);
    font-size: 13px;
}

.search-empty {
    padding: 36px;
    text-align: center;
    color: var(--site-muted);
    border-radius: 24px;
    background: #ffffff;
}

.site-footer {
    margin-top: 72px;
    color: #cbd5e1;
    background: linear-gradient(135deg, #0f172a, #134e4a 52%, #0f172a);
}

.footer-inner {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 28px;
}

.footer-inner h2,
.footer-inner h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.footer-inner p,
.footer-inner a {
    color: #cbd5e1;
    line-height: 1.8;
}

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

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

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

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

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

    .horizontal-list {
        grid-template-columns: 1fr;
    }
}

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

    .logo-title {
        font-size: 18px;
    }

    .logo-subtitle {
        display: none;
    }

    .hero-wrap,
    .container {
        width: min(100% - 24px, 1220px);
    }

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

    .hero-content {
        padding: 24px;
        align-content: center;
    }

    .hero-poster {
        display: none;
    }

    .hero-search-panel form,
    .filter-bar,
    .rank-item,
    .library-row {
        grid-template-columns: 1fr;
    }

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

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

    .rank-cover {
        display: none;
    }

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

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

    .hero-actions {
        display: grid;
    }
}
