/* ---- Auth Modals ---- */
.auth-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.auth-overlay.active {
  display: flex;
}

.auth-modal {
  background: radial-gradient(circle at 50% 40%, #1a1d27, #12141c);
  border: 1.5px solid #2a2d3a;
  border-radius: 10px;
  padding: 2rem 1.75rem 1.5rem;
  width: 90%;
  max-width: 400px;
  position: relative;
  animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: #666;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.15s;
}
.auth-modal-close:hover { color: #fff; }

.auth-modal h2 {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 6px;
  text-align: center;
}
.auth-modal p {
  color: #888;
  font-size: 0.82rem;
  line-height: 1.4;
  margin: 0 0 1.5rem;
  text-align: center;
}

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

.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label {
  font-size: 0.65rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.auth-field input {
  background: #13151f;
  border: 1.5px solid #2a2d3a;
  border-radius: 10px;
  padding: 10px 12px;
  color: #fff;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.auth-field input:hover {
  border-color: #3a3d4a;
}
.auth-field input:focus {
  border-color: var(--spot);
  background: #161a26;
}
.auth-field-hint {
  font-size: 0.7rem;
  color: #666;
  margin-top: 2px;
}

/* Match the height of the standard .btn (e.g. Ascending in cof) so
   modal CTAs read at the same scale as in-tool buttons. */
.auth-btn {
  background: var(--spot);
  color: #fff;
  border: 1.5px solid var(--spot);
  border-radius: 10px;
  padding: 7px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  font-family: inherit;
  margin-top: 6px;
}
.auth-btn:hover {
  background: var(--spot-hover);
  border-color: var(--spot-hover);
}
.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 14px 0;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1.5px;
  background: #2a2d3a;
}
.auth-divider span {
  color: #666;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1;
}

.auth-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #1a1d27;
  border: 1.5px solid #2a2d3a;
  border-radius: 10px;
  padding: 7px 14px;
  color: #ccc;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  font-family: inherit;
  width: 100%;
}
.auth-social-btn:hover {
  background: #252836;
  border-color: #555;
  color: #fff;
}

.auth-footer {
  text-align: center;
  margin-top: 18px;
  font-size: 0.8rem;
  color: #666;
}
.auth-footer a {
  color: var(--spot);
  text-decoration: none;
  cursor: pointer;
}
.auth-footer a:hover { text-decoration: underline; }

.auth-error {
  background: rgba(255, 60, 60, 0.1);
  border: 1px solid rgba(255, 60, 60, 0.3);
  border-radius: 8px;
  padding: 8px 12px;
  color: #ff6b6b;
  font-size: 0.82rem;
  display: none;
}
.auth-error.visible { display: block; }

.auth-success {
  background: rgba(60, 255, 120, 0.1);
  border: 1px solid rgba(60, 255, 120, 0.3);
  border-radius: 8px;
  padding: 8px 12px;
  color: #6bffa0;
  font-size: 0.82rem;
  display: none;
}
.auth-success.visible { display: block; }

/* ---- User Menu ---- */
.user-menu {
  position: relative;
  margin-left: auto;
}

.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 4px 0 4px 10px;
  cursor: pointer;
  color: #ccc;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.15s;
}
.user-menu-trigger span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-menu-trigger:hover {
  border-color: transparent;
  background: none;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--spot);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.user-menu-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #1a1d27;
  border: 1.5px solid #2a2d3a;
  border-radius: 10px;
  width: 220px;
  box-sizing: border-box;
  padding: 6px;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.user-menu-dropdown > div[style*="font-size:0.75rem"] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-menu-dropdown.open { display: block; }

.user-menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 12px;
  background: none;
  border: none;
  border-radius: 6px;
  color: #ccc;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.user-menu-item:hover { color: #fff; }
.user-menu-item.danger { color: #ff6b6b; }
.user-menu-item.danger:hover { color: #ff8a8a; }

.user-menu-divider {
  height: 1px;
  background: #2a2d3a;
  margin: 4px 0;
}

/* ---- Upgrade Modal ---- */
.upgrade-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}

.plan-card {
  background: #0b0d13;
  border: 1.5px solid #2a2d3a;
  border-radius: 10px;
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}

.plan-card.recommended { border-color: var(--spot); position: relative; }
.plan-card.recommended::before {
  content: 'Best value';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--spot);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 10px;
  text-transform: uppercase;
}

.plan-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.plan-price {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--spot);
}
.plan-price span {
  font-size: 0.8rem;
  font-weight: 500;
  color: #666;
}
.plan-savings {
  font-size: 0.78rem;
  color: #6bffa0;
  font-weight: 600;
  margin-top: 4px;
}

/* ---- Premium Badge ---- */
.premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, var(--spot), #7c3aed);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---- Login Prompt (inline, for not-logged-in state) ---- */
/* Plain text link — no border, no background, no pill. Sits in the
   right column of the nav row in place of the user menu. */
.login-prompt-btn {
  display: inline-flex;
  align-items: center;
  background: none;
  border: none;
  padding: 4px 0;
  cursor: pointer;
  color: #ccc;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  transition: color 0.15s;
}
.login-prompt-btn:hover {
  color: #fff;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .auth-modal { padding: 1.5rem; }
  .upgrade-plans { grid-template-columns: 1fr; }
  .user-menu-trigger {
    width: auto;
    min-width: 0;
    max-width: calc(100vw - 120px);
    padding: 4px 0;
    gap: 6px;
  }
  .user-menu-trigger span { display: none; }
  .user-menu-dropdown {
    width: calc(100vw - 24px);
    max-width: 260px;
    right: 0;
  }
  .user-menu-item { padding: 12px; min-height: 44px; }
}
