* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --bg: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --card: #252545;
    --card-hover: #2d2d52;
    --text: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --success: #10b981;
    --border: rgba(255, 255, 255, 0.08);
}

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

body {
    background: 
        radial-gradient(ellipse at top left, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        var(--bg);
    min-height: 100vh;
}

.app {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    position: sticky;
    top: 0;
    background: linear-gradient(180deg, var(--bg) 0%, rgba(15, 15, 26, 0.95) 100%);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.back-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--card);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text);
}

.back-btn:active {
    transform: scale(0.95);
    background: var(--card-hover);
}

.title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.placeholder {
    width: 40px;
}

.content {
    flex: 1;
    padding: 0 20px 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.amount-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 24px;
    padding: 28px 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.25);
}

.amount-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.amount-label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.amount-value {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 8px;
}

.amount-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}

.section-title span {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}

.wallet-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wallet-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--card);
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

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

.wallet-item:active {
    transform: scale(0.98);
    background: var(--card-hover);
}

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

.wallet-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 800;
    font-size: 20px;
    color: white;
    position: relative;
    overflow: hidden;
    background: transparent;
    padding: 0;
}

.wallet-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
    display: block;
}

.wallet-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.wallet-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}

.wallet-desc {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wallet-arrow {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.wallet-item:active .wallet-arrow {
    background: var(--primary);
    color: white;
    transform: translateX(4px);
}

.security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    background: rgba(16, 185, 129, 0.08);
    border-radius: 14px;
    margin-top: 8px;
    color: var(--success);
    font-size: 13px;
    font-weight: 600;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 15, 26, 0.92);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.spinner {
    width: 56px;
    height: 56px;
    border: 4px solid rgba(99, 102, 241, 0.15);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

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

.loading-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}

@media (min-width: 481px) {
    .app {
        max-width: 520px;
        margin: 20px auto;
        min-height: calc(100vh - 40px);
        border-radius: 32px;
        background: var(--bg);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
        overflow: hidden;
    }
    
    body {
        padding: 0;
    }
}

@media (min-width: 768px) {
    .wallet-item:hover {
        background: var(--card-hover);
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
        border-color: rgba(99, 102, 241, 0.2);
    }
    
    .wallet-item:hover .wallet-arrow {
        background: var(--primary);
        color: white;
        transform: translateX(4px);
    }
    
    .back-btn:hover {
        background: var(--card-hover);
    }
}
