/* Authentication Modal Styles - Dark Minimalist Design */

.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-modal-content {
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 0; /* Sharp corners for minimalism */
  width: 90%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px;
  position: relative;
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
}

/* Custom scrollbar for modal */
.auth-modal-content::-webkit-scrollbar {
  width: 4px;
}

.auth-modal-content::-webkit-scrollbar-track {
  background: transparent;
}

.auth-modal-content::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 2px;
}

.auth-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: #555;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  transition: all 0.2s ease;
  padding: 0;
}

.auth-modal-close:hover {
  color: #888;
  transform: rotate(90deg);
}

.auth-modal-header {
  text-align: center;
  margin-bottom: 40px;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  border: 1px solid #333;
  border-radius: 0;
  color: #888;
}

.auth-modal-header h2 {
  margin: 0 0 8px 0;
  font-size: 28px;
  font-weight: 300;
  color: #e8e8e8;
  letter-spacing: -0.5px;
}

.auth-modal-header p {
  margin: 0;
  color: #555;
  font-size: 14px;
  font-weight: 400;
}

/* Form Styles */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 12px;
  font-weight: 400;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input {
  padding: 10px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid #2a2a2a;
  color: #e8e8e8;
  font-size: 14px;
  transition: all 0.3s ease;
  border-radius: 0;
  width: 100%;
}

.form-group input::placeholder {
  color: #444;
}

.form-group input:focus {
  outline: none;
  border-bottom-color: #666;
}

.form-group small {
  font-size: 11px;
  color: #555;
  margin-top: 4px;
}

/* Button Styles - Matching applyFilters style */ 
.btn-primary {
  background: #2a2a2a !important; /* --dark-surface-3 */
  color: #e8e8e8; /* --text-primary */
  border: 1px solid transparent;
  padding: 12px 32px;
  border-radius: 0;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  margin-top: 8px;
  width: 100%;
  overflow: hidden;
}

/* Colorful conic gradient effect on hover - same as applyFilters */
.btn-primary::before {
  content: '';
  position: absolute;
  top: -100%;
  left: -50%;
  width: 200%;
  height: 300%;
  background: conic-gradient(from 0deg at 50% 50%,
    rgba(71, 195, 255, 0.3) 0deg,
    rgba(135, 71, 255, 0.25) 60deg,
    rgba(255, 71, 195, 0.22) 120deg,
    rgba(255, 135, 71, 0.25) 180deg,
    rgba(255, 195, 71, 0.22) 240deg,
    rgba(150, 255, 71, 0.25) 300deg,
    rgba(71, 195, 255, 0.3) 360deg);
  border-radius: 0;
  opacity: 0;
  z-index: -1;
  transition: opacity 0.4s ease;
  animation: rotate-haze 15s linear infinite;
}

.btn-primary:hover:not(:disabled)::before {
  opacity: 0.6;
}

.btn-primary:hover:not(:disabled) {
  background-color: rgba(255, 255, 255, 0.03);
  color: white;
  box-shadow: 0 0 15px rgba(71, 195, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background-color: #1a1a1a;
  border-color: #1a1a1a;
  color: #444;
}

/* Keyframe animations */
@keyframes rotate-haze {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spectrum-shift {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

.btn-oauth {
  background: transparent;
  color: #888;
  border: 1px solid #2a2a2a;
  padding: 12px 24px;
  border-radius: 0;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.btn-oauth:hover {
  background: #1a1a1a;
  border-color: #444;
  color: #e8e8e8;
}

/* Divider */
.auth-divider {
  position: relative;
  text-align: center;
  margin: 24px 0;
  height: 1px;
  background: #2a2a2a;
}

.auth-divider span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #141414;
  padding: 0 12px;
  color: #444;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Links */
.auth-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
  text-align: center;
}

.auth-links a {
  color: #888;
  text-decoration: none;
  font-size: 13px;
  transition: all 0.2s ease;
  position: relative;
}

.auth-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 1px;
  background: #e8e8e8;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.auth-links a:hover {
  color: #e8e8e8;
}

.auth-links a:hover::after {
  width: 100%;
}

.auth-terms {
  margin-top: 24px;
  font-size: 11px;
  color: #444;
  text-align: center;
  line-height: 1.6;
}

.auth-terms a {
  color: #666;
  text-decoration: none;
  border-bottom: 1px dotted #333;
}

.auth-terms a:hover {
  color: #888;
  border-bottom-color: #555;
}

/* Messages */
.auth-message {
  padding: 12px 16px;
  border-radius: 0;
  font-size: 13px;
  text-align: left;
  margin-top: 20px;
  border-left: 3px solid;
  background: #1a1a1a;
}

.auth-message-success {
  border-left-color: #4a9eff;
  color: #4a9eff;
  background: rgba(74, 158, 255, 0.1);
}

.auth-message-error {
  border-left-color: #c23616;
  color: #e8e8e8;
  background: rgba(194, 54, 22, 0.1);
}

.auth-message-info {
  border-left-color: #888;
  color: #888;
  background: rgba(136, 136, 136, 0.1);
}

/* User Menu Styles */
.user-menu {
  position: relative;
  margin-left: auto;
}

.user-menu-button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
}

.user-menu-button:hover {
  background: #f5f5f5;
  border-color: #bbb;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.dropdown-arrow {
  margin-left: 4px;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  min-width: 220px;
  z-index: 1000;
  animation: dropdownSlide 0.2s ease;
}

.user-info {
  padding: 12px 16px;
}

.user-info strong {
  display: block;
  font-size: 14px;
  color: #333;
  margin-bottom: 4px;
}

.user-info small {
  color: #666;
  font-size: 12px;
}

.user-dropdown hr {
  margin: 0;
  border: none;
  border-top: 1px solid #eee;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.2s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.dropdown-item:hover {
  background: #f5f5f5;
}

.dropdown-item.signout {
  color: #dc3545;
}

.dropdown-item.signout:hover {
  background: #fff5f5;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(40px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes dropdownSlide {
  from {
    transform: translateY(-10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Upgrade Prompts */
.upgrade-prompt {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 16px;
  border-radius: 8px;
  margin: 16px 0;
  text-align: center;
}

.upgrade-prompt h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
}

.upgrade-prompt p {
  margin: 0 0 12px 0;
  font-size: 14px;
  opacity: 0.95;
}

.upgrade-prompt .btn-upgrade {
  background: white;
  color: #667eea;
  padding: 8px 20px;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
  transition: all 0.2s;
}

.upgrade-prompt .btn-upgrade:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Responsive */
@media (max-width: 480px) {
  .auth-modal-content {
    width: 95%;
    padding: 24px;
  }
  
  .auth-modal-header h2 {
    font-size: 20px;
  }
  
  .form-group input {
    font-size: 16px; /* Prevent zoom on iOS */
  }
}
