/* ========== PROFILE PAGE ========== */

.profile-page {
    max-width: 700px;
    margin: 0 auto;
}

.profile-guest {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 1.25rem;
}

.profile-guest-icon {
    color: var(--muted);
    opacity: 0.5;
    margin-bottom: 1rem;
}

.profile-guest h2 {
    margin-bottom: 0.5rem;
}

.profile-guest p {
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.profile-header {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.profile-avatar {
    position: relative;
    width: 80px;
    height: 80px;
}

.avatar-letter {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #fff;
    border-radius: 50%;
    font-size: 2rem;
    font-weight: 600;
}

.avatar-level {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-warm);
    color: #fff;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    border: 3px solid var(--surface);
}

.profile-info h1 {
    font-size: 1.6rem;
    margin-bottom: 0.25rem;
}

.profile-email {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.profile-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.profile-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-rank {
    background: rgb(from var(--mud-palette-primary) r g b / 0.12);
    color: var(--accent-strong);
}

.badge-level {
    background: rgba(242, 165, 65, 0.15);
    color: #b45309;
}

.profile-progress {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.progress-xp {
    font-weight: 600;
    color: var(--accent);
}

.progress-bar {
    height: 8px;
    background: rgb(from var(--mud-palette-primary) r g b / 0.1);
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-warm));
    border-radius: 999px;
    transition: width 300ms ease;
}

.progress-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--muted);
}

.profile-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 1rem;
    background: rgb(from var(--mud-palette-primary) r g b / 0.06);
    padding: 0.25rem;
    border-radius: 0.75rem;
}

.profile-tab {
    flex: 1 1 auto;
    padding: 0.6rem 1rem;
    border: none;
    background: transparent;
    border-radius: 0.5rem;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
    transition: all 150ms ease;
}

.profile-tab.active {
    background: var(--surface);
    color: var(--accent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.profile-content {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 1.25rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.stats-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 1rem;
    background: rgb(from var(--mud-palette-primary) r g b / 0.04);
    border-radius: 0.75rem;
    text-align: center;
}

.stat-card-sm {
    padding: 0.75rem;
}

.stat-icon {
    color: var(--muted);
}

.stat-icon-accent {
    color: var(--accent);
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ink);
}

.stat-card-sm .stat-value {
    font-size: 1.1rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--muted);
}

.recent-activity h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.activity-placeholder {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--muted);
}

.activity-placeholder svg {
    opacity: 0.4;
    margin-bottom: 0.5rem;
}

.activity-placeholder p {
    margin: 0 0 0.25rem;
    color: var(--ink);
}

.game-stats-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.game-stats-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #114b64 0%, #0b3648 100%);
    border-radius: 0.75rem;
}

.game-stats-icon-typing {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #fff;
}

.game-stats-icon-word {
    background: linear-gradient(135deg, #f1a54b, #d65d2d);
    color: #fff;
}

.game-stats-icon-math {
    background: linear-gradient(135deg, #2e508b, #1b2f55);
    color: #fff;
}

.game-stats-icon-ludo {
    background: linear-gradient(135deg, #2f8a57, #1e5a7c);
    color: #fff;
}

.game-stats-icon-ttt {
    background: linear-gradient(135deg, #2f2f39, #111827);
    color: #fff;
}

.game-stats-icon-rps {
    background: linear-gradient(135deg, #7a3d1c, #b96a2c);
    color: #fff;
}

.game-stats-title h3 {
    font-size: 1.1rem;
    margin: 0;
}

.game-stats-title span {
    font-size: 0.8rem;
    color: var(--muted);
}

.stats-placeholder {
    text-align: center;
    padding: 1.5rem;
    background: rgb(from var(--mud-palette-primary) r g b / 0.04);
    border-radius: 0.75rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.profile-actions {
    display: flex;
    justify-content: flex-end;
}

.btn-danger {
    color: #b03434;
    border-color: rgba(185, 52, 52, 0.3);
}

.btn-danger:hover {
    background: rgba(185, 52, 52, 0.08);
}
