/* Auth UI styles matching the dark Volie theme */

:root {
  --auth-bg: #0f1419;
  --auth-surface: rgba(19, 27, 38, 0.94);
  --auth-card-bg: rgba(19, 27, 38, 0.96);
  --auth-border: rgba(255, 255, 255, 0.1);
  --auth-text: #e6edf3;
  --auth-text-muted: #8b9cb3;
  --auth-accent: #e8a54b;
  --auth-accent-dim: #49c8bb;
  --auth-error: #f87171;
  --auth-success: #58d5c4;
  --auth-radius: 24px;
  --auth-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  font-family: "Outfit", system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(232, 165, 75, 0.16), transparent 30%),
    radial-gradient(circle at bottom right, rgba(77, 200, 187, 0.14), transparent 26%),
    linear-gradient(180deg, #0f1419 0%, #111823 55%, #0c121a 100%);
  color: var(--auth-text);
}

.auth-root-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.auth-wrapper-modal {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(232, 165, 75, 0.14), transparent 30%),
    radial-gradient(circle at bottom right, rgba(77, 200, 187, 0.12), transparent 26%),
    rgba(7, 10, 16, 0.58);
  backdrop-filter: blur(14px);
}

.auth-card {
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius);
  box-shadow: var(--auth-shadow);
  backdrop-filter: blur(16px);
}

.auth-container {
  width: 100%;
  max-width: 440px;
}

.auth-card {
  position: relative;
  background: var(--auth-card-bg);
  padding: 2rem;
  animation: authRise 0.3s ease-out;
}

.auth-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--auth-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--auth-text);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.auth-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

@keyframes authRise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-logo-row {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}

.auth-logo-mark {
  width: 44px;
  height: 44px;
}

.auth-logo {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #f7fbff;
}

.auth-tagline {
  margin: 0.65rem 0 0;
  color: var(--auth-text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.auth-message-banner {
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: rgba(232, 165, 75, 0.08);
  border: 1px solid rgba(232, 165, 75, 0.16);
  color: #ffd28a;
  font-size: 0.92rem;
  line-height: 1.55;
}

.auth-form-container {
  position: relative;
  min-height: 410px;
}

.auth-form {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.auth-form.auth-form-active {
  position: static;
  opacity: 1;
  pointer-events: auto;
}

.auth-form-title {
  margin: 0 0 1.35rem;
  text-align: center;
  font-size: 1.28rem;
  color: var(--auth-text);
}

.auth-form-group {
  margin-bottom: 1rem;
}

.auth-label {
  display: block;
  margin-bottom: 0.45rem;
  color: #d7e1ea;
  font-size: 0.9rem;
  font-weight: 600;
}

.auth-input {
  width: 100%;
  padding: 0.9rem 0.95rem;
  border-radius: 16px;
  border: 1px solid var(--auth-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--auth-text);
  font-family: inherit;
  font-size: 0.96rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.auth-input::placeholder {
  color: rgba(230, 237, 243, 0.42);
}

.auth-input:focus {
  outline: none;
  border-color: rgba(77, 200, 187, 0.28);
  box-shadow: 0 0 0 4px rgba(77, 200, 187, 0.1);
}

.auth-hint {
  margin-top: 0.35rem;
  color: var(--auth-text-muted);
  font-size: 0.8rem;
}

.auth-error {
  display: none;
  margin-bottom: 1rem;
  padding: 0.8rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(248, 113, 113, 0.18);
  background: rgba(248, 113, 113, 0.08);
  color: var(--auth-error);
  font-size: 0.9rem;
}

.auth-error.show {
  display: block;
}

.auth-button {
  width: 100%;
  padding: 0.95rem 1rem;
  border: none;
  border-radius: 16px;
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

.auth-button:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.auth-button-primary {
  color: #10212d;
  background: linear-gradient(135deg, #f0ad59 0%, #49c8bb 100%);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
}

.auth-button-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 20px 36px rgba(0, 0, 0, 0.28);
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(16, 33, 45, 0.22);
  border-top-color: #10212d;
  border-radius: 50%;
  animation: authSpin 0.8s linear infinite;
}

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

.spinner.hidden {
  display: none;
}

.auth-toggle {
  margin-top: 1.25rem;
  text-align: center;
  color: var(--auth-text-muted);
  font-size: 0.92rem;
}

.auth-toggle-link {
  background: none;
  border: none;
  color: #ffd28a;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  font-size: inherit;
}

.auth-toggle-link:hover {
  text-decoration: underline;
}

.auth-footer {
  margin-top: 1.7rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--auth-border);
  text-align: center;
  color: var(--auth-text-muted);
  font-size: 0.82rem;
}

@media (max-width: 520px) {
  .auth-wrapper {
    padding: 1rem;
  }

  .auth-card {
    padding: 1.4rem;
  }
}

.app.hidden {
  display: none;
}
