* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Nunito', sans-serif; overflow-x: hidden; background: #1a0a2e; }

@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(180deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 10px rgba(255,105,180,0.3); }
  50% { box-shadow: 0 0 25px rgba(255,105,180,0.6), 0 0 50px rgba(255,105,180,0.2); }
}

@keyframes rainbow {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

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

@keyframes bounce-in {
  0% { transform: scale(0); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

@keyframes orb-spin {
  0% { transform: rotate(0deg) scale(0.5); opacity: 0; }
  30% { transform: rotate(180deg) scale(1.2); opacity: 1; }
  60% { transform: rotate(360deg) scale(1); }
  80% { transform: rotate(540deg) scale(1.5); filter: brightness(2); }
  100% { transform: rotate(720deg) scale(0); opacity: 0; }
}

@keyframes crack {
  0% { clip-path: circle(0% at 50% 50%); }
  50% { clip-path: circle(30% at 50% 50%); filter: brightness(3); }
  100% { clip-path: circle(100% at 50% 50%); filter: brightness(1); }
}

@keyframes confetti-fall {
  0% { transform: translateY(-10px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

@keyframes stat-bar-fill {
  from { width: 0%; }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes title-sparkle {
  0%, 100% { text-shadow: 0 0 10px #ff69b4, 0 0 20px #ff69b4, 0 0 40px #ff1493; }
  50% { text-shadow: 0 0 20px #00ffff, 0 0 40px #ff69b4, 0 0 60px #8a2be2; }
}

.sparkle-particle {
  position: fixed;
  pointer-events: none;
  width: 4px;
  height: 4px;
  background: white;
  border-radius: 50%;
  animation: sparkle 3s infinite;
}

.card-glass {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
}

.btn-gacha {
  background: linear-gradient(135deg, #ff69b4, #8a2be2, #00bfff);
  border: none;
  border-radius: 50px;
  color: white;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Nunito', sans-serif;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.btn-gacha:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(255,105,180,0.5);
}

.btn-gacha:active {
  transform: scale(0.97);
}

.btn-secondary {
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 50px;
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Nunito', sans-serif;
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.4);
}

.rarity-common { border-color: #9ca3af; }
.rarity-uncommon { border-color: #22c55e; }
.rarity-rare { border-color: #3b82f6; }
.rarity-epic { border-color: #a855f7; }
.rarity-legendary { border-color: #eab308; box-shadow: 0 0 15px rgba(234,179,8,0.3); }
.rarity-mythic { border-color: #ff69b4; animation: rainbow 3s linear infinite; box-shadow: 0 0 20px rgba(255,105,180,0.4); }

.nav-item { transition: all 0.2s; }
.nav-item.active { transform: translateY(-3px); }

.stat-bar {
  height: 12px;
  border-radius: 6px;
  background: rgba(255,255,255,0.1);
  overflow: hidden;
}

.stat-bar-inner {
  height: 100%;
  border-radius: 6px;
  transition: width 0.5s ease;
  animation: stat-bar-fill 0.8s ease;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }
::-webkit-scrollbar-thumb { background: rgba(255,105,180,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,105,180,0.5); }

.pull-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.character-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  border-radius: 12px;
}

.event-popup {
  animation: bounce-in 0.4s ease;
}

.tab-indicator {
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff69b4;
}