
       /* ── Pioneer Modal — 3D Bubble Style ── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=DM+Sans:wght@400;500&display=swap');

/* Overlay */
#pioneer-modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(ellipse at center, rgba(80,0,0,0.55) 0%, rgba(0,0,0,0.75) 100%);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: overlayFadeIn 0.35s ease forwards;
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Bubble Card */
#pioneer-modal .pm-card {
  position: relative;
  background: linear-gradient(145deg, #8b1a1a 0%, #4a0000 45%, #1e0000 100%);
  padding: 44px 40px 36px;
  border-radius: 36px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  color: #fff;
  font-family: 'DM Sans', sans-serif;

  /* 3D bubble illusion */
  box-shadow:
    0 2px 0px 1px #ff6b5a inset,          /* top-left highlight */
    0 -2px 0px 1px #2d0000 inset,         /* bottom-right shadow */
    0 25px 60px rgba(120,0,0,0.6),        /* deep drop shadow */
    0 8px 20px rgba(0,0,0,0.5),           /* mid shadow */
    0 2px 4px rgba(0,0,0,0.4);            /* close shadow */

  border: 1.5px solid rgba(255,120,100,0.25);

  /* pop-in animation */
  animation: bubblePop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  transform-origin: center bottom;
}

@keyframes bubblePop {
  0%   { transform: scale(0.55) translateY(30px); opacity: 0; }
  70%  { transform: scale(1.04) translateY(-4px); opacity: 1; }
  100% { transform: scale(1)    translateY(0);    opacity: 1; }
}

/* Gloss highlight removed */

/* Bottom reflection removed */

/* Trophy / heading */
#pioneer-modal .pm-card h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.85rem;
  font-weight: 900;
  color: #fff;
  margin: 0 0 16px;
  letter-spacing: 0.01em;
  text-shadow:
    0 1px 0 rgba(255,255,255,0.15),
    0 3px 10px rgba(0,0,0,0.6);
}

/* Info paragraph */
#pioneer-modal .pm-card p {
  font-size: 1rem;
  font-weight: 400;
  color: #ffffff;
  margin: 0 0 28px;
  line-height: 1.6;
  text-shadow: 0 1px 6px rgba(0,0,0,0.7);
}

/* Start Button */
#pioneer-modal .pm-btn {
  display: inline-block;
  padding: 13px 44px;
  background: linear-gradient(160deg, #ffffff 0%, #f0d0cc 100%);
  color: #8b0000;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: none;
  border-radius: 50px;
  cursor: pointer;

  /* 3D button effect */
  box-shadow:
    0 1px 0 rgba(255,255,255,0.8) inset,
    0 -2px 0 rgba(0,0,0,0.2) inset,
    0 6px 20px rgba(0,0,0,0.35),
    0 2px 6px rgba(0,0,0,0.25);

  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
}

#pioneer-modal .pm-btn:hover {
  background: linear-gradient(160deg, #fff5f5 0%, #ffe0d8 100%);
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 -2px 0 rgba(0,0,0,0.2) inset,
    0 10px 28px rgba(0,0,0,0.4),
    0 4px 10px rgba(0,0,0,0.25);
}

#pioneer-modal .pm-btn:active {
  transform: translateY(2px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 -1px 0 rgba(0,0,0,0.15) inset,
    0 3px 8px rgba(0,0,0,0.3);
}

/* User Avatar */
#pioneer-modal .pm-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 16px;
  border: 3px solid rgba(255, 255, 255, 0.6);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.5),
    0 0 0 5px rgba(255, 255, 255, 0.1);
}




/* ── Variables ── */
:root {
  --av-accent:      #f0a500;
  --av-accent-glow: rgba(240, 165, 0, 0.35);
  --av-bg:          #0f0f14;
  --av-card-bg:     #1a1a24;
  --av-card-border: #2e2e3e;
  --av-card-hover:  #252535;
  --av-selected:    #f0a500;
  --av-radius:      16px;
  --av-font:        'Cinzel', serif;
  --av-body-font:   'Raleway', sans-serif;
}

/* ════════════════════════════════
   OVERLAY
   ════════════════════════════════ */
.avatar-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;           /* prevents modal from touching screen edges on small screens */
}
.avatar-modal-overlay.active {
  display: flex;
  animation: av-fadeIn 0.22s ease forwards;
}

@keyframes av-fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ════════════════════════════════
   MODAL BOX
   ════════════════════════════════ */
.avatar-modal {
  background: var(--av-bg);
  border: 1px solid var(--av-card-border);
  border-radius: var(--av-radius);
  padding: 40px 36px 32px;
  width: min(520px, 100%);
  position: relative;
  justify-content: center
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(240, 165, 0, 0.1);

  /* Animation only plays when overlay becomes active — not on page load */
  animation: av-slideUp 0.28s cubic-bezier(0.34, 1.46, 0.64, 1) forwards;
}

@keyframes av-slideUp {
  from { transform: translateY(28px) scale(0.97); opacity: 0; }
  to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

/* ════════════════════════════════
   CLOSE BUTTON
   ════════════════════════════════ */
.avatar-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  border: none;
  color: #555;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 5px 9px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.avatar-modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

/* ════════════════════════════════
   HEADER
   ════════════════════════════════ */
.avatar-modal-header {
  text-align: center;
  margin-bottom: 28px;
}
.avatar-modal-header h2 {
  font-family: var(--av-font);
  font-size: 1.5rem;
  color: var(--av-accent);
  letter-spacing: 0.07em;
  margin: 0 0 6px;
}
.avatar-modal-header p {
  font-family: var(--av-body-font);
  color: #777;
  font-size: 0.83rem;
  margin: 0;
}

/* ════════════════════════════════
   AVATAR GRID
   ════════════════════════════════ */
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 22px;

}

/* ════════════════════════════════
   AVATAR CARD
   ════════════════════════════════ */
.avatar-card {
  background: var(--av-card-bg);
  border: 2px solid var(--av-card-border);
  border-radius: 12px;
  padding: 14px 8px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  transition:
    border-color 0.18s,
    background   0.18s,
    transform    0.15s,
    box-shadow   0.18s;
}
.avatar-card:hover {
  background: var(--av-card-hover);
  border-color: var(--av-accent-glow);
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
.avatar-card:active {
  transform: translateY(-1px);
}
.avatar-card.selected {
  border-color: var(--av-selected);
  background: rgba(240, 165, 0, 0.07);
  box-shadow:
    0 0 0 1px var(--av-selected),
    0 8px 28px rgba(240, 165, 0, 0.18);
}

/* ════════════════════════════════
   AVATAR IMAGE
   ════════════════════════════════ */
.avatar-img-wrap {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  overflow: hidden;
  background: #1e1e2e;
  border: 2px solid transparent;
  transition: border-color 0.18s, box-shadow 0.18s;
  flex-shrink: 0;
}
.avatar-card.selected .avatar-img-wrap {
  border-color: var(--av-accent);
  box-shadow: 0 0 12px var(--av-accent-glow);
}
.avatar-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ════════════════════════════════
   LABEL
   ════════════════════════════════ */
.avatar-section-label {
  text-align: center;
  font-family: var(--av-font);        /* already Cinzel — good */
  font-size: 1.4rem;                  /* was 1.1rem */
  font-weight: 700;                   /* already bold — keep */
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--av-accent);                     /* was var(--av-accent) — brighter yellow */
  margin-bottom: 14px;
}

.avatar-label {
  font-family: var(--av-body-font);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--av-accent);
  transition: color 0.18s;
}
.avatar-card.selected .avatar-label {
  color: var(--av-accent);
}

/* ════════════════════════════════
   CHECKMARK BADGE
   ════════════════════════════════ */
.avatar-check {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 20px;
  height: 20px;
  background: var(--av-accent);
  border-radius: 50%;
  font-size: 11px;
  color: #000;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.18s, transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
.avatar-card.selected .avatar-check {
  opacity: 1;
  transform: scale(1);
}

/* ════════════════════════════════
   CONFIRM BUTTON
   ════════════════════════════════ */
.avatar-confirm-btn {
  width: 100%;
  padding: 13px;
  background: var(--av-accent);
  color: #000;
  font-family: var(--av-font);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
}
.avatar-confirm-btn:disabled {
  opacity: 0.28;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
.avatar-confirm-btn:not(:disabled):hover {
  box-shadow: 0 6px 22px rgba(240, 165, 0, 0.45);
  transform: translateY(-1px);
}
.avatar-confirm-btn:not(:disabled):active {
  transform: translateY(0);
  box-shadow: none;
}

/* ════════════════════════════════
   FEEDBACK MESSAGE
   ════════════════════════════════ */
.avatar-feedback {
  margin-top: 12px;
  text-align: center;
  font-family: var(--av-body-font);
  font-size: 0.82rem;
  min-height: 20px;
  transition: opacity 0.2s;
}
.avatar-feedback.success { color: #4caf50; }
.avatar-feedback.error   { color: #e53935; }

/* ════════════════════════════════
   TRIGGER BUTTON
   ════════════════════════════════ */
#openAvatarBtn {
  padding: 5px 12px;
  background: linear-gradient(145deg, #8b0000, #4a0000);  /* 3d depth gradient */
  color: #ffffff;
  border: none;
  border-radius: 12px;                                      /* rounder for jelly feel */
  font-family: var(--av-body-font);
  font-weight: 700;
  font-size: 1.22rem;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.15s, background 0.15s;

  /* jelly 3d effect */
  box-shadow:
    0 6px 0 #2a0000,                                        /* bottom hard shadow = depth */
    0 8px 16px rgba(0, 0, 0, 0.4),                         /* soft drop shadow */
    inset 0 1px 0 rgba(255, 255, 255, 0.15);               /* top shine */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
#openAvatarBtn:hover {
  background: linear-gradient(145deg, #a00000, #5a0000);   /* slightly lighter on hover */
  box-shadow:
    0 6px 0 #2a0000,
    0 10px 22px rgba(100, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}
#openAvatarBtn:active {
  box-shadow:
    0 2px 0 #2a0000,                                        /* squishes down on click */
    0 4px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(4px);                               /* pushes down like a real button */
}

/* ════════════════════════════════
   RESPONSIVE
   ════════════════════════════════ */
@media (max-width: 480px) {
  .avatar-modal {
    padding: 28px 16px 22px;
  }
  .avatar-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .avatar-modal-header h2 {
    font-size: 1.25rem;
  }
  .avatar-img-wrap {
    width: 60px;
    height: 60px;
  }
}






