/* achievements.css — Trophy case + celebration modal (Unorthodox Ops member app).
   Dark theme, brand red #e10600. */

/* ---------- trophy case ---------- */
#ach-section .ach-count {
  color: #e10600;
  font-weight: 800;
  letter-spacing: .04em;
  font-size: .8rem;
  text-transform: uppercase;
  margin: .25rem 0 .75rem;
}

#ach-case {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .75rem;
  margin-bottom: 1.5rem;
}

.ach-card {
  background: #16181d;
  border: 1px solid #2a2d35;
  border-radius: 14px;
  padding: .9rem .75rem;
  text-align: center;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.ach-card.earned {
  border-color: #e10600;
  background: linear-gradient(160deg, #1d1113 0%, #16181d 60%);
  box-shadow: 0 0 18px rgba(225, 6, 0, .18);
}

.ach-card.earned:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 24px rgba(225, 6, 0, .35);
}

.ach-card.locked {
  opacity: .55;
}

.ach-card.locked .ach-icon {
  filter: grayscale(1) brightness(.6);
}

.ach-icon {
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: .5rem;
}

.ach-name {
  font-weight: 800;
  font-size: .95rem;
  margin-bottom: .3rem;
}

.ach-card.earned .ach-name {
  color: #fff;
}

.ach-desc {
  font-size: .78rem;
  color: #a7adb8;
  line-height: 1.35;
  margin-bottom: .5rem;
}

.ach-meta {
  font-size: .72rem;
  color: #ffd34d;
  font-weight: 700;
  letter-spacing: .03em;
}

.ach-hint {
  font-size: .72rem;
  color: #8b93a1;
  font-style: italic;
}

.ach-error {
  color: #a7adb8;
  font-size: .85rem;
  padding: 1rem 0;
  text-align: center;
}

/* locked variant (free users) — same shape as feat-a sensor lock */
#ach-locked[hidden] { display: none; }
#ach-locked {
  background: #16181d;
  border: 1px dashed #3a3e48;
  border-radius: 14px;
  padding: 1.25rem 1rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

#ach-locked p {
  color: #a7adb8;
  font-size: .9rem;
  margin: .4rem 0 .9rem;
}

/* ---------- celebration modal ---------- */
#ach-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(0, 0, 0, .78);
  backdrop-filter: blur(4px);
}

#ach-modal[hidden] {
  display: none;
}

.ach-modal-card {
  width: 100%;
  max-width: 360px;
  background: #1a1d23;
  border: 2px solid #e10600;
  border-radius: 20px;
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
  box-shadow: 0 0 60px rgba(225, 6, 0, .45);
  animation: ach-pop .35s cubic-bezier(.2, 1.4, .4, 1);
}

@keyframes ach-pop {
  from { transform: scale(.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.ach-modal-eyebrow {
  color: #e10600;
  font-weight: 800;
  letter-spacing: .12em;
  font-size: .75rem;
  text-transform: uppercase;
  margin-bottom: .75rem;
}

.ach-modal-icon {
  font-size: 4.5rem;
  line-height: 1;
  margin-bottom: .75rem;
  animation: ach-bounce 1s ease infinite;
  display: inline-block;
}

@keyframes ach-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.ach-modal-name {
  font-size: 1.4rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: .4rem;
}

.ach-modal-desc {
  color: #a7adb8;
  font-size: .9rem;
  line-height: 1.45;
  margin-bottom: 1.25rem;
}

.ach-modal-btn {
  width: 100%;
}

body.ach-modal-open {
  overflow: hidden;
}

/* respects prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .ach-modal-card { animation: none; }
  .ach-modal-icon { animation: none; }
  .ach-card { transition: none; }
}
