/* Import Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@300;400;500;600;700&display=swap");

/* CSS Reset & Global Variables */
:root {
  --primary-gradient: linear-gradient(135deg, #6b46c1 0%, #5b21b6 100%);
  --secondary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --primary-color: #6b46c1;
  --primary-dark: #5b21b6;
  --secondary-color: #667eea;
  --accent-color: #764ba2;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;
  --border-color: #e5e7eb;
  --bg-light: #f9fafb;
  --bg-white: #ffffff;
  --success-color: #10b981;
  --error-color: #ef4444;
  --warning-color: #f59e0b;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Modern Navbar Design */
.auth-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 0.75rem 0;
  transition: all 0.3s ease;
}

.auth-navbar.scrolled {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.navbar-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.navbar-brand:hover {
  transform: translateY(-1px);
}

.brand-logo {
  width: 42px;
  height: 42px;
  margin-right: 0.75rem;
}

.brand-text {
  font-family: "Poppins", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-actions {
  display: flex;
  gap: 0.75rem;
}

.nav-btn {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-btn-outline {
  color: var(--primary-color);
  background: transparent;
  border: 2px solid var(--primary-color);
}

.nav-btn-outline:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(107, 70, 193, 0.3);
}

.nav-btn-primary {
  background: var(--primary-gradient);
  color: white;
}

.nav-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(107, 70, 193, 0.3);
}

/* Authentication Page Layout */
.auth-page {
  min-height: 100vh;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  padding: 5rem 1rem 2rem;
}

.auth-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.auth-wrapper {
  background: white;
  border-radius: 1.5rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 600px;
}

/* Left Side - Design Panel */
.auth-design-panel {
  background: var(--primary-gradient);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.auth-design-panel::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  animation: float 20s ease-in-out infinite;
}

.design-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
  max-width: 400px;
}

.design-illustration {
  margin-bottom: 2rem;
  animation: float 6s ease-in-out infinite;
}

.design-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
  font-family: "Poppins", sans-serif;
}

.design-description {
  font-size: 1.125rem;
  opacity: 0.9;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.design-features {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.975rem;
  opacity: 0.9;
}

.feature-icon {
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Right Side - Form Panel */
.auth-form-panel {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: white;
}

.form-header {
  margin-bottom: 2rem;
}

.form-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-family: "Poppins", sans-serif;
}

.form-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Modern Form Styling */
.auth-form {
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.form-input-wrapper {
  position: relative;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.975rem;
  transition: all 0.2s ease;
  background: white;
  color: var(--text-primary);
  font-family: inherit;
}

.form-input:hover {
  border-color: #d1d5db;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.1);
}

.form-input.is-invalid {
  border-color: var(--error-color);
}

.form-input.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Password Input with Toggle */
.password-input-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.password-toggle:hover {
  color: var(--primary-color);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
}

/* Form Row */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Select Dropdown */
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

/* Form Help Text */
.form-help {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Error Messages */
.form-error {
  font-size: 0.75rem;
  color: var(--error-color);
  margin-top: 0.25rem;
  display: none;
}

.form-input.is-invalid ~ .form-error {
  display: block;
}

/* Alert Messages */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

/* Submit Button */
.submit-btn {
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(107, 70, 193, 0.3);
}

.submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.submit-btn-text {
  font-weight: 600;
}

.submit-btn-icon {
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

/* Divider */
.form-divider {
  text-align: center;
  margin: 1.5rem 0;
  position: relative;
}

.form-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-color);
}

.form-divider span {
  background: white;
  padding: 0 1rem;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Form Links */
.form-links {
  text-align: center;
  margin-top: 1.5rem;
}

.form-links p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.form-links a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.form-links a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Floating Animation */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Spin Animation */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Pulse Animation */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 968px) {
  .auth-wrapper {
    grid-template-columns: 1fr;
  }

  .auth-design-panel {
    display: none;
  }

  .auth-form-panel {
    padding: 2rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .auth-page {
    padding: 4rem 1rem 2rem;
  }

  .navbar-container {
    padding: 0 1rem;
  }

  .brand-text {
    font-size: 1.125rem;
  }

  .nav-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
  }

  .form-title {
    font-size: 1.75rem;
  }

  .auth-form-panel {
    padding: 1.5rem;
  }
}

/* Focus Visible for Accessibility */
*:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Loading State */
.loading {
  pointer-events: none;
}

.loading * {
  pointer-events: none;
}

/* Backdrop Blur Support Check */
@supports not (backdrop-filter: blur(20px)) {
  .auth-navbar {
    background: rgba(255, 255, 255, 0.98);
  }
}

/* Additional Components */

/* Checkbox Styling */
.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.form-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 0.125rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
}

.form-checkbox input[type="checkbox"]:checked {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.form-checkbox label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
}

/* Success State */
.form-input.is-valid {
  border-color: var(--success-color);
}

.form-input.is-valid:focus {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Tooltip */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip-text {
  visibility: hidden;
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Complete Profile Page Specific Styles */
.profile-form-container {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  border-radius: 1rem;
  box-shadow: var(--shadow-lg);
  padding: 2rem;
}

.profile-header {
  text-align: center;
  margin-bottom: 2rem;
}

.profile-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.profile-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Image Upload Preview */
.image-upload-preview {
  margin-top: 1rem;
  text-align: center;
}

.image-preview-container {
  max-width: 300px;
  margin: 0 auto;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem;
  background: var(--bg-light);
}

.image-preview-container img {
  max-width: 100%;
  border-radius: var(--radius-md);
}

/* Progress Indicator */
.progress-steps {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  gap: 2rem;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.progress-step.active {
  color: var(--primary-color);
  font-weight: 500;
}

.progress-step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  transition: all 0.3s ease;
}

.progress-step.active .progress-step-number {
  background: var(--primary-gradient);
  color: white;
}

/* Geolocation Button */
.geo-btn {
  padding: 0.75rem 1rem;
  background: white;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.geo-btn:hover {
  background: var(--primary-color);
  color: white;
}

.geo-btn svg {
  width: 16px;
  height: 16px;
}

/* Mobile Optimizations */
@media (hover: none) {
  .form-input:hover {
    border-color: var(--border-color);
  }

  .submit-btn:hover:not(:disabled) {
    transform: none;
    box-shadow: none;
  }

  .nav-btn:hover {
    transform: none;
  }
}
