/* 
  Smart Auth - Glossy Glassmorphism Design
  Modern, high-end authenticating interface
*/

:root {
  --auth-glass-bg: rgba(255, 255, 255, 0.08);
  --auth-glass-border: rgba(255, 255, 255, 0.15);
  --auth-accent: #3b82f6; /* Premium Indigo/Blue */
  --auth-text: #ffffff;
  --auth-text-muted: rgba(255, 255, 255, 0.6);
}

.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.auth-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.auth-card {
  width: 90%;
  max-width: 400px;
  background: var(--auth-glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--auth-glass-border);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  color: var(--auth-text);
  transform: translateY(20px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.auth-overlay.active .auth-card {
  transform: translateY(0);
}

/* Subtle glow effect top-right */
.auth-card::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--auth-accent) 0%, transparent 70%);
  opacity: 0.15;
  pointer-events: none;
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  display: block;
}

.auth-subtitle {
  color: var(--auth-text-muted);
  font-size: 0.9rem;
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  background: rgba(0, 0, 0, 0.2);
  padding: 4px;
  border-radius: 12px;
}

.auth-tab {
  flex: 1;
  padding: 8px;
  text-align: center;
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  color: var(--auth-text-muted);
}

.auth-tab.active {
  background: var(--auth-glass-border);
  color: var(--auth-text);
}

.auth-section {
  display: none;
}

.auth-section.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

.auth-input-group {
  margin-bottom: 20px;
}

.auth-label {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 8px;
  color: var(--auth-text-muted);
}

.auth-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--auth-glass-border);
  border-radius: 12px;
  padding: 12px 16px;
  color: white;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box; /* Crucial for padding */
}

.auth-input:focus {
  border-color: var(--auth-accent);
}

.auth-btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: var(--auth-accent);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
  margin-top: 10px;
}

.auth-btn:hover {
  opacity: 0.9;
}

.auth-btn:active {
  transform: scale(0.98);
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  color: var(--auth-text-muted);
  font-size: 0.75rem;
}

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

.auth-divider span {
  padding: 0 12px;
}

.google-btn {
  background: white;
  color: #1f2937;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.google-icon {
  width: 18px;
  height: 18px;
}

.auth-close {
  position: absolute;
  top: 20px;
  right: 20px;
  cursor: pointer;
  color: var(--auth-text-muted);
  transition: color 0.2s;
}

.auth-close:hover {
  color: white;
}

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}

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

.auth-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  margin-bottom: 16px;
  display: none;
}
