/* ==============================
   ACHIEVEMENTS PAGE
============================== */
.achievement-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 20px;
}

.achievement-category {
  margin-bottom: 25px;
}

.achievement-subsection {
  margin-bottom: 24px;
}

.achievement-subsection-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-dim, rgba(255,255,255,0.45));
  margin: 0 0 14px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.collapse-btn {
  width: 100%;
  background: var(--color-surface);
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  padding: 14px 16px;
  font-size: 1.2rem;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition-base);
  text-align: left;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(255,105,180,0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.collapse-btn::after {
  content: '\f078'; /* fa-chevron-down */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 0.85rem;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.collapse-btn.open::after {
  transform: rotate(180deg);
}

.collapse-btn:hover {
  background: var(--color-accent);
  color: var(--color-bg);
  box-shadow: 0 0 15px var(--color-accent-strong);
  transform: scale(1.02);
}

.achievement-content.collapsed {
  display: none;
}

.achievement-content {
  background: var(--color-surface-light);
  padding: 20px;
  border-radius: 12px;
  margin-top: 10px;
  box-shadow: 0 0 20px rgba(255,105,180,0.15);
}

.achievement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px,1fr));
  gap: 20px;
}

.achievement-card {
  position: relative;
  background: var(--color-surface);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  transition: 0.3s ease;
  box-shadow: 0 0 8px rgba(255,105,180,0.15);
  border: 1px solid rgba(255,105,180,0.2);
}

.achievement-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 14px rgba(255,105,180,0.3);
  border-color: rgba(255,105,180,0.4);
}

.achievement-icon-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.achievement-icon-wrap .xp-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.achievement-icon-wrap .xp-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.achievement-icon {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
}

.achievement-icon-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.achievement-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--color-accent);
  margin-bottom: 6px;
  text-shadow: 0 0 8px rgba(255,105,180,0.6);
}

.achievement-desc {
  color: var(--color-text-dim);
  font-size: 0.95rem;
  line-height: 1.3rem;
}

.badge-exclusivity {
  font-size: 0.78rem;
  color: #ffd700;
  margin-top: 6px;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

/* ==============================
   BADGE CARDS (legendary only)
============================== */
.badge-card {
  padding: 24px 20px 20px;
}

.badge-icon-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 165, 0, 0.08);
  border: 1px solid rgba(255, 165, 0, 0.2);
}

.badge-icon-img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  display: block;
}

.badge-icon-emoji {
  font-size: 2.8rem;
  line-height: 1;
}

.badge-check {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffa500;
  border: 2px solid var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  color: #000;
  font-weight: 900;
}



/* ==============================
   ACHIEVEMENT RARITY
============================== */
.rarity-common {
  border-color: #4dd2ff;
  box-shadow: 0 0 10px rgba(77,210,255,0.3);
}
.rarity-common .achievement-title { color: #4dd2ff; }

.rarity-rare {
  border-color: #ff69b4;
  box-shadow: 0 0 12px rgba(255,105,180,0.5);
}
.rarity-rare .achievement-title { color: #ff69b4; }

.rarity-epic {
  border-color: #bf5fff;
  box-shadow: 0 0 15px rgba(191,95,255,0.6);
}
.rarity-epic .achievement-title { color: #bf5fff; }

.rarity-legendary {
  border-color: rgba(255, 165, 0, 0.5);
  box-shadow: 0 0 8px rgba(255, 165, 0, 0.2);
}
.rarity-legendary .achievement-title {
  color: #ffa500;
}

@keyframes popIn {
  0% { transform: scale(0.5); opacity: 0; }
  70% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); }
}

.unlocked-animation { /* no animation on page load */ }

/* XP ring */
.xp-ring svg {
  transform: rotate(-90deg);
}

.xp-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 10;
}

.xp-progress {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s ease;
}

.achievement-progress {
  width: 100%;
  height: 8px;
  background: #222;
  border-radius: 5px;
  overflow: hidden;
  margin-top: 10px;
}

.achievement-progress-fill {
  height: 100%;
  background: linear-gradient(90deg,#ff69b4,#ff00ff);
  box-shadow: 0 0 8px #ff00ff;
  border-radius: 5px;
  transition: width 0.4s ease;
}



/* ==============================
   LOCKED ACHIEVEMENTS
============================== */
.achievement-locked {
  position: relative;
  opacity: 0.35;
  filter: grayscale(100%);
  pointer-events: none;
  transition: 0.4s ease;
}

.achievement-locked::after {
  content: '\f023'; /* fa-lock */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 1.4rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 0.25);
}

.achievement-locked .achievement-title { filter: blur(2px); }
.achievement-locked .achievement-desc { opacity: 0.3; }

.unlocked-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: #000;
  font-weight: 900;
}

/* ── Profile Setup checklist (inside achievements) ── */
.setup-progress-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 105, 180, 0.15);
  color: var(--color-accent);
  border: 1px solid rgba(255, 105, 180, 0.3);
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 1px 9px;
  margin-left: 10px;
  vertical-align: middle;
}
.setup-progress-pill.pill-complete {
  background: rgba(40, 200, 100, 0.15);
  color: #28c864;
  border-color: rgba(40, 200, 100, 0.35);
}

.setup-task-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 4px 4px;
  max-width: 520px;
}

.setup-task-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--color-surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  transition: border-color 0.15s ease;
}

.setup-task-row.setup-done {
  opacity: 0.55;
  border-color: rgba(255, 105, 180, 0.12);
}

.setup-task-check {
  font-size: 1rem;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}

.setup-done .setup-task-check {
  color: var(--color-accent);
}

.setup-task-row:not(.setup-done) .setup-task-check {
  color: rgba(255, 255, 255, 0.18);
}

.setup-task-label {
  flex: 1;
  font-size: 0.88rem;
  color: var(--color-text);
}

.setup-done .setup-task-label {
  color: var(--color-text-dim);
}

.setup-task-badge {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 99px;
  flex-shrink: 0;
  margin-right: 8px;
}

.badge-required {
  background: rgba(255, 105, 180, 0.15);
  color: var(--color-accent);
  border: 1px solid rgba(255, 105, 180, 0.3);
}

.badge-optional {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.setup-task-link {
  font-size: 0.78rem;
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}

.setup-task-link:hover {
  opacity: 0.8;
}
