/* /digr/css/auth-modal.css
   Login modal — immersive, minimal, on-brand */

/* ===== Modal Shell ===== */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.auth-modal.auth-modal-open {
  opacity: 1;
  pointer-events: auto;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ===== Card ===== */
.auth-modal-card {
  position: relative;
  width: 400px;
  max-width: 90vw;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 48px 40px;
  text-align: center;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 24px 80px rgba(0, 0, 0, 0.6),
    0 0 120px rgba(0, 210, 255, 0.03);
}

.auth-modal-open .auth-modal-card {
  transform: translateY(0) scale(1);
}

/* ===== Close ===== */
.auth-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  font-size: 24px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.auth-modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* ===== Logo ===== */
.auth-modal-logo {
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  color: var(--accent, #00d2ff);
  letter-spacing: 4px;
  margin-bottom: 24px;
  opacity: 0.7;
}

/* ===== Typography ===== */
.auth-modal-title {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 8px;
  letter-spacing: -0.3px;
}

.auth-modal-subtitle {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 32px;
  line-height: 1.5;
}

/* ===== Form ===== */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-input-wrap {
  position: relative;
}

.auth-input {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  outline: none;
  transition: all 0.25s;
  box-sizing: border-box;
}

.auth-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.auth-input:focus {
  border-color: var(--accent, #00d2ff);
  background: rgba(0, 210, 255, 0.04);
  box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.08);
}

.auth-input-glow {
  position: absolute;
  inset: -1px;
  border-radius: 11px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.15), transparent 60%);
}

.auth-input:focus ~ .auth-input-glow {
  opacity: 1;
}

/* ===== Submit Button ===== */
.auth-submit {
  padding: 14px 24px;
  background: var(--accent, #00d2ff);
  color: #000;
  border: none;
  border-radius: 10px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.3px;
}

.auth-submit:hover:not(:disabled) {
  background: #33dcff;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 210, 255, 0.3);
}

.auth-submit:active:not(:disabled) {
  transform: translateY(0);
}

.auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ===== Spinner ===== */
.auth-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: auth-spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 4px;
}

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

/* ===== Error ===== */
.auth-error {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(255, 60, 60, 0.08);
  border: 1px solid rgba(255, 60, 60, 0.2);
  border-radius: 8px;
  color: #ff6b6b;
  font-size: 13px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  text-align: left;
}

/* ===== Sent State ===== */
.auth-sent-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.auth-sent-email {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 14px;
  color: var(--accent, #00d2ff);
  background: rgba(0, 210, 255, 0.06);
  padding: 8px 16px;
  border-radius: 6px;
  display: inline-block;
  margin: 4px 0 16px;
  word-break: break-all;
}

.auth-back-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px;
  cursor: pointer;
  margin-top: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.2s;
}

.auth-back-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

/* ===== Success State ===== */
.auth-success-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.auth-success-email {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 14px;
  color: var(--accent, #00d2ff);
  margin-top: 4px;
}

/* ===== Sign Out Button (header dropdown) ===== */
.auth-signout-btn {
  color: #ff6b6b !important;
}

.auth-signout-btn:hover {
  background: rgba(255, 60, 60, 0.08) !important;
}
