/* ═══════════════════════════════════════════════════════
   SLOTY TRIP — Features Stylesheet
   Falling Items, Level Goals, Skill Tree,
   Achievement Toasts, Level Progress Bar
   ═══════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────
   FALLING ITEMS LAYER
───────────────────────────────────────────────────── */
.falling-items-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 30;
  overflow: hidden;
}

.falling-item {
  position: absolute;
  top: -80px;
  pointer-events: auto;
  cursor: pointer;
  animation: fallingDrop linear forwards;
  animation-duration: 4s;
  z-index: 35;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform, top, opacity;
}

@keyframes fallingDrop {
  0% {
    top: -80px;
    transform: translateX(0px) rotate(0deg);
    opacity: 0;
  }
  8% { opacity: 1; }
  90% { opacity: 1; }
  100% {
    top: 105%;
    transform: translateX(var(--drift, 0px)) rotate(var(--spin, 0deg));
    opacity: 0;
  }
}

.falling-item__bubble {
  background: rgba(5, 5, 20, 0.92);
  border: 2px solid #ffd600;
  border-radius: 12px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  box-shadow: 0 0 16px rgba(255, 214, 0, 0.5);
  transition: transform 0.12s ease;
  min-width: 48px;
}

.falling-item:active .falling-item__bubble,
.falling-item:hover .falling-item__bubble {
  transform: scale(1.15);
}

.falling-item__icon {
  font-size: 24px;
  line-height: 1;
}

.falling-item__label {
  font-family: var(--font-main);
  font-size: 7px;
  color: #ffd600;
  text-align: center;
  white-space: nowrap;
}

.falling-item--collect .falling-item__bubble {
  animation: collectPop 0.4s ease forwards;
}

@keyframes collectPop {
  0%   { transform: scale(1); opacity: 1; }
  50%  { transform: scale(1.5); opacity: 0.8; }
  100% { transform: scale(0); opacity: 0; }
}

/* Drop collection toast */
.drop-collect-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(5, 5, 20, 0.95);
  border: 2px solid #ffd600;
  border-radius: 8px;
  padding: 10px 20px;
  font-family: var(--font-main);
  font-size: 9px;
  color: #ffd600;
  z-index: 9000;
  pointer-events: none;
  animation: collectToastAnim 2s ease forwards;
  text-align: center;
}

@keyframes collectToastAnim {
  0%   { opacity: 0; transform: translate(-50%, -60%) scale(0.8); }
  15%  { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  20%  { transform: translate(-50%, -50%) scale(1); }
  70%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -40%) scale(0.95); }
}


/* ─────────────────────────────────────────────────────
   LEVEL GOALS PANEL
───────────────────────────────────────────────────── */
.goals-panel {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  max-width: 60%;
  background: rgba(5, 5, 20, 0.92);
  border: 1px solid var(--neon-gold);
  border-radius: 8px;
  padding: 8px;
  z-index: 40;
  box-shadow: 0 0 12px rgba(255, 214, 0, 0.25);
}

.goals-panel__title {
  font-family: var(--font-main);
  font-size: 7px;
  color: var(--neon-gold);
  text-align: center;
  margin-bottom: 6px;
  text-shadow: 0 0 8px var(--neon-gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.goals-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.goal-item {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  opacity: 0.95;
}

.goal-item--done {
  opacity: 0.7;
}

.goal-icon {
  font-size: 14px;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 1px;
}

.goal-body {
  flex: 1;
  min-width: 0;
}

.goal-desc {
  font-family: var(--font-main);
  font-size: 5.5px;
  color: #ccc;
  margin-bottom: 3px;
  line-height: 1.4;
}

.goal-item--done .goal-desc {
  color: #76ff03;
}

.goal-bar-wrap {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 2px;
}

.goal-bar-fill {
  height: 100%;
  background: var(--neon-gold);
  border-radius: 3px;
  transition: width 0.4s ease;
  box-shadow: 0 0 6px currentColor;
}

.goal-progress {
  font-family: var(--font-main);
  font-size: 5px;
  color: #888;
  text-align: right;
}

.goal-item--done .goal-bar-fill {
  background: var(--neon-green) !important;
}

/* Goals completed fanfare */
.goals-completed-fanfare {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(5, 5, 20, 0.97);
  border: 3px solid var(--neon-gold);
  border-radius: 12px;
  padding: 20px 30px;
  font-family: var(--font-main);
  font-size: 11px;
  color: var(--neon-gold);
  text-align: center;
  line-height: 1.8;
  z-index: 9500;
  box-shadow: 0 0 30px var(--neon-gold), 0 0 60px rgba(255, 214, 0, 0.4);
  animation: fanfareIn 0.4s ease, fanfareOut 0.4s ease 3.1s forwards;
  pointer-events: none;
}

.goals-completed-fanfare small {
  font-size: 7px;
  color: var(--neon-green);
}

@keyframes fanfareIn {
  from { transform: translateX(-50%) scale(0.5); opacity: 0; }
  to   { transform: translateX(-50%) scale(1); opacity: 1; }
}
@keyframes fanfareOut {
  to { opacity: 0; transform: translateX(-50%) scale(0.8); }
}


/* ─────────────────────────────────────────────────────
   LEVEL PROGRESS BAR (In-Game)
───────────────────────────────────────────────────── */
.game-progress-bar-wrap {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  max-width: 60%;
  z-index: 40;
}

.game-progress-label {
  font-family: var(--font-main);
  font-size: 6px;
  color: var(--neon-cyan);
  text-shadow: 0 0 6px var(--neon-cyan);
  margin-bottom: 3px;
  display: flex;
  justify-content: space-between;
}

.game-progress-bar {
  width: 100%;
  height: 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--neon-cyan);
  border-radius: 7px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.3);
}

.game-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00e5ff, #7c4dff, #00e5ff);
  background-size: 200% 100%;
  border-radius: 7px;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  animation: progressShimmer 2.5s linear infinite;
}

@keyframes progressShimmer {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.game-progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 60%, rgba(255,255,255,0.3));
  border-radius: inherit;
}

.game-progress-xp {
  font-family: var(--font-main);
  font-size: 5px;
  color: rgba(0, 229, 255, 0.7);
  text-align: center;
  margin-top: 2px;
}

/* Level badge next to bar */
.game-level-badge {
  display: inline-block;
  background: var(--neon-cyan);
  color: #000;
  font-family: var(--font-main);
  font-size: 6px;
  padding: 2px 5px;
  border-radius: 4px;
  font-weight: bold;
  box-shadow: 0 0 10px var(--neon-cyan);
}


/* ─────────────────────────────────────────────────────
   ACHIEVEMENT TOAST POPUPS
───────────────────────────────────────────────────── */
#achievement-toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9800;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: 90%;
  max-width: 380px;
}

.achievement-toast {
  background: rgba(5, 5, 20, 0.97);
  border: 2px solid var(--neon-gold);
  border-radius: 10px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 0 20px rgba(255, 214, 0, 0.5), 0 4px 20px rgba(0,0,0,0.8);
  animation: toastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
             toastOut 0.4s ease 3.8s forwards;
  width: 100%;
  pointer-events: auto;
}

@keyframes toastIn {
  from { transform: translateY(40px) scale(0.85); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes toastOut {
  to { transform: translateY(20px) scale(0.9); opacity: 0; }
}

.achievement-toast__icon {
  font-size: 28px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px gold);
}

.achievement-toast__body {
  flex: 1;
  min-width: 0;
}

.achievement-toast__header {
  font-family: var(--font-main);
  font-size: 7px;
  color: var(--neon-gold);
  letter-spacing: 1px;
  margin-bottom: 3px;
  text-shadow: 0 0 8px var(--neon-gold);
}

.achievement-toast__name {
  font-family: var(--font-main);
  font-size: 9px;
  color: #fff;
  font-weight: bold;
  margin-bottom: 2px;
}

.achievement-toast__desc {
  font-family: var(--font-main);
  font-size: 6px;
  color: #aaa;
  line-height: 1.4;
}

.achievement-toast__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,214,0,0.07) 0%, transparent 60%);
  border-radius: inherit;
  pointer-events: none;
}


/* ─────────────────────────────────────────────────────
   SKILL TREE SCREEN
───────────────────────────────────────────────────── */
#screen-skilltree .sub-screen__body {
  overflow-y: auto;
  padding: 12px;
}

.st-header {
  font-family: var(--font-main);
  font-size: 16px;
  text-align: center;
  color: var(--neon-cyan);
  text-shadow: 0 0 15px var(--neon-cyan);
  margin-bottom: 8px;
}

.st-points {
  font-family: var(--font-main);
  font-size: 9px;
  color: var(--neon-gold);
  text-align: center;
  margin-bottom: 4px;
}

.st-points-val {
  font-size: 13px;
  text-shadow: 0 0 10px var(--neon-gold);
}

.st-hint {
  font-family: var(--font-main);
  font-size: 6px;
  color: #666;
  text-align: center;
  margin-bottom: 16px;
}

.st-skills {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.st-skill {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 10px;
  padding: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.st-skill:hover {
  border-color: rgba(0, 229, 255, 0.6);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.15);
}

.st-skill--maxed {
  border-color: rgba(118, 255, 3, 0.4);
  background: rgba(118, 255, 3, 0.04);
}

.st-skill__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.st-skill__icon {
  font-size: 22px;
  flex-shrink: 0;
}

.st-skill__info {
  flex: 1;
}

.st-skill__name {
  font-family: var(--font-main);
  font-size: 8px;
  color: var(--neon-cyan);
  margin-bottom: 3px;
}

.st-skill__desc {
  font-family: var(--font-main);
  font-size: 5.5px;
  color: #888;
  line-height: 1.5;
}

.st-skill__level {
  font-family: var(--font-main);
  font-size: 9px;
  color: var(--neon-gold);
  flex-shrink: 0;
}

.st-pips {
  display: flex;
  gap: 5px;
  margin-bottom: 8px;
}

.st-pip {
  width: 16px;
  height: 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  transition: background 0.3s, box-shadow 0.3s;
}

.st-pip--filled {
  background: var(--neon-cyan);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 8px var(--neon-cyan);
}

.st-skill--maxed .st-pip--filled {
  background: var(--neon-green);
  border-color: var(--neon-green);
  box-shadow: 0 0 8px var(--neon-green);
}

.st-skill__effect {
  font-family: var(--font-main);
  font-size: 6.5px;
  color: #ccc;
  margin-bottom: 8px;
}

.st-next {
  color: var(--neon-green);
  text-shadow: 0 0 6px var(--neon-green);
}

.st-btn {
  width: 100%;
  padding: 8px;
  font-family: var(--font-main);
  font-size: 7px;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s;
  border: none;
}

.st-btn:active { transform: scale(0.96); }

.st-btn--ready {
  background: linear-gradient(135deg, #0a2a0a, #0d3d0d);
  color: var(--neon-green);
  border: 1px solid var(--neon-green);
  box-shadow: 0 0 8px rgba(118, 255, 3, 0.3);
}

.st-btn--ready:hover {
  box-shadow: 0 0 16px rgba(118, 255, 3, 0.5);
}

.st-btn--cant {
  background: rgba(30, 30, 40, 0.6);
  color: #555;
  border: 1px solid #333;
  cursor: not-allowed;
}

.st-maxed-badge {
  font-family: var(--font-main);
  font-size: 7px;
  color: var(--neon-green);
  text-align: center;
  padding: 6px;
  text-shadow: 0 0 8px var(--neon-green);
}

.skill-toast {
  position: fixed;
  top: 40%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(5, 5, 20, 0.96);
  border: 2px solid var(--neon-green);
  border-radius: 8px;
  padding: 8px 18px;
  font-family: var(--font-main);
  font-size: 8px;
  color: var(--neon-green);
  z-index: 9500;
  pointer-events: none;
  animation: collectToastAnim 2.5s ease forwards;
  white-space: nowrap;
}

/* Skill tree button in menu extras */
.menu-btn-sm__label--skilltree {
  color: var(--neon-purple);
}

/* ─── Map Goal Badge ─── */
.stage-level__goal-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 10px;
  line-height: 1;
  animation: goalpulse 1.5s ease-in-out infinite;
}

@keyframes goalpulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}


/* ─────────────────────────────────────────────────────
   SKILL VALUES PER LEVEL DISPLAY
───────────────────────────────────────────────────── */
.st-skill__values {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.st-val {
  font-family: var(--font-main);
  font-size: 5px;
  color: #555;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  padding: 2px 5px;
  transition: all 0.2s;
}

.st-val--done {
  color: var(--neon-cyan);
  border-color: rgba(0, 229, 255, 0.3);
  background: rgba(0, 229, 255, 0.05);
}

.st-val--active {
  color: var(--neon-green);
  border-color: var(--neon-green);
  background: rgba(118, 255, 3, 0.1);
  box-shadow: 0 0 6px rgba(118, 255, 3, 0.3);
}


/* ─────────────────────────────────────────────────────
   LOOT BOX SYSTEM
───────────────────────────────────────────────────── */

/* Shop Section Header */
.shop-section-header {
  grid-column: 1 / -1;
  text-align: center;
  padding: 16px 0 8px;
  margin-top: 12px;
  border-top: 2px solid var(--neon-gold);
}

.shop-section-header .neon-text-gold {
  font-family: var(--font-main);
  font-size: 12px;
  display: block;
  margin-bottom: 4px;
  text-shadow: 0 0 12px var(--neon-gold);
}

.shop-section-sub {
  font-family: var(--font-main);
  font-size: 6px;
  color: #888;
}

/* Loot box shop card */
.shop-card--lootbox {
  border: 2px solid var(--neon-gold) !important;
  box-shadow: 0 0 12px rgba(255, 214, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.shop-card--lootbox::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 214, 0, 0.05) 0%, transparent 60%);
  pointer-events: none;
}

.lootbox-icon {
  animation: lootboxFloat 2s ease-in-out infinite;
}

@keyframes lootboxFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.lootbox-odds {
  font-family: var(--font-main);
  margin: 4px 0;
  line-height: 1.6;
}

/* ─── Loot Box Opening Overlay ─── */
.lootbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: lootboxFadeIn 0.4s ease;
}

.lootbox-fadeout {
  animation: lootboxFadeOut 0.4s ease forwards !important;
}

@keyframes lootboxFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes lootboxFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Box Animation */
.lootbox-box {
  text-align: center;
  animation: lootboxAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

@keyframes lootboxAppear {
  from { transform: scale(0) rotate(-15deg); opacity: 0; }
  to { transform: scale(1) rotate(0); opacity: 1; }
}

.lootbox-box__icon {
  font-size: 80px;
  display: block;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 20px rgba(255, 214, 0, 0.6));
}

.lootbox-box__name {
  font-family: var(--font-main);
  font-size: 12px;
  color: var(--neon-gold);
  text-shadow: 0 0 12px var(--neon-gold);
}

.lootbox-box__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 0, 0.15) 0%, transparent 70%);
  pointer-events: none;
  animation: glowPulse 1.5s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

/* Shaking Phase */
.lootbox-shake {
  animation: lootboxShake 0.4s ease-in-out infinite !important;
}

@keyframes lootboxShake {
  0%, 100% { transform: translateX(0) rotate(0); }
  25% { transform: translateX(-6px) rotate(-3deg); }
  75% { transform: translateX(6px) rotate(3deg); }
}

/* Burst Phase */
.lootbox-burst .lootbox-box__icon {
  animation: lootboxBurst 0.5s ease forwards;
}

@keyframes lootboxBurst {
  0% { transform: scale(1); filter: drop-shadow(0 0 20px rgba(255, 214, 0, 0.6)); }
  50% { transform: scale(1.8); filter: drop-shadow(0 0 60px rgba(255, 214, 0, 1)) brightness(2); }
  100% { transform: scale(3); opacity: 0; filter: drop-shadow(0 0 100px rgba(255, 214, 0, 1)) brightness(3); }
}

/* Item Reveal */
.lootbox-reveal {
  text-align: center;
  animation: lootboxRevealIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 320px;
  width: 90%;
}

@keyframes lootboxRevealIn {
  from { transform: scale(0.3) translateY(30px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.lootbox-reveal__tier {
  font-family: var(--font-main);
  font-size: 10px;
  letter-spacing: 4px;
  margin-bottom: 12px;
  text-shadow: 0 0 12px currentColor;
  animation: tierPulse 1.5s ease-in-out infinite;
}

@keyframes tierPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.lootbox-reveal__icon {
  font-size: 70px;
  display: block;
  margin: 16px 0;
  animation: revealIconBounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes revealIconBounce {
  from { transform: scale(0) rotate(-180deg); }
  to { transform: scale(1) rotate(0); }
}

.lootbox-reveal__name {
  font-family: var(--font-main);
  font-size: 13px;
  margin-bottom: 8px;
  text-shadow: 0 0 12px currentColor;
}

.lootbox-reveal__desc {
  font-family: var(--font-main);
  font-size: 6.5px;
  color: #aaa;
  line-height: 1.8;
  margin-bottom: 12px;
  padding: 0 10px;
}

.lootbox-reveal__rarity {
  font-family: var(--font-main);
  font-size: 8px;
  letter-spacing: 2px;
  margin-bottom: 16px;
  text-shadow: 0 0 10px currentColor;
}

.lootbox-reveal__refund {
  font-family: var(--font-main);
  font-size: 14px;
  margin: 12px 0 16px;
  text-shadow: 0 0 10px var(--neon-gold);
}

.lootbox-reveal__close {
  font-family: var(--font-main) !important;
  font-size: 9px !important;
  padding: 10px 28px !important;
  cursor: pointer;
  animation: closeBtnAppear 0.4s ease 0.5s both;
}

@keyframes closeBtnAppear {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ─── Stuck reel animation ─── */
@keyframes stuckBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ─────────────────────────────────────────────────────
   GARAGE — LOOT BOX COLLECTION
───────────────────────────────────────────────────── */
.garage-loot-section {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border, #333);
}

.garage-loot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 6px;
  padding: 8px 4px;
}

.garage-loot-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 4px;
  border: 1px solid var(--loot-color, #333);
  border-radius: 6px;
  background: rgba(0,0,0,0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.garage-loot-item--owned {
  cursor: pointer;
  box-shadow: 0 0 8px var(--loot-color, #333)20;
}

.garage-loot-item--owned:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px var(--loot-color, #333)40;
}

.garage-loot-item--locked {
  opacity: 0.35;
  border-style: dashed;
}

.garage-loot-icon {
  font-size: 22px;
  line-height: 1;
  margin-bottom: 3px;
}

.garage-loot-name {
  font-size: 6px;
  text-align: center;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.loot-inspect-btn {
  margin-top: 4px;
  font-size: 6px;
  padding: 2px 6px;
  border: 1px solid var(--loot-color, #00e5ff);
  color: var(--loot-color, #00e5ff);
  background: transparent;
  border-radius: 3px;
  cursor: pointer;
  text-transform: uppercase;
  font-family: inherit;
}

.loot-inspect-btn:hover {
  background: var(--loot-color, #00e5ff);
  color: #000;
}

/* ─── Loot Detail Overlay ─── */
.loot-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: lootDetailFadeIn 0.3s ease;
}

.loot-detail-overlay.loot-detail-closing {
  animation: lootDetailFadeOut 0.3s ease forwards;
}

.loot-detail-card {
  background: linear-gradient(135deg, #1a1a2e 0%, #0d0d1a 100%);
  border: 2px solid;
  border-radius: 12px;
  padding: 24px 20px;
  max-width: 280px;
  width: 90%;
  text-align: center;
  animation: lootCardPop 0.4s ease;
}

.loot-detail-icon {
  font-size: 60px;
  margin-bottom: 10px;
  animation: lootIconBounce 0.6s ease;
}

.loot-detail-name {
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.loot-detail-tier {
  font-size: 8px;
  letter-spacing: 2px;
  margin-bottom: 10px;
  opacity: 0.8;
}

.loot-detail-desc {
  font-size: 9px;
  color: var(--text-dim, #aaa);
  line-height: 1.5;
  margin-bottom: 12px;
}

.loot-detail-stats {
  text-align: left;
  margin-bottom: 14px;
}

.loot-stat {
  font-size: 8px;
  color: var(--neon-cyan, #00e5ff);
  padding: 3px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.loot-detail-close {
  font-size: 8px;
}

@keyframes lootDetailFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes lootDetailFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes lootCardPop {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes lootIconBounce {
  0% { transform: scale(0.5) rotate(-10deg); }
  60% { transform: scale(1.15) rotate(5deg); }
  100% { transform: scale(1) rotate(0); }
}

/* ═══════════════════════════════════════════════════════
   CHARACTER HUD WIDGET — Mini Profile (Top-Right)
   ═══════════════════════════════════════════════════════ */

.char-hud {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 90;
  display: none;
  cursor: pointer;
  background: rgba(10, 0, 20, 0.85);
  border: 1px solid var(--neon-cyan, #00e5ff);
  border-radius: 8px;
  padding: 4px 8px;
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: #ccc;
  gap: 4px;
  align-items: center;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.2);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.char-hud.visible {
  display: flex;
}

.char-hud:hover {
  border-color: var(--neon-gold, #ffd600);
  box-shadow: 0 0 12px rgba(255, 214, 0, 0.3);
}

.char-hud__avatar {
  font-size: 16px;
  line-height: 1;
}

.char-hud__info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.char-hud__name {
  color: var(--neon-cyan, #00e5ff);
  font-size: 6px;
  letter-spacing: 1px;
}

.char-hud__mood {
  font-size: 5px;
  opacity: 0.8;
}

.char-hud__stress-pip {
  width: 28px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 1px;
}

.char-hud__stress-fill {
  height: 100%;
  transition: width 0.4s, background 0.4s;
  border-radius: 2px;
}

/* ─── Character Popup ─── */

.char-popup {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  font-family: 'Press Start 2P', monospace;
}

.char-popup.active {
  display: flex;
}

.char-popup__card {
  background: linear-gradient(135deg, #0d001a, #1a0033);
  border: 2px solid var(--neon-cyan, #00e5ff);
  border-radius: 12px;
  padding: 16px;
  width: 90%;
  max-width: 360px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.2);
}

.char-popup__header {
  text-align: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.char-popup__avatar {
  font-size: 48px;
  line-height: 1;
}

.char-popup__name {
  font-size: 12px;
  margin-top: 4px;
  letter-spacing: 2px;
}

.char-popup__tagline {
  font-size: 6px;
  color: #999;
  margin-top: 4px;
}

.char-popup__section {
  margin-bottom: 10px;
}

.char-popup__section-title {
  font-size: 7px;
  color: var(--neon-gold, #ffd600);
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.char-popup__stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 6px;
  color: #aaa;
  padding: 3px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.char-popup__stat-val {
  font-size: 7px;
  color: #fff;
}

.char-popup__bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 3px;
}

.char-popup__bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s;
}

.char-popup__thought {
  background: rgba(255, 255, 255, 0.04);
  border-left: 2px solid var(--neon-cyan, #00e5ff);
  padding: 8px;
  margin-top: 8px;
  border-radius: 0 6px 6px 0;
}

.char-popup__thought-label {
  font-size: 6px;
  color: var(--neon-cyan, #00e5ff);
  margin-bottom: 4px;
}

.char-popup__thought-text {
  font-size: 6px;
  color: #ddd;
  line-height: 1.6;
  font-style: italic;
}

.char-popup__wishes {
  margin-top: 8px;
}

.char-popup__wish {
  font-size: 6px;
  color: #bbb;
  padding: 3px 0;
}

.char-popup__wish-icon {
  margin-right: 4px;
}

.char-popup__close {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 8px;
  background: rgba(255, 23, 68, 0.2);
  border: 1px solid var(--neon-red, #ff1744);
  color: var(--neon-red, #ff1744);
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  cursor: pointer;
  border-radius: 6px;
  text-align: center;
}

/* Ability section in popup */
.char-popup__ability {
  background: rgba(255, 214, 0, 0.06);
  border: 1px solid rgba(255, 214, 0, 0.2);
  border-radius: 6px;
  padding: 8px;
  margin-top: 6px;
}

.char-popup__ability-name {
  font-size: 8px;
  color: var(--neon-gold, #ffd600);
  margin-bottom: 3px;
}

.char-popup__ability-desc {
  font-size: 6px;
  color: #bbb;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════
   SPEECH BUBBLE — Character Comments
   ═══════════════════════════════════════════════════════ */

.char-bubble {
  position: absolute;
  top: 32px;
  right: 6px;
  z-index: 91;
  max-width: 200px;
  background: rgba(10, 0, 20, 0.92);
  border: 1px solid var(--bubble-color, #00e5ff);
  border-radius: 8px 8px 8px 0;
  padding: 6px 8px;
  font-family: 'Press Start 2P', monospace;
  font-size: 5px;
  color: #ddd;
  line-height: 1.6;
  opacity: 0;
  transform: translateY(-5px) scale(0.95);
  transition: opacity 0.4s, transform 0.4s;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.char-bubble::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 12px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 6px solid var(--bubble-color, #00e5ff);
}

.char-bubble.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.char-bubble__text {
  display: block;
}

/* ═══════════════════════════════════════════════════════
   RPG CONFIG SECTIONS — Color-coded labels
   ═══════════════════════════════════════════════════════ */

.rpg-section-label {
  display: inline-block;
  font-size: 7px;
  padding: 2px 6px;
  border-radius: 3px;
  margin-bottom: 6px;
  font-family: 'Press Start 2P', monospace;
  letter-spacing: 1px;
}

.rpg-section-label--items {
  background: rgba(118, 255, 3, 0.15);
  color: #76ff03;
  border: 1px solid rgba(118, 255, 3, 0.3);
}

.rpg-section-label--vehicles {
  background: rgba(0, 229, 255, 0.15);
  color: #00e5ff;
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.rpg-section-label--properties {
  background: rgba(255, 214, 0, 0.15);
  color: #ffd600;
  border: 1px solid rgba(255, 214, 0, 0.3);
}

.rpg-section-label--skills {
  background: rgba(224, 64, 251, 0.15);
  color: #e040fb;
  border: 1px solid rgba(224, 64, 251, 0.3);
}

/* ═══════════════════════════════════════════════════════
   SHOP TABS & RPG SHOP
   ═══════════════════════════════════════════════════════ */

.shop-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid rgba(255,255,255,0.1);
  margin-bottom: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.shop-tabs::-webkit-scrollbar { display: none; }

.shop-tab {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  padding: 8px 10px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  margin-bottom: -2px;
}
.shop-tab:hover {
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.03);
}
.shop-tab.active {
  color: var(--neon-cyan, #00e5ff);
  border-bottom-color: var(--neon-cyan, #00e5ff);
}

/* RPG shop info header */
.rpg-shop-info {
  font-size: 8px;
  color: rgba(255,255,255,0.6);
  padding: 8px 12px;
  background: rgba(255,255,255,0.03);
  border-left: 3px solid var(--neon-cyan, #00e5ff);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rpg-shop-summary {
  font-size: 8px;
  padding: 6px 12px;
  margin-bottom: 10px;
  background: rgba(118,255,3,0.05);
  border: 1px solid rgba(118,255,3,0.2);
}

/* Owned card highlight */
.shop-card--owned {
  border-color: rgba(118,255,3,0.3) !important;
  background: rgba(118,255,3,0.03) !important;
}

/* RPG item rarity tag */
.shop-card__rarity {
  font-size: 6px;
  letter-spacing: 1px;
  opacity: 0.8;
  margin: 2px 0;
}

/* Actions row (buy + use) */
.shop-card__actions {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 4px;
}
