.menuPage {
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

.particlesCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.menuHeader {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
}

.brandGlow {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: .85rem;
  letter-spacing: .18em;
  color: var(--green);
  text-shadow: 0 0 20px rgba(61, 232, 138, 0.6);
}

.userBar {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  border-radius: 999px;
  transition: background .15s;
}

.userBar:hover {
  background: rgba(255,255,255,.04);
}

.settingsHint {
  margin: 0 0 4px;
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.4;
}

.settingsHint a {
  color: var(--green);
}

.coinPill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 209, 102, 0.35);
  background: rgba(255, 209, 102, 0.1);
  font-size: .85rem;
  color: var(--muted);
}

.coinPill strong {
  font-family: var(--font-display);
  color: var(--yellow);
  font-size: 1rem;
}

.userChip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: rgba(0, 0, 0, 0.35);
}

.userAvatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green-dim);
  font-size: 1.2rem;
  overflow: hidden;
}

.userAvatarImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.userName {
  font-weight: 700;
  font-size: .9rem;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menuMain {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 140px);
  padding: 20px;
}

.menuTitleBlock {
  text-align: center;
  margin-bottom: 40px;
}

.menuKicker {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: .7rem;
  letter-spacing: .25em;
  color: var(--green);
}

.menuTitle {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 10vw, 5.5rem);
  font-weight: 900;
  line-height: .95;
  letter-spacing: .04em;
  text-shadow: 0 0 40px rgba(61, 232, 138, 0.25);
}

.menuTitle span {
  display: block;
  color: var(--green);
  text-shadow: 0 0 30px rgba(61, 232, 138, 0.55);
}

.menuTagline {
  margin: 12px 0 20px;
  color: var(--muted);
  font-size: .95rem;
}

.onlineBadge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.4);
  font-size: .82rem;
  color: var(--muted);
}

.onlineBadge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  50% { opacity: .45; }
}

.chestBanner {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 580px;
  padding: 14px 18px;
  margin-bottom: 16px;
  border-radius: 14px;
  border: 1px solid #ffd166;
  background: linear-gradient(90deg, rgba(255,209,102,.12), rgba(255,209,102,.03));
  color: var(--text);
  cursor: pointer;
  text-align: left;
  animation: chestGlow 2.4s ease infinite;
}

@keyframes chestGlow {
  0%, 100% { box-shadow: 0 0 12px rgba(255,209,102,.15); }
  50% { box-shadow: 0 0 22px rgba(255,209,102,.4); }
}

.chestIcon { font-size: 1.8rem; flex-shrink: 0; }

.chestText {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chestText strong { font-size: .9rem; color: #ffd166; }
.chestText span { font-size: .78rem; color: var(--muted); }

.chestArrow { font-size: 1.2rem; color: #ffd166; flex-shrink: 0; }

.menuGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 180px));
  gap: 14px;
  max-width: 580px;
  width: 100%;
}

.menuBtn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 110px;
  padding: 20px 16px;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background: rgba(8, 12, 18, 0.75);
  backdrop-filter: blur(12px);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, border-color .2s, background .2s;
}

.menuBtnBadge {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--red, #f25f4c);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(242,95,76,.5);
}

.menuBtn:hover {
  transform: translateY(-4px) scale(1.03);
  border-color: var(--green);
  box-shadow: 0 0 28px rgba(61, 232, 138, 0.25), inset 0 0 20px rgba(61, 232, 138, 0.05);
  background: rgba(61, 232, 138, 0.08);
}

.menuBtn.playBtn {
  grid-column: span 3;
  min-height: 72px;
  flex-direction: row;
  background: linear-gradient(135deg, rgba(61, 232, 138, 0.2), rgba(61, 232, 138, 0.05));
  border-color: rgba(61, 232, 138, 0.5);
}

.menuBtn.playBtn:hover {
  box-shadow: 0 0 40px rgba(61, 232, 138, 0.4);
}

.menuBtnIcon {
  font-size: 1.6rem;
  line-height: 1;
}

.menuBtnLabel {
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
}

.menuFooter {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 16px;
  color: var(--muted);
  font-size: .75rem;
  letter-spacing: .1em;
}

.cascade {
  opacity: 0;
  animation: cascadeIn .6s ease forwards;
  animation-delay: calc(var(--i, 0) * 0.08s);
}

@keyframes cascadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modalOverlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}

.modalOverlay.hidden { display: none; }

.modalBox {
  width: min(420px, 100%);
  padding: 28px;
}

.modalBox h2 {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: .1em;
}

.modalActions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.modalActions .btn { flex: 1; }

.authBlock {
  display: grid;
  gap: 10px;
  margin: 14px 0 4px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.authHint {
  margin: 0;
  font-size: .75rem;
  color: var(--muted);
  line-height: 1.35;
}

.googleBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  text-decoration: none;
  background: #fff;
  color: #1f1f1f;
  border: 1px solid rgba(255,255,255,.15);
  font-weight: 700;
}

.googleBtn:hover {
  background: #f3f3f3;
  color: #111;
}

.googleBtn::before {
  content: "G";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4285f4, #34a853 50%, #fbbc05 85%, #ea4335);
  color: #fff;
  font-size: .72rem;
  font-weight: 900;
}

@media (max-width: 520px) {
  .menuGrid {
    grid-template-columns: 1fr 1fr;
  }
  .menuBtn.playBtn {
    grid-column: span 2;
  }
  .menuHeader {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
}
