/*
 * Изумрудный стиль трекера на всём сайте (подключается последним, после стилей страниц).
 * Названия, разметка и логика страниц не меняются — только палитра, фон, карточки и движение.
 * 60 FPS: анимируются ТОЛЬКО transform и opacity.
 */

:root {
    --bg-color: #040c09;
    --surface-color: rgba(9, 28, 21, 0.72);
    --surface-color-raised: #0b2219;
    --glass-color: rgba(4, 12, 9, 0.62);
    --border-color: rgba(45, 212, 191, 0.16);
    --pill-bg: rgba(4, 12, 9, 0.62);
    --pill-border: rgba(45, 212, 191, 0.26);
    --text-color-emphasis: #10b981;
    --text-color-emphasis-secondary: rgba(16, 185, 129, 0.8);
    --accent-gradient: linear-gradient(180deg, #10b981 0%, #34d399 150%);
    --em-card-radius: 16px;
}

/* ---------- фон: #040c09 → #081c15 и мягкое изумрудное свечение сверху ---------- */

html,
body {
    background-color: #040c09;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(1100px 520px at 50% -160px, rgba(16, 185, 129, 0.24), rgba(16, 185, 129, 0) 70%),
        radial-gradient(700px 380px at 92% 8%, rgba(45, 212, 191, 0.08), rgba(45, 212, 191, 0) 70%),
        linear-gradient(180deg, #040c09 0%, #081c15 100%);
}

#particles {
    opacity: 1;
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
#particles.is-paused,
#particles.is-off {
    opacity: 0;
}

/* ---------- карточки ---------- */

.cm-card,
.glass-card {
    background: rgba(9, 28, 21, 0.72);
    border: 1px solid rgba(45, 212, 191, 0.16);
    border-radius: var(--em-card-radius);
}

/* ---------- катакана за заголовками разделов ---------- */

.ab-glyph {
    position: absolute;
    top: -0.28em;
    right: 0.1em;
    z-index: 0;
    font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
    font-size: clamp(64px, 9vw, 150px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.02em;
    color: transparent;
    -webkit-text-stroke: 1px rgba(16, 185, 129, 0.08);
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
}
.ab-glyph_left { right: auto; left: -0.05em; }
.ab-glyph ~ *,
.ab-glyph + * { z-index: 1; }
.ab-credits .ab-glyph { font-size: 92px; top: -14px; }
.pp-portfolio .ab-glyph { font-size: 110px; top: -22px; }
.sr-hero .ab-glyph,
.wp-top .ab-glyph { top: 50%; transform: translate3d(0, -50%, 0); }
.wp-top { position: relative; overflow: hidden; }
.now-watch { overflow: visible; }

/* ---------- плавное появление (stagger) ---------- */

.em-reveal-on .em-pending {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
}
.em-reveal-on .em-in {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition:
        opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1) var(--em-delay, 0ms),
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1) var(--em-delay, 0ms);
}

/* ---------- 3D-постеры: подъём, неоновая рамка и стеклянная плашка ---------- */

.release__card-body {
    border-radius: var(--em-card-radius);
    transform: translate3d(0, 0, 0);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}
.release__card-body::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
    box-shadow:
        inset 0 0 0 1px rgba(52, 211, 153, 0.85),
        0 0 18px rgba(16, 185, 129, 0.45),
        0 14px 34px rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}
.release__card:hover .release__card-body,
.release__card-link:focus-visible .release__card-body {
    transform: translate3d(0, -6px, 0) scale(1.02);
}
.release__card:hover .release__card-body::after,
.release__card-link:focus-visible .release__card-body::after {
    opacity: 1;
}
/* затемнение постера — прозрачностью слоя, а не filter */
.release__card:hover .release__card-poster {
    filter: none;
    transform: scale(1.04);
}
.release__card-body::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(0deg, rgba(4, 12, 9, 0.88) 0%, rgba(4, 12, 9, 0.25) 55%, rgba(4, 12, 9, 0) 100%);
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}
.release__card:hover .release__card-body::before { opacity: 1; }
.release__card-effect-content { display: none; }
.release__card-pills { z-index: 2; transition: opacity 0.25s ease; }
.release__card:hover .release__card-pills { opacity: 0; }

.rc-glass {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    z-index: 4;
    display: grid;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(45, 212, 191, 0.3);
    background: rgba(6, 22, 16, 0.82);
    opacity: 0;
    transform: translate3d(0, 10px, 0);
    transition:
        opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}
.release__card:hover .rc-glass,
.release__card-link:focus-visible .rc-glass {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}
.rc-glass__play {
    display: block;
    padding: 7px 10px;
    border-radius: 9px;
    background: linear-gradient(135deg, #10b981, #0d9488);
    color: #fff;
    font-size: 0.86rem;
    font-weight: 700;
    text-align: center;
}
.rc-glass__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    color: #d1fae5;
}
.rc-glass__rating { color: #fde68a; font-weight: 700; }
.rc-glass__voice {
    padding: 1px 8px;
    border-radius: 999px;
    border: 1px solid rgba(45, 212, 191, 0.35);
    background: rgba(16, 185, 129, 0.14);
}
.release__card:hover .release__card-title { color: #34d399; }

@media (hover: none) {
    .rc-glass { display: none; }
}

/* ---------- переключатель атмосферы ---------- */

.atmo {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 900;
}
.atmo__btn {
    list-style: none;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(45, 212, 191, 0.3);
    background: rgba(6, 22, 16, 0.86);
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.atmo__btn::-webkit-details-marker { display: none; }
.atmo__btn:hover { transform: translate3d(0, -2px, 0); }
.atmo__menu {
    position: absolute;
    left: 0;
    bottom: 52px;
    display: grid;
    gap: 4px;
    min-width: 220px;
    padding: 8px;
    border-radius: 14px;
    border: 1px solid rgba(45, 212, 191, 0.22);
    background: rgba(6, 20, 15, 0.96);
    animation: em-pop-in 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes em-pop-in {
    from { opacity: 0; transform: translate3d(0, 8px, 0) scale(0.98); }
    to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
.atmo__item {
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: #d1fae5;
    text-align: left;
    cursor: pointer;
}
.atmo__item:hover { background: rgba(16, 185, 129, 0.1); }
.atmo__item.is-active { border-color: rgba(52, 211, 153, 0.5); background: rgba(16, 185, 129, 0.16); }
.atmo__note { padding: 4px 6px 0; font-size: 0.72rem; color: rgba(209, 250, 229, 0.55); }
@media (max-width: 640px) {
    .atmo { left: 10px; bottom: 76px; }
    .atmo__btn { width: 36px; height: 36px; font-size: 0.95rem; }
}

@media (prefers-reduced-motion: reduce) {
    .em-reveal-on .em-pending { opacity: 1; transform: none; }
    .release__card-body,
    .rc-glass { transition: none; }
}

.pp-info,
.sr-hero { overflow: hidden; }
.pp-info .ab-glyph { top: -10px; font-size: clamp(70px, 8vw, 130px); }
.now-watch > .ab-glyph { top: -0.42em; left: -0.06em; }
