/* ============================================================ */
/* ФРАКТАЛ МОМЕНТА — ОБЩИЕ СТИЛИ ДЛЯ ВСЕХ КВИЗОВ              */
/* Версия: 1.0                                                   */
/* ============================================================ */

/* Анимации */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes drawLine {
    from { height: 0; opacity: 0; }
    to { height: 30px; opacity: 1; }
}

/* Обёртка квиза */
.fractal-wrapper {
    max-width: 950px;
    margin: 40px auto;
    padding: 20px;
    background: #050505;
    border-radius: 6px;
    border: 1px solid rgba(0, 245, 255, 0.08);
}

/* Уровень */
.fractal-level {
    animation: fadeInUp 0.6s ease-out;
    margin-bottom: 0;
}

/* Вопрос */
.fractal-question {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    margin-bottom: 16px;
    text-align: center;
    letter-spacing: 1px;
    transition: all 0.4s ease-in-out;
    line-height: 1.6;
}

/* Кнопки — 3 в ряд */
.fractal-options {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    max-width: 700px;
    margin: 0 auto;
}

/* Базовые кнопки */
.fractal-btn {
    display: block !important;
    width: 100% !important;
    max-width: 700px !important;
    margin: 0 auto !important;
    background: transparent !important;
    cursor: pointer !important;
    text-align: center !important;
    padding: 14px 20px !important;
    font-size: 0.95rem !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    font-family: 'Courier New', Courier, monospace !important;
    font-weight: bold !important;
    text-decoration: none !important;
    color: #00ff66 !important;
    border: 1px solid rgba(0, 255, 102, 0.45) !important;
    box-shadow: 0 0 15px rgba(0, 255, 102, 0.15) !important;
    text-shadow: 0 0 5px rgba(0, 255, 102, 0.5) !important;
    transition: all 0.4s ease-in-out !important;
}

/* Наведение */
.fractal-btn:hover:not(.selected):not(.past):not(.inactive) {
    animation: none !important;
    color: #00F5FF !important;
    border-color: #00F5FF !important;
    background-color: rgba(0, 245, 255, 0.08) !important;
    text-shadow: 0 0 5px rgba(0, 245, 255, 0.95),
                 0 0 12px rgba(0, 245, 255, 0.5) !important;
    box-shadow: 0 0 25px rgba(0, 245, 255, 0.55) !important;
}

/* Выбранная */
.fractal-btn.selected {
    animation: none !important;
    color: #00F5FF !important;
    border-color: #00F5FF !important;
    background-color: rgba(0, 245, 255, 0.08) !important;
    text-shadow: 0 0 5px rgba(0, 245, 255, 0.95),
                 0 0 12px rgba(0, 245, 255, 0.5) !important;
    box-shadow: 0 0 25px rgba(0, 245, 255, 0.55) !important;
    cursor: default !important;
    pointer-events: none !important;
}

/* Неактивная — оранжевая */
.fractal-btn.inactive {
    color: #ff6633 !important;
    border: 1px solid rgba(255, 102, 51, 0.7) !important;
    background-color: rgba(255, 102, 51, 0.08) !important;
    text-shadow: 0 0 8px rgba(255, 102, 51, 0.25) !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    opacity: 0.85 !important;
    pointer-events: none !important;
}

/* Пройденная — голубая */
.fractal-btn.past {
    color: #00F5FF !important;
    border-color: #00F5FF !important;
    background-color: rgba(0, 245, 255, 0.08) !important;
    text-shadow: 0 0 5px rgba(0, 245, 255, 0.95),
                 0 0 12px rgba(0, 245, 255, 0.5) !important;
    box-shadow: 0 0 25px rgba(0, 245, 255, 0.55) !important;
    cursor: default !important;
    pointer-events: none !important;
}

/* Линии между уровнями */
.fractal-line-wrapper {
    display: flex;
    justify-content: center;
    margin: 4px 0 6px 0;
}
.fractal-line {
    width: 2px;
    height: 0;
    background: transparent;
    position: relative;
    overflow: hidden;
    opacity: 0;
}
.fractal-line.dotted {
    border-left: 2px dashed rgba(0, 245, 255, 0.4);
    animation: drawLine 0.6s ease-out forwards;
}
.fractal-line.solid {
    border-left: 2px solid rgba(0, 245, 255, 0.5);
    animation: drawLine 0.6s ease-out forwards;
}

/* Кнопка-приглашение */
.fractal-toggle-btn {
    display: inline-block;
    padding: 16px 32px;
    background: transparent;
    border: 1px solid rgba(0, 255, 102, 0.45);
    color: #00ff66;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.4s ease-in-out;
    text-shadow: 0 0 5px rgba(0, 255, 102, 0.5);
    box-shadow: 0 0 15px rgba(0, 255, 102, 0.15);
}
.fractal-toggle-btn:hover {
    color: #00F5FF;
    border-color: #00F5FF;
    background: rgba(0, 245, 255, 0.08);
    text-shadow: 0 0 5px rgba(0, 245, 255, 0.95),
                 0 0 12px rgba(0, 245, 255, 0.5);
    box-shadow: 0 0 25px rgba(0, 245, 255, 0.55);
}

/* Результат */
.fractal-result-block {
    display: none;
    margin-top: 30px;
    padding: 20px 24px;
    border-left: 3px solid #00F5FF;
    background: rgba(0, 245, 255, 0.03);
    border-radius: 4px;
}
.fractal-result-block.visible {
    display: block;
    animation: fadeInUp 0.8s ease-out;
}
.fractal-result-text {
    color: #00F5FF;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    line-height: 1.8;
    text-shadow: 0 0 12px rgba(0, 245, 255, 0.15);
    margin: 0;
    text-indent: 0 !important;
}
.fractal-result-actions {
    margin-top: 15px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.fractal-result-actions button {
    background: transparent;
    border: 1px solid rgba(0, 245, 255, 0.3);
    color: #94a3b8;
    padding: 6px 16px;
    font-family: monospace;
    font-size: 0.75rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}
.fractal-result-actions button:hover {
    color: #00F5FF;
    border-color: #00F5FF;
}

/* Адаптация */
@media (max-width: 600px) {
    .fractal-options {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 6px;
        max-width: 100%;
    }
    .fractal-btn {
        font-size: 0.7rem !important;
        padding: 10px 6px !important;
        letter-spacing: 0.5px !important;
    }
    .fractal-question {
        font-size: 0.95rem !important;
    }
}