:root {
  --primary: #6d28d9;
  --primary-dark: #5b21b6;
  --secondary: #ec4899;
  --secondary-dark: #be185d;
  --success: #10b981;
  --danger: #ef4444;
  --dark: #111827;
  --light: #f9fafb;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overscroll-behavior: none;
  touch-action: manipulation;
}

/* Animations */
@keyframes fadeOutLeft {
  0% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(-100vw); }
}

.animate-fadeOutLeft {
  animation: fadeOutLeft 1s forwards;
}

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.animate-fadeIn {
  animation: fadeIn 0.3s forwards;
}

@keyframes scaleIn {
  0% { opacity: 0; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1); }
}

.animate-scaleIn {
  animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(-2deg); }
  20% { transform: rotate(2deg); }
  40% { transform: rotate(-2deg); }
  60% { transform: rotate(2deg); }
  80% { transform: rotate(-2deg); }
}

.animate-wiggle {
  animation: wiggle 0.6s linear 1;
}

@keyframes pulse-border {
  0%, 100% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.7); }
  50% { box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.4); }
}

.animate-pulse-border {
  animation: pulse-border 1.5s infinite;
}

/* Avatar selector */
.avatar-container {
  position: relative;
}

.other-avatars {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  pointer-events: none;
  z-index: 10;
}

.other-avatars img {
  position: absolute;
  pointer-events: auto;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.other-avatars:not(.visible) img {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.5);
}

.other-avatars.visible img {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

/* Custom form elements */
input, select, button {
  -webkit-tap-highlight-color: transparent;
}

/* Range slider */
input[type=range] {
  width: 100%;
  height: 48px;
  background: transparent;
  cursor: pointer;
  margin: 10px 0;
}

input[type=range]:focus {
  outline: none;
}

input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 12px;
  background: rgba(0,0,0,0.2);
  border-radius: 10px;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--secondary);
  border: 3px solid var(--light);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  margin-top: -15px;
  cursor: pointer;
  transition: all 0.2s;
}

input[type=range]:focus::-webkit-slider-thumb {
  background: var(--secondary-dark);
  box-shadow: 0 0 0 8px rgba(236, 72, 153, 0.2);
}

input[type=range]::-moz-range-track {
  width: 100%;
  height: 12px;
  background: rgba(0,0,0,0.2);
  border-radius: 10px;
}

input[type=range]::-moz-range-thumb {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--secondary);
  border: 3px solid var(--light);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: all 0.2s;
}

input[type=range]:focus::-moz-range-thumb {
  background: var(--secondary-dark);
  box-shadow: 0 0 0 8px rgba(236, 72, 153, 0.2);
}

/* Button styles */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 0.75rem;
  transition: all 0.2s;
  overflow: hidden;
  transform: translateZ(0);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
  color: white;
}

.btn-success {
  background: linear-gradient(135deg, var(--success), #059669);
  color: white;
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #dc2626);
  color: white;
}

/* Card styles */
.card {
  background-color: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
}

/* Container with safe areas */
.safe-container {
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) 
           env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
}

/* Modern scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(255,255,255,0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255,255,255,0.5);
}

/* Fixed bottom bar with safe area */
.fixed-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(8px);
  z-index: 50;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-bottom: 0rem;
  padding-top: 0rem;
  display: flex;
  justify-content: space-around;
  border-top: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}

/* Text styles */
.text-shadow {
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Touch-friendly inputs */
.touch-input {
  min-height: 48px;
  font-size: 16px;
  padding: 0.5rem 1rem;
}

/* Glass effect */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.glass-dark {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Add a new CSS keyframe animation for fade-out */
@keyframes fadeOut {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

.animate-fadeOut {
  animation: fadeOut 0.5s forwards;
} 