/* Phantom Deeplinks Mobile Styles */

/* Amélioration du modal de connexion pour mobile */
@media (max-width: 768px) {
    .wallet-selection-modal {
        padding: 1rem;
    }
    
    .wallet-modal-content {
        width: 95%;
        max-width: none;
        padding: 1.5rem;
        border-radius: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .wallet-modal-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .wallet-modal-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .wallet-options {
        gap: 0.75rem;
    }
    
    .wallet-option {
        padding: 1rem;
        border-radius: 16px;
        display: flex;
        align-items: center;
        gap: 1rem;
        transition: all 0.3s ease;
        background: rgba(255, 255, 255, 0.05);
        border: 2px solid rgba(171, 104, 255, 0.3);
    }
    
    .wallet-option:active {
        transform: scale(0.98);
        background: rgba(171, 104, 255, 0.2);
    }
    
    .wallet-primary {
        background: linear-gradient(135deg, rgba(171, 104, 255, 0.2) 0%, rgba(124, 58, 237, 0.2) 100%);
        border-color: #ab68ff;
    }
    
    .wallet-icon {
        font-size: 2rem;
        min-width: 2.5rem;
        text-align: center;
    }
    
    .wallet-info {
        flex: 1;
        text-align: left;
    }
    
    .wallet-name {
        display: block;
        font-size: 1.1rem;
        font-weight: 600;
        color: #fff;
        margin-bottom: 0.25rem;
    }
    
    .wallet-subtitle {
        display: block;
        font-size: 0.85rem;
        color: rgba(255, 255, 255, 0.7);
    }
    
    .wallet-arrow {
        font-size: 1.5rem;
        color: #ab68ff;
    }
    
    /* État de connexion */
    .wallet-connecting-state {
        text-align: center;
        padding: 2rem 1rem;
        animation: fadeIn 0.3s ease;
    }
    
    .connecting-spinner {
        width: 60px;
        height: 60px;
        border: 3px solid rgba(171, 104, 255, 0.3);
        border-top-color: #ab68ff;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        margin: 0 auto 1rem;
    }
    
    /* Message d'aide */
    .wallet-help-section {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .wallet-help-text {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.85rem;
        color: rgba(255, 255, 255, 0.7);
        margin-bottom: 1rem;
    }
    
    .help-icon {
        font-size: 1.2rem;
    }
    
    /* Erreur de connexion */
    .wallet-error-info {
        background: rgba(255, 59, 48, 0.1);
        border: 2px solid rgba(255, 59, 48, 0.3);
        border-radius: 12px;
        padding: 1rem;
        margin-top: 1rem;
    }
    
    .error-message {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
        color: #ff3b30;
        font-weight: 600;
    }
    
    .error-suggestion {
        font-size: 0.85rem;
        color: rgba(255, 255, 255, 0.8);
        margin-bottom: 1rem;
        line-height: 1.5;
    }
    
    .wallet-retry-button {
        width: 100%;
        padding: 0.75rem;
        background: linear-gradient(135deg, #ab68ff 0%, #7c3aed 100%);
        color: white;
        border: none;
        border-radius: 12px;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .wallet-retry-button:active {
        transform: scale(0.98);
    }
    
    /* Bouton de fermeture */
    .close-modal {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: rgba(255, 255, 255, 0.1);
        border: none;
        color: white;
        font-size: 1.5rem;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
        z-index: 1;
    }
    
    .close-modal:active {
        background: rgba(255, 255, 255, 0.2);
        transform: scale(0.95);
    }
    
    /* Détection de wallet dans le navigateur */
    .wallet-browser-detected {
        text-align: center;
        padding: 1rem;
    }
    
    .wallet-icon-large {
        font-size: 4rem;
        margin-bottom: 1rem;
        animation: pulse 2s ease-in-out infinite;
    }
    
    .wallet-connect-button {
        width: 100%;
        padding: 1rem;
        margin-top: 1rem;
        background: linear-gradient(135deg, #ab68ff 0%, #7c3aed 100%);
        color: white;
        border: none;
        border-radius: 16px;
        font-size: 1.1rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
    }
    
    .wallet-connect-button:active {
        transform: scale(0.98);
    }
    
    .connect-icon {
        font-size: 1.3rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Notification de redirection */
.phantom-redirect-notice {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #ab68ff;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    z-index: 10000;
    animation: slideIn 0.3s ease;
    box-shadow: 0 20px 40px rgba(171, 104, 255, 0.3);
}

.phantom-redirect-notice h3 {
    color: #fff;
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
}

.phantom-redirect-notice p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 1.5rem 0;
    line-height: 1.5;
}

.phantom-redirect-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(171, 104, 255, 0.3);
    border-top-color: #ab68ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Desktop styles for Phantom deeplinks */
@media (min-width: 769px) {
    .wallet-modal-content {
        min-width: 400px;
    }
    
    .wallet-option:hover {
        background: rgba(171, 104, 255, 0.1);
        border-color: #ab68ff;
        transform: translateY(-2px);
    }
    
    .wallet-connect-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 30px rgba(171, 104, 255, 0.3);
    }
}
