/* ── Achievements Screen ──────────────────────────────────────────── */

/* Season pill (shared between achievements + hiscore topbar right) */
.season-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 12px; background: var(--rose-bg);
  border: 1px solid rgba(194, 105, 122, 0.2);
  border-radius: 99px; font-size: 11px; color: var(--rose);
}
.season-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--rose) }

/* Content area */
.ach-content {
  flex: 1; overflow-y: auto; padding: 24px 28px;
}

/* Milestone pass hero */
.milestone-hero {
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 16px; padding: 24px 28px; margin-bottom: 20px;
  position: relative; overflow: hidden;
}
.milestone-hero::before {
  content: ''; position: absolute; top: -60px; right: -60px;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(194, 105, 122, 0.07) 0%, transparent 70%);
  pointer-events: none;
}
.milestone-hero-top {
  display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px;
}
.milestone-season-label {
  font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--muted2); margin-bottom: 4px;
}
.milestone-season-title {
  font-family: var(--ff-display); font-size: 22px;
  font-weight: 400; color: var(--cream);
}
.milestone-hero-right { text-align: right }
.milestone-days { font-size: 12px; color: var(--muted) }
.milestone-xp-big {
  font-family: var(--ff-display); font-size: 28px;
  font-weight: 300; color: var(--cream); line-height: 1;
}
.milestone-xp-sub { font-size: 11px; color: var(--muted); margin-top: 2px }

/* Level nodes row */
.level-nodes-wrap { margin-bottom: 12px }
.level-nodes {
  display: flex; align-items: center; justify-content: space-between;
  position: relative; margin-bottom: 10px;
}
.level-nodes::before {
  content: ''; position: absolute; top: 50%;
  left: 16px; right: 16px; height: 1px;
  background: var(--border2); transform: translateY(-50%); z-index: 0;
}
.lnode {
  width: 32px; height: 32px; min-width: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 500;
  position: relative; z-index: 1;
  cursor: pointer; transition: all 0.15s;
  border: 1.5px solid var(--border2);
  background: var(--bg2); color: var(--muted2);
}
.lnode:hover { border-color: rgba(194, 105, 122, 0.3); transform: scale(1.15) }
.lnode.done { background: var(--rose); border-color: var(--rose); color: #fff }
.lnode.current {
  background: var(--bg2); border-color: var(--rose); color: var(--rose);
  border-width: 2px; box-shadow: 0 0 0 3px rgba(194, 105, 122, 0.15);
}
.lnode.locked { border-color: var(--border2); background: var(--bg2); color: rgba(255,255,255,0.15) }
.lnode.locked.final { border-color: rgba(194, 105, 122, 0.3); color: var(--rose-dim) }
.lnode.selected { box-shadow: 0 0 0 3px rgba(194, 105, 122, 0.3); transform: scale(1.15) }

/* Level node tooltip */
.lnode-tooltip {
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  background: var(--bg3); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px; min-width: 180px; z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  animation: tooltipIn 0.15s ease;
  pointer-events: none;
  text-align: center;
}
.lnode-tooltip::after {
  content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: var(--border);
}
.lnode-tooltip-preview {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
}
.lnode-tooltip-preview .avatar-frame { pointer-events: none }
.lnode-tooltip-level {
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted2); margin-bottom: 4px;
}
.lnode-tooltip-reward {
  font-size: 13px; color: var(--cream); font-weight: 400; margin-bottom: 4px;
}
.lnode-tooltip-status {
  font-size: 11px; color: var(--muted);
}
.lnode-tooltip-status.unlocked { color: var(--green) }
.lnode-tooltip-status.current { color: var(--rose) }
@keyframes tooltipIn { from { opacity: 0; transform: translateX(-50%) translateY(4px) } to { opacity: 1; transform: translateX(-50%) translateY(0) } }

/* Reward preview icons */
.reward-preview-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.reward-preview-icon svg { width: 20px; height: 20px }
.reward-preview-icon.rpi-rose   { background: var(--rose-bg); color: var(--rose) }
.reward-preview-icon.rpi-amber  { background: rgba(218, 165, 32, 0.12); color: #daa520 }
.reward-preview-icon.rpi-purple { background: rgba(167, 139, 250, 0.1); color: #a78bfa }
.reward-preview-icon.rpi-blue   { background: rgba(96, 165, 250, 0.1); color: var(--blue) }
.reward-preview-icon.rpi-green  { background: rgba(74, 222, 128, 0.1); color: var(--green) }

/* Production milestone reward detail */
.milestone-next-reward {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  background: rgba(194, 105, 122, 0.05);
  border: 1px solid rgba(194, 105, 122, 0.15);
  border-radius: 10px; margin-top: 12px;
}
.milestone-reward-preview { flex-shrink: 0 }
.milestone-reward-preview .avatar-frame { pointer-events: none }
.milestone-next-info { flex: 1; min-width: 0 }
.milestone-next-label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 2px }
.milestone-next-name { display: block; font-size: 14px; font-weight: 400; color: var(--cream) }
.tier-upgrade-hint { display: block; font-size: 11px; color: var(--rose); margin-top: 2px }
.milestone-next-xptogo { font-size: 12px; color: var(--muted2); white-space: nowrap }
.milestone-detail-status { font-size: 12px; white-space: nowrap }
.milestone-detail-status.claimed { color: var(--muted) }
.milestone-claim-btn {
  padding: 6px 16px; border-radius: 8px; font-size: 12px;
  font-weight: 500; border: none; cursor: pointer;
  background: var(--rose); color: #fff;
  font-family: var(--ff-body); transition: opacity 0.15s;
}
.milestone-claim-btn:hover { opacity: 0.85 }

/* XP progress bar */
.ach-xp-bar-track {
  height: 4px; background: var(--border2);
  border-radius: 2px; overflow: hidden; margin-bottom: 12px;
}
.ach-xp-bar-fill {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--rose-dim), var(--rose));
}

/* Next reward banner */
.next-reward-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  background: rgba(194, 105, 122, 0.05);
  border: 1px solid rgba(194, 105, 122, 0.15);
  border-radius: 10px;
}
.nrb-icon {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--rose-bg);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.nrb-icon svg { width: 16px; height: 16px; color: var(--rose) }
.nrb-preview { flex-shrink: 0; display: flex; align-items: center; justify-content: center }
.nrb-preview .banner-preview-box { width: 120px; height: 60px; border-radius: 9px }
.nrb-body { flex: 1 }
.nrb-label { font-size: 11px; color: var(--muted); margin-bottom: 2px }
.nrb-reward { font-size: 14px; font-weight: 400; color: var(--cream) }
.nrb-hint { font-size: 11px; color: var(--rose); margin-top: 2px }
.nrb-xp { font-size: 12px; color: var(--muted2); white-space: nowrap }

/* Stats row */
.ach-stats-row {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px; margin-bottom: 20px;
}
.ach-stat-card {
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 12px; padding: 14px 16px;
}
.ach-stat-val {
  font-family: var(--ff-display); font-size: 26px;
  font-weight: 300; color: var(--cream); line-height: 1;
}
.ach-stat-lbl { font-size: 11px; color: var(--muted); margin-top: 5px }
.ach-stat-delta {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; margin-top: 7px; padding: 2px 7px; border-radius: 99px;
}
.delta-rose { background: var(--rose-bg); color: var(--rose) }
.delta-green { background: rgba(74, 222, 128, 0.1); color: var(--green) }

/* Filter tabs */
.ach-filter-row { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap }
.ach-ftab {
  padding: 5px 14px; border-radius: 99px; font-size: 12px;
  border: 1px solid var(--border2); background: transparent;
  color: var(--muted); cursor: pointer; transition: all 0.15s;
  font-family: var(--ff-body);
}
.ach-ftab.active {
  background: var(--rose-bg); border-color: rgba(194, 105, 122, 0.25); color: var(--rose);
}
.ach-ftab:hover:not(.active) { color: var(--cream) }

/* Two column layout */
.ach-two-col {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; margin-bottom: 16px;
}

/* Achievement section card */
.ach-section {
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 14px; overflow: hidden;
}
.ach-section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border2);
}
.ach-section-title { font-size: 13px; font-weight: 500; color: var(--cream) }
.ach-section-count {
  font-size: 11px; color: var(--muted);
  padding: 3px 8px; background: var(--bg2); border-radius: 99px;
}
.ach-list { padding: 6px 10px }

/* Achievement item */
.ach-item {
  display: flex; align-items: center; gap: 12px;
  padding: 8px; border-radius: 9px; transition: background 0.15s; cursor: default;
}
.ach-item:hover { background: var(--bg2) }
.ach-icon {
  width: 36px; height: 36px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ach-icon svg { width: 16px; height: 16px }
.ach-icon.done-rose { background: var(--rose-bg); color: var(--rose) }
.ach-icon.done-green { background: rgba(74, 222, 128, 0.1); color: var(--green) }
.ach-icon.done-amber { background: var(--yellow-bg); color: var(--yellow) }
.ach-icon.done-blue { background: rgba(96, 165, 250, 0.1); color: var(--blue) }
.ach-icon.locked { background: var(--bg2); color: var(--muted2); border: 1px solid var(--border2) }
.ach-icon.secret { background: var(--bg2); color: var(--muted2); border: 1px solid var(--border2) }
.ach-body { flex: 1; min-width: 0 }
.ach-name {
  font-size: 13px; color: var(--cream);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ach-desc {
  font-size: 11px; color: var(--muted); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Progress bar */
.ach-prog { display: flex; align-items: center; gap: 8px; margin-top: 5px }
.prog-track { flex: 1; height: 2px; background: var(--border2); border-radius: 1px; overflow: hidden }
.prog-fill { height: 100%; border-radius: 1px }
.prog-fill.rose { background: var(--rose) }
.prog-fill.green { background: var(--green) }
.prog-fill.amber { background: var(--yellow) }
.prog-txt { font-size: 10px; color: var(--muted2); white-space: nowrap }

/* Right side badges */
.ach-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0 }
.xp-badge { font-size: 11px; font-weight: 500; padding: 2px 9px; border-radius: 99px }
.xp-done { background: var(--rose-bg); color: var(--rose) }
.xp-locked { background: var(--bg2); color: var(--muted2) }
.xp-secret { background: rgba(124, 58, 237, 0.1); color: #a78bfa }
.check-circle {
  width: 18px; height: 18px; border-radius: 50%; background: var(--rose);
  display: flex; align-items: center; justify-content: center;
}
.check-circle svg { width: 9px; height: 9px; stroke: #fff; fill: none; stroke-width: 2.5 }
.tier-row { display: flex; align-items: center; gap: 4px }
.tier-dot { width: 5px; height: 5px; border-radius: 50% }
.tier-lbl { font-size: 10px; color: var(--muted2) }

/* Full width section headers */
.ach-full-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px;
}
.ach-full-title {
  font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted2);
}

/* Wide achievement list */
.ach-wide {
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 14px; overflow: hidden; margin-bottom: 16px;
}
.ach-wide-inner { padding: 6px 10px }
.ach-item-wide {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 8px; border-radius: 9px; transition: background 0.15s; cursor: default;
}
.ach-item-wide:hover { background: var(--bg2) }

/* Secret achievement styling */
.secret-desc { font-size: 11px; color: var(--muted2); margin-top: 1px; font-style: italic }

/* ── Reward Popup Overlays (shared base) ─────────────────────────── */

.reward-popup-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0, 0, 0, 0.7);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}
.reward-popup-overlay.show { opacity: 1; }

.reward-popup-content {
  position: relative;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 36px 32px 28px;
  max-width: 380px;
  width: 90%;
  text-align: center;
  overflow: hidden;
}

.reward-popup-glow {
  position: absolute; top: -80px; left: 50%; transform: translateX(-50%);
  width: 260px; height: 260px; border-radius: 50%;
  pointer-events: none;
}

.reward-popup-icon {
  font-size: 48px; margin-bottom: 8px;
  animation: reward-bounce 0.5s ease-out;
}

@keyframes reward-bounce {
  0% { transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.reward-popup-title {
  font-family: var(--ff-display); font-size: 22px;
  color: var(--cream); margin: 0 0 4px;
}

.reward-popup-sub {
  font-size: 13px; color: var(--muted); margin: 0 0 20px;
}

.reward-popup-items {
  display: flex; flex-direction: column; gap: 12px;
  margin-bottom: 24px;
}

.reward-popup-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 12px;
  background: var(--bg2); border: 1px solid var(--border2);
  text-align: left;
}

.reward-popup-item-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 20px;
}

.reward-popup-item-icon.rpi-amber { background: rgba(251, 191, 36, 0.12); color: #fbbf24; }
.reward-popup-item-icon.rpi-blue  { background: rgba(88, 101, 242, 0.12); color: #5865f2; }

.reward-popup-item-text {
  flex: 1; min-width: 0;
}
.reward-popup-item-title {
  font-size: 13px; font-weight: 500; color: var(--cream);
}
.reward-popup-item-sub {
  font-size: 11px; color: var(--muted); margin-top: 1px;
}

/* Cosmetic preview rows */
.reward-popup-preview {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 12px;
  background: var(--bg2); border: 1px solid var(--border2);
  text-align: left;
}

.reward-popup-preview-visual {
  flex-shrink: 0;
}

.reward-popup-banner-preview {
  position: relative; width: 120px; height: 48px;
  border-radius: 8px; overflow: hidden;
  background: var(--surface); flex-shrink: 0;
}

.reward-popup-btn {
  padding: 10px 36px; border-radius: 99px;
  background: var(--rose); color: #fff;
  font-family: var(--ff-body); font-size: 14px; font-weight: 500;
  border: none; cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.reward-popup-btn:hover { filter: brightness(1.1); }
.reward-popup-btn:active { transform: scale(0.97); }

/* Discord-specific glow color */
.reward-popup-glow.discord {
  background: radial-gradient(circle, rgba(88, 101, 242, 0.15) 0%, transparent 70%);
}

/* ── Production Milestone Bar (rendered by achievements.js) ─────── */

.milestone-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 16px;
}
.milestone-header h3 {
  font-family: var(--ff-display); font-size: 20px;
  font-weight: 400; color: var(--cream); margin: 0;
}
.milestone-header-left { display: flex; flex-direction: column; gap: 4px }
.milestone-header-right { text-align: right; display: flex; flex-direction: column; gap: 4px }
.milestone-season-sub { font-size: 12px; color: var(--muted) }
.milestone-days-left { font-size: 12px; color: var(--muted) }
.milestone-xp-display {
  font-family: var(--ff-display); font-size: 16px;
  font-weight: 400; color: var(--cream);
}

#milestoneBarContainer {
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 16px; padding: 24px 28px; margin-bottom: 20px;
  position: relative; overflow: hidden;
}
#milestoneBarContainer::before {
  content: ''; position: absolute; top: -60px; right: -60px;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(194, 105, 122, 0.07) 0%, transparent 70%);
  pointer-events: none;
}

/* Progress bar */
.milestone-bar {
  height: 4px; background: var(--border2);
  border-radius: 2px; overflow: hidden; margin-bottom: 16px;
}
.milestone-bar-fill {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--rose-dim), var(--rose));
  transition: width 0.4s ease;
}

/* Milestone level nodes */
.milestone-nodes {
  display: flex; align-items: center; justify-content: space-between;
  position: relative; margin-bottom: 10px;
}
.milestone-nodes::before {
  content: ''; position: absolute; top: 50%;
  left: 16px; right: 16px; height: 1px;
  background: var(--border2); transform: translateY(-50%); z-index: 0;
}
.milestone-node {
  width: 32px; height: 32px; min-width: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 500;
  position: relative; z-index: 1;
  cursor: pointer; transition: all 0.15s;
  border: 1.5px solid var(--border2);
  background: var(--bg2); color: var(--muted2);
}
.milestone-node:hover { border-color: rgba(194, 105, 122, 0.3); transform: scale(1.15) }
.milestone-node.completed { background: var(--rose); border-color: var(--rose); color: #fff }
.milestone-node.current {
  background: var(--bg2); border-color: var(--rose); color: var(--rose);
  border-width: 2px; box-shadow: 0 0 0 3px rgba(194, 105, 122, 0.15);
}
.milestone-node.locked { border-color: var(--border2); background: var(--bg2); color: rgba(255,255,255,0.15) }
.milestone-node.claimed {
  background: var(--green); border-color: var(--green); color: #fff;
}
.milestone-node.claimed .claimed-check { width: 14px; height: 14px }
.milestone-node.selected { box-shadow: 0 0 0 3px rgba(194, 105, 122, 0.3); transform: scale(1.15) }

/* ── Production Stats Row (rendered by achievements.js) ──────────── */

.ach-stats-prod {
  display: flex; gap: 16px; margin-bottom: 20px;
}
.ach-stat {
  flex: 1;
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 12px; padding: 14px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.ach-stat-num {
  font-family: var(--ff-display); font-size: 24px;
  font-weight: 300; color: var(--cream); line-height: 1;
}
.ach-stat-label { font-size: 11px; color: var(--muted) }

/* ── Production Achievement Cards (rendered by achievements.js) ── */

.ach-section-label {
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted2); padding: 12px 0 6px; margin-top: 4px;
}
.achievement-empty {
  padding: 24px; text-align: center; color: var(--muted2); font-size: 12px;
}

.achievement-card {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  background: var(--bg3); border: 1px solid var(--border2);
  margin-bottom: 6px; transition: background 0.15s;
}
.achievement-card:hover { background: var(--bg2) }
.achievement-card.unlocked { border-color: rgba(194, 105, 122, 0.2) }
.achievement-card.hidden-secret { border-color: rgba(124, 58, 237, 0.2) }
.achievement-card .ach-icon.unlocked { background: var(--rose-bg); color: var(--rose); border: none }
.achievement-card .ach-icon.secret { background: var(--bg2); color: var(--muted2); border: 1px solid var(--border2) }
.achievement-card .ach-info { flex: 1; min-width: 0 }
.achievement-card .ach-title {
  font-size: 13px; color: var(--cream);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.achievement-card .ach-desc {
  font-size: 11px; color: var(--muted); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.achievement-card .ach-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0 }
.achievement-card .ach-xp { font-size: 11px; font-weight: 500; padding: 2px 9px; border-radius: 99px; background: var(--rose-bg); color: var(--rose) }
.achievement-card .ach-xp.dim { background: var(--bg2); color: var(--muted2) }
.achievement-card .ach-check { color: var(--green); font-size: 14px }
.achievement-card .ach-tier-badge { font-size: 10px }
.achievement-card .ach-cosmetic-line { font-size: 10px; color: var(--muted2) }

/* Achievement progress bar */
.achievement-card .ach-progress { display: flex; align-items: center; gap: 8px; margin-top: 5px }
.achievement-card .ach-progress-bar { flex: 1; height: 3px; background: var(--border2); border-radius: 2px; overflow: hidden }
.achievement-card .ach-progress-fill { height: 100%; border-radius: 2px; background: var(--rose) }
.achievement-card .ach-progress-text { font-size: 10px; color: var(--muted2); white-space: nowrap }

/* Category tab (production — shares base with .ach-ftab) */
.achievement-category-tab {
  padding: 5px 14px; border-radius: 99px; font-size: 12px;
  border: 1px solid var(--border2); background: transparent;
  color: var(--muted); cursor: pointer; transition: all 0.15s;
  font-family: var(--ff-body);
}
.achievement-category-tab.active {
  background: var(--rose-bg); border-color: rgba(194, 105, 122, 0.25); color: var(--rose);
}
.achievement-category-tab:hover:not(.active) { color: var(--cream) }

/* Skeleton loading blocks */
.ach-skeleton-block {
  background: var(--bg3); border: 1px solid var(--border2);
  animation: skeleton-pulse 1.2s ease-in-out infinite;
}
@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.5 }
  50% { opacity: 0.3 }
}

/* ── Achievement Unlock Popup ────────────────────────────────────── */

.achievement-unlock-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0, 0, 0, 0.7);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}
.achievement-unlock-overlay.show { opacity: 1; }

.achievement-unlock-content {
  position: relative;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 36px 32px 28px;
  max-width: 380px;
  width: 90%;
  text-align: center;
  overflow: hidden;
}

.achievement-unlock-glow {
  position: absolute; top: -80px; left: 50%; transform: translateX(-50%);
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.achievement-unlock-icon {
  font-size: 48px; margin-bottom: 8px;
  animation: reward-bounce 0.5s ease-out;
}

.achievement-unlock-title {
  font-family: var(--ff-display); font-size: 22px;
  color: var(--cream); margin: 0 0 4px;
}

.achievement-unlock-name {
  font-size: 15px; font-weight: 600; color: var(--amber, #fbbf24);
  margin: 0 0 4px;
}

.achievement-unlock-desc {
  font-size: 13px; color: var(--muted); margin: 0 0 16px;
}

.achievement-unlock-xp {
  font-size: 14px; font-weight: 600;
  color: var(--amber, #fbbf24); margin-bottom: 12px;
}

.achievement-unlock-bar-wrap {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px;
}
.achievement-unlock-bar-wrap span {
  font-size: 12px; color: var(--muted); white-space: nowrap;
}
.achievement-unlock-bar {
  flex: 1; height: 4px; background: var(--border2);
  border-radius: 2px; overflow: hidden;
}
.achievement-unlock-bar-fill {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--rose-dim), var(--rose));
  transition: width 0.4s ease;
}

.achievement-unlock-btn {
  padding: 10px 36px; border-radius: 99px;
  background: var(--rose); color: #fff;
  font-family: var(--ff-body); font-size: 14px; font-weight: 500;
  border: none; cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.achievement-unlock-btn:hover { filter: brightness(1.1); }
.achievement-unlock-btn:active { transform: scale(0.97); }

/* ── Milestone Level Up Popup ────────────────────────────────────── */

.milestone-levelup-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0, 0, 0, 0.7);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}
.milestone-levelup-overlay.show { opacity: 1; }

.milestone-levelup-content {
  position: relative;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 36px 32px 28px;
  max-width: 380px;
  width: 90%;
  text-align: center;
  overflow: hidden;
}

.milestone-levelup-title {
  font-family: var(--ff-display); font-size: 22px;
  color: var(--cream); margin: 0 0 4px;
}

.milestone-levelup-season {
  font-size: 12px; color: var(--muted); margin: 0 0 16px;
}

.milestone-levelup-reward {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 16px; border-radius: 12px;
  background: var(--bg2); border: 1px solid var(--border2);
  margin-bottom: 16px;
}
.milestone-levelup-reward .reward-icon { font-size: 24px; }
.milestone-levelup-reward .reward-text {
  font-size: 14px; font-weight: 500; color: var(--cream);
}

.tier-upgrade-hint {
  font-size: 12px; color: var(--rose); margin: 0 0 16px;
  font-style: italic;
}

.milestone-levelup-btn {
  padding: 10px 36px; border-radius: 99px;
  background: var(--rose); color: #fff;
  font-family: var(--ff-body); font-size: 14px; font-weight: 500;
  border: none; cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.milestone-levelup-btn:hover { filter: brightness(1.1); }
.milestone-levelup-btn:active { transform: scale(0.97); }

/* ── Season Summary Overlay ───────────────────────────────────────── */

.season-summary-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0, 0, 0, 0.8);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.4s ease;
  backdrop-filter: blur(12px);
}
.season-summary-overlay.show { opacity: 1; }

.season-summary-card {
  position: relative;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 24px;
  padding: 40px 36px 32px;
  max-width: 440px;
  width: 92%;
  text-align: center;
  overflow: hidden;
  transform: translateY(30px);
  transition: transform 0.4s ease;
}
.season-summary-overlay.show .season-summary-card {
  transform: translateY(0);
}

.season-summary-glow {
  position: absolute; top: -100px; left: 50%; transform: translateX(-50%);
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(194, 105, 122, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.season-summary-title {
  font-family: var(--ff-display); font-size: 24px;
  font-weight: 400; color: var(--cream);
  margin-bottom: 24px;
  opacity: 0; animation: seasonFadeUp 0.5s ease forwards;
}

.season-summary-xp {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  margin-bottom: 24px;
  opacity: 0; animation: seasonFadeUp 0.5s ease forwards;
}
.season-summary-xp-value {
  font-family: var(--ff-display); font-size: 42px;
  font-weight: 300; color: var(--rose); line-height: 1;
}
.season-summary-xp-label {
  font-size: 12px; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.08em;
}

.season-summary-bar-wrap {
  margin-bottom: 20px;
  opacity: 0; animation: seasonFadeUp 0.5s ease forwards;
}

.season-summary-nodes {
  display: flex; align-items: center; justify-content: center;
  gap: 4px; flex-wrap: wrap;
}
.season-summary-node {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 500;
  border: 1.5px solid var(--border2);
  background: var(--bg2); color: var(--muted2);
  transition: all 0.3s ease;
}
.season-summary-node.reached {
  background: var(--rose); border-color: var(--rose); color: #fff;
}

.season-summary-participants {
  font-size: 13px; color: var(--muted);
  margin-bottom: 20px;
  opacity: 0; animation: seasonFadeUp 0.5s ease forwards;
}

.season-summary-section {
  width: 100%;
  margin-bottom: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border2);
  opacity: 0; animation: seasonFadeUp 0.5s ease forwards;
}

.season-summary-section-header {
  font-size: 11px; font-weight: 600;
  color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: 10px;
}

.season-summary-stat {
  font-size: 14px; color: var(--cream); margin-bottom: 8px;
  opacity: 0; animation: seasonFadeUp 0.5s ease forwards;
}
.season-summary-stat.auto-claimed {
  font-size: 12px; color: var(--rose);
  padding: 8px 16px; margin-top: 4px;
  background: rgba(194, 105, 122, 0.08);
  border-radius: 8px;
}

.season-summary-title-row {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 14px; color: var(--cream); margin-bottom: 6px;
  opacity: 0; animation: seasonFadeUp 0.5s ease forwards;
}
.season-summary-title-row .rank-icon { font-size: 20px; }

.season-summary-best-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 0; font-size: 13px; color: var(--cream);
  opacity: 0; animation: seasonFadeUp 0.5s ease forwards;
}
.season-summary-best-row .best-score {
  font-weight: 500; color: var(--rose);
}

.season-summary-dismiss {
  margin-top: 20px;
  padding: 12px 40px; border-radius: 99px;
  background: var(--rose); color: #fff;
  font-family: var(--ff-body); font-size: 14px; font-weight: 500;
  border: none; cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  opacity: 0; animation: seasonFadeUp 0.5s ease forwards;
}
.season-summary-dismiss:hover { filter: brightness(1.1); }
.season-summary-dismiss:active { transform: scale(0.97); }

@keyframes seasonFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Reward Claim Celebration Modal ─────────────────────────────── */

.reward-claim-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0, 0, 0, 0.7);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}
.reward-claim-overlay.show { opacity: 1; }

.reward-claim-content {
  position: relative;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 36px 32px 28px;
  max-width: 380px;
  width: 90%;
  text-align: center;
  overflow: hidden;
}

.reward-claim-glow {
  position: absolute; top: -80px; left: 50%; transform: translateX(-50%);
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 222, 128, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.reward-claim-icon {
  font-size: 52px; margin-bottom: 8px;
  animation: rcmBounce 0.6s ease-out;
}

@keyframes rcmBounce {
  0% { transform: scale(0) rotate(-15deg); }
  50% { transform: scale(1.3) rotate(5deg); }
  70% { transform: scale(0.9) rotate(-2deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.reward-claim-title {
  font-family: var(--ff-display); font-size: 22px;
  color: var(--cream); margin: 0 0 16px;
  animation: seasonFadeUp 0.4s ease 0.1s both;
}

.reward-claim-detail {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 18px; border-radius: 12px;
  background: var(--bg2); border: 1px solid var(--border2);
  margin-bottom: 20px;
  animation: seasonFadeUp 0.4s ease 0.2s both;
}
.reward-claim-detail-icon { font-size: 24px; }
.reward-claim-detail-text {
  font-size: 15px; font-weight: 500; color: var(--cream);
}

.reward-claim-use-btn {
  display: block; width: 100%; padding: 10px 0; border-radius: 99px;
  background: transparent; color: var(--rose);
  font-family: var(--ff-body); font-size: 13px; font-weight: 500;
  border: 1px solid rgba(194, 105, 122, 0.3); cursor: pointer;
  margin-bottom: 10px;
  transition: background 0.15s;
  animation: seasonFadeUp 0.4s ease 0.3s both;
}
.reward-claim-use-btn:hover { background: rgba(194, 105, 122, 0.08); }

.reward-claim-dismiss-btn {
  padding: 10px 36px; border-radius: 99px;
  background: var(--rose); color: #fff;
  font-family: var(--ff-body); font-size: 14px; font-weight: 500;
  border: none; cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  animation: seasonFadeUp 0.4s ease 0.35s both;
}
.reward-claim-dismiss-btn:hover { filter: brightness(1.1); }
.reward-claim-dismiss-btn:active { transform: scale(0.97); }

/* Confetti particles */
.rcm-confetti {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.rcm-confetti-particle {
  position: absolute; top: -8px;
  border-radius: 2px;
  animation: rcmFall linear forwards;
  opacity: 0;
}
@keyframes rcmFall {
  0% { opacity: 1; transform: translateY(0) translateX(0) rotate(0deg); }
  100% { opacity: 0; transform: translateY(320px) translateX(var(--drift, 0px)) rotate(720deg); }
}
