/* ===== Auth Modal (Login / Sign Up) — Pure CSS via :target ===== */

.auth-modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 38, 0.55);
  backdrop-filter: blur(2px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

/* :target activates the modal when URL hash matches #auth-modal */
.auth-modal:target {
  opacity: 1;
  visibility: visible;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  cursor: pointer;
  z-index: 1;
}

.auth-modal-card {
  position: relative;
  z-index: 2;
  background: #fff;
  border-radius: 18px;
  width: 100%;
  max-width: 460px;
  padding: 44px 48px 36px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  text-align: center;
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.auth-modal:target .auth-modal-card {
  transform: scale(1);
}

.auth-modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--text-light);
  background: transparent;
  text-decoration: none;
  line-height: 1;
  transition: var(--transition);
}

.auth-modal-close:hover {
  background: var(--bg-light);
  color: var(--text-primary);
}

.auth-modal-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ff4c4c 0%, #ff6b6b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 8px 20px rgba(255, 76, 76, 0.3);
}

.auth-modal h2 {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.2;
}

.auth-modal-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 26px;
}

/* Email Input */
.auth-input-wrap {
  position: relative;
  margin-bottom: 16px;
}

.auth-input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 1rem;
  pointer-events: none;
}

.auth-input {
  width: 100%;
  height: 50px;
  padding: 0 16px 0 46px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: #fff;
  transition: var(--transition);
  font-family: inherit;
}

.auth-input::placeholder {
  color: var(--text-light);
}

.auth-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 76, 76, 0.12);
  outline: none;
}

/* Continue Button */
.auth-btn-primary {
  width: 100%;
  height: 54px;
  background: #ffabab;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 24px;
}

.auth-btn-primary:hover {
  background: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 76, 76, 0.25);
}

/* Google Button */
.auth-btn-google {
  width: 100%;
  height: 50px;
  background: #fff;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
  text-decoration: none;
}

.auth-btn-google:hover {
  background: var(--bg-light);
  color: var(--text-primary);
  border-color: #d1d5db;
}

.auth-btn-google .g-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  background: conic-gradient(from -45deg, #4285f4, #ea4335, #fbbc05, #34a853, #4285f4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Footer Terms */
.auth-modal-terms {
  margin-top: 22px;
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.6;
}

.auth-modal-terms a {
  color: var(--text-secondary);
  text-decoration: underline;
}

.auth-modal-terms a:hover {
  color: var(--primary);
}


/* Small Mobile: <= 480px */
@media (max-width: 480px) {
  .section-title {
    font-size: 1.3rem;
  }

  .card-img {
    height: 160px;
  }

  /* Layer auth modal responsive */
  .auth-layer-popup {
    width: calc(100% - 40px) !important;
    max-width: 400px !important;
  }

  .auth-modal-content {
    padding: 28px 20px 24px !important;
  }

  .auth-modal-header h2 {
    font-size: 1.3rem;
  }

  .auth-input {
    height: 46px;
    font-size: 0.9rem;
  }

  .auth-btn-primary {
    height: 48px;
    font-size: 1rem;
  }

  .auth-btn-google {
    height: 46px;
    font-size: 0.9rem;
  }

  /* Fix close button on mobile */
  .custom-close-btn {
    top: -10px !important;
    right: -10px !important;
    width: 30px !important;
    height: 30px !important;
    font-size: 24px !important;
    line-height: 26px !important;
  }
}

/* Extra small screens */
@media (max-width: 360px) {
  .auth-layer-popup {
    width: calc(100% - 30px) !important;
  }

  .custom-close-btn {
    top: -8px !important;
    right: -8px !important;
    width: 28px !important;
    height: 28px !important;
    font-size: 22px !important;
    line-height: 24px !important;
  }
}
