:root {
  --primary: #ff3a7c;
  --primary-light: #ff6b9d;
  --secondary: #1e3a8a;
  --accent: #7c3aff;
  --background: #090d26;
  --text: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --success: #10b981;
  --error: #ef4444;
  --card-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.1);
  
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.5;
  font-weight: 400;
  
  color: var(--text);
  background-color: var(--background);
  
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 320px;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

#background-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(135deg, var(--background), var(--secondary));
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: float 20s ease-in-out infinite;
  background: radial-gradient(circle at center, var(--primary-light), var(--primary));
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(5%, 10%) scale(1.05);
  }
  50% {
    transform: translate(10%, 5%) scale(0.95);
  }
  75% {
    transform: translate(5%, 15%) scale(1.05);
  }
}

#app {
  width: 100%;
  max-width: 480px;
  padding: 2rem;
  z-index: 1;
  perspective: 1000px;
}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 24px;
  border: 1px solid var(--glass-border);
  padding: 2.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transform-style: preserve-3d;
  animation: cardFloat 6s ease-in-out infinite;
}

@keyframes cardFloat {
  0%, 100% {
    transform: translateZ(0) rotateX(0) rotateY(0);
  }
  25% {
    transform: translateZ(10px) rotateX(1deg) rotateY(-1deg);
  }
  50% {
    transform: translateZ(20px) rotateX(-1deg) rotateY(1deg);
  }
  75% {
    transform: translateZ(10px) rotateX(1deg) rotateY(0);
  }
}

.headline {
  text-align: center;
  margin-bottom: 2rem;
}

h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.2;
  background: linear-gradient(to right, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
}

.headline p {
  font-size: 1rem;
  color: var(--text-secondary);
}

.form-group {
  margin-bottom: 1.25rem;
}

input {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text);
  transition: all 0.3s ease;
}

input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 58, 124, 0.25);
}

input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

button {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(to right, var(--primary), var(--accent));
  border: none;
  border-radius: 12px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(255, 58, 124, 0.3);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 58, 124, 0.4);
}

button:active {
  transform: translateY(0);
}

.button-text {
  position: relative;
  z-index: 1;
}

.button-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  margin-left: -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  opacity: 0;
  z-index: 2;
}

button.loading .button-text {
  opacity: 0;
}

button.loading .button-loader {
  opacity: 1;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#success-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50% , -50%);
  width: 100%;
  height: 100%;
  background: rgba(9, 13, 38, 0.9);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#success-message.visible {
  opacity: 1;
  pointer-events: all;
}

.success-content {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  border: 1px solid var(--glass-border);
  padding: 3rem;
  text-align: center;
  max-width: 480px;
  width: 90%;
  animation: popup 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50% , -50%);
}

@keyframes popup {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.success-content h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--success);
}

.success-content p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.small-text {
  font-size: 0.8rem;
  opacity: 0.7;
}

#sparkle-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.sparkle {
  position: absolute;
  width: 10px;
  height: 10px;
  background-image: radial-gradient(circle, white 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
}

.hidden {
  display: none;
}

/* Responsive styles */
@media (max-width: 600px) {
  #app {
    padding: 1rem;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .success-content {
    padding: 2rem;
  }
}

#success-message {
  display: none;
}

#success-message.visible {
  display: block;
}

#success-message.hidden {
  display: none;
}