/* Authentication Modal Styles */
.auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.auth-container {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 40px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  border: 1px solid var(--border-color);
}

/* Separate Auth Page Styles */
.auth-page {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  min-height: 100vh;
  margin: 0;
  font-family: 'Inter', sans-serif;
}

.auth-page-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  gap: 0;
}

.auth-card {
  background: var(--card-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 40px;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

.auth-features {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  padding: 60px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: white;
}

.auth-features h3 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 32px;
  text-align: center;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.feature-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.feature-icon {
  font-size: 24px;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-item h4 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px 0;
  color: white;
}

.feature-item p {
  font-size: 14px;
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
}

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

.auth-header .logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.auth-header .whistle-icon {
  width: 40px;
  height: 40px;
  color: var(--primary-color);
}

.auth-header h1 {
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  font-size: 28px;
  color: var(--text-color);
  margin: 0;
}

.auth-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-color);
  margin: 0 0 8px 0;
}

.auth-subtitle {
  color: var(--text-muted);
  margin: 0;
  font-size: 16px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-weight: 500;
  color: var(--text-color);
  font-size: 14px;
}

.form-group input {
  padding: 14px 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text-color);
  font-size: 16px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.auth-submit {
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  margin-top: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
}

.auth-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.btn.primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.4);
}

.btn.secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

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

.auth-divider {
  text-align: center;
  margin: 16px 0;
  position: relative;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-color);
}

.auth-divider span {
  background: var(--card-bg);
  padding: 0 16px;
  font-size: 14px;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

.auth-error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  margin-top: 16px;
  font-size: 14px;
  text-align: center;
}

/* User Profile Styles */
.user-profile {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 100;
}

.profile-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

#userName {
  font-weight: 500;
  color: var(--text-color);
  font-size: 14px;
}

#signOutBtn {
  padding: 6px 12px;
  font-size: 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: var(--secondary-bg);
  color: var(--text-color);
  transition: all 0.2s ease;
}

#signOutBtn:hover {
  background: var(--hover-bg);
}

/* Sync Status Styles */
.sync-status {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text-muted);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sync-status.syncing {
  color: var(--primary-color);
}

.sync-status.synced {
  color: #10b981;
}

.sync-status.error {
  color: #ef4444;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Hidden utility */
.hidden {
  display: none !important;
}

/* Dark mode support */
:root[data-theme="dark"] .auth-error {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.3);
}

:root[data-theme="dark"] .auth-page {
  background: linear-gradient(135deg, #1f2937, #111827);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .auth-page-container {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .auth-features {
    order: -1;
    padding: 40px 24px;
  }
  
  .auth-card {
    padding: 40px 24px;
  }
  
  .auth-features h3 {
    font-size: 24px;
    margin-bottom: 24px;
  }
  
  .feature-list {
    gap: 20px;
  }
  
  .feature-item {
    gap: 12px;
  }
  
  .feature-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 24px;
  }
  
  .auth-features {
    padding: 24px;
  }
  
  .user-profile {
    position: relative;
    top: auto;
    right: auto;
    margin: 16px;
  }
  
  .sync-status {
    position: relative;
    bottom: auto;
    right: auto;
    margin: 16px;
    justify-content: center;
  }
}

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

.auth-header .logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.auth-header .whistle-icon {
  width: 32px;
  height: 32px;
  color: var(--primary-color);
}

.auth-header h1 {
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  font-size: 24px;
  color: var(--text-color);
  margin: 0;
}

.auth-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-color);
  margin: 0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-weight: 500;
  color: var(--text-color);
  font-size: 14px;
}

.form-group input {
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text-color);
  font-size: 16px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.auth-submit {
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  margin-top: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.4);
}

.btn.secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

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

.auth-divider {
  text-align: center;
  margin: 8px 0;
  position: relative;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-color);
}

.auth-divider span {
  background: var(--card-bg);
  padding: 0 16px;
  font-size: 14px;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

.auth-error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  margin-top: 16px;
  font-size: 14px;
  text-align: center;
}

/* User Profile Styles */
.user-profile {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 100;
}

.profile-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

#userName {
  font-weight: 500;
  color: var(--text-color);
  font-size: 14px;
}

#signOutBtn {
  padding: 6px 12px;
  font-size: 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: var(--secondary-bg);
  color: var(--text-color);
  transition: all 0.2s ease;
}

#signOutBtn:hover {
  background: var(--hover-bg);
}

/* Sync Status Styles */
.sync-status {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text-muted);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sync-status.syncing {
  color: var(--primary-color);
}

.sync-status.synced {
  color: #10b981;
}

.sync-status.error {
  color: #ef4444;
}

.spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Hidden utility */
.hidden {
  display: none !important;
}

/* Dark mode support */
:root[data-theme="dark"] .auth-error {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.3);
}

/* Mobile responsive */
@media (max-width: 480px) {
  .auth-container {
    padding: 24px;
    margin: 20px;
  }
  
  .user-profile {
    position: relative;
    top: auto;
    right: auto;
    margin: 16px;
  }
  
  .sync-status {
    position: relative;
    bottom: auto;
    right: auto;
    margin: 16px;
    justify-content: center;
  }
}
