/* Profilansicht im Lager-Design */

.profile-page .inventory-header {
  display: grid;
  grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 36px);
  align-items: center;
  border-color: var(--accent-border-mid, rgba(42, 217, 119, 0.22));
  background:
    var(--gradient-panel-glow, radial-gradient(circle at 85% 15%, rgba(118, 255, 101, 0.18), transparent 60%)),
    var(--gradient-panel, linear-gradient(150deg, rgba(11, 18, 14, 0.94) 0%, rgba(4, 7, 5, 0.95) 100%));
  box-shadow:
    inset 0 0 0 1px rgba(var(--accent-rgb, 42, 217, 119), 0.14),
    0 26px 50px var(--shadow-soft, rgba(3, 8, 4, 0.58)),
    0 0 34px rgba(var(--accent-pop-rgb, 118, 255, 101), 0.22);
}

.profile-metrics .inventory-metric {
  min-width: 0;
}

.profile-metrics .inventory-metric__value,
.profile-metrics .inventory-metric__hint {
  overflow-wrap: anywhere;
}

.profile-header__avatar {
  justify-self: center;
}

.profile-page .inventory-header::before {
  inset: -45% -25%;
  background:
    radial-gradient(circle at 30% 18%, rgba(var(--accent-pop-rgb, 118, 255, 101), 0.32), transparent 62%),
    radial-gradient(circle at 82% 120%, rgba(var(--accent-soft-rgb, 17, 123, 69), 0.24), transparent 70%);
  opacity: 0.42;
}

.profile-avatar {
  width: clamp(140px, 18vw, 190px);
  aspect-ratio: 1 / 1;
  border-radius: 22px;
  border: 2px solid rgba(var(--accent-rgb, 42, 217, 119), 0.45);
  box-shadow:
    0 0 18px rgba(var(--accent-pop-rgb, 118, 255, 101), 0.28),
    inset 0 0 0 1px rgba(var(--accent-rgb, 42, 217, 119), 0.16);
  object-fit: cover;
}

.profile-header__content {
  display: grid;
  gap: 16px;
}

.profile-gamification {
  display: grid;
  gap: 22px;
}

.profile-gamification__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.profile-level-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
 border: 1px solid var(--accent-border-mid, rgba(42, 217, 119, 0.26));
  background: linear-gradient(135deg, rgba(12, 20, 16, 0.92), rgba(6, 12, 9, 0.88));
  box-shadow:
    inset 0 0 0 1px rgba(var(--accent-rgb, 42, 217, 119), 0.12),
    0 0 18px rgba(var(--accent-pop-rgb, 118, 255, 101), 0.25);
  font-weight: 600;
  letter-spacing: 0.35px;
  color: var(--accent-text-strong, rgba(222, 255, 232, 0.92));
}

.profile-xp-overview {
  display: grid;
  gap: 12px;
}

.profile-xp-overview__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(200, 255, 210, 0.82);
  font-weight: 500;
}

.profile-xp-overview__xp {
  font-size: 1.05rem;
  color: #fff;
}

.profile-xp-overview__next {
  font-size: 0.95rem;
  color: rgba(200, 255, 210, 0.75);
}

.profile-xp-bar {
  position: relative;
  width: 100%;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb, 42, 217, 119), 0.2);
  background: rgba(8, 12, 10, 0.85);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb, 42, 217, 119), 0.08);
  overflow: hidden;
}

.profile-xp-bar span {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(var(--accent-pop-rgb, 118, 255, 101), 0.85), rgba(var(--accent-rgb, 42, 217, 119), 0.95));
  box-shadow: 0 0 18px rgba(var(--accent-pop-rgb, 118, 255, 101), 0.45);
  transition: width 0.45s ease;
}

.profile-xp-breakdown {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.profile-xp-breakdown__item {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--accent-border-mid, rgba(42, 217, 119, 0.18));
  background:
    linear-gradient(150deg, rgba(9, 15, 12, 0.9), rgba(5, 9, 7, 0.88)),
    var(--gradient-card, linear-gradient(160deg, rgba(9, 15, 12, 0.92), rgba(4, 8, 6, 0.9)));
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb, 42, 217, 119), 0.06);
  display: grid;
  gap: 6px;
}

.profile-xp-breakdown__label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.32px;
  color: rgba(200, 255, 210, 0.7);
}

.profile-xp-breakdown__value {
  font-size: 1.22rem;
  font-weight: 700;
  color: #fff;
}

.profile-xp-breakdown__hint {
  font-size: 0.85rem;
  color: rgba(200, 255, 210, 0.72);
}

.profile-achievement-card {
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(118, 255, 101, 0.28);
  background: linear-gradient(135deg, rgba(12, 18, 15, 0.88), rgba(16, 26, 20, 0.9));
  box-shadow:
    inset 0 0 0 1px rgba(118, 255, 101, 0.12),
    0 18px 32px rgba(0, 0, 0, 0.32);
  display: grid;
  gap: 8px;
}

.profile-achievement-card__eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.38px;
  text-transform: uppercase;
  color: rgba(118, 255, 101, 0.82);
}

.profile-achievement-card__title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.profile-achievement-card__text {
  margin: 0;
  color: rgba(222, 255, 232, 0.82);
  line-height: 1.6;
}

.profile-achievement-card--locked {
  border-color: rgba(var(--accent-rgb, 42, 217, 119), 0.18);
  background: rgba(10, 14, 12, 0.85);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb, 42, 217, 119), 0.08);
}

.profile-achievement-card--locked .profile-achievement-card__eyebrow {
  color: rgba(200, 255, 210, 0.72);
}

@media (max-width: 640px) {
  .profile-gamification__heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-xp-overview__row {
    flex-direction: column;
    align-items: flex-start;
  }
}

.profile-rank {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--accent-border-mid, rgba(42, 217, 119, 0.26));
  background: linear-gradient(135deg, rgba(12, 20, 16, 0.9), rgba(7, 12, 9, 0.86));
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb, 42, 217, 119), 0.1);
  width: fit-content;
}

.profile-rank__icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.profile-rank__title {
  font-weight: 600;
  letter-spacing: 0.4px;
}

.profile-status {
  color: rgba(255, 255, 255, 0.78);
}

.profile-metrics .inventory-metric {
  border-color: var(--accent-border-mid, rgba(42, 217, 119, 0.18));
  background:
    linear-gradient(150deg, rgba(10, 16, 12, 0.9), rgba(6, 11, 8, 0.88)),
    var(--gradient-card, linear-gradient(160deg, rgba(9, 15, 12, 0.92), rgba(4, 8, 6, 0.9)));
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb, 42, 217, 119), 0.08);
}

.profile-bio p {
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.8);
}

.profile-skills__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-skills__list li {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb, 42, 217, 119), 0.22);
  background: rgba(8, 12, 14, 0.78);
  color: rgba(222, 255, 232, 0.9);
  letter-spacing: 0.3px;
}

.profile-details-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.profile-detail {
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(var(--accent-rgb, 42, 217, 119), 0.18);
  background: rgba(9, 13, 15, 0.8);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb, 42, 217, 119), 0.05);
  display: grid;
  gap: 6px;
}

.profile-detail__label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.45px;
  color: var(--text-muted, rgba(200, 255, 210, 0.7));
}

.profile-detail__value {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  word-break: break-word;
  text-decoration: none;
}

.profile-detail__value:hover,
.profile-detail__value:focus-visible {
  color: rgba(118, 255, 101, 0.95);
}

.profile-actions {
  display: grid;
  gap: 14px;
  text-align: center;
}

.profile-actions p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.profile-edit-page .profile-header__avatar {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}

.profile-edit-page .profile-edit-hint {
  font-size: 0.85rem;
  color: rgba(200, 255, 210, 0.7);
}

.profile-edit-avatar-grid {
  display: grid;
  gap: clamp(18px, 4vw, 32px);
  align-items: center;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
}

.profile-edit-avatar-preview {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}

.profile-edit-avatar-preview .profile-avatar {
  width: clamp(140px, 16vw, 190px);
}

.profile-avatar-form {
  width: 100%;
}

.profile-avatar-input {
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed rgba(var(--accent-pop-rgb, 118, 255, 101), 0.35);
  background: rgba(7, 10, 9, 0.92);
  color: #fff;
  font: inherit;
  cursor: pointer;
  transition: var(--transition);
}

.profile-avatar-input:hover,
.profile-avatar-input:focus-visible {
  border-color: rgba(var(--accent-pop-rgb, 118, 255, 101), 0.65);
  box-shadow: 0 0 18px rgba(var(--accent-pop-rgb, 118, 255, 101), 0.28);
}

.profile-avatar-input::-webkit-file-upload-button,
.profile-avatar-input::file-selector-button {
  padding: 10px 18px;
  margin-right: 14px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-pop-rgb, 118, 255, 101), 0.32);
  background: rgba(var(--accent-pop-rgb, 118, 255, 101), 0.14);
  color: rgba(222, 255, 232, 0.9);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.profile-avatar-input::-webkit-file-upload-button:hover,
.profile-avatar-input::file-selector-button:hover,
.profile-avatar-input::-webkit-file-upload-button:focus-visible,
.profile-avatar-input::file-selector-button:focus-visible {
  background: rgba(var(--accent-pop-rgb, 118, 255, 101), 0.2);
  border-color: rgba(var(--accent-pop-rgb, 118, 255, 101), 0.6);
  color: #051105;
}

.profile-edit-page .form-actions {
  justify-content: flex-start;
}

.button-main {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  background: var(--button-bg, linear-gradient(125deg, rgba(var(--accent-rgb), 0.18), rgba(var(--accent-soft-rgb), 0.08)));
  color: var(--button-color, var(--accent-text-strong));
  padding: 12px 22px;
  border-radius: 14px;
  border: 1px solid var(--button-border, rgba(var(--accent-rgb), 0.32));
  cursor: pointer;
  transition: var(--transition, transform 0.2s ease, box-shadow 0.2s ease);
  text-decoration: none;
  font-weight: 600;
}

.button-main:hover,
.button-main:focus-visible {
  background: var(--button-hover-bg, var(--menu-gradient-strong));
  color: var(--button-hover-color, var(--accent-ink));
  border-color: var(--button-hover-border, rgba(var(--accent-rgb), 0.55));
  transform: var(--button-hover-transform, translateY(-3px) scale(1.02));
  box-shadow: var(
    --button-hover-shadow,
    0 20px 40px rgba(var(--accent-soft-rgb), 0.32),
    inset 0 0 22px rgba(var(--accent-pop-rgb), 0.24)
  );
}

@media (max-width: 720px) {
  .profile-page .inventory-header {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .profile-header__avatar {
    order: -1;
  }

  .profile-rank {
    justify-self: center;
  }

  .profile-metrics {
    justify-items: center;
  }
}

@media (max-width: 860px) {
  .profile-edit-avatar-grid {
    grid-template-columns: 1fr;
  }
}