/* ── Achievement card ───────────────────────────────────────── */
.achievement-card {
  width: 360px;
  padding: 28px;
  border-radius: 28px;
  background:
    radial-gradient(circle at center, rgba(34, 197, 94, 0.14), transparent 45%),
    linear-gradient(180deg, #111827, #07111f);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: #e5e7eb;
  font-family: Inter, system-ui, sans-serif;
  text-align: center;
}

.achievement-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  border-radius: 12px;
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.08);
  color: #bbf7d0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.achievement-status span {
  font-size: 20px;
  color: #86efac;
}

.achievement-icon {
  margin: 48px auto 28px;
  width: 92px;
  height: 92px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  font-size: 48px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.achievement-card h3 {
  margin: 0;
  text-align: center;
  color: #bbf7d0;
  font-size: 34px;
  line-height: 1.1;
}

.achievement-card p {
  margin: 18px 0 36px;
  text-align: center;
  color: #cbd5e1;
  font-size: 18px;
}

.achievement-footer {
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  text-align: center;
  color: #e5e7eb;
  font-size: 16px;
}

/* ── Achievement toast (top-right) ──────────────────────────── */
#achievements-toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  pointer-events: none;
}

.achievement-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.1rem;
  background: linear-gradient(180deg, #111827, #07111f);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  max-width: 300px;
  cursor: pointer;
  font-family: Inter, system-ui, sans-serif;
  opacity: 0;
  transform: translateX(calc(100% + 2rem));
  transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.achievement-toast--in {
  opacity: 1;
  transform: translateX(0);
}

.achievement-toast--out {
  opacity: 0;
  transform: translateX(calc(100% + 2rem));
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.35s ease;
}

.achievement-toast-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 11px;
}

.achievement-toast-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #86efac;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.achievement-toast-name {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: #e2e8f0;
  line-height: 1.2;
}

.achievement-toast-desc {
  display: block;
  font-size: 0.76rem;
  color: #94a3b8;
  margin-top: 0.15rem;
}

/* ── Achievements section in stats modal ────────────────────── */
.achievements-section {
  padding: 0;
  margin-top: 0;
}

.achievements-title {
  font-size: 1rem;
  font-weight: 800;
  color: #e2e8f0;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.achievements-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: #63ff9d;
  background: rgba(0, 184, 92, 0.12);
  border: 1px solid rgba(0, 184, 92, 0.35);
  border-radius: 20px;
  padding: 2px 10px;
  letter-spacing: 0.03em;
}

.achievements-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 28px;
}

.achievements-list--3col {
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 16px;
}

.achievements-list--4col {
  grid-template-columns: repeat(4, 1fr);
  gap: 12px 16px;
}

.achievements-list--5col {
  grid-template-columns: repeat(5, 1fr);
  gap: 10px 14px;
}

.achievements-box:has(.achievements-list--5col) {
  width: min(1520px, 96vw) !important;
}

.achievements-list--5col .achievement-row {
  padding: 10px 12px;
  gap: 8px;
}

.achievements-list--5col .achievement-row .achievement-toast-icon {
  width: 38px;
  height: 38px;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.achievements-list--5col .achievement-toast-name { font-size: 0.82rem; }
.achievements-list--5col .achievement-toast-desc  { font-size: 0.68rem; }

.achievement-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(90deg, rgba(0,40,30,.96), rgba(5,22,48,.96));
  border: 1px solid #00b85c;
  border-radius: 15px;
  box-shadow: none;
}

.achievement-row .achievement-toast-icon {
  width: 46px;
  height: 46px;
  font-size: 1.4rem;
  border-radius: 11px;
  flex-shrink: 0;
  background: #06452d;
  border: 1px solid #00b85c;
}

.achievement-row .achievement-toast-label { color: #63ff9d; font-weight: 900; }
.achievement-row .achievement-toast-desc  { color: #c2dcff; }


@media (max-width: 600px) {
  .achievements-list { grid-template-columns: 1fr; }
}

/* ── Stats action buttons ───────────────────────────────────── */
.stats-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #334155;
}

.stats-actions button,
.stats-actions .stats-import-label {
  flex: 1;
  padding: 0.5rem 0.75rem;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  font-family: inherit;
  line-height: normal;
  user-select: none;
}

.stats-actions button:hover,
.stats-actions .stats-import-label:hover {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #475569;
}

#stats-reset:hover {
  border-color: rgba(251, 113, 133, 0.5);
  color: #fb7185;
}
