* {
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

body {
  font-family: 'Nunito', sans-serif;
  background-color: #38bdf8;
  color: #1f2937;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.font-display {
  font-family: 'Fredoka', sans-serif;
}

.safe-top { padding-top: max(16px, env(safe-area-inset-top)); }
.safe-bottom { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.safe-left { padding-left: max(16px, env(safe-area-inset-left)); }
.safe-right { padding-right: max(16px, env(safe-area-inset-right)); }

.glass-panel {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.glass-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.25), inset 0 3px 0 rgba(255, 255, 255, 0.35), 0 8px 24px rgba(217, 119, 6, 0.4);
  transition: all 0.12s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: none;
}

.glass-btn:active {
  transform: translateY(3px) scale(0.96);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.2), inset 0 2px 0 rgba(255, 255, 255, 0.3), 0 4px 12px rgba(217, 119, 6, 0.3);
}

.secondary-btn {
  background: #f3f4f6;
  border: 2px solid #e5e7eb;
  color: #374151;
  transition: all 0.12s ease;
}

.secondary-btn:active {
  transform: scale(0.95);
  background: #e5e7eb;
}

.text-shadow-sm { text-shadow: 0 2px 4px rgba(0,0,0,0.15); }
.text-shadow-heavy { text-shadow: 0 4px 12px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.3); }

.spinner {
  border: 5px solid rgba(255, 255, 255, 0.3);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border-left-color: #ffffff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.touch-ctrl-btn {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  user-select: none;
  -webkit-user-select: none;
}

/* Skin selector cards */
.skin-card {
  position: relative;
  border: 2px solid transparent;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

.skin-card.skin-selected {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25), 0 8px 20px rgba(217, 119, 6, 0.2);
  background: linear-gradient(180deg, rgba(255,251,235,0.98), rgba(255,255,255,0.96));
}

.skin-card.skin-locked {
  opacity: 0.88;
}

.skin-card.skin-locked .skin-lock {
  display: inline;
}

.skin-card[data-skin="cyber"].skin-selected {
  border-color: #06b6d4;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.28), 0 8px 20px rgba(6, 182, 212, 0.2);
}

.skin-card[data-skin="idol"].skin-selected {
  border-color: #eab308;
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.3), 0 8px 22px rgba(234, 179, 8, 0.25);
}

@keyframes skinShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.skin-shake {
  animation: skinShake 0.35s ease;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.05);
  border-radius: 8px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
  .animate-float,
  .spinner,
  .skin-shake {
    animation: none !important;
  }
}