:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --teal: #0d9488;
    --teal-dark: #0f766e;
    --blue: #2563eb;
    --orange: #ea580c;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    --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;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

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

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

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.94);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
}

.header-inner {
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--teal);
    white-space: nowrap;
}

.logo span:last-child {
    background: linear-gradient(90deg, var(--teal), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--teal), var(--blue));
    color: white;
    box-shadow: 0 10px 20px rgba(13, 148, 136, 0.25);
    -webkit-background-clip: border-box;
    background-clip: border-box;
}

.nav {
    display: flex;
    align-items: center;
    gap: 28px;
    color: #334155;
    font-weight: 650;
}

.nav a {
    transition: color 0.2s ease;
}

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

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

.search-form {
    position: relative;
    width: 260px;
}

.search-form input,
.filter-input,
.filter-select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 10px 16px;
    background: white;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form input {
    padding-left: 42px;
}

.search-form::before {
    content: "⌕";
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-53%);
    color: #94a3b8;
    font-size: 20px;
}

.search-form input:focus,
.filter-input:focus,
.filter-select:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.14);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #f1f5f9;
    color: #0f172a;
}

.hero {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.24), transparent 32%),
        radial-gradient(circle at 84% 20%, rgba(45, 212, 191, 0.25), transparent 28%),
        linear-gradient(135deg, #0d9488 0%, #2563eb 54%, #4338ca 100%);
    color: white;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.16;
    background-image: radial-gradient(circle, rgba(255,255,255,0.8) 1px, transparent 1px);
    background-size: 26px 26px;
}

.hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 120px;
    background: linear-gradient(to top, var(--bg), rgba(248, 250, 252, 0));
}

.hero-inner {
    position: relative;
    z-index: 2;
    min-height: 600px;
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(340px, 0.8fr);
    align-items: center;
    gap: 44px;
    padding: 64px 0 110px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #dbeafe;
    font-weight: 700;
    margin-bottom: 22px;
}

.hero h1 {
    margin: 0;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 680px;
    margin: 22px 0 30px;
    font-size: clamp(17px, 2.2vw, 24px);
    color: #dbeafe;
}

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

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

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

.btn-primary {
    background: white;
    color: var(--teal);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.16);
}

.btn-primary:hover {
    background: #f0fdfa;
}

.btn-outline {
    border-color: rgba(255, 255, 255, 0.9);
    color: white;
    background: transparent;
}

.btn-outline:hover {
    background: white;
    color: var(--teal);
}

.btn-solid {
    background: linear-gradient(90deg, var(--teal), var(--blue));
    color: white;
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.18);
}

.hero-panel {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(18px);
}

.hero-slide {
    display: none;
}

.hero-slide.active {
    display: block;
}

.hero-poster {
    position: relative;
    aspect-ratio: 16 / 11;
    overflow: hidden;
}

.hero-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.84), rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0));
}

.hero-slide-text {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 20px;
}

.hero-slide-text h2 {
    margin: 0 0 8px;
    font-size: 25px;
    line-height: 1.2;
}

.hero-slide-text p {
    margin: 0;
    color: #e0f2fe;
    font-size: 14px;
    line-height: 1.55;
}

.hero-panel-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    padding: 0;
}

.hero-dot.active {
    width: 28px;
    background: white;
}

.feature-strip {
    position: relative;
    z-index: 3;
    margin-top: -70px;
    margin-bottom: 72px;
}

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

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

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.14);
}

.feature-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: white;
    font-size: 24px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--teal), var(--blue));
}

.feature-card:nth-child(2) .feature-icon {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.feature-card:nth-child(3) .feature-icon {
    background: linear-gradient(135deg, #fb923c, #ea580c);
}

.feature-card h2,
.feature-card h3 {
    margin: 0 0 8px;
    font-size: 23px;
}

.feature-card p {
    margin: 0;
    color: var(--muted);
}

.section {
    padding: 72px 0;
}

.section.alt {
    background: #f1f5f9;
}

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

.section-title {
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.section-subtitle {
    margin: 8px 0 0;
    color: var(--muted);
}

.more-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--teal);
    font-weight: 800;
    white-space: nowrap;
}

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

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

.movie-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border-radius: 22px;
    background: white;
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-poster {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
}

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

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

.card-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.12), transparent);
    transition: opacity 0.25s ease;
}

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

.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--teal);
    transform: translate(-50%, -50%) scale(0.72);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

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

.card-label {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 10px;
    background: var(--teal);
    color: white;
    font-size: 12px;
    font-weight: 800;
}

.card-year {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 10px;
    background: rgba(15, 23, 42, 0.68);
    color: white;
    font-size: 12px;
    font-weight: 750;
}

.card-body {
    padding: 18px;
    flex: 1;
}

.card-title {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.32;
    font-weight: 850;
    color: #0f172a;
    transition: color 0.2s ease;
}

.movie-card:hover .card-title {
    color: var(--teal);
}

.card-desc {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    background: #f0fdfa;
    color: var(--teal-dark);
    font-size: 12px;
    font-weight: 750;
}

.tag.gray {
    background: #f1f5f9;
    color: #475569;
}

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

.category-card {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border-radius: 26px;
    padding: 26px;
    color: white;
    background: linear-gradient(135deg, #0d9488, #2563eb);
    box-shadow: var(--soft-shadow);
}

.category-card:nth-child(2n) {
    background: linear-gradient(135deg, #2563eb, #4338ca);
}

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

.category-card::after {
    content: "";
    position: absolute;
    right: -35px;
    bottom: -35px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
}

.category-card h2,
.category-card h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 12px;
    font-size: 24px;
}

.category-card p {
    position: relative;
    z-index: 1;
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.86);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 58px 112px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    padding: 14px;
    border-radius: 22px;
    background: white;
    box-shadow: var(--soft-shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.rank-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.rank-num {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: white;
    font-weight: 900;
    background: linear-gradient(135deg, #0d9488, #2563eb);
}

.rank-thumb {
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 16 / 11;
    background: #e2e8f0;
}

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

.rank-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 850;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-desc {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.page-hero {
    padding: 72px 0;
    background:
        radial-gradient(circle at 15% 30%, rgba(20, 184, 166, 0.18), transparent 34%),
        linear-gradient(135deg, #f8fafc, #eff6ff 52%, #f0fdfa);
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 56px);
    letter-spacing: -0.05em;
    line-height: 1.12;
}

.page-hero p {
    max-width: 760px;
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 18px;
}

.filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 16px;
    margin: 0 0 28px;
    padding: 18px;
    border-radius: 24px;
    background: white;
    box-shadow: var(--soft-shadow);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 26px 0;
    color: #64748b;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--teal-dark);
    font-weight: 750;
}

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

.detail-main,
.detail-side {
    min-width: 0;
}

.player-card,
.detail-card {
    overflow: hidden;
    border-radius: 26px;
    background: white;
    box-shadow: var(--shadow);
}

.player-shell {
    position: relative;
    overflow: hidden;
    background: #020617;
    aspect-ratio: 16 / 9;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    background: rgba(2, 6, 23, 0.26);
    color: white;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-overlay span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--teal);
    font-size: 36px;
    box-shadow: 0 20px 50px rgba(2, 6, 23, 0.28);
}

.detail-content {
    padding: 28px;
}

.detail-content h1 {
    margin: 0 0 14px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.18;
    letter-spacing: -0.04em;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 0 0 20px;
}

.content-section {
    margin-top: 28px;
}

.content-section h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.content-section p {
    margin: 0;
    color: #334155;
    white-space: pre-line;
}

.side-card {
    padding: 22px;
    border-radius: 24px;
    background: white;
    box-shadow: var(--soft-shadow);
    margin-bottom: 20px;
}

.side-card h2,
.side-card h3 {
    margin: 0 0 14px;
    font-size: 22px;
}

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

.side-link {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.side-link img {
    width: 76px;
    height: 52px;
    object-fit: cover;
    border-radius: 13px;
    background: #e2e8f0;
}

.side-link strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.site-footer {
    background: linear-gradient(135deg, #1e293b, #0f172a 56%, #134e4a);
    color: white;
    padding: 54px 0 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
    gap: 30px;
}

.footer-title {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 850;
}

.footer-grid p,
.footer-grid a {
    color: #cbd5e1;
}

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

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

.footer-bottom {
    margin-top: 34px;
    padding-top: 22px;
    border-top: 1px solid rgba(226, 232, 240, 0.18);
    color: #94a3b8;
    font-size: 14px;
    text-align: center;
}

.empty-state {
    display: none;
    padding: 38px;
    border-radius: 24px;
    background: white;
    color: var(--muted);
    box-shadow: var(--soft-shadow);
    text-align: center;
}

.empty-state.show {
    display: block;
}

@media (max-width: 1024px) {
    .hero-inner,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .hero-inner {
        padding-top: 44px;
    }

    .hero-panel {
        max-width: 640px;
    }

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

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

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

    .header-inner {
        height: 62px;
    }

    .nav,
    .header-actions .search-form {
        display: none;
    }

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

    .mobile-panel {
        display: none;
        padding: 0 12px 16px;
        border-top: 1px solid #e2e8f0;
        background: white;
    }

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

    .mobile-panel .nav {
        display: grid;
        gap: 12px;
        padding: 14px 0;
    }

    .mobile-panel .search-form {
        width: 100%;
        display: block;
    }

    .hero,
    .hero-inner {
        min-height: auto;
    }

    .hero-inner {
        gap: 28px;
        padding: 52px 0 100px;
    }

    .feature-grid,
    .movie-grid,
    .movie-grid.compact,
    .category-grid,
    .ranking-list {
        grid-template-columns: 1fr;
    }

    .feature-strip {
        margin-top: -52px;
    }

    .section {
        padding: 52px 0;
    }

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

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

    .rank-item {
        grid-template-columns: 46px 94px minmax(0, 1fr);
        gap: 12px;
    }

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