/* Mobile-optimized styles for Alandys Launch */

/* Amélioration de l'affichage wallet sur mobile */
@media (max-width: 768px) {
    /* Header mobile optimisé */
    .header {
        padding: 0.5rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .nav-buttons {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        width: 100%;
        order: 2;
    }
    
    .nav-buttons button {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        min-width: auto;
    }
    
    /* Wallet info optimisé */
    .wallet-section {
        order: 1;
        width: 100%;
        display: flex;
        justify-content: center;
        margin-bottom: 0.5rem;
    }
    
    .wallet-info {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
        border-radius: 20px;
        background: linear-gradient(135deg, #706fd3, #5f5cc9);
        border: 2px solid #474787;
        color: white;
        font-weight: bold;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .wallet-info:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 20px rgba(112, 111, 211, 0.5);
    }
    
    .wallet-info.connected {
        background: linear-gradient(135deg, #05c46b, #0be881);
        border-color: #00d2d3;
        animation: connectedGlow 3s ease-out;
    }
    
    @keyframes connectedGlow {
        0% { 
            box-shadow: 0 0 0 0 rgba(5, 196, 107, 0.8);
        }
        50% { 
            box-shadow: 0 0 20px 10px rgba(5, 196, 107, 0.4);
        }
        100% { 
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        }
    }
    
    .wallet-address {
        font-family: 'Courier New', monospace;
        font-size: 0.75rem;
        opacity: 0.9;
    }
    
    /* Phantom connection modal mobile */
    .wallet-modal-content {
        padding: 1.5rem;
        margin: 1rem;
        max-height: 85vh;
        overflow-y: auto;
    }
    
    .wallet-modal-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .wallet-modal-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .wallet-options {
        gap: 0.75rem;
    }
    
    .wallet-option {
        padding: 1rem;
        font-size: 0.95rem;
        border-radius: 20px;
        background: linear-gradient(145deg, #706fd3, #5f5cc9);
        border: 3px solid #474787;
        color: white;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        gap: 1rem;
        text-decoration: none;
        margin-bottom: 0.5rem;
    }
    
    .wallet-option:hover,
    .wallet-option:active {
        transform: translateY(-2px);
        background: linear-gradient(145deg, #5f5cc9, #706fd3);
        border-color: #ffd32a;
        box-shadow: 0 4px 20px rgba(255, 211, 42, 0.3);
    }
    
    .wallet-option.wallet-primary {
        background: linear-gradient(135deg, #ffd32a, #ffb142);
        color: #2c2c54;
        border-color: #ff6b6b;
        font-weight: 900;
    }
    
    .wallet-icon {
        font-size: 2rem;
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    }
    
    .wallet-info {
        flex: 1;
        text-align: left;
    }
    
    .wallet-name {
        display: block;
        font-weight: 900;
        font-size: 1.1rem;
        margin-bottom: 0.25rem;
        text-transform: uppercase;
        letter-spacing: 1px;
    }
    
    .wallet-subtitle {
        display: block;
        font-size: 0.8rem;
        opacity: 0.8;
    }
    
    .wallet-arrow {
        font-size: 1.5rem;
        opacity: 0.8;
    }
    
    /* État de connexion en cours */
    .wallet-connecting-state {
        text-align: center;
        padding: 2rem 0;
        color: #ffd32a;
    }
    
    .connecting-spinner {
        width: 50px;
        height: 50px;
        border: 4px solid rgba(255, 211, 42, 0.3);
        border-top: 4px solid #ffd32a;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        margin: 0 auto 1rem;
    }
    
    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
    
    /* État d'erreur */
    .wallet-error-info {
        background: rgba(255, 107, 107, 0.1);
        border: 2px solid #ff6b6b;
        border-radius: 15px;
        padding: 1rem;
        margin-top: 1rem;
        animation: errorShake 0.5s ease-out;
    }
    
    @keyframes errorShake {
        0%, 100% { transform: translateX(0); }
        25% { transform: translateX(-5px); }
        75% { transform: translateX(5px); }
    }
    
    .error-message {
        color: #ff6b6b;
        font-weight: bold;
        margin-bottom: 0.5rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .error-icon {
        font-size: 1.2rem;
    }
    
    .error-suggestion {
        color: rgba(255, 255, 255, 0.8);
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
    
    .wallet-retry-button {
        background: linear-gradient(135deg, #ff6b6b, #ff4757);
        color: white;
        border: none;
        padding: 0.75rem 1.5rem;
        border-radius: 20px;
        font-weight: bold;
        cursor: pointer;
        transition: all 0.3s ease;
        width: 100%;
    }
    
    .wallet-retry-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    }
    
    /* Daily rewards button mobile */
    .daily-rewards-button {
        min-width: auto;
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .daily-rewards-button span:nth-child(2) {
        display: none; /* Hide text on mobile, keep only icon */
    }
    
    /* Floating Marga button mobile */
    .unified-floating-button {
        width: 60px;
        height: 60px;
        bottom: 20px;
        right: 20px;
    }
    
    .unified-marga-icon img {
        width: 50px;
        height: 50px;
    }
    
    .notification-badge {
        width: 22px;
        height: 22px;
        font-size: 0.8rem;
        top: -5px;
        right: -5px;
    }
}

/* Touch-friendly styles */
@media (hover: none) and (pointer: coarse) {
    /* Augmenter les zones tactiles */
    button, .wallet-option, .nav-button {
        min-height: 44px;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    /* Désactiver les effets hover sur mobile */
    button:hover, .wallet-option:hover {
        transform: none;
    }
    
    /* Utiliser :active pour le feedback tactile */
    button:active, .wallet-option:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
}

/* Amélioration générale de la lisibilité */
@media (max-width: 768px) {
    body {
        font-size: 16px; /* Empêche le zoom sur iOS */
    }
    
    input, select, textarea {
        font-size: 16px; /* Empêche le zoom sur iOS */
    }
    
    /* Réduire l'espacement général */
    .container {
        padding: 0.5rem;
    }
    
    .section {
        margin-bottom: 1rem;
        padding: 1rem;
    }
}
