.playerprofile,
.playerprofile * {
  box-sizing: border-box;
}

.playerprofile {
  --profile-bg: var(--designbg, #2b2b2b);
  --profile-bg-deep: #252725;
  --profile-panel: #343a37;
  --profile-green: #414c46;
  --profile-accent: #db715b;
  --profile-text: #d5dcd5;
  --profile-muted: #9da8a1;
  --profile-line: rgba(213, 220, 213, 0.12);

  width: calc(100% - 30px);
  max-width: 1000px;
  margin: 30px auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 15px;
  color: var(--profile-text);
  font: 12px/1.6 Century Gothic, CenturyGothic, AppleGothic, sans-serif;
}

.playerprofile__header {
  height: 120px;
  min-height: 120px;
  padding: 20px 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  border-top: 4px solid var(--profile-accent);
  background:
    linear-gradient(110deg, rgba(65, 76, 70, 0.96), rgba(43, 43, 43, 0.96)),
    var(--profile-bg);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.22);
}

.playerprofile__eyebrow,
.playerprofile__kicker,
.playerprofile__label,
.playerprofile__stat-label {
  color: var(--profile-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.7px;
  text-transform: uppercase;
}

.playerprofile__name {
  margin: 2px 0 0;
  font: 42px/1.1 'Grimoire', serif;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.playerprofile__name a {
  color: var(--color4, var(--profile-text));
  text-decoration: none;
  transition: color 0.2s ease;
}

.playerprofile__name a:hover {
  color: var(--profile-accent);
}

.playerprofile__title {
  margin-top: 8px;
  color: var(--profile-muted);
  font-size: 13px;
  font-style: italic;
}

.playerprofile__status {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border: 1px solid var(--profile-line);
  background: rgba(0, 0, 0, 0.16);
  color: var(--profile-text);
  font-size: 11px;
  letter-spacing: 0.5px;
}

.playerprofile__status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--profile-accent);
  box-shadow: 0 0 0 4px rgba(219, 113, 91, 0.15);
}

.playerprofile__main {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 15px;
  margin-top: 15px;
}

.playerprofile__sidebar {
  padding: 20px;
  background: var(--profile-bg);
  border: 1px solid var(--profile-line);
}

.playerprofile__avatar {
  width: 250px;
  height: 250px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--profile-line);
  border-bottom: 5px solid var(--profile-accent);
  background: var(--profile-bg-deep);
}

/* Bewusst erzwungene Maße: Auch abweichende Uploads werden auf 250 x 250 px verzerrt. */
.playerprofile__avatar img {
  display: block !important;
  width: 250px !important;
  min-width: 250px !important;
  max-width: 250px !important;
  height: 250px !important;
  min-height: 250px !important;
  max-height: 250px !important;
  object-fit: fill !important;
}

.playerprofile__contact {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.playerprofile__discord {
  min-width: 0;
  padding: 11px 13px;
  border-left: 3px solid var(--profile-green);
  background: var(--profile-bg-deep);
}

.playerprofile__discord span {
  display: block;
}

.playerprofile__contact-value {
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.playerprofile__contact-link {
  display: block;
  padding: 10px 13px;
  border: 1px solid var(--profile-line);
  background: var(--profile-green);
  color: var(--profile-text);
  text-align: center;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.playerprofile__contact-link:hover {
  border-color: var(--profile-accent);
  background: var(--profile-accent);
  color: #fff;
}

.playerprofile__content {
  display: grid;
  gap: 15px;
  min-width: 0;
}

.playerprofile__section {
  border: 1px solid var(--profile-line);
  background: var(--profile-bg);
}

.playerprofile__section-heading {
  padding: 17px 22px 14px;
  border-bottom: 1px solid var(--profile-line);
  background: linear-gradient(90deg, var(--profile-green), rgba(65, 76, 70, 0.25));
}

.playerprofile__section-heading h2 {
  margin: 0;
  color: var(--profile-text);
  font: 25px/1.2 'Grimoire', serif;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.playerprofile__kicker {
  color: var(--profile-accent);
}

.playerprofile__about-content {
  min-height: 178px;
  max-height: 290px;
  padding: 22px;
  overflow: auto;
  color: var(--profile-text);
  text-align: justify;
}

.playerprofile__stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 14px;
}

.playerprofile__stat {
  min-height: 105px;
  padding: 13px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  border-top: 2px solid var(--profile-green);
  background: var(--profile-bg-deep);
}

.playerprofile__stat-value {
  margin-top: 5px;
  color: var(--profile-text);
  font: 23px/1.2 'Grimoire', serif;
  overflow-wrap: anywhere;
}

.playerprofile__stat-value--small {
  font-size: 18px;
  letter-spacing: 0.8px;
}

.playerprofile__stat-link,
.playerprofile__stat-unit {
  color: var(--profile-muted);
  font-size: 10px;
}

.playerprofile__stat-link a,
.playerprofile__accounts a,
.playerprofile__awards a {
  color: var(--profile-accent);
}

.playerprofile__away,
.playerprofile__accounts,
.playerprofile__awards {
  margin-top: 15px;
}

/* Die verknüpften Accounts stehen vor dem Abwesenheitsbereich. */
.playerprofile__header {
  order: 1;
  grid-column: 1 / -1;
}

.playerprofile__main {
  order: 2;
  grid-column: 1 / -1;
}

.playerprofile__accounts {
  order: 3;
  grid-column: 1;
}

.playerprofile__away {
  order: 4;
  grid-column: 2;
}

.playerprofile__awards {
  order: 5;
  grid-column: 1 / -1;
}

.playerprofile__section-heading--compact {
  padding-top: 13px;
  padding-bottom: 11px;
}

.playerprofile__section-heading--compact h2 {
  font-size: 21px;
}

.playerprofile__away-content,
.playerprofile__accounts-content {
  min-height: 65px;
  max-height: 180px;
  padding: 18px 22px;
  overflow: auto;
}

.playerprofile__awards {
  padding: 18px 22px;
  border-left: 4px solid var(--profile-accent);
  background: var(--profile-bg);
}

.playerprofile__about-content,
.playerprofile__away-content,
.playerprofile__accounts-content {
  scrollbar-color: var(--profile-accent) rgba(255, 255, 255, 0.05);
  scrollbar-width: thin;
}

.playerprofile__about-content::-webkit-scrollbar,
.playerprofile__away-content::-webkit-scrollbar,
.playerprofile__accounts-content::-webkit-scrollbar {
  width: 6px;
}

.playerprofile__about-content::-webkit-scrollbar-track,
.playerprofile__away-content::-webkit-scrollbar-track,
.playerprofile__accounts-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.playerprofile__about-content::-webkit-scrollbar-thumb,
.playerprofile__away-content::-webkit-scrollbar-thumb,
.playerprofile__accounts-content::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: var(--profile-accent);
}

@media (max-width: 800px) {
  .playerprofile__header {
    align-items: flex-start;
    padding: 25px;
  }

  .playerprofile__name {
    font-size: 34px;
  }

  .playerprofile__main {
    grid-template-columns: 1fr;
  }

  .playerprofile__sidebar {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 18px;
  }

  .playerprofile__contact {
    align-content: start;
    margin-top: 0;
  }
}

@media (max-width: 580px) {
  .playerprofile {
    width: calc(100% - 16px);
    margin: 16px auto;
    grid-template-columns: 1fr;
  }

  .playerprofile__header,
  .playerprofile__main,
  .playerprofile__accounts,
  .playerprofile__away,
  .playerprofile__awards {
    grid-column: 1;
  }

  .playerprofile__header {
    flex-direction: column;
    height: auto;
    min-height: 120px;
  }

  .playerprofile__name {
    font-size: 29px;
  }

  .playerprofile__sidebar {
    display: block;
  }

  .playerprofile__contact {
    margin-top: 18px;
  }

  .playerprofile__stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 390px) {
  .playerprofile__stats-grid {
    grid-template-columns: 1fr;
  }
}