/* flj-addict.css — dopamine loops: XP bursts, combos, daily missions, achievements */

@keyframes flja-xp-rise {
  0%   { opacity: 0; transform: translateY(12px) scale(0.85); }
  12%  { opacity: 1; transform: translateY(0) scale(1.08); }
  70%  { opacity: 1; transform: translateY(-28px) scale(1); }
  100% { opacity: 0; transform: translateY(-56px) scale(0.92); }
}

@keyframes flja-streak-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.45); }
  50%      { box-shadow: 0 0 0 8px rgba(251, 191, 36, 0); }
}

@keyframes flja-combo-pop {
  0%   { opacity: 0; transform: scale(0.6) rotate(-8deg); }
  40%  { opacity: 1; transform: scale(1.12) rotate(4deg); }
  100% { opacity: 0; transform: scale(1) rotate(0deg) translateY(-24px); }
}

@keyframes flja-ach-slide {
  0%   { opacity: 0; transform: translateX(120%); }
  12%  { opacity: 1; transform: translateX(0); }
  88%  { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(120%); }
}

@keyframes flja-welcome-in {
  from { opacity: 0; transform: translateY(-16px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes flja-mission-glow {
  0%, 100% { border-color: rgba(255, 107, 157, 0.35); }
  50%      { border-color: rgba(0, 245, 212, 0.5); }
}

/* ── XP float burst ── */
.flja-xp-pop {
  position: fixed;
  top: 68px;
  right: 18px;
  z-index: 10050;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  animation: flja-xp-rise 1.5s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}

.flja-xp-pop-main {
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  padding: 10px 18px;
  border-radius: 100px;
  background: linear-gradient(135deg, #ff3d52, #ff6b9d 55%, #fbbf24);
  box-shadow: 0 8px 32px rgba(255, 61, 82, 0.45), 0 0 24px rgba(255, 107, 157, 0.25);
}

.flja-xp-pop-combo {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #00f5d4;
  text-shadow: 0 0 12px rgba(0, 245, 212, 0.5);
}

/* ── Combo floater (center-top) ── */
.flja-combo {
  position: fixed;
  top: 88px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10040;
  pointer-events: none;
  font-family: 'Noto Sans JP', 'Nunito', sans-serif;
  font-size: 1.35rem;
  font-weight: 900;
  color: #fbbf24;
  text-shadow: 0 0 24px rgba(251, 191, 36, 0.6), 0 2px 8px rgba(0, 0, 0, 0.5);
  animation: flja-combo-pop 1.1s ease forwards;
}

/* ── Nav streak pulse when active ── */
.nav-pill--streak.flja-streak-hot,
.nav-stat--streak.flja-streak-hot {
  animation: flja-streak-pulse 2.2s ease-in-out infinite;
}
.nav-stat--streak.flja-streak-hot .nav-stat-val {
  color: var(--gold, #f5a623);
}

/* ── Level micro-bar in nav ── */
.nav-xp-bar {
  display: none;
  width: 72px;
  height: 4px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  flex-shrink: 0;
}

@media (min-width: 720px) {
  .nav-xp-bar,

}
.main-nav--auth .nav-stats-chip .nav-xp-bar {
  display: block;
}
@media (max-width: 900px) {
  .main-nav--auth .nav-stats-chip .nav-xp-bar { display: none; }
}

.nav-xp-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff3d52, #ff6b9d, #00f5d4);
  background-size: 200% 100%;
  transition: width 0.45s cubic-bezier(0.34, 1.2, 0.64, 1);
}

/* ── Welcome / streak toast ── */
.flja-toast {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10030;
  max-width: min(420px, calc(100vw - 32px));
  padding: 14px 22px;
  border-radius: 16px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  text-align: center;
  background: linear-gradient(145deg, rgba(30, 20, 50, 0.96), rgba(13, 15, 28, 0.98));
  border: 1px solid rgba(255, 107, 157, 0.35);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 107, 157, 0.12);
  animation: flja-welcome-in 0.5s ease both;
  pointer-events: none;
}

.flja-toast strong { color: #fbbf24; }

.flja-toast-jp {
  display: block;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.78rem;
  color: #ffb7d5;
  margin-bottom: 4px;
  font-weight: 700;
}

/* ── Achievement unlock ── */
.flja-achievement {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10035;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(26, 18, 48, 0.98), rgba(10, 12, 24, 0.98));
  border: 1px solid rgba(251, 191, 36, 0.4);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55), 0 0 40px rgba(251, 191, 36, 0.15);
  animation: flja-ach-slide 4.2s ease forwards;
  pointer-events: none;
  max-width: min(340px, calc(100vw - 32px));
}

.flja-ach-kanji {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  color: var(--gold, #f5a623);
}
.flja-missions-kanji {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 900;
  margin-right: 4px;
  color: var(--mint, #00f5d4);
}
.flja-ach-title {
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
}
.flja-ach-jp {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.72rem;
  color: #fbbf24;
  font-weight: 700;
}
.flja-ach-sub {
  font-size: 0.72rem;
  color: #9aa3c0;
  margin-top: 2px;
}

/* ── Daily missions panel ── */
.flja-missions {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10020;
  width: min(300px, calc(100vw - 24px));
  font-family: 'Nunito', sans-serif;
}

.flja-missions--done {
  animation: flja-mission-glow 2s ease infinite;
}

.flja-missions-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 107, 157, 0.35);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(22, 16, 40, 0.95), rgba(10, 10, 20, 0.97));
  color: #fff;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  transition: border-color 0.2s, transform 0.2s;
}

.flja-missions-toggle:hover {
  border-color: rgba(0, 245, 212, 0.4);
  transform: translateY(-2px);
}

.flja-missions-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 100px;
  background: rgba(255, 61, 82, 0.2);
  color: #ff8a9a;
  border: 1px solid rgba(255, 61, 82, 0.35);
}

.flja-missions-badge--ready {
  background: rgba(0, 245, 212, 0.15);
  color: #00f5d4;
  border-color: rgba(0, 245, 212, 0.4);
}

.flja-missions-panel {
  margin-top: 8px;
  padding: 14px 16px 16px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(18, 14, 36, 0.97), rgba(8, 9, 20, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.55);
}

.flja-missions-panel[hidden] { display: none; }

.flja-missions-head {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ff6b9d;
  margin-bottom: 12px;
}

.flja-mission {
  margin-bottom: 12px;
}

.flja-mission:last-child { margin-bottom: 0; }

.flja-mission-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.flja-mission-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #e8eaf4;
}

.flja-mission-label--done {
  color: #00f5d4;
  text-decoration: line-through;
  opacity: 0.75;
}

.flja-mission-count {
  font-size: 0.68rem;
  font-weight: 800;
  color: #9aa3c0;
}

.flja-mission-track {
  height: 6px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.flja-mission-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff3d52, #ff6b9d, #00f5d4);
  transition: width 0.4s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.flja-mission-fill--done {
  background: linear-gradient(90deg, #00f5d4, #38bdf8);
}

.flja-missions-reward {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  color: #9aa3c0;
  text-align: center;
}

.flja-missions-reward strong { color: #fbbf24; }

.flja-missions-collect {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #0d0f12;
  background: linear-gradient(135deg, #fbbf24, #ff6b9d);
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.35);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.flja-missions-collect:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(251, 191, 36, 0.45);
}

.flja-missions-collect:active {
  transform: translateY(0);
}

.flja-missions-collect[hidden] {
  display: none;
}

.flja-missions--claimable .flja-missions-toggle {
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.45), 0 8px 28px rgba(0, 0, 0, 0.35);
}

.flja-missions-claimed-mark {
  color: #00f5d4;
  font-weight: 800;
}

@media (max-width: 768px) {
  .flja-missions {
    bottom: 12px;
    right: 12px;
    left: 12px;
    width: auto;
  }
  .flja-achievement {
    right: 12px;
    left: 12px;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flja-xp-pop,
  .flja-combo,
  .flja-achievement,
  .flja-toast,
  .nav-pill--streak.flja-streak-hot,
  .flja-missions--done { animation: none !important; }
}