/**
 * EASTER-EGG.CSS — Стили награды квеста «Лестница Мёбиуса».
 * Кроваво-красная надпись CONGRATULATIONS + тёмное модальное окно.
 */

/* Глитч-дрожь всего экрана в момент победы */
@keyframes sys-glitch {
    0%   { transform: translate(0, 0); filter: none; }
    20%  { transform: translate(-3px, 2px); filter: contrast(1.4) hue-rotate(-10deg); }
    40%  { transform: translate(3px, -2px); filter: invert(0.05) contrast(1.2); }
    60%  { transform: translate(-2px, -1px); filter: contrast(1.5); }
    80%  { transform: translate(2px, 1px); filter: none; }
    100% { transform: translate(0, 0); filter: none; }
}
body.ambient-pulse {
    animation: sys-glitch 0.45s steps(2) 2;
}

#sys-msg-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000000;          /* выше всех оверлеев и лайтбокса */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.94);
    padding: 20px;
    opacity: 0;
    transition: opacity 0.6s ease;
}
#sys-msg-overlay.sys-active { opacity: 1; }

.sys-msg-box {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    background: #070707;
    border: 1px solid #2a0000;
    box-shadow: 0 0 40px rgba(140, 0, 0, 0.35), inset 0 0 60px rgba(0, 0, 0, 0.8);
    padding: 40px 34px 32px;
    text-align: center;
    font-family: 'IM Fell English', serif;
    color: #b0b0b0;
}

.sys-msg-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    color: #555;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.3s ease;
}
.sys-msg-close:hover { color: #b32626; }

/* Кроваво-красный заголовок */
.sys-msg-title {
    font-family: 'Special Elite', cursive;
    font-size: clamp(1.8rem, 6vw, 2.8rem);
    letter-spacing: 0.18em;
    color: #8a0000;
    text-transform: uppercase;
    margin: 0 0 10px;
    text-shadow:
        0 0 8px rgba(170, 0, 0, 0.8),
        0 0 22px rgba(120, 0, 0, 0.6),
        0 2px 2px rgba(0, 0, 0, 0.9);
    animation: sys-msg-title-pulse 2.6s ease-in-out infinite;
}
@keyframes sys-msg-title-pulse {
    0%, 100% { text-shadow: 0 0 8px rgba(170,0,0,0.8), 0 0 22px rgba(120,0,0,0.6), 0 2px 2px rgba(0,0,0,0.9); }
    50%      { text-shadow: 0 0 14px rgba(210,0,0,0.95), 0 0 34px rgba(150,0,0,0.7), 0 2px 2px rgba(0,0,0,0.9); }
}

.sys-msg-sub {
    font-style: italic;
    color: #9a9a9a;
    margin: 0 0 22px;
    font-size: 1.05rem;
}

.sys-msg-body { color: #c0c0c0; line-height: 1.6; margin: 0 0 18px; }
.sys-msg-how  { color: #909090; margin: 0 0 8px; }
.sys-msg-list {
    list-style: none;
    padding: 0;
    margin: 0 auto 22px;
    max-width: 420px;
    text-align: left;
    color: #a8a8a8;
    line-height: 1.7;
}
.sys-msg-list li {
    position: relative;
    padding-left: 18px;
}
.sys-msg-list li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: #6a0000;
}

/* Блок кодовой фразы */
.sys-msg-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 22px 0;
    padding: 16px;
    background: rgba(138, 0, 0, 0.06);
    border: 1px solid #2a0000;
}
.sys-msg-label {
    color: #888;
    font-size: 0.9rem;
}
.sys-msg-code {
    font-family: 'Special Elite', monospace;
    font-size: 1.3rem;
    color: #d83a3a;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px dashed #5a0000;
    user-select: all;
}
.sys-msg-copy {
    background: transparent;
    border: 1px solid #6a0000;
    color: #c06060;
    font-family: 'IM Fell English', serif;
    padding: 6px 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
}
.sys-msg-copy:hover { background: rgba(138, 0, 0, 0.2); color: #fff; border-color: #b32626; }
.sys-msg-copy.sys-done { color: #6ab06a; border-color: #2e5a2e; }

.sys-msg-actions {
    margin-top: 24px;
}
.sys-msg-go {
    background: transparent;
    border: 1px solid #444;
    color: #aaa;
    font-family: 'IM Fell English', serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 12px 28px;
    cursor: pointer;
    transition: all 0.4s ease;
}
.sys-msg-go:hover {
    border-color: #8a0000;
    color: #fff;
    box-shadow: 0 0 14px rgba(138, 0, 0, 0.4);
}

@media (prefers-reduced-motion: reduce) {
    body.ambient-pulse { animation: none; }
    .sys-msg-title { animation: none; }
    #sys-msg-overlay { transition: none; }
}

@media (max-width: 520px) {
    .sys-msg-box { padding: 32px 20px 24px; }
    .sys-msg-row { gap: 8px; }
}
