/* Authentication Modal Styles */
.auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.auth-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.auth-modal-content {
  position: relative;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  max-width: 440px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.auth-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  color: #666;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  z-index: 10;
}

.auth-close-btn:hover {
  background: #f5f5f5;
  color: #000;
}

.auth-form-container {
  padding: 40px 32px;
}

.auth-form-container h2 {
  margin: 0 0 8px 0;
  font-size: 28px;
  font-weight: 600;
  color: #000;
}

.auth-subtitle {
  margin: 0 0 28px 0;
  color: #666;
  font-size: 14px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-input-group label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.auth-input-group input {
  padding: 12px 14px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.auth-input-group input:focus {
  outline: none;
  border-color: #000;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -6px;
}

.auth-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
}

.auth-remember input[type="checkbox"] {
  cursor: pointer;
}

.auth-forgot-link {
  font-size: 14px;
  color: #000;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.auth-forgot-link:hover {
  opacity: 0.7;
}

.auth-submit-btn {
  background: #000;
  color: white;
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 6px;
}

.auth-submit-btn:hover {
  background: #333;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.auth-submit-btn:active {
  transform: translateY(0);
}

.auth-divider {
  position: relative;
  text-align: center;
  margin: 8px 0;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e0e0e0;
}

.auth-divider span {
  position: relative;
  background: white;
  padding: 0 12px;
  font-size: 13px;
  color: #999;
  font-weight: 500;
}

.auth-google-btn {
  background: white;
  border: 1.5px solid #ddd;
  padding: 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.auth-google-btn:hover {
  background: #f8f8f8;
  border-color: #ccc;
}

.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: #666;
}

.auth-switch a {
  color: #000;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.auth-switch a:hover {
  opacity: 0.7;
}

/* User Icon Button */
.user-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: background 0.3s ease;
  position: relative;
  font-size: 2.8rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-btn:hover {
  background: #f5f5f5;
}

.user-btn svg {
  width: 32px !important;
  height: 32px !important;
}

.user-btn.logged-in {
  background: #000;
  color: white;
}

.user-btn.logged-in:hover {
  background: #333;
}

/* User Dropdown */
.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  min-width: 240px;
  z-index: 1000;
  animation: dropdownSlide 0.2s ease;
  overflow: hidden;
}

@keyframes dropdownSlide {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-dropdown-header {
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8f8f8;
}

.user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #000;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 18px;
  flex-shrink: 0;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-weight: 600;
  font-size: 14px;
  color: #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 12px;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown-divider {
  height: 1px;
  background: #e0e0e0;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #333;
  text-decoration: none;
  transition: background 0.2s ease;
  font-size: 14px;
}

.user-dropdown-item:hover {
  background: #f8f8f8;
}

.user-dropdown-item svg {
  flex-shrink: 0;
}

.user-dropdown-logout {
  color: #dc3545;
}

.user-dropdown-logout:hover {
  background: #fff5f5;
}

/* Loading State */
.auth-submit-btn.loading {
  pointer-events: none;
  opacity: 0.7;
  position: relative;
}

.auth-submit-btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid white;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Error Message */
.auth-error {
  background: #fff5f5;
  color: #dc3545;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 12px;
  border: 1px solid #ffebee;
}

.auth-success {
  background: #f0f9ff;
  color: #0066cc;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 12px;
  border: 1px solid #e0f2ff;
}

/* Responsive */
@media (max-width: 768px) {
  .auth-form-container {
    padding: 32px 24px;
  }

  .auth-form-container h2 {
    font-size: 24px;
  }

  .auth-modal-content {
    width: 95%;
  }
}
