/* Reset & Base Styling */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #FFFFFF;
  background-image: linear-gradient(to bottom, #FFFFFF 60%, #F8F6FF 100%);
  color: #1C1636;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
}

/* Decorative Vertical Grid Lines */
.grid-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 1;
  padding: 0 8%;
}

.grid-line {
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, rgba(124, 58, 237, 0.04) 0%, rgba(124, 58, 237, 0.01) 60%, rgba(124, 58, 237, 0) 100%);
}

/* Confetti Canvas */
#confettiCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 99;
}

/* Content Container */
.container {
  width: 100%;
  max-width: 580px;
  padding: 40px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
}

/* App Icon Styling */
.app-icon-wrapper {
  margin-bottom: 32px;
  filter: drop-shadow(0 20px 30px rgba(124, 58, 237, 0.15));
  animation: float 6s ease-in-out infinite;
}

.app-icon {
  width: 80px;
  height: 80px;
  border-radius: 24px;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
}

.app-icon:hover {
  transform: scale(1.08) rotate(5deg);
}

/* Typography */
.headline {
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #1C1636;
  margin-bottom: 16px;
  text-transform: lowercase;
}

.headline .highlight {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 600;
  background: linear-gradient(to right, #9B7CFA, #7C3AED);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-right: 2px;
}

.subheadline {
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
  font-weight: 500;
  color: #7A7590;
  max-width: 420px;
  line-height: 1.5;
  margin-bottom: 40px;
  text-transform: lowercase;
}

/* Waitlist Form & Input Capsule */
.waitlist-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.input-capsule {
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border: 1.5px solid rgba(124, 58, 237, 0.12);
  border-radius: 9999px;
  padding: 6px;
  padding-left: 24px;
  width: 100%;
  box-shadow: 
    0 15px 35px rgba(124, 58, 237, 0.06), 
    0 5px 15px rgba(0, 0, 0, 0.02);
  transition: border-color 0.3s, box-shadow 0.3s, background-color 0.3s;
}

.input-capsule:focus-within {
  border-color: #7C3AED;
  background: #FFFFFF;
  box-shadow: 
    0 15px 35px rgba(124, 58, 237, 0.12), 
    0 0 0 1px rgba(124, 58, 237, 0.2);
}

.input-capsule input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #1C1636;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  height: 48px;
  min-width: 120px;
}

.input-capsule input::placeholder {
  color: rgba(122, 117, 144, 0.45);
  font-weight: 500;
}

.input-capsule button {
  background: linear-gradient(135deg, #9B7CFA 0%, #7C3AED 100%);
  border: none;
  outline: none;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  text-transform: lowercase;
  height: 48px;
  padding: 0 28px;
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.input-capsule button:hover {
  background: linear-gradient(135deg, #A88BFA 0%, #6D28D9 100%);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.35);
  transform: translateY(-1px);
}

.input-capsule button:active {
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.2);
}

/* Error Message */
.error-msg {
  font-size: 13px;
  font-weight: 700;
  color: #EF4444;
  margin-top: 12px;
  height: 18px;
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.3s, transform 0.3s;
  text-transform: lowercase;
}

.error-msg.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Success Badge (Tilted styling from reference) */
.success-badge {
  display: inline-block;
  background: linear-gradient(135deg, rgba(155, 124, 250, 0.05) 0%, rgba(124, 58, 237, 0.05) 100%);
  border: 1.5px solid rgba(124, 58, 237, 0.18);
  color: #7C3AED;
  font-family: inherit;
  font-weight: 800;
  font-size: clamp(1.1rem, 3.5vw, 1.3rem);
  padding: 14px 28px;
  border-radius: 16px;
  transform: rotate(-3deg);
  margin-top: 10px;
  box-shadow: 
    0 15px 35px rgba(124, 58, 237, 0.08),
    0 5px 15px rgba(0, 0, 0, 0.02);
  text-transform: lowercase;
  backdrop-filter: blur(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.success-badge #queuePosition {
  color: #1C1636;
}

/* Helper Utility Classes */
.hidden {
  display: none !important;
  opacity: 0;
}

.fade-out {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
}

/* Keyframes / Animations */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0px); }
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.8) rotate(0deg) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(-3deg) translateY(0);
  }
}

.success-badge-animate {
  animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
  .container {
    padding: 30px 16px;
  }
  
  .input-capsule {
    padding-left: 20px;
  }
  
  .input-capsule input {
    font-size: 15px;
    height: 44px;
  }
  
  .input-capsule button {
    font-size: 14px;
    height: 44px;
    padding: 0 20px;
  }
}
