/* Solana Wallet Adapter Styles */

/* Wallet Modal Overlay */
.wallet-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wallet-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Wallet Modal */
.wallet-modal {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.98), rgba(0, 255, 65, 0.05));
    border: 3px solid #00ff41;
    border-radius: 16px;
    padding: 1.25rem;
    max-width: 380px;
    width: 92%;
    max-height: 60vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 
        0 0 40px rgba(0, 255, 65, 0.35),
        0 16px 32px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transform: scale(0.86);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.wallet-modal-overlay.show .wallet-modal {
    transform: scale(1);
}

/* Modal Header */
.wallet-modal-header {
    text-align: center;
    margin-bottom: 1.25rem;
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.98), rgba(0, 255, 65, 0.05));
    padding-top: 0.5rem;
    padding-bottom: 0.75rem;
    z-index: 1;
    border-bottom: 1px solid rgba(0, 255, 65, 0.15);
    flex-shrink: 0;
}

.wallet-modal-title {
    color: #00ff41;
    font-family: 'Press Start 2P', cursive;
    font-size: 1.2rem;
    margin-bottom: 0.6rem;
    text-shadow: 
        0 0 8px rgba(0, 255, 65, 0.45),
        0 0 16px rgba(0, 255, 65, 0.25);
    letter-spacing: 1.5px;
}

.wallet-modal-subtitle {
    color: #ccc;
    font-size: 0.95rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Close Button */
.wallet-modal-close {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 32px;
    height: 32px;
    background: #ff0040;
    border: 2px solid #00ff41;
    border-radius: 50%;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.wallet-modal-close:hover {
    background: #cc0033;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 0, 64, 0.5);
}

/* Wallet List */
.wallet-list {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex: 1;
    overflow-y: auto;
    min-height: 200px;
    padding-right: 0.25rem;
}

/* Wallet Item */
.wallet-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 255, 65, 0.05));
    border: 2px solid #333;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 56px;
    backdrop-filter: blur(10px);
}

.wallet-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 65, 0.1), transparent);
    transition: left 0.5s;
}

.wallet-item:hover::before {
    left: 100%;
}

.wallet-item:hover {
    border-color: #00ff41;
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.15), rgba(0, 255, 65, 0.05));
    transform: translateX(8px) translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(0, 255, 65, 0.4),
        0 4px 10px rgba(0, 0, 0, 0.3);
}

.wallet-item.available {
    border-color: #00ff41;
    background: rgba(0, 255, 65, 0.05);
}

.wallet-item.not-available {
    opacity: 0.5;
    cursor: not-allowed;
}

.wallet-item.not-available:hover {
    transform: none;
    border-color: #333;
    background: rgba(0, 0, 0, 0.7);
    box-shadow: none;
}

/* Wallet Icon */
.wallet-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    margin-right: 0.75rem;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 2px solid #333;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.wallet-item:hover .wallet-icon {
    border-color: #00ff41;
    transform: scale(1.05);
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(0, 255, 65, 0.3);
}

/* Wallet Info */
.wallet-info {
    flex: 1;
    min-width: 0;
}

.wallet-name {
    color: #fff;
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wallet-status {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.wallet-status.available {
    color: #00ff41;
}

.wallet-status.not-available {
    color: #666;
}

/* Status Indicator */
.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #666;
}

.status-indicator.available {
    background: #00ff41;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

/* Install Link */
.wallet-install-link {
    color: #00ff41;
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.3s ease;
}

.wallet-install-link:hover {
    color: #00ff80;
    text-decoration: underline;
}

/* Loading State */
.wallet-item.loading {
    cursor: wait;
}

.wallet-item.loading::after {
    content: '';
    position: absolute;
    right: 1rem;
    width: 20px;
    height: 20px;
    border: 2px solid #333;
    border-top: 2px solid #00ff41;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Status Container */
#wallet-status-container {
    margin-bottom: 1rem;
    flex-shrink: 0;
}

/* Connection Status */
.connection-status {
    text-align: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 1px solid #333;
}

.connection-status.connected {
    border-color: #00ff41;
    background: rgba(0, 255, 65, 0.1);
}

.connection-status.connecting {
    border-color: #ffaa00;
    background: rgba(255, 170, 0, 0.1);
}

.connection-status.error {
    border-color: #ff0040;
    background: rgba(255, 0, 64, 0.1);
}

/* Connected Wallet Display */
.connected-wallet {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(0, 255, 65, 0.1);
    border: 2px solid #00ff41;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.connected-wallet-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.connected-wallet-name {
    color: #00ff41;
    font-weight: bold;
}

.connected-wallet-address {
    color: #ccc;
    font-family: monospace;
    font-size: 0.8rem;
}

.disconnect-button {
    background: #ff0040;
    border: none;
    border-radius: 8px;
    color: #fff;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.65rem;
    transition: all 0.3s ease;
}

.disconnect-button:hover {
    background: #cc0033;
    transform: scale(1.05);
}

/* Error Messages */
.wallet-error {
    background: rgba(255, 0, 64, 0.1);
    border: 2px solid #ff0040;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #ff0040;
    text-align: center;
}

/* Success Messages */
.wallet-success {
    background: rgba(0, 255, 65, 0.1);
    border: 2px solid #00ff41;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #00ff41;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wallet-modal {
        padding: 1rem;
        margin: 0.75rem;
        max-width: 92%;
    }
    
    .wallet-modal-title {
        font-size: 1rem;
    }
    
    .wallet-item {
        padding: 0.6rem;
        min-height: 52px;
    }
    
    .wallet-icon {
        width: 34px;
        height: 34px;
        margin-right: 0.6rem;
    }
    
    .wallet-name {
        font-size: 0.95rem;
    }
    
    .wallet-status {
        font-size: 0.75rem;
    }
    
    .connected-wallet {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .connected-wallet-address {
        font-size: 0.8rem;
        word-break: break-all;
    }
}

/* Animation for wallet items */
.wallet-item {
    animation: slideInUp 0.3s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.wallet-item:nth-child(1) { animation-delay: 0.1s; }
.wallet-item:nth-child(2) { animation-delay: 0.2s; }
.wallet-item:nth-child(3) { animation-delay: 0.3s; }
.wallet-item:nth-child(4) { animation-delay: 0.4s; }
.wallet-item:nth-child(5) { animation-delay: 0.5s; }
.wallet-item:nth-child(6) { animation-delay: 0.6s; }

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
