/* ИСПРАВЛЕНИЕ КНОПКИ "РЕГИСТРАЦИЯ" НА МОБИЛЬНЫХ УСТРОЙСТВАХ */

/* Принудительно восстанавливаем стили кнопки как на ПК */
.hero-btn-magnum {
    display: inline-block !important;
    background: linear-gradient(135deg, #0f172a, #1e293b, #334155, #0f172a) !important;
    background-size: 300% 300% !important;
    color: #ffffff !important;
    border: 2px solid rgba(71, 85, 105, 0.3) !important;
    padding: 18px 36px !important;
    text-decoration: none !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 18px !important;
    letter-spacing: 0.025em !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    cursor: pointer !important;
    backdrop-filter: blur(8px) !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    text-align: center !important;
}

/* Восстанавливаем псевдоэлемент для эффекта блеска */
.hero-btn-magnum::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent) !important;
    animation: shimmerFlow 2s ease-in-out infinite !important;
    z-index: 1 !important;
    pointer-events: none !important;
}

/* Восстанавливаем hover эффекты */
.hero-btn-magnum:hover {
    background: linear-gradient(135deg, #1e293b, #334155, #475569, #1e293b) !important;
    background-size: 200% 200% !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3) !important;
    border-color: rgba(100, 116, 139, 0.5) !important;
}

/* Восстанавливаем активное состояние */
.hero-btn-magnum:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3) !important;
}

/* Медиа-запросы для мобильных устройств */
@media (max-width: 768px) {
    .hero-btn-magnum {
        display: inline-block !important;
        background: linear-gradient(135deg, #0f172a, #1e293b, #334155, #0f172a) !important;
        background-size: 300% 300% !important;
        color: #ffffff !important;
        border: 2px solid rgba(71, 85, 105, 0.3) !important;
        padding: 18px 36px !important;
        text-decoration: none !important;
        border-radius: 12px !important;
        font-weight: 700 !important;
        font-size: 18px !important;
        letter-spacing: 0.025em !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        position: relative !important;
        overflow: hidden !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
        cursor: pointer !important;
        backdrop-filter: blur(8px) !important;
        width: auto !important;
        max-width: none !important;
        margin: 0 !important;
        text-align: center !important;
    }
    
    .hero-btn-magnum::before {
        content: '' !important;
        position: absolute !important;
        top: 0 !important;
        left: -100% !important;
        width: 100% !important;
        height: 100% !important;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent) !important;
        animation: shimmerFlow 2s ease-in-out infinite !important;
        z-index: 1 !important;
        pointer-events: none !important;
    }
    
    .hero-btn-magnum:hover {
        background: linear-gradient(135deg, #1e293b, #334155, #475569, #1e293b) !important;
        background-size: 200% 200% !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3) !important;
        border-color: rgba(100, 116, 139, 0.5) !important;
    }
    
    .hero-btn-magnum:active {
        transform: translateY(0) !important;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3) !important;
    }
}

@media (max-width: 480px) {
    .hero-btn-magnum {
        display: inline-block !important;
        background: linear-gradient(135deg, #0f172a, #1e293b, #334155, #0f172a) !important;
        background-size: 300% 300% !important;
        color: #ffffff !important;
        border: 2px solid rgba(71, 85, 105, 0.3) !important;
        padding: 18px 36px !important;
        text-decoration: none !important;
        border-radius: 12px !important;
        font-weight: 700 !important;
        font-size: 18px !important;
        letter-spacing: 0.025em !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        position: relative !important;
        overflow: hidden !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
        cursor: pointer !important;
        backdrop-filter: blur(8px) !important;
        width: auto !important;
        max-width: none !important;
        margin: 0 !important;
        text-align: center !important;
    }
    
    .hero-btn-magnum::before {
        content: '' !important;
        position: absolute !important;
        top: 0 !important;
        left: -100% !important;
        width: 100% !important;
        height: 100% !important;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent) !important;
        animation: shimmerFlow 2s ease-in-out infinite !important;
        z-index: 1 !important;
        pointer-events: none !important;
    }
    
    .hero-btn-magnum:hover {
        background: linear-gradient(135deg, #1e293b, #334155, #475569, #1e293b) !important;
        background-size: 200% 200% !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3) !important;
        border-color: rgba(100, 116, 139, 0.5) !important;
    }
    
    .hero-btn-magnum:active {
        transform: translateY(0) !important;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3) !important;
    }
}

/* Принудительное переопределение любых других стилей */
.hero-btn-magnum[style*="background"] {
    background: linear-gradient(135deg, #0f172a, #1e293b, #334155, #0f172a) !important;
    background-size: 300% 300% !important;
}

.hero-btn-magnum[style*="padding"] {
    padding: 18px 36px !important;
}

.hero-btn-magnum[style*="font-size"] {
    font-size: 18px !important;
}

.hero-btn-magnum[style*="width"] {
    width: auto !important;
}

.hero-btn-magnum[style*="margin"] {
    margin: 0 !important;
}

/* Современный стек кнопок для получателя */
.recipient-actions {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.recipient-actions a.btn,
.recipient-actions button.btn {
    width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    border-radius: 12px !important;
    padding: 16px 20px !important;
    min-height: 56px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
}

.recipient-actions .btn.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
}

.recipient-actions .btn.btn-success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
}

.recipient-actions .btn.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
}

.recipient-actions-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin: 0 !important;
    width: 100% !important;
}

@media (min-width: 641px) {
    .recipient-actions {
        gap: 12px !important;
    }
    .recipient-actions a.btn,
    .recipient-actions button.btn {
        padding: 18px 24px !important;
        min-height: 60px !important;
        font-size: 17px !important;
    }
}

/* Стили для кнопки "Назад на главную" */
.back-btn {
    position: fixed !important;
    top: 16px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 1000 !important;
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 14px 22px !important;
    border-radius: 14px !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3) !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* На очень узких экранах ограничиваем ширину и переносим текст */
@media (max-width: 390px) {
    .back-btn {
        max-width: 92vw !important;
        white-space: normal !important;
        line-height: 1.2 !important;
        text-align: center !important;
    }
}

.back-btn:hover {
    background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 100%) !important;
    transform: translateX(-50%) translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4) !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.back-btn:active {
    transform: translateX(-50%) translateY(0) !important;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3) !important;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .back-btn {
        top: 14px !important;
        padding: 14px 22px !important;
        font-size: 16px !important;
        border-radius: 16px !important;
    }
    /* Отодвигаем первый контейнер вниз, чтобы кнопка не перекрывала его */
    a.back-btn + .container {
        margin-top: 88px !important;
    }
}

@media (max-width: 480px) {
    .back-btn {
        top: 12px !important;
        padding: 16px 24px !important;
        font-size: 17px !important;
        border-radius: 18px !important;
    }
    a.back-btn + .container {
        margin-top: 96px !important;
    }
}

/* Более компактная кнопка на странице "О сервисе" на мобильных */
@media (max-width: 768px) {
    body.about-page .back-btn {
        padding: 10px 14px !important;
        font-size: 14px !important;
        border-radius: 12px !important;
        min-width: 0 !important;
    }
}
@media (max-width: 390px) {
    body.about-page .back-btn {
        padding: 9px 12px !important;
        font-size: 13.5px !important;
        border-radius: 12px !important;
    }
}

/* Более компактная кнопка на странице "Настройки" на мобильных */
@media (max-width: 768px) {
    body.settings-page .back-btn {
        padding: 12px 18px !important;
        font-size: 15px !important;
        border-radius: 14px !important;
        min-width: 0 !important;
    }
}
@media (max-width: 390px) {
    body.settings-page .back-btn {
        padding: 11px 16px !important;
        font-size: 14.5px !important;
        border-radius: 13px !important;
    }
}