* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.9;
}

.gradient-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(243, 156, 18, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 40%, rgba(168, 85, 247, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at center, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 1;
    pointer-events: none;
}

.container {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 1.5rem;
}

header {
    text-align: center;
    margin-bottom: 1.5rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.6;
    font-weight: 400;
    margin-bottom: 1rem;
}

.btc-price-display {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    margin: 0 auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.btc-price-display:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
    border-color: rgba(243, 156, 18, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.btc-label {
    font-size: 0.85rem;
    opacity: 0.6;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btc-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #f39c12;
    transition: transform 0.15s ease;
}

.wallet-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 2rem;
    backdrop-filter: blur(30px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.wallet-input, .wallet-address {
    margin-bottom: 0;
}

.wallet-input label, .wallet-address label {
    display: block;
    font-size: 0.85rem;
    opacity: 0.7;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.input-display, .address-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.input-display:focus-within, .address-display:hover {
    border-color: rgba(243, 156, 18, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

#wallet-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    padding: 0.5rem;
    outline: none;
}

#wallet-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.lookup-button, .copy-button, .refresh-button {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.2), rgba(255, 149, 0, 0.15));
    border: 1px solid rgba(243, 156, 18, 0.3);
    color: #f39c12;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.1);
}

.lookup-button:hover, .copy-button:hover, .refresh-button:hover {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.3), rgba(255, 149, 0, 0.2));
    border-color: rgba(243, 156, 18, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(243, 156, 18, 0.2);
}

.lookup-button:disabled, .refresh-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#wallet-address {
    flex: 1;
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    word-break: break-all;
    color: #f39c12;
    opacity: 0.9;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 0;
}

.stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    min-height: 80px;
}

.stat-card:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    transform: translateY(-2px);
    border-color: rgba(243, 156, 18, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    font-size: 1.3rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.15), rgba(255, 149, 0, 0.08));
    border: 1px solid rgba(243, 156, 18, 0.2);
    border-radius: 10px;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-label {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: #f39c12;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4444;
    animation: pulse 2s infinite;
}

.status-dot.connected {
    background: #44ff44;
}

.status-dot.loading {
    background: #ffaa00;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.refresh-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 1rem;
}

.auto-refresh {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.7;
}

.auto-refresh input[type="checkbox"] {
    accent-color: #f39c12;
    width: 16px;
    height: 16px;
}

@media (max-width: 968px) {
    .container {
        padding: 1rem;
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    
    .stat-card {
        padding: 1rem;
        min-height: 70px;
    }
    
    .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    
    .stat-value {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
        gap: 1rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .wallet-card {
        padding: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .stat-card {
        padding: 1rem;
        gap: 0.8rem;
    }
    
    .address-display, .input-display {
        flex-direction: column;
        align-items: stretch;
        gap: 0.8rem;
    }
    
    .refresh-controls {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.8rem;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .wallet-card {
        padding: 1rem;
        border-radius: 16px;
    }
    
    .stat-card {
        padding: 0.8rem;
        min-height: 60px;
    }
    
    .stat-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .stat-label {
        font-size: 0.65rem;
    }
    
    .stat-value {
        font-size: 0.85rem;
    }
}