/* ============================================================
   Spēļotava.lv — profila lapas stili (profils.css)
   Izmanto kopā ar home.css (jaunā dizaina sistēma).
   Vecā versija saglabāta failā profils.css.old-design.bak
   ============================================================ */

.profile-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 34px 24px 20px;
}

/* ==================== Stāvokļu kartes ==================== */

.profile-state {
  display: flex;
  align-items: center;
  gap: 22px;
  max-width: 720px;
  margin: 60px auto;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel-solid);
}

.profile-state strong {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
}

.profile-state p {
  margin: 6px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}

.state-spinner {
  flex: none;
  width: 40px;
  height: 40px;
  border: 3px solid var(--line-strong);
  border-top-color: var(--lime);
  border-radius: 50%;
  animation: slowspin 0.9s linear infinite;
}

.profile-state.signed-out {
  align-items: flex-start;
}

.profile-state.signed-out h1 {
  margin: 8px 0 8px;
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.6px;
}

.state-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  font-size: 24px;
  color: var(--lime);
}

.state-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.state-actions .btn {
  padding: 10px 18px;
  font-size: 13.5px;
}

/* ==================== Neielogojies: kopienas login ==================== */

.signed-out-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 420px);
  gap: 40px;
  align-items: center;
  max-width: 1060px;
  margin: 40px auto 30px;
}

.signed-out-copy h1 {
  margin: 10px 0 12px;
  font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 800;
  letter-spacing: -1.4px;
  line-height: 1.06;
}

.grad-text {
  background: linear-gradient(100deg, var(--lime) 10%, #7ef0c3 45%, var(--violet) 85%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}

.signed-out-copy > p {
  margin: 0 0 22px;
  max-width: 480px;
  font-size: 14.5px;
  color: var(--muted);
}

.perk-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.perk-list li {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    radial-gradient(10rem 5rem at 0% 50%, color-mix(in srgb, var(--tone, #c8f542) 6%, transparent), transparent 70%),
    var(--panel);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.perk-list li:hover {
  transform: translateX(4px);
  border-color: var(--line-strong);
}

.perk-list i {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  font-style: normal;
  font-size: 15px;
  font-weight: 800;
  background: linear-gradient(150deg, color-mix(in srgb, var(--tone) 34%, #0b1322), #0a101d);
  border: 1px solid color-mix(in srgb, var(--tone) 46%, transparent);
  color: color-mix(in srgb, var(--tone) 86%, #fff);
}

.perk-list strong {
  display: block;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 800;
}

.perk-list small {
  display: block;
  font-size: 11.5px;
  color: var(--muted-2);
}

.auth-card {
  padding: 26px;
  border: 1px solid rgba(200, 245, 66, 0.22);
  border-radius: 22px;
  background:
    radial-gradient(20rem 12rem at 100% -20%, rgba(200, 245, 66, 0.08), transparent 70%),
    radial-gradient(16rem 10rem at 0% 120%, rgba(139, 123, 255, 0.08), transparent 70%),
    var(--panel-solid);
  box-shadow: var(--shadow-lift);
}

.pa-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.pa-tab {
  flex: 1;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pa-tab:hover { color: var(--text); }

.pa-tab.active {
  background: var(--lime);
  color: #16230a;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(200, 245, 66, 0.2);
}

.pa-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.pa-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted-2);
}

.pa-form input {
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(5, 9, 17, 0.6);
  color: var(--text);
  font-size: 14.5px;
  letter-spacing: normal;
  font-weight: 500;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pa-form input::placeholder { color: var(--muted-2); font-weight: 400; }

.pa-form input:focus {
  outline: none;
  border-color: rgba(200, 245, 66, 0.5);
  box-shadow: 0 0 0 3px rgba(200, 245, 66, 0.08);
}

.pa-form .btn { justify-content: center; margin-top: 4px; }

.pa-msg {
  min-height: 18px;
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
}

.pa-msg.is-error { color: var(--red); }
.pa-msg.is-ok { color: var(--green); }

.pa-hint {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  color: var(--muted-2);
  text-align: center;
}

/* ==================== Profila hero ==================== */

.profile-hero {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel-solid);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
}

.profile-cover {
  position: relative;
  height: 150px;
  background:
    radial-gradient(30rem 16rem at 12% 120%, rgba(200, 245, 66, 0.16), transparent 70%),
    radial-gradient(30rem 16rem at 88% -30%, rgba(139, 123, 255, 0.2), transparent 70%),
    linear-gradient(120deg, #0d1526, #0a1120 60%, #0d1224);
  overflow: hidden;
  transition: background 0.35s ease;
}

.profile-cover[data-cover="cards"] {
  background:
    radial-gradient(28rem 18rem at 12% 110%, rgba(255, 100, 116, 0.2), transparent 68%),
    radial-gradient(24rem 15rem at 86% -20%, rgba(255, 215, 110, 0.17), transparent 70%),
    linear-gradient(120deg, #1b0c17, #11101d 56%, #111927);
}

.profile-cover[data-cover="aurora"] {
  background:
    radial-gradient(30rem 15rem at 22% 120%, rgba(61, 220, 132, 0.2), transparent 70%),
    radial-gradient(28rem 16rem at 74% -24%, rgba(111, 195, 255, 0.25), transparent 72%),
    linear-gradient(120deg, #071820, #0c1322 52%, #17122b);
}

.profile-cover[data-cover="sunset"] {
  background:
    radial-gradient(28rem 17rem at 14% 112%, rgba(255, 184, 77, 0.23), transparent 70%),
    radial-gradient(28rem 16rem at 84% -20%, rgba(139, 123, 255, 0.25), transparent 70%),
    linear-gradient(120deg, #28111c, #171222 55%, #0a1724);
}

.profile-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(158, 182, 214, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(158, 182, 214, 0.06) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(40rem 14rem at 50% 100%, #000, transparent 80%);
  -webkit-mask-image: radial-gradient(40rem 14rem at 50% 100%, #000, transparent 80%);
}

.cv-glyph {
  position: absolute;
  font-family: var(--font-display);
  font-style: normal;
  font-size: 24px;
  font-weight: 800;
  color: rgba(158, 182, 214, 0.2);
  animation: floaty 6s ease-in-out infinite;
  animation-delay: var(--fd, 0s);
}

.cv-motto {
  position: absolute;
  right: 22px;
  bottom: 14px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 4px;
  color: rgba(200, 245, 66, 0.4);
}

.profile-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 0 30px 26px;
}

.profile-avatar-wrap {
  position: relative;
  margin-top: -46px;
}

.profile-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  border-radius: 32px;
  background: linear-gradient(145deg, var(--lime), #7ec42a);
  border: 4px solid var(--panel-solid);
  color: #14210a;
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 800;
  box-shadow: 0 16px 38px rgba(200, 245, 66, 0.2);
}

.profile-avatar i {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green);
  border: 3px solid var(--panel-solid);
}

.profile-avatar .avatar-art,
.profile-avatar .goblin-art {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  border-radius: 28px;
}

.profile-name-block { padding-top: 18px; min-width: 0; }

.profile-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-character-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 13px;
  padding: 8px 11px;
  border: 1px solid rgba(200, 245, 66, 0.28);
  border-radius: 7px;
  background: rgba(200, 245, 66, 0.06);
  color: var(--lime);
  font-size: 11.5px;
  font-weight: 800;
}

.profile-character-link:hover {
  border-color: rgba(200, 245, 66, 0.5);
  background: rgba(200, 245, 66, 0.1);
}

.profile-character-link svg {
  width: 16px;
  height: 16px;
}

.profile-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 800;
  letter-spacing: -1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.verified {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.online-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border: 1px solid rgba(61, 220, 132, 0.3);
  border-radius: 99px;
  background: rgba(61, 220, 132, 0.08);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--green);
}

.online-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: ping 2.2s ease-out infinite;
}

.profile-note {
  margin: 6px 0 10px;
  font-size: 13px;
  color: var(--muted);
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.profile-tags span {
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--panel);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
}

/* Līmeņa karte ar riņķa progresu */

.profile-level-card {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  padding: 16px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--panel);
}

.level-circle {
  position: relative;
  flex: none;
  width: 86px;
  height: 86px;
}

.level-circle svg {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}

.level-circle .ring-track,
.level-circle .ring-fill {
  fill: none;
  stroke-width: 7;
  stroke-linecap: round;
}

.level-circle .ring-track { stroke: rgba(158, 182, 214, 0.14); }

.level-circle .ring-fill {
  stroke: var(--lime);
  stroke-dasharray: 251.33;
  stroke-dashoffset: 251.33;
  filter: drop-shadow(0 0 6px rgba(200, 245, 66, 0.5));
  transition: stroke-dashoffset 1.2s cubic-bezier(0.2, 0.65, 0.25, 1);
}

.level-circle > div {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}

.level-circle strong {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
}

.level-circle span {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted-2);
}

.level-copy { min-width: 170px; }

.profile-tier {
  display: inline-block;
  margin-bottom: 5px;
  padding: 4px 12px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--tier-color, #ff9d6b) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--tier-color, #ff9d6b) 40%, transparent);
  color: color-mix(in srgb, var(--tier-color, #ff9d6b) 85%, #fff);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.level-copy > strong {
  display: block;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.level-bar {
  height: 8px;
  margin: 8px 0 6px;
  border-radius: 99px;
  background: rgba(158, 182, 214, 0.12);
  overflow: hidden;
}

.level-bar i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--lime), #7ef0c3);
  box-shadow: 0 0 12px rgba(200, 245, 66, 0.4);
  transition: width 1.2s cubic-bezier(0.2, 0.65, 0.25, 1);
}

.level-copy small {
  font-size: 11.5px;
  color: var(--muted-2);
}

/* ==================== Kopsavilkuma flīzes ==================== */

.stats-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.stat-tile {
  position: relative;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(12rem 7rem at 100% 0%, color-mix(in srgb, var(--tone) 10%, transparent), transparent 70%),
    var(--panel-solid);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.stat-tile:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--tone) 38%, transparent);
}

.stat-icon {
  position: absolute;
  right: 16px;
  top: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--tone) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--tone) 34%, transparent);
  color: color-mix(in srgb, var(--tone) 82%, #fff);
  font-size: 15px;
  font-weight: 800;
}

.stat-tile > span:not(.stat-icon) {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted-2);
}

.stat-tile strong {
  display: block;
  margin: 6px 0 2px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}

.stat-tile small {
  font-size: 12px;
  color: var(--muted);
}

/* ==================== Izkārtojums un paneļi ==================== */

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.profile-primary,
.profile-secondary {
  display: grid;
  gap: 16px;
}

.profile-panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel-solid);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.panel-head h2 {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.panel-head .section-link {
  padding: 7px 13px;
  font-size: 12px;
}

/* ==================== Reitingu rindas ==================== */

.rating-list {
  display: grid;
  gap: 10px;
}

.rating-row {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.rating-row:hover {
  transform: translateX(4px);
  border-color: color-mix(in srgb, var(--tone) 40%, transparent);
}

.rating-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 19px;
  font-weight: 800;
  font-family: var(--font-display);
  background: linear-gradient(150deg, color-mix(in srgb, var(--tone) 38%, #0b1322), #0a101d);
  border: 1px solid color-mix(in srgb, var(--tone) 48%, transparent);
  color: color-mix(in srgb, var(--tone) 86%, #fff);
}

.rating-copy { flex: 1; min-width: 0; }

.rating-copy strong {
  display: block;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 800;
}

.rating-copy small {
  display: block;
  font-size: 11.5px;
  color: var(--muted-2);
}

.rating-copy small b {
  color: var(--muted);
  font-weight: 700;
}

.rating-number {
  flex: none;
  text-align: right;
}

.rating-number strong {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.rating-number small {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted-2);
}

.rating-rank-wrap {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.rating-rank {
  min-width: 52px;
  padding: 6px 0;
  border-radius: 10px;
  background: color-mix(in srgb, var(--tone) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--tone) 30%, transparent);
  color: color-mix(in srgb, var(--tone) 84%, #fff);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.rating-rank-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* ==================== Rekordi ==================== */

.record-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.record-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(10rem 6rem at 100% 0%, color-mix(in srgb, var(--tone) 9%, transparent), transparent 70%),
    var(--panel);
}

.record-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--tone) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--tone) 38%, transparent);
  color: color-mix(in srgb, var(--tone) 84%, #fff);
  font-size: 17px;
  font-weight: 800;
}

.record-card > div:not(.record-values) strong {
  display: block;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
}

.record-card > div:not(.record-values) small {
  font-size: 11.5px;
  color: var(--muted-2);
}

.record-values {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--muted);
}

.record-values > span { color: var(--muted-2); }
.record-values > strong { display: block; font-variant-numeric: tabular-nums; }

.game-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(158, 182, 214, 0.07);
  font-variant-numeric: tabular-nums;
}

.game-stat-row:last-child { border-bottom: 0; }

.game-stat-row span { font-size: 12px; color: var(--muted-2); }
.game-stat-row strong { font-size: 12.5px; font-weight: 700; }

.game-stat-row.highlight strong { color: var(--lime); }
.game-stat-row.highlight span { color: var(--muted); }

/* ==================== Kolekcija ==================== */

.wallet-preview {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 17px;
  border: 1px solid rgba(255, 215, 110, 0.24);
  border-radius: 15px;
  background:
    radial-gradient(12rem 7rem at 100% 0%, rgba(255, 215, 110, 0.08), transparent 70%),
    var(--panel);
  margin-bottom: 14px;
}

.wallet-coin {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: conic-gradient(from 200deg, #ffd76e, #b8860b, #ffd76e, #f5c542, #ffd76e);
  color: #4a3305;
  font-size: 19px;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(255, 199, 89, 0.25), inset 0 0 0 3px rgba(255, 244, 214, 0.35);
  animation: coinTilt 5s ease-in-out infinite;
}

.wallet-preview span {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted-2);
}

.wallet-preview strong {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
}

.loadout-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.loadout-preview article {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.loadout-slot {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: var(--panel);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  color: var(--muted);
  transition: border-color 0.22s ease, transform 0.22s ease;
}

.loadout-preview article:hover .loadout-slot {
  border-color: rgba(200, 245, 66, 0.4);
  transform: translateY(-3px);
}

.loadout-slot.frame {
  background:
    linear-gradient(var(--panel-solid), var(--panel-solid)) padding-box,
    linear-gradient(140deg, var(--lime), var(--violet)) border-box;
  border: 2px solid transparent;
}

.loadout-preview small {
  font-size: 10.5px;
  color: var(--muted-2);
}

.collection-note {
  margin: 14px 0 0;
  font-size: 11.5px;
  color: var(--muted-2);
}

/* ==================== Sasniegumi ==================== */

.achievement-grid {
  display: grid;
  gap: 10px;
}

.achievement-grid:not(.expanded) .achievement:nth-child(n + 9) {
  display: none;
}

.achievement-toggle {
  width: 100%;
  min-height: 38px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(158, 182, 214, 0.04);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.achievement-toggle:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.achievement {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.achievement:hover { transform: translateX(3px); }

.achievement-copy {
  min-width: 0;
  flex: 1;
}

.achievement-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
}

.achievement span {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted-2);
}

.achievement h3 {
  margin: 1px 0 1px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 800;
}

.achievement p {
  margin: 0;
  font-size: 11.5px;
  color: var(--muted-2);
}

.achievement-progress {
  position: relative;
  height: 5px;
  margin-top: 8px;
  overflow: visible;
  border-radius: 99px;
  background: rgba(158, 182, 214, 0.1);
}

.achievement-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--lime);
}

.achievement-progress small {
  position: absolute;
  right: 0;
  bottom: 7px;
  font-size: 9px;
  font-weight: 700;
  color: var(--muted-2);
}

.achievement.unlocked .achievement-progress small {
  color: var(--lime);
}

.achievement.locked {
  opacity: 0.6;
}

.achievement.locked .achievement-icon {
  background: rgba(158, 182, 214, 0.08);
  border: 1px solid var(--line);
  color: var(--muted-2);
}

.achievement.unlocked {
  border-color: rgba(200, 245, 66, 0.3);
}

.achievement.unlocked .achievement-icon {
  background: linear-gradient(145deg, rgba(200, 245, 66, 0.24), rgba(200, 245, 66, 0.06));
  border: 1px solid rgba(200, 245, 66, 0.45);
  color: var(--lime);
  text-shadow: 0 0 14px rgba(200, 245, 66, 0.5);
}

.achievement.unlocked::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(200, 245, 66, 0.07) 48%, transparent 62%);
  transform: translateX(-110%);
  animation: achShine 3.4s ease infinite;
  pointer-events: none;
}

@keyframes achShine {
  0%, 55% { transform: translateX(-110%); }
  85%, 100% { transform: translateX(110%); }
}

/* ==================== Kausu vitrīna ==================== */

.trophy-panel {
  background:
    radial-gradient(16rem 10rem at 50% -20%, rgba(255, 184, 77, 0.07), transparent 70%),
    var(--panel-solid);
}

.trophy-empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 20px 12px 12px;
  text-align: center;
}

.trophy-glyph {
  font-size: 38px;
  color: var(--amber);
  animation: floaty 4.4s ease-in-out infinite;
  text-shadow: 0 0 26px rgba(255, 184, 77, 0.4);
}

.trophy-empty strong {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
}

.trophy-empty p {
  margin: 0 0 12px;
  max-width: 260px;
  font-size: 12.5px;
  color: var(--muted);
}

.trophy-empty .btn {
  padding: 9px 16px;
  font-size: 12.5px;
}

/* ==================== Responsivitāte ==================== */

@media (max-width: 1080px) {
  .profile-layout { grid-template-columns: 1fr; }
  .stats-overview { grid-template-columns: repeat(2, 1fr); }
  .profile-identity { grid-template-columns: auto minmax(0, 1fr); }
  .profile-level-card { grid-column: 1 / -1; }
}

@media (max-width: 980px) {
  .signed-out-hero { grid-template-columns: 1fr; gap: 26px; margin: 20px auto; }
  .auth-card { max-width: 460px; }
}

@media (max-width: 640px) {
  .profile-main { padding: 20px 16px; }
  .profile-state { flex-direction: column; align-items: flex-start; margin: 30px auto; padding: 24px; }
  .profile-identity { grid-template-columns: 1fr; gap: 12px; padding: 0 18px 20px; }
  .profile-avatar-wrap { justify-self: center; margin-top: -40px; }
  .profile-avatar { width: 92px; height: 92px; font-size: 36px; }
  .profile-avatar .avatar-art,
  .profile-avatar .goblin-art { width: 100%; height: 100%; }
  .profile-name-block { padding-top: 0; text-align: center; }
  .profile-name-row { justify-content: center; }
  .profile-tags { justify-content: center; }
  .profile-level-card { flex-direction: column; text-align: center; }
  .stats-overview { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-tile { padding: 15px 16px; }
  .stat-tile strong { font-size: 23px; }
  .record-grid { grid-template-columns: 1fr; }
  .rating-row { flex-wrap: wrap; }
  .rating-rank-wrap { order: 2; margin-left: auto; }
  .rating-copy { flex: 1 1 100%; order: 3; }
}

/* ==================== Konta iestatījumi ==================== */

.profile-username-line {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted-2);
}

.profile-settings-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.profile-settings-btn:hover {
  color: var(--lime);
  border-color: rgba(200, 245, 66, 0.4);
  transform: rotate(35deg);
}

.profile-settings {
  scroll-margin-top: 82px;
  margin-top: 18px;
  padding: 26px 28px;
  border: 1px solid rgba(200, 245, 66, 0.22);
  border-radius: 22px;
  background:
    radial-gradient(24rem 12rem at 100% -20%, rgba(200, 245, 66, 0.07), transparent 70%),
    var(--panel-solid);
  animation: settingsIn 0.4s cubic-bezier(0.2, 0.65, 0.25, 1) both;
}

@keyframes settingsIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

.settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.settings-head h2 {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
}

.settings-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.settings-close:hover { color: var(--red); border-color: rgba(255, 100, 116, 0.4); }

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.settings-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.settings-card h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
}

.settings-hint {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.settings-hint b { color: var(--text); }

.settings-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted-2);
}

.settings-label input {
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: rgba(5, 9, 17, 0.6);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.settings-input-wrap {
  position: relative;
  display: block;
}

.settings-input-wrap input {
  width: 100%;
  padding-right: 62px;
}

.settings-input-wrap small {
  position: absolute;
  right: 13px;
  top: 50%;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  transform: translateY(-50%);
}

.settings-label input:focus {
  outline: none;
  border-color: rgba(200, 245, 66, 0.5);
  box-shadow: 0 0 0 3px rgba(200, 245, 66, 0.08);
}

.settings-card .btn-primary { width: 100%; justify-content: center; margin-top: 2px; }

.settings-msg {
  min-height: 16px;
  margin: 10px 0 0;
  font-size: 12.5px;
  font-weight: 600;
}

.settings-msg.is-error { color: var(--red); }
.settings-msg.is-ok { color: var(--green); }

.dn-history {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.dn-history ul {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dn-history li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  font-size: 12.5px;
}

.dn-history li span:first-child { color: var(--text); font-weight: 700; }
.dn-history li span:last-child { color: var(--muted-2); }
.dn-history.empty { display: none; }

.cover-settings-card {
  grid-column: 1 / -1;
}

.cover-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.cover-option {
  display: grid;
  gap: 8px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 9, 17, 0.38);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.cover-option:hover {
  color: var(--text);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.cover-option.active {
  color: var(--text);
  border-color: var(--lime);
  box-shadow: inset 0 0 0 1px rgba(200, 245, 66, 0.2);
}

.cover-option strong {
  padding: 0 3px 2px;
  font-size: 11px;
}

.cover-preview {
  display: block;
  height: 54px;
  border-radius: 5px;
  background:
    radial-gradient(7rem 4rem at 15% 110%, rgba(200, 245, 66, 0.3), transparent 70%),
    radial-gradient(7rem 4rem at 90% -20%, rgba(139, 123, 255, 0.35), transparent 70%),
    #0d1526;
}

.cover-preview.cards {
  background:
    radial-gradient(7rem 4rem at 12% 110%, rgba(255, 100, 116, 0.35), transparent 70%),
    radial-gradient(7rem 4rem at 88% -20%, rgba(255, 215, 110, 0.3), transparent 70%),
    #1b0c17;
}

.cover-preview.aurora {
  background:
    radial-gradient(7rem 4rem at 20% 110%, rgba(61, 220, 132, 0.36), transparent 70%),
    radial-gradient(7rem 4rem at 80% -20%, rgba(111, 195, 255, 0.42), transparent 72%),
    #071820;
}

.cover-preview.sunset {
  background:
    radial-gradient(7rem 4rem at 15% 110%, rgba(255, 184, 77, 0.4), transparent 70%),
    radial-gradient(7rem 4rem at 85% -20%, rgba(139, 123, 255, 0.4), transparent 70%),
    #28111c;
}

.settings-head-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.settings-admin-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(200, 245, 66, 0.3);
  border-radius: 7px;
  color: var(--lime);
  background: rgba(200, 245, 66, 0.06);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.settings-admin-link:hover {
  border-color: rgba(200, 245, 66, 0.65);
  background: rgba(200, 245, 66, 0.1);
}

@media (max-width: 720px) {
  .settings-grid { grid-template-columns: 1fr; }
  .cover-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
