:root {
    --color-ocean-dark: #0a2540;
    --color-ocean-deep: #061a2d;
    --color-ocean-primary: #1a4d7a;
    --color-ocean-light: #2e6ba8;
    --color-sea-foam: #4fb3bf;
    --color-sand: #f4e8d0;
    --color-coral: #ff6b6b;
    --color-sunset: #ff9f43;
    --color-sky: #74b9ff;
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.68);
    --line-soft: rgba(255, 255, 255, 0.12);
    --panel-soft: rgba(255, 255, 255, 0.08);
    --panel-strong: rgba(10, 37, 64, 0.82);
    --shadow-deep: 0 24px 70px rgba(0, 0, 0, 0.42);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 8% 4%, rgba(79, 179, 191, 0.18), transparent 34%),
        radial-gradient(circle at 90% 0%, rgba(116, 185, 255, 0.14), transparent 28%),
        linear-gradient(180deg, var(--color-ocean-deep), var(--color-ocean-dark) 46%, #071322);
    color: var(--text-main);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid var(--line-soft);
}

.glass-effect {
    background: rgba(10, 37, 64, 0.72);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--line-soft);
}

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

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.logo {
    font-size: clamp(20px, 2vw, 28px);
}

.logo-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--color-sea-foam), var(--color-sky));
    color: #061a2d;
    box-shadow: 0 10px 30px rgba(79, 179, 191, 0.28);
    font-size: 15px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link,
.mobile-link {
    color: rgba(255, 255, 255, 0.78);
    border-radius: 999px;
    transition: color 0.25s ease, background 0.25s ease;
}

.nav-link {
    padding: 10px 16px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: #fff;
    background: rgba(79, 179, 191, 0.16);
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
}

.menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: #fff;
}

.mobile-nav {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(5, 22, 39, 0.92);
}

.mobile-nav.is-open {
    display: grid;
    gap: 8px;
}

.mobile-link {
    display: block;
    padding: 12px 14px;
}

.hero {
    position: relative;
    min-height: 78vh;
    overflow: hidden;
    background: var(--color-ocean-dark);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    align-items: center;
    gap: clamp(24px, 5vw, 68px);
    padding: clamp(84px, 10vw, 128px) max(24px, calc((100vw - 1280px) / 2)) 76px;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.6s ease, transform 1.1s ease;
}

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

.hero-content {
    max-width: 760px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--color-sea-foam);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.04;
    letter-spacing: -0.05em;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.42);
}

.hero-desc,
.page-hero p,
.detail-desc {
    max-width: 720px;
    margin: 20px 0 0;
    color: var(--text-muted);
    font-size: clamp(16px, 2vw, 20px);
}

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

.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.76);
    font-size: 12px;
}

.hero-tags {
    margin-top: 22px;
}

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

.primary-button,
.ghost-button,
.text-button,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.25s ease, background 0.25s ease, border 0.25s ease;
}

.primary-button {
    padding: 13px 22px;
    background: linear-gradient(135deg, var(--color-sea-foam), var(--color-sky));
    color: #051627;
    box-shadow: 0 14px 34px rgba(79, 179, 191, 0.28);
}

.ghost-button {
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.primary-button:hover,
.ghost-button:hover,
.section-link:hover,
.text-button:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-deep);
    aspect-ratio: 2 / 3;
}

.hero-poster img,
.card-poster img,
.detail-poster img,
.category-cover img,
.category-posters img,
.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-poster span {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 12px 16px;
    border-radius: 18px;
    background: rgba(5, 22, 39, 0.72);
    backdrop-filter: blur(12px);
    text-align: center;
    font-weight: 800;
}

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

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

.hero-dot.is-active {
    background: var(--color-sea-foam);
}

.section {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: clamp(48px, 7vw, 88px) 0;
}

.alt-section {
    width: 100%;
    max-width: none;
    padding-left: max(16px, calc((100vw - 1280px) / 2));
    padding-right: max(16px, calc((100vw - 1280px) / 2));
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
    letter-spacing: -0.03em;
}

.section-link,
.text-button {
    color: var(--color-sea-foam);
}

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

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

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.075);
    border: 1px solid var(--line-soft);
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.22);
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    border-color: rgba(79, 179, 191, 0.44);
    box-shadow: 0 22px 62px rgba(0, 0, 0, 0.34);
}

.card-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
}

.card-poster img {
    transition: transform 0.45s ease;
}

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

.card-play,
.rank-mark {
    position: absolute;
    z-index: 2;
}

.card-play {
    right: 12px;
    bottom: 12px;
    padding: 7px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--color-sea-foam), var(--color-sky));
    color: #051627;
    font-size: 12px;
    font-weight: 900;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .card-play {
    opacity: 1;
    transform: translateY(0);
}

.rank-mark {
    top: 12px;
    left: 12px;
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--color-sunset), var(--color-coral));
    color: #fff;
    box-shadow: 0 12px 28px rgba(255, 107, 107, 0.28);
}

.card-body {
    padding: 16px;
}

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

.card-body h3 a:hover {
    color: var(--color-sea-foam);
}

.card-meta,
.card-desc {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}

.card-desc {
    display: -webkit-box;
    min-height: 3.9em;
    margin-top: 10px;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.card-body .tag-list {
    margin-top: 14px;
}

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

.category-tile,
.category-card {
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.075);
    border: 1px solid var(--line-soft);
}

.category-tile {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: 210px;
}

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

.category-posters img,
.category-cover img {
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
}

.category-info,
.category-content {
    padding: 24px;
}

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

.category-info p,
.category-content p {
    margin: 0;
    color: var(--text-muted);
}

.category-card {
    display: grid;
    grid-template-columns: 230px 1fr;
}

.category-cover {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 12px;
}

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0;
}

.mini-links a {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
}

.filter-panel {
    margin-bottom: 24px;
    padding: 18px;
    border-radius: var(--radius-lg);
}

.filter-title {
    margin-bottom: 12px;
    font-weight: 900;
}

.filter-row {
    display: flex;
    gap: 14px;
    align-items: center;
}

.search-input {
    width: min(420px, 100%);
    height: 46px;
    padding: 0 16px;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    outline: 0;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.search-input:focus {
    border-color: rgba(79, 179, 191, 0.72);
    box-shadow: 0 0 0 4px rgba(79, 179, 191, 0.12);
}

.pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-pill {
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.76);
}

.filter-pill.is-active,
.filter-pill:hover {
    background: rgba(79, 179, 191, 0.18);
    color: #fff;
    border-color: rgba(79, 179, 191, 0.44);
}

.page-hero,
.detail-hero {
    width: min(1280px, calc(100% - 32px));
    margin: 34px auto 0;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-deep);
    background-size: cover;
    background-position: center;
}

.page-hero {
    padding: clamp(44px, 6vw, 86px);
}

.compact-hero {
    background:
        radial-gradient(circle at 86% 18%, rgba(116, 185, 255, 0.22), transparent 32%),
        linear-gradient(135deg, rgba(10, 37, 64, 0.95), rgba(26, 77, 122, 0.58));
}

.detail-hero {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: clamp(24px, 5vw, 58px);
    align-items: center;
    padding: clamp(28px, 5vw, 58px);
}

.detail-poster {
    overflow: hidden;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-deep);
    aspect-ratio: 2 / 3;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--color-sea-foam);
}

.detail-line {
    margin: 14px 0 0;
    color: var(--color-sand);
    font-weight: 700;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #000;
    box-shadow: var(--shadow-deep);
    aspect-ratio: 16 / 9;
}

.video-player {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 18px;
    border: 0;
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    isolation: isolate;
}

.player-cover img {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.player-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(5, 22, 39, 0.24), rgba(5, 22, 39, 0.72));
}

.player-cover.is-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.play-ring {
    width: 84px;
    height: 84px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-sea-foam), var(--color-sky));
    box-shadow: 0 16px 44px rgba(79, 179, 191, 0.36);
}

.play-ring span {
    width: 0;
    height: 0;
    margin-left: 6px;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 24px solid #061a2d;
}

.player-cover strong {
    font-size: 22px;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.48);
}

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

.article-card {
    padding: clamp(22px, 3vw, 34px);
    border-radius: var(--radius-xl);
}

.article-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.article-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 17px;
}

.site-footer {
    margin-top: 36px;
    padding: 48px max(16px, calc((100vw - 1280px) / 2)) 24px;
    background: rgba(5, 22, 39, 0.82);
    border-top: 1px solid var(--line-soft);
}

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

.footer-logo {
    margin-bottom: 14px;
    font-size: 20px;
}

.site-footer p,
.footer-bottom {
    color: rgba(255, 255, 255, 0.58);
}

.site-footer h2 {
    margin: 0 0 12px;
    font-size: 18px;
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.62);
}

.footer-links a:hover {
    color: var(--color-sea-foam);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 34px;
    padding-top: 18px;
    border-top: 1px solid var(--line-soft);
    font-size: 14px;
}

[hidden] {
    display: none !important;
}

@media (max-width: 1120px) {
    .movie-grid,
    .all-grid,
    .ranking-grid,
    .ranking-strip,
    .related-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

@media (max-width: 820px) {
    .desktop-nav {
        display: none;
    }

    .menu-button {
        display: block;
    }

    .hero {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 92px 16px 70px;
    }

    .hero-poster {
        width: min(220px, 56vw);
        justify-self: center;
    }

    .section-head,
    .filter-row,
    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .movie-grid,
    .all-grid,
    .ranking-grid,
    .ranking-strip,
    .related-grid,
    .category-grid,
    .category-list-grid,
    .content-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .detail-poster {
        width: min(260px, 70vw);
    }
}

@media (max-width: 540px) {
    .movie-grid,
    .all-grid,
    .ranking-grid,
    .ranking-strip,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .card-body {
        padding: 12px;
    }

    .card-body h3 {
        font-size: 15px;
    }

    .card-desc,
    .card-body .tag-list {
        display: none;
    }

    .page-hero,
    .detail-hero {
        width: calc(100% - 20px);
        margin-top: 18px;
        border-radius: 20px;
    }
}
