/* Profilseite, Favoriten und Avatar-Auswahl */

/* ---------- User Profil ---------- */

.profile-container {
  max-width: 1000px;
  margin: 0 auto;
}

.profile-header-card {
  background: linear-gradient(135deg, rgba(245, 197, 24, 0.08) 0%, rgba(23, 26, 34, 0.95) 100%), var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.profile-avatar-box {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 3px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 0 20px var(--accent-glow);
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}

.profile-avatar-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-avatar-box:hover {
  transform: scale(1.05);
}
.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info {
  flex: 1;
  min-width: 240px;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.profile-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 36px;
  letter-spacing: 0.04em;
  color: var(--text);
  line-height: 1;
}

.profile-level-badge {
  background: var(--accent);
  color: #000;
  font-weight: 800;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.profile-bio {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 14px;
  line-height: 1.45;
}

.profile-xp-wrap {
  max-width: 440px;
}
.profile-xp-head {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.profile-xp-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}
.profile-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #c49000, var(--accent));
  border-radius: 999px;
  transition: width 0.4s ease;
}

.profile-edit-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
  font-size: 12.5px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-self: flex-start;
  transition: all 0.15s ease;
}
.profile-edit-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

/* Pinned Favorites Showcase */
.pinned-section {
  margin-bottom: 28px;
}
.pinned-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.pinned-slot {
  aspect-ratio: 2/3;
  border-radius: var(--radius-md);
  background: var(--bg-raised);
  border: 1.5px dashed var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}
.pinned-slot:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.pinned-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pinned-slot-empty {
  font-size: 28px;
  color: var(--text-dim);
  opacity: 0.5;
}
.pinned-slot-label {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
  margin-top: 6px;
}

/* Avatar Picker Modal */
.avatar-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(54px, 1fr));
  gap: 10px;
  max-height: 240px;
  overflow-y: auto;
  padding: 8px;
  background: #111318;
  border-radius: var(--radius-sm);
  margin: 14px 0;
}
.avatar-picker-item {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  border: 2px solid var(--line);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: var(--bg-card);
  transition: all 0.15s ease;
  overflow: hidden;
}
.avatar-picker-item:hover:not(.locked), .avatar-picker-item.active {
  border-color: var(--accent);
  transform: scale(1.08);
  box-shadow: 0 0 10px var(--accent-glow);
}
.avatar-picker-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Gesperrtes Avatar-Icon mit 🔒-Overlay */
.avatar-picker-item.locked {
  opacity: 0.35;
  filter: grayscale(1);
  cursor: not-allowed;
  position: relative;
}
.avatar-picker-item.locked::after {
  content: '🔒';
  position: absolute;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.75);
  border-radius: 50%;
  padding: 2px 4px;
  line-height: 1;
}

@media (max-width: 600px) {
  .pinned-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-header-card { flex-direction: column; text-align: center; }
  .profile-name-row { justify-content: center; }
  .profile-xp-wrap { margin: 0 auto; }
  .profile-edit-btn { align-self: center; }
}
