/* Wallet modal styles (old, to be replaced) */
.wallet-profile-section {
        padding: 24px 18px 18px 18px;
        background: var(--background-light);
        border-radius: 16px;
        box-shadow: 0 4px 24px rgba(0,0,0,0.18);
        border: 1.5px solid var(--border);
        max-width: 400px;
        margin: 0 auto;
}
/* Wallet Modal - harmonized with multiplier modal */
.wallet-modal-content {
        background: var(--background-light);
        border-radius: 18px;
        box-shadow: 0 8px 32px rgba(0,0,0,0.45);
        border: 1.5px solid var(--border);
        padding: 0 0 24px 0;
        max-width: 420px;
        margin: 0 auto;
        animation: modalFadeIn 0.22s cubic-bezier(.4,1.4,.6,1) 1;
}

@media (max-width: 600px) {
    .wallet-modal-content {
        max-width: 98vw;
        padding: 0 0 16px 0;
    }
}
/* ========================================
   Profile Page
   ======================================== */

.profile {
    max-width: 1000px;
    margin: 0 auto;
    padding-top: var(--spacing-xl);
}

.profile-header {
    background: var(--background-light);
    padding: var(--spacing-2xl);
    border-radius: var(--radius-lg);
    display: flex;
    gap: var(--spacing-xl);
    align-items: center;
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.profile-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1;
    pointer-events: none;
}

.profile-header > * {
    position: relative;
    z-index: 2;
}

.profile-avatar,
.profile-info,
.profile-stats-quick,
.stat-badge {
    position: relative;
    z-index: 2;
}

.profile-avatar {
    flex-shrink: 0;
}

.avatar-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid rgba(255, 255, 255, 0.3);
}

.avatar-icon {
    font-size: 4rem;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-info {
    flex: 1;
    color: white;
}

.profile-username {
    font-size: 2rem;
    margin-bottom: var(--spacing-xs);
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 0, 0, 0.6);
}

.profile-type {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: var(--spacing-md);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.profile-stats-quick {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.stat-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
    min-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.stat-badge .stat-label {
    display: block;
    font-size: 0.8rem;
    opacity: 0.8;
    margin-bottom: var(--spacing-xs);
    white-space: nowrap;
}

.stat-badge .stat-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
}

.profile-content {
    background: var(--background-light);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.profile-content h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-lg);
    margin-top: var(--spacing-xl);
    font-size: 1.5rem;
    font-weight: 600;
}

.profile-content h3:first-child {
    margin-top: 0;
}

.stats-grid {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
}

.stat-card {
    background: var(--surface);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
    flex: 1;
    min-width: 150px;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), 0 0 15px rgba(0, 217, 255, 0.2);
    border-color: var(--primary-color);
}

.stat-icon {
    font-size: 1.8rem;
    opacity: 0.8;
    flex-shrink: 0;
}

.stat-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stat-number {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.activity-list {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    border: 1px solid var(--border);
}

.activity-item {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-game {
    font-weight: 600;
    color: var(--text-primary);
}

.activity-details {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.activity-time {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.high-scores-list {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    border: 1px solid var(--border);
}

.high-score-item {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.high-score-item:hover {
    background: rgba(255, 117, 24, 0.05);
    transform: translateX(4px);
}

.high-score-item:last-child {
    border-bottom: none;
}

.high-score-game {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex: 1;
}

.high-score-thumbnail {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 2px solid var(--border);
}

.high-score-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.high-score-game-name {
    font-weight: 600;
    color: var(--text-primary);
}

.high-score-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(0, 217, 255, 0.1);
    border-radius: var(--radius-lg);
    border: 2px solid var(--primary-color);
}

.settings-section {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    border: 1px solid var(--border);
}

.setting-item {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.setting-info strong {
    color: var(--text-primary);
    font-size: 0.95rem;
}

.setting-value {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.text-muted {
    color: var(--text-muted);
    text-align: center;
    padding: var(--spacing-lg);
}

.loading-placeholder {
    color: var(--text-muted);
    text-align: center;
    padding: var(--spacing-lg);
    font-style: italic;
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .profile {
        padding-top: 130px;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .profile-header {
        padding: var(--spacing-lg);
    }
    
    .avatar-circle {
        width: 80px;
        height: 80px;
    }
    
    .avatar-icon {
        font-size: 2.5rem;
    }
    
    .profile-username {
        font-size: 1.5rem;
    }
    
    .profile-content {
        padding: var(--spacing-md);
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
}

/* Modal animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
