/* ============================================
   GAINOVO TOKENS - DARK MODERN
   Versión 6.0 - Modales oscuros y compactos
   ============================================ */

/* ============================================
   TARJETAS BASE
   ============================================ */
.gainovo-card {
    background: transparent;
    padding: 0;
    margin: 0;
}

.gainovo-buttons {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
}

.gainovo-btn {
    padding: 4px 12px;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.deposit-btn {
    background: rgba(40, 167, 69, 0.15);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.deposit-btn:hover {
    background: rgba(40, 167, 69, 0.25);
    transform: translateY(-1px);
}

.withdraw-btn {
    background: rgba(22, 123, 255, 0.15);
    color: #167BFF;
    border: 1px solid rgba(22, 123, 255, 0.2);
}

.withdraw-btn:hover {
    background: rgba(22, 123, 255, 0.25);
    transform: translateY(-1px);
}

.metamask-btn {
    background: rgba(246, 133, 27, 0.15);
    color: #f6851b;
    border: 1px solid rgba(246, 133, 27, 0.2);
}

.metamask-btn:hover {
    background: rgba(246, 133, 27, 0.25);
    transform: translateY(-1px);
}

.contract-btn {
    background: rgba(52, 152, 219, 0.15);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.contract-btn:hover {
    background: rgba(52, 152, 219, 0.25);
    transform: translateY(-1px);
}

.gainovo-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================
   MODALES - DARK MODERN
   ============================================ */
.gainovo-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 20, 50, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    align-items: center;
    justify-content: center;
    animation: gd-fade-in 0.25s ease;
    padding: 20px;
}

.gainovo-modal[style*="display: block"] {
    display: flex !important;
}

@keyframes gd-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes gd-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.gainovo-modal-content {
    background: linear-gradient(145deg, #0F2B5C, #0a1a3a);
    border-radius: 16px;
    max-width: 440px;
    width: 100%;
    padding: 24px 22px 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
    color: #ffffff;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: gd-slide-up 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scrollbar personalizada */
.gainovo-modal-content::-webkit-scrollbar {
    width: 4px;
}
.gainovo-modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
}
.gainovo-modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

/* ============================================
   MODAL - TÍTULOS
   ============================================ */
.modal-title {
    text-align: center;
    margin: 0 0 16px 0;
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ============================================
   MODAL - ADVERTENCIAS
   ============================================ */
.qr-warning,
.withdraw-warning {
    background: rgba(255, 193, 7, 0.08);
    color: #ffc107;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
    border-left: 3px solid #ffc107;
    line-height: 1.5;
}

.qr-warning svg,
.withdraw-warning svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.qr-warning strong,
.withdraw-warning strong {
    color: #ffc107;
}

/* ============================================
   MODAL - QR Y DIRECCIÓN
   ============================================ */
.qr-code-container {
    display: flex;
    justify-content: center;
    margin: 12px 0;
    padding: 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.qr-code-container canvas {
    border-radius: 8px;
    background: #ffffff;
    padding: 8px;
}

.wallet-address-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.04);
    padding: 10px 12px;
    border-radius: 8px;
    margin: 12px 0 16px;
    word-break: break-all;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.wallet-address-text {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    flex: 1;
    margin-right: 10px;
    word-break: break-all;
}

.copy-address-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    border-radius: 6px;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.copy-address-btn:hover {
    background: rgba(255, 255, 255, 0.06);
}

.copy-address-btn svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   MODAL - FORMULARIOS
   ============================================ */
.gainovo-form-group {
    margin-bottom: 14px;
}

.gainovo-form-group label {
    display: block;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    font-size: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gainovo-form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.gainovo-form-group input:focus {
    outline: none;
    border-color: #167BFF;
    box-shadow: 0 0 0 3px rgba(22, 123, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
}

.gainovo-form-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.gainovo-form-group input[type="number"] {
    -moz-appearance: textfield;
}
.gainovo-form-group input[type="number"]::-webkit-inner-spin-button,
.gainovo-form-group input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ============================================
   BALANCE DISPLAY
   ============================================ */
.balance-display {
    font-size: 18px;
    font-weight: 600;
    color: #28a745;
    padding: 10px 14px;
    background: rgba(40, 167, 69, 0.06);
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(40, 167, 69, 0.1);
    font-family: 'SF Mono', 'Monaco', monospace;
}

/* ============================================
   AMOUNT INPUT CON MÁX
   ============================================ */
.amount-input-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

.amount-input-container input {
    flex: 1;
}

.max-amount-btn {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 600;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 50px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.max-amount-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.15);
}

/* ============================================
   MODAL - BOTONES DE ACCIÓN
   ============================================ */
.gainovo-modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 16px;
}

.gainovo-modal-actions .gainovo-btn {
    padding: 8px 20px;
    font-size: 12px;
    text-transform: none;
    border-radius: 40px;
    font-weight: 600;
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.primary-btn {
    background: linear-gradient(135deg, #0F52AA, #167BFF);
    color: #ffffff;
    border: 1px solid rgba(15, 82, 170, 0.3);
}

.primary-btn:hover {
    background: linear-gradient(135deg, #167BFF, #4a9eff);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(15, 82, 170, 0.3);
}

/* ============================================
   MODAL - CONTRASEÑA
   ============================================ */
.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-container input {
    flex: 1;
    padding-right: 44px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 4px;
    border-radius: 50%;
    transition: background 0.3s ease;
    color: rgba(255, 255, 255, 0.3);
}

.toggle-password:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.6);
}

.toggle-password svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   MODAL - STATUS MESSAGES
   ============================================ */
.status-message {
    padding: 10px 14px;
    border-radius: 8px;
    margin: 12px 0;
    text-align: center;
    font-weight: 500;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.status-processing {
    background: rgba(22, 123, 255, 0.1);
    color: #167BFF;
    border-left: 3px solid #167BFF;
}

.status-success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border-left: 3px solid #28a745;
}

.status-error {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border-left: 3px solid #dc3545;
}

/* ============================================
   MODAL - CÓDIGO 2FA
   ============================================ */
.codigo-2fa-modal .modal-title {
    font-size: 18px;
}

.codigo-2fa-modal .gainovo-form-group label {
    text-align: center;
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0;
}

.codigo-2fa-modal .gainovo-form-group p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin: 4px 0 12px;
    text-align: center;
}

.codigo-input {
    width: 100%;
    padding: 12px;
    font-size: 24px;
    text-align: center;
    letter-spacing: 8px;
    border: 2px solid rgba(22, 123, 255, 0.3);
    border-radius: 12px;
    outline: none;
    font-family: 'SF Mono', 'Monaco', monospace;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    transition: all 0.3s ease;
}

.codigo-input:focus {
    border-color: #167BFF;
    box-shadow: 0 0 0 3px rgba(22, 123, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
}

.codigo-input:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.codigo-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 4px;
}

/* ============================================
   MODAL - RETIRO PENDIENTE
   ============================================ */
.pending-withdraw-modal .gainovo-modal-content {
    max-width: 400px;
}

.pending-info {
    text-align: center;
    padding: 8px 0 12px;
}

.pending-info svg {
    margin-bottom: 8px;
}

.pending-info p {
    margin: 6px 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

#pending-details {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 12px 16px;
    margin: 12px 0;
    font-size: 13px;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
}

#pending-details strong {
    color: #ffffff;
}

#pending-details code {
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'SF Mono', 'Monaco', monospace;
}

#pending-timer {
    font-size: 14px;
    color: #ffc107;
    font-weight: 500;
    margin-bottom: 12px;
}

.resend-code-btn {
    background: rgba(243, 156, 18, 0.15) !important;
    color: #f39c12 !important;
    border: 1px solid rgba(243, 156, 18, 0.2) !important;
}

.resend-code-btn:hover {
    background: rgba(243, 156, 18, 0.25) !important;
    transform: translateY(-1px);
}

.resend-code-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================
   BOTÓN CERRAR MODAL
   ============================================ */
.close-modal-btn {
    background: rgba(255, 255, 255, 0.06) !important;
    color: rgba(255, 255, 255, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    width: 100%;
    margin-top: 8px;
    padding: 10px !important;
    font-size: 12px !important;
    border-radius: 40px !important;
    font-weight: 600 !important;
}

.close-modal-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 600px) {
    .gainovo-modal-content {
        padding: 20px 16px;
        margin: 10px;
        border-radius: 14px;
    }
    
    .modal-title {
        font-size: 18px;
        margin-bottom: 14px;
    }
    
    .gainovo-modal-actions {
        flex-direction: column;
    }
    
    .gainovo-modal-actions .gainovo-btn {
        width: 100%;
        justify-content: center;
    }
    
    .codigo-input {
        font-size: 20px;
        letter-spacing: 6px;
        padding: 10px;
    }
    
    .qr-warning,
    .withdraw-warning {
        font-size: 11px;
        padding: 8px 12px;
    }
    
    .balance-display {
        font-size: 16px;
        padding: 8px 12px;
    }
    
    .gainovo-form-group input {
        font-size: 13px;
        padding: 8px 12px;
    }
    
    .max-amount-btn {
        padding: 8px 12px;
        font-size: 10px;
        min-width: 44px;
    }
    
    .wallet-address-text {
        font-size: 11px;
    }
}

@media (max-width: 400px) {
    .gainovo-modal-content {
        padding: 16px 12px;
        border-radius: 12px;
    }
    
    .modal-title {
        font-size: 16px;
    }
    
    .codigo-input {
        font-size: 18px;
        letter-spacing: 4px;
        padding: 8px;
    }
    
    .gainovo-modal-actions .gainovo-btn {
        font-size: 11px;
        padding: 6px 14px;
    }
}