* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  background: #0d0d1a;
  font-family: 'Fredoka', sans-serif;
  overflow: hidden;
  height: 100dvh;
  width: 100vw;
  color: #e0e0e0;
}

#root {
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
}

::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
}
::-webkit-scrollbar-thumb {
  background: rgba(0,245,212,0.3);
  border-radius: 2px;
}

@keyframes popOff {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.7; }
  100% { transform: scale(0); opacity: 0; }
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes slideInLeft {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

@keyframes floatUp {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-80px); opacity: 0; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 10px rgba(0,245,212,0.3); }
  50% { box-shadow: 0 0 30px rgba(0,245,212,0.7); }
}

@keyframes confettiBurst {
  0% { transform: scale(0); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.8; }
  100% { transform: scale(2); opacity: 0; }
}

@keyframes countUp {
  from { transform: scale(1.3); }
  to { transform: scale(1); }
}

@keyframes spotlight {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.8; }
}

.pop-anim {
  animation: popOff 0.35s ease-out forwards;
}

.shake-anim {
  animation: shake 0.4s ease-out;
}

.float-up {
  animation: floatUp 1.2s ease-out forwards;
  position: absolute;
  pointer-events: none;
  font-weight: 700;
  font-size: 1.3rem;
  color: #ffd166;
  text-shadow: 0 0 10px rgba(255,209,102,0.5);
}

.glow-pulse {
  animation: glow 1s ease-in-out;
}

.panel-container {
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.wordbox-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.tile-letter {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
}

.search-tile {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 2px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 1.1rem;
  position: relative;
}

.tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tutorial-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
}

.tutorial-card {
  position: relative;
  z-index: 1001;
  max-width: 340px;
  padding: 24px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 2px solid rgba(0,245,212,0.4);
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 0 40px rgba(0,245,212,0.15);
}

.portrait-card {
  background: linear-gradient(145deg, #1e1e3a, #16213e);
  border: 2px solid rgba(255,209,102,0.3);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s;
  cursor: pointer;
}

.portrait-card:hover {
  transform: scale(1.03);
}

.portrait-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.store-tile {
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}

.store-tile:hover {
  transform: scale(1.08);
}

.store-tile:active {
  transform: scale(0.95);
}

.confetti-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
}