/* --- Стили для модуля Загадка Дня --- */
.rod-module { position: relative; }
.rod-fixed-container {
    position: fixed !important;
    z-index: 9998 !important;
    display: flex !important;
    align-items: flex-end !important;
}
.rod-position-bottom-right { bottom: 30px !important; right: 30px !important; }
.rod-position-bottom-left { bottom: 30px !important; left: 30px !important; }
.rod-position-top-right { top: 30px !important; right: 30px !important; }
.rod-position-top-left { top: 30px !important; left: 30px !important; }
.rod-container-hidden { display: none !important; }

/* ============================================ */
/* Кнопка вызова */
/* ============================================ */
.rod-trigger-btn {
    padding: 10px 18px !important;
    font-size: 16px !important;
    color: white !important;
    border: none !important;
    border-radius: 50px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.3s !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    min-width: 180px !important;
    text-transform: none !important;
    text-decoration: none !important;
    letter-spacing: normal !important;
    font-weight: normal !important;
}
.rod-trigger-btn:hover {
    transform: scale(1.05) !important;
    opacity: 0.9 !important;
}

/* Текст кнопки */
.rod-trigger-btn span:first-child {
    flex-grow: 1 !important;
    text-align: left !important;
    font-size: 12px !important;
    text-transform: none !important;
    text-decoration: none !important;
    letter-spacing: normal !important;
    font-weight: normal !important;
    line-height: 1.2 !important;
}

/* Крестик внутри кнопки */
.rod-btn-close-icon {
    width: 24px !important;
    height: 24px !important;
    background-color: rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: bold !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s !important;
    flex-shrink: 0 !important;
}
.rod-btn-close-icon:hover {
    background-color: #d63031 !important;
    transform: rotate(180deg) scale(1.2) !important;
}

/* ============================================ */
/* Модальное окно */
/* ============================================ */
.rod-modal-overlay {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.8) !important;
    z-index: 99999 !important;
    justify-content: center !important;
    align-items: center !important;
}
.rod-modal-content {
    background: white !important;
    width: 90% !important;
    max-width: 600px !important;
    border-radius: 20px !important;
    padding: 25px !important;
    text-align: center !important;
    position: relative !important;
    z-index: 100000 !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5) !important;
    animation: rodSlideDown 0.3s ease-out !important;
    color: #333 !important;
}
@keyframes rodSlideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ============================================ */
/* ПРИВЕТСТВЕННЫЙ ЭКРАН */
/* ============================================ */
.rod-welcome-screen {
    text-align: center !important;
    padding: 40px 20px !important;
    animation: rodFadeIn 0.5s ease-out !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

.rod-test-screen.rod-hidden {
    display: none !important;
}

.rod-result-screen.rod-hidden {
    display: none !important;
}

/* Кнопка закрытия приветственного экрана */
.rod-close-welcome {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    width: 40px !important;
    height: 40px !important;
    border: none !important;
    background: rgba(0, 0, 0, 0.1) !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    z-index: 10 !important;
}
.rod-close-welcome:hover {
    background: rgba(214, 48, 49, 0.9) !important;
    transform: rotate(90deg) scale(1.1) !important;
}
.rod-close-icon {
    font-size: 20px !important;
    color: #333 !important;
    font-weight: bold !important;
    transition: all 0.3s ease !important;
}
.rod-close-welcome:hover .rod-close-icon {
    color: white !important;
}

/* Кнопка закрытия экрана теста/результата */
.rod-close-test {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    width: 36px !important;
    height: 36px !important;
    border: none !important;
    background: rgba(0, 0, 0, 0.1) !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    font-size: 20px !important;
    color: #333 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    z-index: 10 !important;
}
.rod-close-test:hover {
    background: rgba(214, 48, 49, 0.9) !important;
    color: white !important;
    transform: rotate(90deg) !important;
}

/* Логотип */
.rod-welcome-logo {
    margin: 0 auto 30px auto !important;
    animation: rodBounce 1s ease-in-out !important;
    display: block !important;
    width: 100% !important;
    text-align: center !important;
}
.rod-welcome-logo img {
    height: auto !important;
    border-radius: 10px !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
    display: inline-block !important;
}

/* Текст задачи */
.rod-welcome-text {
    font-size: 20px !important;
    color: #2d3436 !important;
    margin-bottom: 40px !important;
    line-height: 1.6 !important;
    font-weight: 500 !important;
    animation: rodSlideUp 0.6s ease-out 0.2s both !important;
    width: 100% !important;
}

/* ============================================ */
/* КНОПКА НАЧАЛА ТЕСТА */
/* ============================================ */
.rod-btn-start {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe) !important;
    color: white !important;
    border: none !important;
    padding: 18px 50px !important;
    font-size: 20px !important;
    font-weight: bold !important;
    border-radius: 50px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 15px !important;
    box-shadow: 0 5px 20px rgba(108, 92, 231, 0.4) !important;
    transition: all 0.3s ease !important;
    animation: rodPulse 2s infinite, rodSlideUp 0.6s ease-out 0.4s both !important;
    text-transform: none !important;
    text-decoration: none !important;
    letter-spacing: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
}
.rod-btn-start:hover {
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.6) !important;
}
.rod-btn-start:active {
    transform: translateY(-1px) scale(1.02) !important;
}
.rod-btn-arrow {
    font-size: 24px !important;
    transition: transform 0.3s ease !important;
}
.rod-btn-start:hover .rod-btn-arrow {
    transform: translateX(5px) !important;
}

/* Текст внутри кнопки начала */
.rod-btn-start .rod-btn-text {
    text-transform: none !important;
    text-decoration: none !important;
    letter-spacing: normal !important;
    font-variant: normal !important;
}

/* ============================================ */
/* НОВОЕ: НОМЕР ВОПРОСА (отдельной строкой) */
/* ============================================ */
.rod-question-counter {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #6c5ce7 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    margin-bottom: 15px !important;
    padding-bottom: 10px !important;
    border-bottom: 2px solid #e0e0ff !important;
    display: block !important;
    text-align: center !important;
    width: 100% !important;
}

/* Текст вопроса */
.rod-riddle-text {
    font-size: 20px !important;
    font-weight: bold !important;
    margin: 0 0 20px 0 !important;
    color: #2d3436 !important;
    line-height: 1.4 !important;
}

/* Варианты ответов */
.rod-options-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    margin-bottom: 20px !important;
}
.rod-option-label {
    display: block !important;
    background: #f1f2f6 !important;
    padding: 12px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    border: 2px solid transparent !important;
    text-align: left !important;
}
.rod-option-label:hover { background: #dfe6e9 !important; }
.rod-option-label.selected { border-color: #6c5ce7 !important; background: #e0e0ff !important; }
.rod-option-label input[type="radio"] { margin-right: 10px !important; }

/* Сообщение об ответе */
.rod-feedback-message {
    font-size: 18px !important;
    margin-bottom: 15px !important;
    min-height: 25px !important;
    font-weight: bold !important;
}
.rod-success { color: #00b894 !important; }
.rod-error { color: #d63031 !important; }

/* ============================================ */
/* ПРОМОКОД И УСЛОВИЯ */
/* ============================================ */
.rod-promo-container {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe) !important;
    padding: 25px !important;
    border-radius: 12px !important;
    margin: 20px 0 !important;
    color: white !important;
}
.rod-promo-text { 
    font-size: 16px !important; 
    margin-bottom: 10px !important; 
    font-weight: 500 !important; 
}
.rod-promo-code {
    font-size: 32px !important;
    font-weight: bold !important;
    letter-spacing: 3px !important;
    background: rgba(255, 255, 255, 0.2) !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    display: inline-block !important;
    font-family: 'Courier New', monospace !important;
    border: 2px dashed rgba(255, 255, 255, 0.5) !important;
    margin-bottom: 15px !important;
}

/* Текст условий */
.rod-promo-conditions {
    font-size: 13px !important;
    color: rgba(255, 255, 255, 0.9) !important;
    line-height: 1.5 !important;
    margin-top: 15px !important;
    padding-top: 15px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.3) !important;
    font-style: italic !important;
}

/* Кнопки действий */
.rod-action-btns {
    display: flex !important;
    justify-content: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    margin-top: 20px !important;
}
.rod-btn {
    padding: 10px 20px !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    text-transform: none !important;
    text-decoration: none !important;
    letter-spacing: normal !important;
}
.rod-hidden { display: none !important; }
.rod-visible { display: inline-block !important; }
.rod-btn-submit { background: #6c5ce7 !important; color: white !important; }
.rod-btn-submit:hover { background: #5b4cc4 !important; }
.rod-btn-next { background: #00b894 !important; color: white !important; }
.rod-btn-next:hover { background: #00a383 !important; }
.rod-btn-close { background: #b2bec3 !important; color: white !important; }
.rod-btn-close:hover { background: #636e72 !important; }
.rod-btn-tryagain { background: #0984e3 !important; color: white !important; }
.rod-btn-tryagain:hover { background: #076aba !important; }

/* ============================================ */
/* АНИМАЦИИ */
/* ============================================ */
@keyframes rodFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes rodSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes rodBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}
@keyframes rodPulse {
    0%, 100% {
        box-shadow: 0 5px 20px rgba(108, 92, 231, 0.4);
    }
    50% {
        box-shadow: 0 5px 30px rgba(108, 92, 231, 0.7);
    }
}

/* ============================================ */
/* Адаптивность */
/* ============================================ */
@media (max-width: 500px) {
    .rod-position-bottom-right, .rod-position-bottom-left { bottom: 20px !important; }
    .rod-position-top-right, .rod-position-top-left { top: 20px !important; }
    .rod-trigger-btn { padding: 10px 15px !important; font-size: 14px !important; min-width: 150px !important; }
    .rod-btn-close-icon { width: 20px !important; height: 20px !important; font-size: 12px !important; }
    .rod-options-grid { grid-template-columns: 1fr !important; }
    .rod-modal-content { padding: 15px !important; }
    .rod-promo-code { font-size: 24px !important; padding: 8px 15px !important; }
    
    .rod-welcome-screen {
        padding: 30px 15px !important;
    }
    .rod-welcome-logo {
        margin: 0 auto 25px auto !important;
    }
    .rod-welcome-text {
        font-size: 16px !important;
        margin-bottom: 30px !important;
    }
    .rod-btn-start {
        padding: 15px 35px !important;
        font-size: 18px !important;
    }
    .rod-close-welcome,
    .rod-close-test {
        width: 35px !important;
        height: 35px !important;
        top: 10px !important;
        right: 10px !important;
    }
    
    .rod-promo-conditions {
        font-size: 12px !important;
    }
    
    .rod-question-counter {
        font-size: 12px !important;
        margin-bottom: 10px !important;
    }
    
    .rod-riddle-text {
        font-size: 18px !important;
    }
}