/* ==========================================================================
   Enhanced Auth Page CSS - FitJourney Login / Register
   Matching Dashboard Color Scheme with Theme Toggle Support
   ========================================================================== */

/* CSS Custom Properties - Matching Dashboard Theme */
:root {
  /* Brand Colors - Matching Dashboard */
  --primary: #6a1b9a;
  --primary-light: #8e24aa;
  --primary-dark: #4a148c;
  --accent: #ff6f00;
  --accent-light: #ff8f00;
  --accent-dark: #e65100;

  /* Background Colors */
  --dark-bg: #1c1c1c;
  --darker-bg: #121212;
  --card-bg: #1e1e1e;
  --elevated-bg: #242424;
  --surface-bg: #2d2d2d;
  --surface-light: #3d3d3d;

  /* Text Colors */
  --text-color: #e0e0e0;
  --light-text: #b0b0b0;
  --muted-text: #757575;
  --disabled-text: #6c6c6c;

  /* Status Colors */
  --success: #4caf50;
  --success-light: #69f0ae;
  --warning: #ffc107;
  --warning-light: #ffff00;
  --error: #f44336;
  --error-light: #ff8a80;
  --info: #2196f3;

  /* Border & Effects */
  --border-light: rgba(255, 255, 255, 0.12);
  --border-radius: 8px;
  --border-radius-sm: 6px;
  --border-radius-lg: 12px;
  --border-radius-xl: 16px;

  /* Shadows */
  --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  --card-shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.25);
  --elevated-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);

  /* Transitions */
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Typography */
  --font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Light Mode Variables */
body.light-mode {
  --dark-bg: #f8fafc;
  --darker-bg: #ffffff;
  --card-bg: #ffffff;
  --elevated-bg: #ffffff;
  --surface-bg: #f1f5f9;
  --surface-light: #e2e8f0;
  --text-color: #1a202c;
  --light-text: #515c6f;
  --muted-text: #718096;
  --disabled-text: #a0aec0;
  --border-light: rgba(0, 0, 0, 0.08);
  --card-shadow: 0 4px 12px rgba(106, 27, 154, 0.08);
  --card-shadow-hover: 0 8px 25px rgba(106, 27, 154, 0.12);
  --elevated-shadow: 0 10px 30px rgba(106, 27, 154, 0.15);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--dark-bg);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: radial-gradient(circle at 10% 20%, rgba(106, 27, 154, 0.05) 0%, transparent 20%),
    radial-gradient(circle at 90% 80%, rgba(255, 111, 0, 0.05) 0%, transparent 25%);
  background-attachment: fixed;
  transition: all var(--transition);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Enhanced Header Styles */
.header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  box-shadow: 0 4px 20px rgba(106, 27, 154, 0.3);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

body.light-mode .header {
  background: linear-gradient(90deg, #f2cfff, #ffe0b2);
  box-shadow: 0 4px 20px rgba(106, 27, 154, 0.1);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: white;
  font-weight: 700;
  font-size: 1.25rem;
  transition: transform var(--transition-fast);
}
.logo img {
  height: 40px;
  width: 40px;
  border-radius: var(--border-radius);
  margin-right: 0.75rem;
  object-fit: cover;
}

body.light-mode .logo {
  color: var(--primary);
}

.logo:hover {
  transform: scale(1.02);
}

.logo-circle {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

body.light-mode .logo-circle {
  background: rgba(106, 27, 154, 0.1);
  color: var(--primary);
  border: 1px solid rgba(106, 27, 154, 0.2);
}

.nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  align-items: center;
}

.nav a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
  position: relative;
}

body.light-mode .nav a {
  color: var(--primary);
}

.nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: white;
  transition: all var(--transition-fast);
  transform: translateX(-50%);
  border-radius: 1px;
}

body.light-mode .nav a::after {
  background: var(--accent);
}

.nav a:hover,
.nav a.active {
  color: white;
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

body.light-mode .nav a:hover,
body.light-mode .nav a.active {
  color: var(--accent);
  background: rgba(255, 111, 0, 0.08);
}

.nav a:hover::after,
.nav a.active::after {
  width: 80%;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Theme Toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  outline: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  color: white;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 1.2rem;
}

body.light-mode .theme-toggle {
  background: rgba(106, 27, 154, 0.1);
  color: var(--primary);
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

body.light-mode .theme-toggle:hover {
  background: rgba(106, 27, 154, 0.2);
}

.mobile-menu-toggle {
  display: none;
  cursor: pointer;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  font-size: 1.5rem;
  padding: 0.5rem;
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
}

body.light-mode .mobile-menu-toggle {
  color: var(--primary);
  background: rgba(106, 27, 154, 0.1);
}

.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

body.light-mode .mobile-menu-toggle:hover {
  background: rgba(106, 27, 154, 0.2);
}

/* Main Content */
.main {
  flex: 1;
  padding: 2rem 0;
}

/* Enhanced Auth Container */
#auth-container {
  max-width: 800px;
  margin: 2rem auto;
  background: var(--card-bg);
  border-radius: var(--border-radius-xl);
  overflow: hidden;
  box-shadow: var(--elevated-shadow);
  border: 1px solid var(--border-light);
  backdrop-filter: blur(20px);
  position: relative;
}

#auth-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
}

/* Auth Message */
.auth-message {
  padding: 1rem 2rem;
  margin: 0;
  text-align: center;
  font-weight: 600;
  border-radius: 0;
  transition: all var(--transition);
}

.auth-message.success {
  background: rgba(76, 175, 80, 0.1);
  color: var(--success);
  border-bottom: 2px solid var(--success);
}

.auth-message.error {
  background: rgba(244, 67, 54, 0.1);
  color: var(--error);
  border-bottom: 2px solid var(--error);
}

.auth-message.hidden {
  display: none;
}

/* Enhanced Auth Tabs */
.auth-tabs {
  display: flex;
  background: var(--surface-bg);
  border-bottom: 1px solid var(--border-light);
}

.auth-tabs .tab {
  flex: 1;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--light-text);
  border: none;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  font-family: var(--font-family);
}

.auth-tabs .tab::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transition: transform var(--transition);
  transform-origin: center;
}

.auth-tabs .tab.active {
  color: var(--text-color);
  background: rgba(106, 27, 154, 0.1);
}

.auth-tabs .tab.active::after {
  transform: scaleX(1);
}

.auth-tabs .tab:hover:not(.active) {
  background: rgba(106, 27, 154, 0.05);
  color: var(--text-color);
}

/* Auth Sections */
.auth-section {
  padding: 2.5rem;
  display: none;
}

.auth-section.active {
  display: block;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-subtitle {
  color: var(--light-text);
  font-size: 1rem;
  margin-bottom: 0;
}

/* Enhanced Form Styles */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
}

.step-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.3rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-light);
}

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

.form-group label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-color);
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon i.material-icons:first-child {
  position: absolute;
  left: 1rem;
  color: var(--light-text);
  font-size: 1.25rem;
  pointer-events: none;
  z-index: 2;
}

.input-with-icon input,
.input-with-icon select {
  width: 100%;
  padding: 1rem 3rem;
  background: var(--surface-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-lg);
  color: var(--text-color);
  font-size: 1rem;
  font-family: var(--font-family);
  transition: all var(--transition);
}

.input-with-icon input:focus,
.input-with-icon select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--elevated-bg);
  box-shadow: 0 0 0 3px rgba(255, 111, 0, 0.1);
}

.input-with-icon input::placeholder {
  color: var(--muted-text);
  opacity: 0.7;
}

.textarea-wrapper {
  position: relative;
}

.textarea-wrapper i {
  position: absolute;
  top: 1rem;
  left: 1rem;
  color: var(--light-text);
  font-size: 1.25rem;
  pointer-events: none;
  z-index: 2;
}

.textarea-wrapper textarea {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  background: var(--surface-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-lg);
  color: var(--text-color);
  font-size: 1rem;
  font-family: var(--font-family);
  resize: vertical;
  min-height: 120px;
  transition: all var(--transition);
}

.textarea-wrapper textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--elevated-bg);
  box-shadow: 0 0 0 3px rgba(255, 111, 0, 0.1);
}

.textarea-wrapper textarea::placeholder {
  color: var(--muted-text);
  opacity: 0.7;
}

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

.password-wrapper .toggle-password {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--light-text);
  transition: color var(--transition);
  z-index: 3;
}

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

/* Enhanced Password Strength */
.password-strength {
  margin-top: 0.5rem;
}

.strength-meter {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.25rem;
}

.strength-segment {
  height: 4px;
  flex: 1;
  background-color: var(--surface-bg);
  border-radius: 2px;
  transition: all var(--transition);
}

.strength-segment.active:nth-child(1) {
  background: linear-gradient(90deg, var(--error), #ff6b6b);
}

.strength-segment.active:nth-child(2) {
  background: linear-gradient(90deg, var(--warning), #ffd93d);
}

.strength-segment.active:nth-child(3) {
  background: linear-gradient(90deg, #3498db, #74b9ff);
}

.strength-segment.active:nth-child(4) {
  background: linear-gradient(90deg, var(--success), #00d2d3);
}

.strength-text {
  font-size: 0.8rem;
  color: var(--light-text);
  font-weight: 500;
}

.strength-text.weak {
  color: var(--error);
}
.strength-text.fair {
  color: var(--warning);
}
.strength-text.good {
  color: #3498db;
}
.strength-text.strong {
  color: var(--success);
}

/* Form Row */
.form-row {
  display: flex;
  gap: 1.5rem;
}

.form-row .form-group {
  flex: 1;
}

/* Form Options */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.checkbox-group label {
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-color);
}

.checkbox-group label a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

.checkbox-group label a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.forgot-password {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}

.forgot-password:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Enhanced Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border: none;
  border-radius: var(--border-radius-lg);
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  min-height: 48px;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
  width: 300%;
  height: 300%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(106, 27, 154, 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(106, 27, 154, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--text-color);
  border: 2px solid var(--border-light);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--primary);
  background: rgba(106, 27, 154, 0.1);
  transform: translateY(-2px);
}

.form-buttons {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}

.form-buttons .btn {
  flex: 1;
}

/* Enhanced Social Login */
.social-login {
  margin-top: 2rem;
}

.divider {
  display: flex;
  align-items: center;
  margin: 2rem 0 1.5rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}

.divider span {
  padding: 0 1.5rem;
  color: var(--light-text);
  font-size: 0.9rem;
  font-weight: 500;
}

.social-buttons {
  display: flex;
  gap: 1rem;
}

.social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--surface-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-lg);
  color: var(--text-color);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-family);
}

.social-btn:hover {
  background: var(--elevated-bg);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--card-shadow);
}

/* Enhanced Progress Steps */
.progress-steps {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.5;
  transition: all var(--transition);
}

.step.active {
  opacity: 1;
}

.step-number {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-bg);
  color: var(--light-text);
  border-radius: 50%;
  font-weight: 700;
  transition: all var(--transition);
  border: 2px solid var(--border-light);
}

.step.active .step-number {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  box-shadow: 0 4px 15px rgba(106, 27, 154, 0.3);
  border-color: transparent;
}

.step span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--light-text);
}

.step.active span {
  color: var(--text-color);
}

/* Loading Animation */
@keyframes loading {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loading {
  animation: loading 1s linear infinite;
}

/* Enhanced Footer Styles */
.footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border-light);
  margin-top: auto;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  padding: 3rem 0 2rem;
}

.footer-section h4 {
  color: var(--accent);
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-color);
}

.footer-logo .logo-circle {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none;
}

.footer-section p {
  color: var(--light-text);
  line-height: 1.6;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: var(--light-text);
  text-decoration: none;
  transition: var(--transition);
}

.footer-section ul li a:hover {
  color: var(--primary);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  background: var(--surface-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--light-text);
  transition: var(--transition);
  text-decoration: none;
  border: 1px solid var(--border-light);
}

.social-links a:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--card-shadow);
}

.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--light-text);
}

/* Field Error Styling */
.field-error {
  color: var(--error);
  font-size: 0.8rem;
  margin-top: 0.25rem;
  animation: fadeIn 0.3s ease;
}

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

/* Enhanced Responsive Design */
@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-top: 1px solid var(--border-light);
    padding: 1rem;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
  }

  .nav.mobile-open {
    display: block;
  }

  .nav ul {
    flex-direction: column;
    gap: 0.5rem;
  }

  .nav a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
  }

  .mobile-menu-toggle {
    display: block;
  }

  #auth-container {
    margin: 1rem;
    border-radius: var(--border-radius);
  }

  .auth-section {
    padding: 1.5rem;
  }

  .form-row {
    flex-direction: column;
    gap: 1rem;
  }

  .form-buttons {
    flex-direction: column;
  }

  .social-buttons {
    flex-direction: column;
  }

  .progress-steps {
    gap: 1rem;
  }

  .form-options {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }

  .header-actions {
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.5rem;
  }

  .header .container {
    padding: 0.75rem 0.5rem;
  }

  .logo {
    font-size: 1.1rem;
  }

  .logo-circle {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }

  .auth-header h2 {
    font-size: 1.5rem;
  }

  .auth-tabs .tab {
    font-size: 1rem;
    padding: 1rem;
    flex-direction: column;
    gap: 0.25rem;
  }

  .auth-tabs .tab i {
    font-size: 1.2rem;
  }

  .step-title {
    font-size: 1.1rem;
  }

  .input-with-icon input,
  .input-with-icon select,
  .textarea-wrapper textarea {
    padding: 0.875rem 2.5rem;
    font-size: 0.9rem;
  }

  .btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
  }

  .progress-steps {
    gap: 0.5rem;
  }

  .step-number {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }

  .step span {
    font-size: 0.7rem;
  }

  .theme-toggle {
    width: 35px;
    height: 35px;
    font-size: 1.1rem;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .btn:hover::before {
    display: none;
  }

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

  .social-btn:active,
  .tab:active {
    transform: scale(0.98);
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border-light: rgba(255, 255, 255, 0.5);
    --light-text: #cccccc;
  }

  body.light-mode {
    --border-light: rgba(0, 0, 0, 0.3);
    --light-text: #333333;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Enhanced Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--surface-bg);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--accent), var(--primary));
}

/* Selection */
::selection {
  background-color: var(--accent);
  color: white;
}

/* Focus Management for Accessibility */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Enhanced hover effects for better UX */
@media (hover: hover) {
  .auth-tabs .tab:hover,
  .btn:hover,
  .social-btn:hover {
    cursor: pointer;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
