/* ========================================================================
   [TBC] OBT Event «Treasure Hunt» — анимированная плашка-триггер в hero +
   премиальный поп-ап (модалка) со всей инфой. Dark-fantasy, без emoji/кислоты.
   ======================================================================== */

/* ===== Плашка-триггер в hero (возле таймера) ===== */
.ev-trigger {
    --gold: #f5a623;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 18px auto 4px;
    padding: 11px 20px;
    border-radius: 999px;
    cursor: pointer;
    color: #ffe9c2;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: linear-gradient(135deg, rgba(245, 166, 35, 0.14), rgba(0, 0, 0, 0.25));
    border: 1px solid rgba(212, 175, 90, 0.55);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45), 0 0 0 rgba(245, 166, 35, 0.5);
    position: relative;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.25s ease, border-color 0.2s ease;
    animation: evTrigPulse 3.2s ease-in-out infinite;
}
.ev-trigger:hover {
    transform: translateY(-2px);
    border-color: var(--gold);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), 0 0 22px rgba(245, 166, 35, 0.45);
}
@keyframes evTrigPulse {
    0%, 100% { box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45), 0 0 0 rgba(245, 166, 35, 0); }
    50%      { box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45), 0 0 22px rgba(245, 166, 35, 0.4); }
}
/* shimmer пробег */
.ev-trigger::after {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 45%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 240, 200, 0.35), transparent);
    transform: skewX(-18deg);
    animation: evTrigShimmer 6s ease-in-out infinite;
    pointer-events: none;
}
@keyframes evTrigShimmer {
    0%, 80%, 100% { left: -60%; }
    88%           { left: 130%; }
}
.ev-trigger__dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 0 rgba(245, 166, 35, 0.6);
    animation: evDot 2s ease-out infinite;
    flex-shrink: 0;
}
@keyframes evDot {
    0%   { box-shadow: 0 0 0 0 rgba(245, 166, 35, 0.6); }
    70%  { box-shadow: 0 0 0 8px rgba(245, 166, 35, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 166, 35, 0); }
}
.ev-trigger__arrow { color: var(--gold); font-weight: 700; transition: transform 0.2s ease; }
.ev-trigger:hover .ev-trigger__arrow { transform: translateX(3px); }

/* ===== Модалка ===== */
.ev-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}
.ev-modal.is-open { opacity: 1; visibility: visible; }
.ev-modal__overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 5, 10, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.ev-modal__card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1080px;
    margin: auto;
    border-radius: 18px;
    /* [TBC] База — сплошной тёмный фон + лёгкий золотой акцент.
       Сам арт ивента рисуется отдельным слоем ::after и плавно
       растворяется в этот фон (без обрыва). */
    background:
        radial-gradient(120% 120% at 100% 0%, rgba(245, 166, 35, 0.10) 0%, rgba(0, 0, 0, 0) 50%),
        #0b0c14;
    border: 1px solid rgba(212, 175, 90, 0.45);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.65), inset 0 0 60px rgba(0, 0, 0, 0.45);
    transform: translateY(18px) scale(0.98);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.ev-modal.is-open .ev-modal__card { transform: none; }
.ev-modal__card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 18px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 224, 138, 0.7), rgba(245, 166, 35, 0.15) 40%, rgba(255, 224, 138, 0.6));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.7;
    animation: evGlow 5s ease-in-out infinite;
}
/* [TBC] Арт ивента — полоса 16:9 сверху, без зума, плавно растворяется в фон.
   z-index:-1 — за контентом, но над базовым фоном карточки. Маска привязана
   к самому слою (aspect-ratio), поэтому стыка нет на любой ширине. */
.ev-modal__card::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    aspect-ratio: 16 / 9;
    z-index: -1;
    pointer-events: none;
    border-radius: 18px 18px 0 0;
    background:
        linear-gradient(180deg, rgba(10, 11, 18, 0.42) 0%, rgba(10, 11, 18, 0.70) 55%, rgba(11, 12, 20, 0.95) 100%),
        url('/nostalgia/assets/images/treasurehunt.jpg') top center / cover no-repeat;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 50%, rgba(0, 0, 0, 0) 100%);
            mask-image: linear-gradient(180deg, #000 0%, #000 50%, rgba(0, 0, 0, 0) 100%);
}
@keyframes evGlow { 0%, 100% { opacity: 0.45; } 50% { opacity: 0.85; } }

.ev-modal__close {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 5;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 90, 0.4);
    background: rgba(0, 0, 0, 0.35);
    color: #e6dcc2;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.ev-modal__close:hover { background: rgba(245, 166, 35, 0.18); color: #fff; transform: rotate(90deg); }

/* фон-частицы внутри карточки */
.ev-spot__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: 18px;
    background-image:
        radial-gradient(2px 2px at 12% 30%, rgba(255, 220, 140, 0.5), transparent),
        radial-gradient(2px 2px at 78% 18%, rgba(255, 220, 140, 0.38), transparent),
        radial-gradient(1.5px 1.5px at 60% 70%, rgba(255, 220, 140, 0.42), transparent),
        radial-gradient(1.5px 1.5px at 30% 82%, rgba(255, 220, 140, 0.32), transparent),
        radial-gradient(2px 2px at 90% 60%, rgba(255, 220, 140, 0.38), transparent);
    animation: evDrift 14s ease-in-out infinite alternate;
    opacity: 0.6;
}
@keyframes evDrift { from { transform: translateY(0); } to { transform: translateY(-14px); } }

/* ===== Контент (внутри модалки) ===== */
.ev-spot__inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    grid-template-areas: "main media" "mech mech" "rew rew";
    gap: 20px 34px;
    padding: 40px 42px;
}
.ev-spot__main { grid-area: main; }
.ev-spot__media { grid-area: media; align-self: start; margin-top: 44px; }
.ev-spot__mechanics { grid-area: mech; }
.ev-spot__rewards { grid-area: rew; }

/* видео 16:9 */
.ev-spot__video {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 90, 0.4);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
    background: #000;
}
.ev-spot__iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* награды */
.ev-spot__rewards {
    margin-top: 4px;
    padding-top: 18px;
    border-top: 1px solid rgba(212, 175, 90, 0.18);
}
.ev-spot__rw-note {
    margin: 0 0 14px;
    color: #b9bed1;
    font-size: 13.5px;
    line-height: 1.55;
    max-width: 880px;
}
/* условия участия */
.ev-spot__rw-cond {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
}
.ev-spot__rw-cond li {
    color: #cdd2e2;
    font-size: 12.5px;
    line-height: 1.45;
    padding: 11px 14px 11px 32px;
    position: relative;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 0;
}
.ev-spot__rw-cond li::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffe08a, #f5a623);
    box-shadow: 0 0 8px rgba(245, 166, 35, 0.6);
}
/* две колонки наград */
.ev-spot__rw-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.ev-spot__rw-col {
    border: 1px solid rgba(212, 175, 90, 0.22);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
}
.ev-spot__rw-head {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(180deg, rgba(245, 166, 35, 0.14), rgba(245, 166, 35, 0.04));
    border-bottom: 1px solid rgba(212, 175, 90, 0.22);
}
.ev-spot__rw-head::before {
    font-size: 15px;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}
.ev-spot__rw-head--top::before { content: "\1F451"; }   /* 👑 */
.ev-spot__rw-head--part::before { content: "\1F465"; }  /* 👥 */
.ev-spot__rw-list {
    list-style: none;
    margin: 0;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ev-spot__rw-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #d7dbe9;
    font-size: 13.5px;
    line-height: 1.4;
    padding: 9px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    transition: background 0.15s ease;
}
.ev-spot__rw-list li:hover { background: rgba(245, 166, 35, 0.07); }
.ev-spot__reward-ic {
    flex-shrink: 0;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffe08a, #f5a623);
    box-shadow: 0 0 8px rgba(245, 166, 35, 0.6);
}

.ev-spot__eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #f2c971;
    margin-bottom: 14px;
    padding: 5px 12px;
    border: 1px solid rgba(212, 175, 90, 0.45);
    border-radius: 999px;
    background: rgba(245, 166, 35, 0.07);
}
.ev-spot__title {
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.14;
    font-weight: 800;
    color: #fff;
    margin: 0 0 12px;
    text-shadow: 0 0 18px rgba(245, 166, 35, 0.25);
}
.ev-spot__state {
    font-size: 14px;
    color: #cdd0e0;
    margin: 0 0 12px;
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(245, 166, 35, 0.08);
    border: 1px solid rgba(212, 175, 90, 0.25);
}
.ev-spot__state b { color: #f2c971; }
.ev-spot__subtitle {
    font-size: 15px;
    line-height: 1.6;
    color: #aab0c6;
    margin: 0 0 18px;
    max-width: 540px;
}
.ev-spot__chips {
    list-style: none;
    margin: 0 0 22px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ev-spot__chips li {
    font-size: 12.5px;
    font-weight: 700;
    color: #e6dcc2;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(212, 175, 90, 0.3);
}
.ev-spot__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.ev-spot__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 26px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.ev-spot__btn--primary {
    color: #1a1206;
    background: linear-gradient(135deg, #ffe08a, #f5a623);
    box-shadow: 0 8px 22px rgba(245, 166, 35, 0.35);
}
.ev-spot__btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(245, 166, 35, 0.5); }
.ev-spot__btn--ghost { color: #f2c971; background: transparent; border: 1px solid rgba(212, 175, 90, 0.5); }
.ev-spot__btn--ghost:hover { background: rgba(245, 166, 35, 0.1); transform: translateY(-2px); }

.ev-spot__visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}
.ev-spot__visual::before {
    content: '';
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 166, 35, 0.28) 0%, rgba(245, 166, 35, 0.06) 45%, transparent 70%);
    filter: blur(4px);
    animation: evPulse 6s ease-in-out infinite;
}
@keyframes evPulse {
    0%, 100% { transform: scale(0.92); opacity: 0.7; }
    50%      { transform: scale(1.05); opacity: 1; }
}
.ev-spot__chest {
    position: relative;
    z-index: 1;
    width: 190px;
    height: auto;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.6));
    animation: evFloat 5.5s ease-in-out infinite;
}
@keyframes evFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

.ev-spot__h {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #8b90a8;
    margin: 4px 0 12px;
}
.ev-spot__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ev-spot__card {
    padding: 22px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(212, 175, 90, 0.22);
    text-align: center;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.ev-spot__card:hover { transform: translateY(-3px); border-color: rgba(245, 166, 35, 0.55); background: rgba(245, 166, 35, 0.06); }
.ev-spot__card .ev-spot__num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0 auto 12px;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 800;
    line-height: 36px;
    text-align: center;
    color: #1a1206;
    background: linear-gradient(135deg, #ffe08a, #f5a623);
    box-shadow: 0 4px 12px rgba(245, 166, 35, 0.4);
}
.ev-spot__card b { display: block; color: #fff; font-size: 14.5px; margin-bottom: 5px; }
.ev-spot__card b ~ span { display: block; color: #9aa0b6; font-size: 13px; line-height: 1.5; }

/* ===== адаптив ===== */
@media (max-width: 900px) {
    .ev-spot__inner {
        grid-template-columns: 1fr;
        grid-template-areas: "main" "media" "mech" "rew";
        padding: 28px 16px;
        gap: 18px;
    }
    .ev-spot__media { margin-top: 0; }
    .ev-spot__cards { grid-template-columns: 1fr; }
    .ev-spot__rw-cols { grid-template-columns: 1fr; }
    .ev-spot__rw-cond { grid-template-columns: 1fr; }
    .ev-modal { padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .ev-trigger, .ev-trigger::after, .ev-trigger__dot,
    .ev-modal, .ev-modal__card, .ev-modal__card::before,
    .ev-spot__bg, .ev-spot__visual::before, .ev-spot__chest {
        animation: none !important;
        transition: none !important;
    }
}
