/* marketplace.css — Marketplace, custom bundle, Caps store, themed purchase modal */

/* Marketplace Layout */
.market-layout {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.market-feature-card {
  width: 300px;
  flex-shrink: 0;
  background: var(--card-bg);
  border: 1px solid #ff5db055;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 0 20px -8px var(--neon-pink);
}
.feature-header {
  background: linear-gradient(120deg, var(--neon-purple), var(--neon-pink));
  color: #ffffff;
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  padding: 12px;
}
.feature-body {
  padding: 16px 18px 20px;
}
.feature-body h4 {
  font-size: 1.5rem;
  margin-bottom: 6px;
}
.feature-body p {
  font-size: 1.4rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-bottom: 10px;
}
.feature-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 14px 0;
}
.feature-bullets li {
  font-size: 1.35rem;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
  margin-bottom: 10px;
}
.feature-bullets li::before {
  content: "-";
  position: absolute;
  left: 0;
  color: var(--neon-green);
}
.feature-price {
  text-align: center;
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--neon-green);
}
.feature-price small {
  display: block;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-muted);
}

.market-pricing { flex: 1; min-width: 280px; }

/* Custom Bundle */
.custom-bundle-card {
  margin-top: 24px;
  max-width: 420px;
  background: var(--card-bg);
  border: 1px solid #0088ff55;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 0 20px -8px var(--neon-blue);
}
.custom-toggle {
  display: flex;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 14px;
}
.custom-toggle-btn {
  flex: 1;
  padding: 8px;
  font-size: 1.3rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
}
.custom-toggle-btn.active {
  background: var(--neon-blue);
  color: #ffffff;
  font-weight: bold;
}
.custom-preview {
  margin: 14px 0;
  font-size: 1.5rem;
  color: var(--text-main);
  min-height: 28px;
}
.custom-preview .rate-note {
  display: block;
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.custom-buy-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Caps Store (spend Caps on cosmetics, not real money) */
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.store-item-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.store-item-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 18px -6px var(--item-color, var(--neon-purple));
}
.store-item-art {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--item-color, var(--neon-purple)) 0%, #0a0b10 140%);
}
.store-item-art i {
  font-size: 2.6rem;
  color: #ffffff;
}
.store-item-body {
  padding: 14px 16px;
  text-align: center;
}
.store-item-body h3 {
  font-size: 1.6rem;
  margin-bottom: 10px;
}
.store-item-buy {
  width: 100%;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  color: var(--neon-orange);
  font-weight: 700;
  font-size: 1.35rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.store-item-buy:hover { border-color: var(--neon-orange); }

/* Already-owned state (see js/store.js refreshStoreOwnedState) — dims the
   whole card and relabels its buy button to "Owned" instead of a price. */
.store-item-card.owned { opacity: 0.55; }
.store-item-card.owned:hover { transform: none; box-shadow: none; }
.store-item-buy:disabled {
  color: var(--text-muted);
  cursor: default;
}
.store-item-buy:disabled:hover { border-color: var(--border-color); }

/* Big Back Theme card: warm food-gradient art + floating emoji */
.theme-item-card {
  cursor: pointer;
  grid-column: span 2;
}
.theme-item-art {
  position: relative;
  height: 120px;
  background: linear-gradient(120deg, #ff9d3d 0%, #ff3b5c 100%);
  overflow: hidden;
}
.theme-emoji {
  position: absolute;
  font-size: 2.6rem;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.35));
  animation: theme-bob 3.5s ease-in-out infinite;
}
.theme-emoji.e1 { top: 18%; left: 10%; animation-delay: 0s; }
.theme-emoji.e2 { top: 55%; left: 30%; animation-delay: -1s; font-size: 2.2rem; }
.theme-emoji.e3 { top: 15%; left: 55%; animation-delay: -2s; font-size: 3rem; }
.theme-emoji.e4 { top: 50%; left: 78%; animation-delay: -0.5s; font-size: 2.3rem; }
@keyframes theme-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.theme-item-tagline {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.theme-buy-btn {
  background: linear-gradient(120deg, #ff9d3d, #ff3b5c);
  border: none;
  color: #ffffff;
}
.theme-buy-btn:hover { filter: brightness(1.1); }

/* Themed purchase-confirmation modal (used for the Big Back Theme) */
.theme-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
}
.theme-modal-overlay.open { display: flex; }
.theme-modal-box {
  width: 380px;
  max-width: 90vw;
  background: var(--card-bg);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  text-align: center;
}
.theme-modal-header {
  background: linear-gradient(120deg, #ff9d3d 0%, #ff3b5c 100%);
  padding: 22px 16px;
  font-size: 2.2rem;
  color: #ffffff;
  position: relative;
  overflow: hidden;
}
.theme-modal-header .theme-emoji {
  position: absolute;
  font-size: 2.2rem;
  opacity: 0.85;
}
.theme-modal-body {
  padding: 18px 20px 22px;
  text-align: left;
}
.theme-modal-body p {
  font-size: 1.4rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-align: center;
}
.theme-perk-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
  font-size: 1.3rem;
}
.theme-perk-list li {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border-color);
  color: var(--text-main);
}
.theme-perk-list li span:last-child { color: var(--neon-orange); font-weight: 600; }
.theme-modal-close {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(120deg, #ff9d3d, #ff3b5c);
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 700;
  cursor: pointer;
}

.market-pricing h2 {
  font-size: 2.2rem;
  margin-bottom: 16px;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.price-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.price-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 16px -4px var(--price-color, var(--neon-orange));
}
.price-header {
  background: var(--price-color, #06070b);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.5rem;
  text-align: center;
  padding: 10px;
}
.price-body {
  text-align: center;
  padding: 14px;
  font-size: 1.6rem;
  color: var(--text-main);
}


/* ---- Store cosmetics showing up around the app ---- */
.flair-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 1.05rem; padding: 0 7px; border-radius: 8px; margin-left: 5px; vertical-align: middle; line-height: 1.5; }
.flair-vip { background: linear-gradient(120deg, #f59e0b, #fbbf24); color: #3a2400; }
.flair-title { background: rgba(255, 59, 92, 0.18); color: var(--neon-red); border: 1px solid var(--neon-red); }
.flair-bb { background: rgba(255, 157, 61, 0.2); }
.neon-ring { box-shadow: 0 0 0 2px var(--neon), 0 0 10px var(--neon), 0 0 20px var(--neon); }

/* My Cosmetics window */
.cust-preview { text-align: center; font-size: 2rem; padding: 10px; margin-bottom: 10px; background: var(--bg-color); border-radius: 12px; }
.cust-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 2px; font-size: 1.5rem; border-bottom: 1px solid var(--border-color); }
.cust-row input[type=color] { width: 40px; height: 28px; border: none; background: none; cursor: pointer; }
.cust-swatches { display: flex; align-items: center; gap: 6px; }
.cust-swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; background: var(--c); box-shadow: 0 0 8px var(--c); cursor: pointer; }
.cust-swatch.on { border-color: #fff; }
.cust-empty { color: var(--text-muted); font-size: 1.4rem; text-align: center; padding: 10px; }

/* Big Back chat stickers */
.sticker-wrap { position: relative; display: flex; }
.sticker-btn { width: auto; padding: 0 14px; }
.sticker-tray { display: none; position: absolute; bottom: 110%; right: 0; flex-direction: column; gap: 6px; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; padding: 8px; z-index: 20; min-width: 190px; }
.sticker-tray.open { display: flex; }
.sticker-tray button { background: var(--bg-color); color: var(--text-main); border: 1px solid var(--border-color); border-radius: 8px; padding: 6px 10px; font-size: 1.4rem; cursor: pointer; text-align: left; }
.sticker-tray button:hover { border-color: var(--neon-orange); }
.stk { display: inline-flex; align-items: center; gap: 6px; font-size: 1.5rem; }
.stk b { font-weight: 700; }
.stk-only .stk { font-size: 2.6rem; }
.stk-slurper b { color: var(--neon-green); letter-spacing: 1px; }
.stk-shake { animation: stk-shake 0.5s ease-in-out infinite; }
.stk-pizza b { color: var(--neon-orange); }
.stk-pizza { animation: stk-bounce 1.1s ease-in-out infinite; }
@keyframes stk-shake { 0%,100% { transform: translateX(0) rotate(0); } 25% { transform: translateX(-3px) rotate(-6deg); } 75% { transform: translateX(3px) rotate(6deg); } }
@keyframes stk-bounce { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }

/* Big Back theme: warm diner colours (dark mode) */
html[data-app-theme="big_back_theme"]:not([data-theme="light"]) {
  --bg-color: #130b08; --bg-edge: #130b08; --bg-glow: #2a1710;
  --card-bg: #201410; --border-color: #43291d;
  --neon-blue: #ff7a2f; --neon-purple: #ff5d73;
}
html[data-app-theme="big_back_theme"][data-theme="light"] {
  --bg-color: #fff4e8; --bg-edge: #ffe6cc; --bg-glow: #fffaf3; --neon-blue: #e8590c; --neon-purple: #d6336c;
}


/* Sidebar labels are always centered, even when they wrap onto two lines (e.g. "Table Mates") */
#sidebar .nav-btn { text-align: center; padding: 0 3px; }
#sidebar .nav-btn span { text-align: center; line-height: 1.05; max-width: 100%; }

/* Big Back: the pictures change too, not just the words */
html[data-app-theme="big_back_theme"] .coin-icon,
html[data-app-theme="big_back_theme"] .coin-icon-sm {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='18' fill='%23f2b04a' stroke='%23a8641a' stroke-width='2'/%3E%3Cpath d='M10 8V32M20 3V37M30 8V32M8 12H32M5 20H35M8 28H32' stroke='%23b36b1c' stroke-width='2' fill='none'/%3E%3Crect x='15.5' y='15.5' width='9' height='9' rx='1.5' fill='%23fff2a8' stroke='%23e0c25a' stroke-width='1'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 0 4px rgba(255, 157, 61, 0.6));
}
html[data-app-theme="big_back_theme"] .coin-icon > *,
html[data-app-theme="big_back_theme"] .coin-icon-sm > * { display: none; }
html[data-app-theme="big_back_theme"] #btn-hubs i::before { content: "\f2e7"; }      /* utensils */
html[data-app-theme="big_back_theme"] #btn-polls i::before { content: "\f200"; }     /* pie chart */
html[data-app-theme="big_back_theme"] #btn-quests i::before { content: "\f562"; }    /* concierge bell */
/* Table Mates: the same two-people icon, with a small white apron on the front person */
html[data-app-theme="big_back_theme"] #btn-friends i { position: relative; display: inline-block; }
html[data-app-theme="big_back_theme"] #btn-friends i::after {
  content: ""; position: absolute; left: 13%; bottom: 0; width: 34%; height: 46%;
  background: #fff;
  clip-path: polygon(22% 0, 78% 0, 100% 100%, 0 100%);
  border-radius: 0 0 2px 2px;
}
