:root {
  --bg-color: #0f172a;
  --text-color: #f1f5f9;
  --text-muted: #94a3b8;
  --card-bg: rgba(30, 41, 59, 0.7);
  --primary-color: #6366f1;
  --primary-hover: #4f46e5;
  --danger-color: #ef4444;
  --danger-hover: #dc2626;
  --glass-border: rgba(255, 255, 255, 0.1);
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.15) 0%, transparent 25%);
}

.container {
  width: 100%;
  max-width: 420px;
  padding: 2rem;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  text-align: center;
  margin: 1rem;
}

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(to right, #818cf8, #e879f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

p.subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

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

.btn-google {
  background-color: white;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.btn-google:hover:not(:disabled) {
  background-color: #f9fafb;
}

.btn-apple {
  background-color: black;
  color: white;
}

.btn-apple:hover:not(:disabled) {
  background-color: #1a1a1a;
}

.btn-email {
  background-color: var(--primary-color);
  color: white;
}

.btn-email:hover:not(:disabled) {
  background-color: var(--primary-hover);
}

.btn-danger {
  background-color: var(--danger-color);
  color: white;
  margin-top: 1rem;
}

.btn-danger:hover:not(:disabled) {
  background-color: var(--danger-hover);
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--glass-border);
}

.divider::before {
  margin-right: .5em;
}

.divider::after {
  margin-left: .5em;
}

.form-group {
  margin-bottom: 1rem;
  text-align: left;
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

input {
  width: 100%;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(15, 23, 42, 0.5);
  color: white;
  font-size: 0.95rem;
  box-sizing: border-box; /* Fix input overflow */
  transition: border-color 0.2s;
}

input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.hidden {
  display: none !important;
}

#user-profile {
  text-align: center;
}

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1rem;
  text-transform: uppercase;
}

.user-email {
  font-weight: 500;
  margin-bottom: 2rem;
}

.status-message {
  margin-top: 1rem;
  font-size: 0.9rem;
  min-height: 1.4em;
  padding: 0.75rem;
  border-radius: 8px;
}

.status-error {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-success {
  background: rgba(34, 197, 94, 0.1);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.btn-icon {
  margin-right: 0.5rem;
  width: 20px;
  height: 20px;
}

footer {
  margin-top: 2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #ffffff;
  border-bottom-color: transparent;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
  margin-right: 8px;
}

@keyframes rotation {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
