/* Modal Variables */
:root {
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --error-color: #ef4444;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --bg-color: #f3f4f6;
  --input-border: #d1d5db;
  --input-focus: #3b82f6;
  --modal-backdrop: rgba(0, 0, 0, 0.5);
}

/* Shared Modal Structure */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--modal-backdrop);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  width: 100%;
  max-width: 400px;
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  position: relative;
  transform: scale(0.95);
  opacity: 0;
  transition: all 0.3s ease;
}

.modal-backdrop.active .modal {
  transform: scale(1);
  opacity: 1;
}

/* Close Button */
.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.close-modal:hover {
  background: var(--bg-color);
}

/* Headers */
.login-header,
.user-profile-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header h1,
.user-profile-header h1 {
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.login-header p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Form Elements */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-group input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 36px 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  line-height: 20px;
  color: #1a1a1a;
}

.form-group input:focus {
  outline: none;
  border-color: var(--input-focus);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}
.form input::placeholder {
  color: #999;
}

.error {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: none;
}

/* Remember & Forgot Password */
.remember-forgot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.forgot-password {
  display: block;
  margin-top: 8px;
  color: #4285f4;
  text-decoration: none;
  font-size: 14px;
}

.forgot-password:hover {
  text-decoration: underline;
}

/* Buttons */
.btn-primary-modal {
  width: 100%;
  padding: 0.75rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary-modal:hover {
  background: var(--primary-hover);
}

.btn-primary-modal:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  margin: 1.25rem 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--input-border);
}

.divider span {
  padding: 0 1rem;
}

/* Google Button */
.btn-google {
  width: 100%;
  padding: 0.75rem;
  background: white;
  border: 1.5px solid var(--input-border);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-google:hover {
  background: var(--primary-hover);
}

/* User Profile Specific Styles */
.user-avatar {
  margin-bottom: 1.5rem;
}

.avatar-circle {
  width: 80px;
  height: 80px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.avatar-initial {
  color: white;
  font-size: 2rem;
  font-weight: bold;
}

.user-profile-content {
  padding: 0 0.5rem;
}

.user-info-group {
  margin-bottom: 1.5rem;
}

.user-info-group label {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.user-info-value {
  color: var(--text-primary);
  font-size: 1rem;
  padding: 0.75rem 0;
  margin: 0;
  border-bottom: 1.5px solid var(--input-border);
}

/* Logout Button */
.btn-logout {
  width: 100%;
  padding: 0.75rem;
  margin-top: 2rem;
  background: white;
  border: 1.5px solid var(--input-border);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--error-color);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-logout:hover {
  background: #fee2e2;
  border-color: var(--error-color);
}

.btn-logout svg {
  transition: transform 0.3s ease;
}

.btn-logout:hover svg {
  transform: translateX(3px);
}
.password-input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.password-toggle:focus {
  outline: none;
}

.eye-icon {
  width: 20px;
  height: 20px;
  color: #666;
}
.password-toggle:hover .eye-icon {
  color: #333;
}
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 360px;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  font-size: 24px;
  color: #6b7280;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.modal-close:hover {
  color: #374151;
}

.visibility-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.visibility-toggle svg {
  width: 20px;
  height: 20px;
}

.forgot-link {
  display: block;
  color: #4285f4;
  text-decoration: none;
  font-size: 14px;
  margin: 8px 0 24px;
}

.divider {
  text-align: center;
  margin: 24px 0;
  position: relative;
}

.divider::before,
.divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 20px);
  height: 1px;
  background: #e0e0e0;
}

.divider::before {
  left: 0;
}

.divider::after {
  right: 0;
}

.divider span {
  background: white;
  padding: 0 8px;
  color: #666;
  font-size: 14px;
}

.password-input-wrapper {
  position: relative;
}

.password-input-wrapper input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 36px 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  line-height: 20px;
  color: #1a1a1a;
}
.password-input-wrapper input::placeholder {
  color: #999;
}

.modal-header {
  margin-bottom: 24px;
}

.modal-header h1 {
  font-size: 20px;
  margin: 0 0 6px;
}
.modal-header p {
  margin: 0;
  color: #666;
  font-size: 14px;
}

.form-field {
  margin-bottom: 6px;
}

.form-field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #1a1a1a;
}

.forgot-link {
  margin: 6px 0 20px;
}


/* Warmup Loading Overlay */
.warmup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.warmup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.warmup-content {
  background: white;
  border-radius: 1rem;
  padding: 2.5rem;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.warmup-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid #e5e7eb;
  border-top: 4px solid var(--primary-color, #4f46e5);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1.5rem;
}

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

.warmup-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.warmup-icon.success {
  color: #10b981;
}

.warmup-icon.error {
  color: #ef4444;
}

.warmup-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.5rem;
}

.warmup-message {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.warmup-btn {
  padding: 0.75rem 2rem;
  background: var(--primary-color, #4f46e5);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.warmup-btn:hover {
  background: var(--primary-hover, #4338ca);
}

.warmup-btn.error {
  background: #ef4444;
}

.warmup-btn.error:hover {
  background: #dc2626;
}
