@layer base {
  html, body {
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 0;
    background-color: #10131a;
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }
  *, *::before, *::after {
    box-sizing: inherit;
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
    touch-callout: none !important;
    touch-action: manipulation;
  }
  body {
    overscroll-behavior: none;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    flex-direction: column;
  }
  a, button, .nav-link, [onclick], [role="button"] {
    -webkit-touch-callout: none !important;
    touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
  }
  img, video, canvas, svg, picture, figure {
    -webkit-user-drag: none !important;
    -webkit-touch-callout: none !important;
    touch-callout: none !important;
    pointer-events: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
  }
}

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

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

/* 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 */
#core-tap-button {
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

/* Boost card states */
.boost-card {
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.boost-card.boost-ready {
  border-color: rgba(0, 240, 255, 0.25);
}
.boost-card.boost-ready:hover {
  border-color: rgba(0, 240, 255, 0.5);
}

.boost-card.boost-active {
  border-color: rgba(0, 240, 255, 0.9);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.35), inset 0 0 12px rgba(0, 240, 255, 0.08);
  animation: boostPulse 1.2s ease-in-out infinite;
}

.boost-card.boost-active .boost-icon {
  background: rgba(0, 240, 255, 0.25);
}

@keyframes boostPulse {
  0%, 100% { box-shadow: 0 0 16px rgba(0, 240, 255, 0.35), inset 0 0 12px rgba(0, 240, 255, 0.08); }
  50% { box-shadow: 0 0 28px rgba(0, 240, 255, 0.6), inset 0 0 18px rgba(0, 240, 255, 0.15); }
}

.boost-card.boost-cooldown {
  opacity: 0.55;
  border-color: rgba(132, 148, 149, 0.15);
  cursor: not-allowed;
  filter: grayscale(0.4);
}
.boost-card.boost-cooldown .boost-icon {
  background: rgba(132, 148, 149, 0.1);
  color: #849495;
}

.boost-card.energy-empty {
  opacity: 0.55;
  border-color: rgba(132, 148, 149, 0.15);
  cursor: not-allowed;
  filter: grayscale(0.4);
}
.boost-card.energy-empty .boost-icon {
  background: rgba(132, 148, 149, 0.1);
  color: #849495;
}

.boost-card.autobot-inactive {
  border-color: rgba(132, 148, 149, 0.15);
  opacity: 0.75;
}
.boost-card.autobot-inactive .boost-icon {
  background: rgba(132, 148, 149, 0.1);
  color: #849495;
}

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

/* No scrollbar utility */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ========== SATIN ALMA BAŞARI MODAL ========== */
.purchase-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.purchase-modal.active {
  opacity: 1;
}
.purchase-modal-content {
  width: 85%;
  max-width: 320px;
  background: #1d2026;
  border: 1px solid rgba(0,240,255,0.25);
  border-radius: 1.25rem;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 0 40px rgba(0,240,255,0.2), 0 8px 32px rgba(0,0,0,0.5);
  transform: scale(0.85) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.purchase-modal.active .purchase-modal-content {
  transform: scale(1) translateY(0);
}
.purchase-modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background: rgba(0,240,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00f0ff;
  font-size: 28px;
  animation: modalPop 0.5s ease both;
}
.purchase-modal-heading {
  font-family: 'Sora', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: #dbfcff;
  margin-bottom: 0.25rem;
}
.purchase-modal-sub {
  font-size: 0.8rem;
  color: #849495;
  margin-bottom: 1rem;
}
.purchase-modal-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(0,240,255,0.06);
  border: 1px solid rgba(0,240,255,0.15);
  border-radius: 0.75rem;
  padding: 0.6rem;
  margin-bottom: 0.75rem;
  color: #ffd700;
  font-weight: 700;
  font-size: 0.9rem;
}
.purchase-modal-name {
  color: #ffd700;
}
.purchase-modal-stats {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.purchase-modal-stat {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: rgba(255,215,0,0.06);
  border: 1px solid rgba(255,215,0,0.15);
  border-radius: 0.6rem;
  padding: 0.5rem;
  font-size: 0.75rem;
  color: #ffd700;
  font-weight: 600;
}
.purchase-modal-btn {
  width: 100%;
  padding: 0.65rem;
  border-radius: 0.75rem;
  background: rgba(0,240,255,0.9);
  color: #10131a;
  font-weight: 800;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 0 16px rgba(0,240,255,0.3);
}
.purchase-modal-btn:active {
  transform: scale(0.96);
}
@keyframes modalPop {
  0% { transform: scale(0); }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Lottie konfeti container */
#lottie-confetti-container {
  position: fixed;
  inset: 0;
  z-index: 298;
  pointer-events: none;
}

/* ELO / Lig System Styles */
@keyframes pulse-cyan {
  0%, 100% { box-shadow: 0 0 15px rgba(0, 240, 255, 0.4), 0 0 30px rgba(0, 240, 255, 0.2); }
  50% { box-shadow: 0 0 25px rgba(0, 240, 255, 0.7), 0 0 45px rgba(0, 240, 255, 0.35); }
}
.neon-pulse {
  animation: pulse-cyan 2.5s infinite ease-in-out;
}
.tap-tier-card {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.tap-tier-card:active {
  transform: scale(0.96);
}
