/* Mahana Sign Up - Extracted from Sovereign 2.0 */

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

body {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

#app {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  cursor: text;
}

/* Gradient background */
.gradient-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
}

/* Parallax Mahana icon */
.parallax-icon {
  position: absolute;
  pointer-events: none;
  width: 120%;
  height: 120%;
  top: -10%;
  right: -10%;
  opacity: 0.15;
  transition: transform 0.3s ease-out;
}

/* Form container */
.form-container {
  position: absolute;
  left: 3rem;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  min-width: 280px;
  max-width: 440px;
}

/* Steps */
.step {
  display: none;
}

.step.active {
  display: block;
}

/* Email input */
#email-input {
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  width: 100%;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 1rem;
}

#email-input::placeholder {
  color: #ffffff;
  opacity: 1;
}

.input-underline {
  height: 2px;
  background: white;
  margin-top: 4px;
  width: 100%;
}

/* Hint row */
.hint-row {
  color: rgba(255, 255, 255, 0.4);
  margin-top: 0.75rem;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#recovery-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.15s ease;
}

#recovery-toggle:hover {
  color: rgba(255, 255, 255, 0.9);
}

#recovery-toggle.active {
  color: rgba(255, 255, 255, 0.9);
}

/* Email label on passkey/recovery steps */
.email-label {
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1.5rem;
  font-size: clamp(1rem, calc((15vh + 15vw) / 20 - 4px), 2rem);
}

/* Error banner */
.error-banner {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.error-banner button {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
}

/* Status message */
.status-message {
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

/* Action buttons */
.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Glass button */
.glass-btn {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: white;
  padding: 0.875rem 1.5rem;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.glass-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.glass-btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

/* Link button */
.link-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.8rem;
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0.25rem 0;
}

.link-btn:hover {
  color: rgba(255, 255, 255, 0.6);
}

/* Mode toggle row */
.mode-row {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.mode-row button,
.mode-row .toggle-link {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
}

.mode-row .toggle-link:hover {
  color: rgba(255, 255, 255, 0.8);
}

.back-btn {
  color: rgba(255, 255, 255, 0.35) !important;
  text-decoration: none !important;
}

/* Recovery step */
.recovery-text {
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.recovery-detail {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* Tagline */
.tagline {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
  margin-bottom: 1rem;
  letter-spacing: 0.1em;
  text-transform: lowercase;
}

/* Loading step */
.loading-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Success step */
.success-header {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

/* Credentials box */
.credentials-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.cred-label {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.cred-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.cred-row:last-child {
  margin-bottom: 0;
}

.cred-key {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  min-width: 40px;
}

.cred-value {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.7);
  padding: 0.25rem 0.5rem;
  font-family: inherit;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* Primary button variant */
.glass-btn.primary {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
}

.glass-btn.primary:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* Instructions preview */
.instructions-preview {
  margin-top: 1.5rem;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  padding: 1rem;
}

.instructions-label {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

#instructions-code {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  line-height: 1.6;
  margin: 0;
  white-space: pre-wrap;
}

/* Error step */
.error-header {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: #ff6b6b;
}

.error-message {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}
