/* Core Variables */
/* Pink Dominant */
:root {
  --primary: #ff69b4;
  --error: #9370db;
  --success: #ffffff;
  --text: #adb5bd;
  --bg-hover: #9370db;
}

/* Purple Dominant */
/*
:root {
  --primary: #9370db;
  --error: #ff69b4;
  --success: #ffffff;
  --text: #adb5bd;
  --bg: #0f0f13;
  --bg-hover: #ff69b4;
}
*/

/* True Blue */
/*
:root {
  --primary: #3b82f6;
  --error: #ef4444;
  --success: #10b981;
  --text: #1f2937;
  --bg: #f9fafb;
  --bg-hover: #ef4444;
}
*/

/* Base Styles */
body {
  margin: 0;
  color: var(--text);
}

/* Layout */
.auth-container {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: var(--bg);
  font-family: system-ui, sans-serif;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 2rem;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Typography */
h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--text);
}

/* Forms */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.auth-form input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--text);
  border-radius: 0.375rem;
  font-size: 1rem;
  background-color: var(--bg);
  color: var(--text);
}

/* Form submit buttons only */
.auth-form > button[type="submit"] {
  width: 100%;
  padding: 0.75rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  margin-top: 0.5rem;
}

.auth-form > button[type="submit"]:hover {
  background: var(--bg-hover);
}

/* Links */
.auth-switch {
  text-align: center;
  margin-top: 1rem;
}

.auth-switch a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* Status Messages */
#auth-status {
  padding: 1rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
  text-align: center;
  font-weight: 500;
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

/* Success State */
#auth-status.success {
  background-color: var(--bg);
  color: var(--primary);
  border-color: var(--primary);
}

/* Error State */
#auth-status.error {
  background-color: var(--bg); 
  color: var(--error);
  border-color: var(--error);
}

#auth-status:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#auth-status:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: var(--text);
  animation: spin 1s ease-in-out infinite;
}

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

/* Utilities */
.hidden {
  display: none;
}

/* Password Field Styles */
.password-wrapper {
  position: relative;
}

.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
  width: 100%;
  padding-right: 2.5rem;
  box-sizing: border-box;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: var(--text);
  line-height: 1;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-toggle svg {
  width: 18px;
  height: 18px;
}

.password-toggle:hover {
  color: var(--primary);
}

.password-toggle:focus {
  outline: none;
  box-shadow: none;
}

.auth-feedback {
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 4px;
  border: 1px solid;
}

.auth-feedback.success {
  background: var(--bg);
  border-color: var(--success);
  color: var(--success);
}

.auth-feedback.error {
  background: var(--bg);
  border-color: var(--error);
  color: var(--error);
}

.form-alert {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 0.375rem;
  font-weight: 500;
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.form-alert.success {
  background-color: var(--bg);
  color: var(--primary);
  border-color: var(--primary);
}

.form-alert.error {
  background-color: var(--bg);
  color: var(--error);
  border-color: var(--error);
}