@layer base {
  html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: #10131a;
    height: 100%;
    overflow: hidden;
  }
  body {
    overscroll-behavior: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    display: flex;
    flex-direction: column;
  }
}

::-webkit-scrollbar {
  display: none;
}

/* Main container - no scroll here */
main {
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* View Section Management - CRITICAL: must override Tailwind flex utility */
.view-section {
  display: none !important;
  animation: fadeIn 0.25s ease-out both;
  height: 100%;
  width: 100%;
}

.view-section.active {
  display: flex !important;
  overflow-y: auto;
  overflow-x: hidden;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Leaderboard custom item */
.leaderboard-item:last-child {
  margin-bottom: 0;
}

/* Particle text glow fallback */
.absolute.font-num-counter {
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.8), 0 0 20px rgba(0, 240, 255, 0.4);
}

/* Safe area helpers */
.pb-safe {
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 0.5rem);
}
.pt-safe {
  padding-top: env(safe-area-inset-top, 0px);
}

/* Crystal image container press effect - JS toggled */
.crystal-inner {
  transition: transform 0.1s ease-out;
}
.crystal-inner.tapped {
  transform: scale(0.90);
}

/* Mobile optimizations */
@media (max-height: 700px) {
  #core-tap-button {
    width: 14rem;
    height: 14rem;
  }
  #core-tap-button img {
    width: 9rem;
    height: 9rem;
  }
}

@media (max-height: 600px) {
  #core-tap-button {
    width: 12rem;
    height: 12rem;
  }
  #core-tap-button img {
    width: 7rem;
    height: 7rem;
  }
}
