/* src/pages/account.css
 *
 * Minimal Steam-ish profile layout for Akoma account page.
 * Covers:
 * - profile header (avatar, name, years of service)
 * - karmascore pill
 * - vault button
 * - achievements card (progress bar + recent icons)
 *
 * Assumes you already have your global variables like:
 * --space-1..8, --radius, etc. If not, it still works.
 */

/* Optional: if your project uses per-page CSS imports,
   make sure account.rs (or a parent) imports this file. */

.container.account {
  /* keep your existing container behavior */
}

.account__error {
  margin-top: var(--space-4, 16px);
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(120, 40, 40, 0.20);
}

/* --- Profile layout --- */

.profile {
  display: grid;
  gap: 14px;
}

.profile__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
}

.profile__id {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.profile__avatar {
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
}

.profile__who {
  min-width: 0;
}

.profile__name {
  font-size: 1.8rem;
  font-weight: 850;
  letter-spacing: 0.01em;
  line-height: 1.1;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile__meta {
  margin-top: 6px;
  opacity: 0.8;
  font-size: 0.95rem;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Right side actions --- */

.profile__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.profile__karmascore {
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.22);
  min-width: 150px;
  text-align: right;
}

.profile__karmascore_k {
  font-size: 0.78rem;
  opacity: 0.75;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.profile__karmascore_v {
  font-size: 1.6rem;
  font-weight: 900;
  margin-top: 2px;
}

/* --- Achievements card --- */

.profile__card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.14);
}

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

.profile__title {
  font-weight: 850;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

/* --- Progress row --- */

.progressrow {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.progressrow__bar {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.progressrow__fill {
  height: 100%;
  border-radius: 999px;
  background: rgba(120, 180, 255, 0.80);
  width: 0%;
  transition: width 300ms ease;
}

.progressrow__pct {
  font-weight: 800;
  opacity: 0.85;
  min-width: 44px;
  text-align: right;
}

/* --- Achievement icons row --- */

.achicons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.achicons__icn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;

  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);

  transition: transform 140ms ease, filter 140ms ease;
}

.achicons__icn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

/* --- Responsive --- */

@media (max-width: 860px) {
  .profile__header {
    flex-direction: column;
    align-items: stretch;
  }

  .profile__actions {
    width: 100%;
    justify-content: space-between;
  }

  .profile__karmascore {
    text-align: left;
    width: 100%;
  }

  .profile__avatar {
    width: 96px;
    height: 96px;
  }

  .profile__name {
    font-size: 1.55rem;
  }
}
