/* Большое промо «Дневник трейдера в Preplay». Модальная карточка поверх всего:
   слева продающий текст и кнопки, справа «живой» макет дневника.
   Самодостаточно — свои переменные, ничего из темы страницы не берёт. */

.dp-overlay {
    --dp-bg: #090b16;
    --dp-card: #0f1226;
    --dp-text: #f2f4ff;
    --dp-muted: #a9b0d0;
    --dp-violet: #7c5cff;
    --dp-cyan: #22d3ee;
    --dp-lime: #a3e635;
    --dp-coral: #ff5c7a;
    --dp-line: rgba(255, 255, 255, 0.08);
    position: fixed;
    inset: 0;
    z-index: 100050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(4, 6, 14, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}
.dp-overlay.is-visible { opacity: 1; }

.dp-card {
    position: relative;
    width: min(960px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: 28px;
    padding: 34px 36px 30px;
    border-radius: 26px;
    color: var(--dp-text);
    background:
        radial-gradient(90% 70% at 100% 0%, rgba(124, 92, 255, 0.28), transparent 60%),
        radial-gradient(70% 60% at 0% 100%, rgba(34, 211, 238, 0.16), transparent 60%),
        linear-gradient(180deg, #131740 0%, var(--dp-card) 55%, #0b0d1c 100%);
    border: 1px solid rgba(124, 92, 255, 0.45);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 40px 120px -30px rgba(124, 92, 255, 0.55),
        0 30px 80px -20px rgba(0, 0, 0, 0.9);
    transform: translateY(26px) scale(0.96);
    transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.25, 1.1);
}
.dp-overlay.is-visible .dp-card { transform: none; }

/* Северное сияние по верхней кромке — движется, чтобы карточка «жила». */
.dp-aurora {
    position: absolute;
    top: -140px;
    left: -10%;
    width: 120%;
    height: 280px;
    pointer-events: none;
    background:
        radial-gradient(40% 60% at 20% 50%, rgba(124, 92, 255, 0.7), transparent 70%),
        radial-gradient(35% 60% at 55% 50%, rgba(34, 211, 238, 0.55), transparent 70%),
        radial-gradient(30% 60% at 85% 50%, rgba(255, 92, 122, 0.45), transparent 70%);
    filter: blur(46px);
    opacity: 0.55;
    animation: dpAurora 9s ease-in-out infinite alternate;
}
@keyframes dpAurora {
    from { transform: translateX(-4%) scaleX(1); }
    to   { transform: translateX(4%) scaleX(1.12); }
}
.dp-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: radial-gradient(80% 80% at 50% 40%, #000 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(80% 80% at 50% 40%, #000 30%, transparent 100%);
}

.dp-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--dp-line);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.06);
    color: #c3c8e6;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.15s;
}
.dp-close:hover { background: rgba(255, 255, 255, 0.14); color: #fff; transform: rotate(90deg); }

/* ── Текст ───────────────────────────────────────────── */
.dp-copy { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 16px; }

.dp-badge { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dp-badge-new {
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #14061c;
    background: linear-gradient(90deg, #ffd166, var(--dp-coral));
    box-shadow: 0 6px 18px -6px rgba(255, 92, 122, 0.8);
}
.dp-badge-where {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #e6e0ff;
    background: rgba(124, 92, 255, 0.18);
    border: 1px solid rgba(124, 92, 255, 0.55);
}
.dp-badge-where i { color: var(--dp-cyan); }

.dp-title {
    margin: 0;
    font-family: "Unbounded", "Inter", sans-serif;
    font-weight: 800;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.12;
    letter-spacing: -0.01em;
    text-wrap: balance;
}
.dp-hl {
    background: linear-gradient(90deg, var(--dp-cyan), var(--dp-violet) 55%, var(--dp-coral));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% 100%;
    animation: dpShine 5s linear infinite;
}
@keyframes dpShine { to { background-position: -200% 0; } }

.dp-lead { margin: 0; font-size: 15px; line-height: 1.55; color: var(--dp-muted); max-width: 46ch; }

.dp-feats {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.dp-feats li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 600;
    color: #dfe3ff;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--dp-line);
}
.dp-feats li i { color: var(--dp-cyan); font-size: 12px; }

.dp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.dp-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 20px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
    white-space: nowrap;
}
.dp-btn-primary {
    position: relative;
    overflow: hidden;
    color: #0b0d1c;
    background: linear-gradient(90deg, var(--dp-lime), #4ade80);
    box-shadow: 0 14px 34px -10px rgba(163, 230, 53, 0.75);
}
.dp-btn-primary::after {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    transform: skewX(-20deg);
    animation: dpSweep 3s ease-in-out infinite;
}
@keyframes dpSweep { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.dp-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -10px rgba(163, 230, 53, 0.9); color: #0b0d1c; }
.dp-play {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #0b0d1c;
    color: var(--dp-lime);
    font-size: 11px;
    padding-left: 2px;
}
.dp-btn-ghost {
    color: #eef0ff;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.16);
}
.dp-btn-ghost:hover { background: rgba(255, 255, 255, 0.12); color: #fff; transform: translateY(-2px); }

.dp-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 12.5px;
    color: #8f97bd;
}
.dp-foot b { color: #cfd4f5; font-weight: 700; }
.dp-foot-mark { width: 18px; height: 18px; border-radius: 5px; object-fit: cover; }

/* ── Макет дневника ─────────────────────────────────── */
.dp-visual { position: relative; z-index: 2; display: flex; align-items: center; }
.dp-mock {
    width: 100%;
    padding: 14px 14px 12px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(20, 24, 52, 0.95), rgba(10, 12, 28, 0.95));
    border: 1px solid rgba(124, 92, 255, 0.35);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    transform: rotate(-1.5deg);
    animation: dpFloat 6s ease-in-out infinite;
}
@keyframes dpFloat {
    0%, 100% { transform: rotate(-1.5deg) translateY(0); }
    50% { transform: rotate(-1.5deg) translateY(-6px); }
}
.dp-mock-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.dp-mock-brand { font-family: "Unbounded", sans-serif; font-weight: 600; font-size: 12px; color: #fff; }
.dp-mock-brand em { font-style: normal; font-weight: 500; color: var(--dp-muted); font-family: "Inter", sans-serif; }
.dp-mock-live { display: inline-flex; align-items: center; gap: 6px; color: #9fb3d9; font-weight: 600; }
.dp-mock-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--dp-lime); box-shadow: 0 0 0 0 rgba(163, 230, 53, 0.7); animation: dpPing 1.6s infinite; }
@keyframes dpPing { 70% { box-shadow: 0 0 0 7px rgba(163, 230, 53, 0); } 100% { box-shadow: 0 0 0 0 rgba(163, 230, 53, 0); } }

.dp-mock-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 8px; }
.dp-kpi {
    padding: 8px 10px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--dp-line);
}
.dp-kpi small { display: block; font-size: 10.5px; color: #8f97bd; margin-bottom: 3px; }
.dp-kpi b { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.dp-up { color: var(--dp-lime); }
.dp-dn { color: var(--dp-coral); }

.dp-curve { width: 100%; height: 96px; display: block; margin-bottom: 8px; }
.dp-curve-line { stroke-dasharray: 700; stroke-dashoffset: 700; animation: dpDraw 2.2s 0.4s ease-out forwards; }
.dp-curve-fill { opacity: 0; animation: dpFade 0.8s 2s ease-out forwards; }
.dp-curve-dot { opacity: 0; animation: dpFade 0.3s 2.4s ease-out forwards; }
@keyframes dpDraw { to { stroke-dashoffset: 0; } }
@keyframes dpFade { to { opacity: 1; } }

.dp-mock-rows { display: flex; flex-direction: column; gap: 5px; }
.dp-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 9px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.04);
}
.dp-row-sym { font-weight: 700; color: #e8ebff; }
.dp-row-side { font-size: 10px; font-weight: 800; letter-spacing: 0.06em; padding: 2px 6px; border-radius: 5px; }
.dp-row-side.long { color: var(--dp-lime); background: rgba(163, 230, 53, 0.14); }
.dp-row-side.short { color: var(--dp-coral); background: rgba(255, 92, 122, 0.14); }
.dp-row-tag { font-size: 11px; color: #9fb3d9; padding: 2px 7px; border-radius: 6px; background: rgba(124, 92, 255, 0.18); }
.dp-row b { font-variant-numeric: tabular-nums; font-weight: 800; }

.dp-mock-ai {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    margin-top: 9px;
    padding: 9px 11px;
    border-radius: 11px;
    font-size: 11.5px;
    line-height: 1.4;
    color: #dfe3ff;
    background: linear-gradient(90deg, rgba(124, 92, 255, 0.22), rgba(34, 211, 238, 0.12));
    border: 1px solid rgba(124, 92, 255, 0.4);
}
.dp-mock-ai i { color: var(--dp-cyan); margin-top: 2px; }

.dp-float {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    color: #0b0d1c;
    white-space: nowrap;
    box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.8);
    animation: dpFloat2 5s ease-in-out infinite;
}
.dp-float-a { top: -12px; left: -14px; background: linear-gradient(90deg, #ffd166, #ff9f43); }
.dp-float-b { bottom: -10px; right: -6px; background: linear-gradient(90deg, var(--dp-cyan), #8be9ff); animation-delay: -2.5s; }
@keyframes dpFloat2 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* ── Адаптив ───────────────────────────────────────── */
@media (max-width: 860px) {
    .dp-card { grid-template-columns: 1fr; gap: 22px; padding: 26px 20px 22px; }
    /* На телефоне сначала текст и кнопки, макет — ниже; плашки не лезут на крестик. */
    .dp-visual { margin-top: 4px; margin-bottom: 10px; }
    .dp-mock { transform: none; animation: none; }
    .dp-float-a { top: auto; bottom: -12px; left: 8px; }
    .dp-float-b { display: none; }
    .dp-lead { max-width: none; }
    .dp-title { padding-right: 30px; }
}
@media (max-width: 480px) {
    .dp-overlay { padding: 10px; }
    .dp-card { max-height: calc(100vh - 20px); border-radius: 20px; }
    .dp-actions .dp-btn { width: 100%; justify-content: center; }
    .dp-mock-kpis { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .dp-kpi b { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
    .dp-aurora, .dp-hl, .dp-btn-primary::after, .dp-mock, .dp-float, .dp-mock-live i { animation: none; }
    .dp-curve-line { stroke-dashoffset: 0; animation: none; }
    .dp-curve-fill, .dp-curve-dot { opacity: 1; animation: none; }
    .dp-overlay, .dp-card { transition: none; }
}

/* Пока промо открыто, страница под ним не крутится. */
html.dp-lock { overflow: hidden; }
/* Пока баннер открыт, холсты графиков под ним не рисуются: blur(10px) поверх 40 живых
   графиков заставлял видеокарту пересчитывать размытие на каждый тик (жалобы на «мало
   fps» 18.09.2026 — день выката баннера). Размытию всё равно, что под ним. */
html.dp-lock canvas { visibility: hidden; }
