/* ═══════════════════════════════════════════════════════════════
   Aquafire Rewards – Styles
   ═══════════════════════════════════════════════════════════════ */

/* ── Nav Rewards Button ── */
.nav-rewards { margin-left: auto; }
.af-rewards-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(192,57,43,0.1);
  border: 1px solid rgba(192,57,43,0.25);
  border-radius: 20px;
  color: #e4e5e9;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.af-rewards-btn:hover {
  background: rgba(192,57,43,0.18);
  border-color: rgba(192,57,43,0.4);
}
.af-nav-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #c0392b;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}
.af-nav-points {
  display: flex;
  align-items: center;
  gap: 4px;
}
.af-nav-pts-icon { font-size: 0.9rem; line-height: 1; }
.af-nav-pts-num { font-variant-numeric: tabular-nums; }
.af-nav-login-label { font-weight: 500; }

/* ── Login Modal ── */
.af-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.af-modal-overlay.af-modal--open { opacity: 1; }
.af-modal-overlay.af-modal--closing { opacity: 0; }

.af-modal {
  position: relative;
  width: 92%;
  max-width: 400px;
  background: #1b1e24;
  border: 1px solid #2c3038;
  border-radius: 20px;
  padding: 36px 32px 28px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  transform: translateY(20px) scale(0.96);
  transition: transform 0.25s ease;
}
.af-modal--open .af-modal {
  transform: translateY(0) scale(1);
}
.af-modal--closing .af-modal {
  transform: translateY(20px) scale(0.96);
}
.af-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  color: #878c99;
  font-size: 1.3rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.af-modal-close:hover { background: rgba(255,255,255,0.1); color: #e4e5e9; }

.af-modal-header {
  text-align: center;
  margin-bottom: 28px;
}
.af-modal-flame {
  font-size: 2rem;
  margin-bottom: 8px;
}
.af-modal-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #e4e5e9;
  margin: 0;
}
.af-modal-sub {
  color: #878c99;
  font-size: 0.88rem;
  margin-top: 6px;
}

/* Auth Buttons */
.af-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 20px;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.af-auth-google {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #e4e5e9;
}
.af-auth-google:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.18);
}
.af-auth-icon { flex-shrink: 0; }

.af-auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
  color: #878c99;
  font-size: 0.8rem;
}
.af-auth-divider::before,
.af-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #2c3038;
}

/* Email Form */
.af-form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #878c99;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.af-form-input {
  width: 100%;
  padding: 13px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid #2c3038;
  border-radius: 12px;
  color: #e4e5e9;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.af-form-input:focus {
  border-color: rgba(192,57,43,0.5);
}
.af-form-input::placeholder { color: #555; }
.af-password-group {
  margin-top: 12px;
}
.af-auth-error {
  color: #e74c3c;
  font-size: 0.82rem;
  min-height: 20px;
  margin-top: 8px;
}
.af-auth-submit {
  width: 100%;
  padding: 14px 20px;
  margin-top: 12px;
  background: #c0392b;
  border: none;
  border-radius: 12px;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 12px rgba(192,57,43,0.15);
}
.af-auth-submit:hover {
  background: #a93226;
  box-shadow: 0 4px 20px rgba(192,57,43,0.35);
}

.af-modal-footer {
  text-align: center;
  color: #555;
  font-size: 0.78rem;
  margin-top: 20px;
}

/* ── Profile Dropdown ── */
.af-dropdown {
  position: fixed;
  z-index: 10001;
  width: 280px;
  background: #1b1e24;
  border: 1px solid #2c3038;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}
.af-dd-header {
  margin-bottom: 16px;
}
.af-dd-name {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: #e4e5e9;
}
.af-dd-email {
  display: block;
  font-size: 0.78rem;
  color: #878c99;
  margin-top: 2px;
}
.af-dd-points {
  background: rgba(192,57,43,0.08);
  border: 1px solid rgba(192,57,43,0.15);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  margin-bottom: 16px;
}
.af-dd-pts-num {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #e8a838;
}
.af-dd-pts-label {
  display: block;
  font-size: 0.72rem;
  color: #878c99;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.af-dd-progress { margin-bottom: 16px; }
.af-dd-bar-wrap { }
.af-dd-bar {
  height: 6px;
  background: #22262e;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.af-dd-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #c0392b, #e8a838);
  border-radius: 3px;
  transition: width 0.4s ease;
}
.af-dd-bar-label {
  font-size: 0.72rem;
  color: #878c99;
}
.af-dd-redeem {
  display: block;
  width: 100%;
  padding: 10px;
  margin-bottom: 8px;
  background: rgba(192,57,43,0.12);
  border: 1px solid rgba(192,57,43,0.3);
  border-radius: 8px;
  color: #e4724a;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  box-sizing: border-box;
}
.af-dd-redeem:hover { background: rgba(192,57,43,0.2); border-color: rgba(192,57,43,0.5); }
.af-dd-signout {
  width: 100%;
  padding: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid #2c3038;
  border-radius: 8px;
  color: #878c99;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.af-dd-signout:hover { background: rgba(255,255,255,0.08); color: #e4e5e9; }

/* ── Reward Badges ── */
.af-reward-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(232,168,56,0.08);
  border: 1px solid rgba(232,168,56,0.18);
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #e8a838;
  white-space: nowrap;
  vertical-align: middle;
  transition: background 0.2s, border-color 0.2s;
}
.af-reward-badge--done {
  background: rgba(46,204,113,0.08);
  border-color: rgba(46,204,113,0.2);
  color: #2ecc71;
}
.af-rb-flame { font-size: 0.8rem; line-height: 1; }
.af-rb-check { font-size: 0.8rem; line-height: 1; }
.af-rb-pts { font-variant-numeric: tabular-nums; }

/* Badge positioning on bento tiles */
.bento-tile .af-reward-badge {
  position: absolute;
  top: 12px;
  right: 12px;
}

/* Badge positioning on section cards */
.card .af-reward-badge,
.step-row ~ .af-reward-badge {
  position: absolute;
  top: 16px;
  right: 16px;
}
.card { position: relative; }

/* Badge on model cards */
.model-card .af-reward-badge {
  position: absolute;
  top: 12px;
  right: 12px;
}
.model-card { position: relative; }

/* Badge on support cards */
.support-card .af-reward-badge {
  position: absolute;
  top: 12px;
  right: 12px;
}
.support-card { position: relative; }

/* ── Toast Notification ── */
.af-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  z-index: 10002;
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
  pointer-events: none;
}
.af-toast--show {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}
.af-toast--hide {
  transform: translate(-50%, -50%) scale(0.85) translateY(30px);
  opacity: 0;
  transition: transform 0.4s ease-in, opacity 0.3s ease;
}
.af-toast-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px 48px;
  background: radial-gradient(ellipse at center, rgba(232,168,56,0.08) 0%, #1b1e24 70%);
  border: 1px solid rgba(232,168,56,0.3);
  border-radius: 20px;
  box-shadow: 0 0 60px rgba(232,168,56,0.15), 0 20px 60px rgba(0,0,0,0.5);
  overflow: visible;
}
.af-toast-icon-ring {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(232,168,56,0.1);
  border: 2px solid rgba(232,168,56,0.3);
  animation: af-pulse-ring 1.2s ease-out;
}
@keyframes af-pulse-ring {
  0%   { transform: scale(0); opacity: 0; }
  40%  { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.af-toast-flame {
  font-size: 1.6rem;
  animation: af-flame-bounce 0.6s 0.3s ease both;
}
@keyframes af-flame-bounce {
  0%   { transform: scale(0) rotate(-20deg); }
  50%  { transform: scale(1.3) rotate(5deg); }
  100% { transform: scale(1) rotate(0deg); }
}
.af-toast-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.af-toast-points {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #e8a838;
  animation: af-pts-count 0.6s 0.4s ease both;
}
@keyframes af-pts-count {
  0%   { transform: translateY(10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.af-toast-label {
  font-size: 0.85rem;
  color: #878c99;
  animation: af-label-fade 0.5s 0.6s ease both;
}
@keyframes af-label-fade {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

/* Sparkle particles */
.af-toast-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.af-spark {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e8a838;
}
.af-spark-1 { top: 20%; left: 10%;  animation: af-spark-fly 0.8s 0.2s ease-out both; }
.af-spark-2 { top: 15%; right: 12%; animation: af-spark-fly 0.8s 0.35s ease-out both; }
.af-spark-3 { top: 50%; left: 5%;   animation: af-spark-fly 0.8s 0.25s ease-out both; }
.af-spark-4 { top: 45%; right: 8%;  animation: af-spark-fly 0.8s 0.4s ease-out both; }
.af-spark-5 { bottom: 25%; left: 15%;  animation: af-spark-fly 0.8s 0.3s ease-out both; }
.af-spark-6 { bottom: 20%; right: 15%; animation: af-spark-fly 0.8s 0.45s ease-out both; }
@keyframes af-spark-fly {
  0%   { transform: scale(0) translate(0, 0); opacity: 1; }
  50%  { transform: scale(1.5) translate(var(--sx, -15px), var(--sy, -20px)); opacity: 1; }
  100% { transform: scale(0) translate(var(--ex, -25px), var(--ey, -35px)); opacity: 0; }
}
.af-spark-1 { --sx: -20px; --sy: -25px; --ex: -35px; --ey: -40px; }
.af-spark-2 { --sx: 20px;  --sy: -20px; --ex: 35px;  --ey: -35px; }
.af-spark-3 { --sx: -25px; --sy: 5px;   --ex: -40px; --ey: 10px; }
.af-spark-4 { --sx: 22px;  --sy: 8px;   --ex: 38px;  --ey: 12px; }
.af-spark-5 { --sx: -18px; --sy: 20px;  --ex: -30px; --ey: 35px; }
.af-spark-6 { --sx: 18px;  --sy: 22px;  --ex: 32px;  --ey: 38px; }

/* ── Responsive ── */
@media (max-width: 800px) {
  .nav-rewards { margin-left: 0; margin-top: 8px; }
  .af-rewards-btn { width: 100%; justify-content: center; }
  .af-modal { padding: 28px 20px 24px; }
  .af-dropdown {
    left: 50% !important;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 320px;
  }
}

@media (max-width: 560px) {
  .af-modal { border-radius: 16px; }
}
