@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Fredoka', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #0d1117;
  color: #e6edf3;
  min-height: 100vh;
}

.screen { display: none; }
.screen.active { display: block; }

/* ===== AUTH ===== */
.auth-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  background: radial-gradient(ellipse at 50% 30%, #1a1500 0%, #0d1117 70%);
}

.logo {
  font-size: 3.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #f5c542, #ff9f1c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  margin-bottom: 0.25rem;
}

.tagline {
  color: #7d8590;
  margin-bottom: 2.5rem;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 320px;
}

.auth-form input {
  padding: 0.85rem 1rem;
  border: 2px solid #30363d;
  border-radius: 12px;
  background: #161b22;
  color: #e6edf3;
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form input:focus {
  border-color: #f5c542;
  box-shadow: 0 0 0 3px rgba(245, 197, 66, 0.15);
}

.auth-form button, button {
  padding: 0.8rem 1rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #f5c542, #ff9f1c);
  color: #0d1117;
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s;
}

.auth-form button:hover, button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(245, 197, 66, 0.3);
}

.auth-form button:active, button:active {
  transform: translateY(0);
}

.switch-text {
  text-align: center;
  color: #7d8590;
  font-size: 0.9rem;
}

.switch-text a {
  color: #f5c542;
  text-decoration: none;
  font-weight: 600;
}

.error {
  color: #f85149;
  text-align: center;
  margin-top: 0.5rem;
  min-height: 1.25rem;
  font-weight: 500;
}

/* ===== DASHBOARD ===== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  background: #161b22;
  border-bottom: 2px solid #21262d;
}

.logo-small {
  font-size: 1.3rem;
  font-weight: 700;
  background: linear-gradient(135deg, #f5c542, #ff9f1c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.banana-count {
  background: linear-gradient(135deg, #f5c542, #ff9f1c);
  color: #0d1117;
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
}

.btn-small {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  background: #30363d;
  color: #e6edf3;
  border-radius: 8px;
  font-weight: 500;
}

.btn-small:hover {
  background: #484f58;
  box-shadow: none;
  transform: none;
}

main {
  padding: 1rem 1.25rem;
  max-width: 900px;
  margin: 0 auto;
}

.bonus-banner {
  background: linear-gradient(135deg, #1a3a1a, #0d2a0d);
  border: 1px solid #238636;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  text-align: center;
  font-weight: 600;
  animation: bannerSlide 0.4s ease-out;
}

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

/* ===== TABS ===== */
.tab-bar {
  display: flex;
  gap: 0;
  background: #161b22;
  border-bottom: 1px solid #21262d;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab {
  flex: 0 0 auto;
  padding: 0.7rem 1rem;
  background: transparent;
  color: #7d8590;
  border: none;
  border-bottom: 3px solid transparent;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 0.2s;
  border-radius: 0;
  box-shadow: none;
}

.tab:hover {
  color: #e6edf3;
  transform: none;
  box-shadow: none;
}

.tab.active {
  color: #f5c542;
  border-bottom-color: #f5c542;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===== PACKS ===== */
.packs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.pack-card {
  background: #161b22;
  border: 2px solid #30363d;
  border-radius: 16px;
  padding: 1.5rem 1rem;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.pack-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.pack-card.standard {
  border-top: 4px solid #7d8590;
}
.pack-card.standard:hover { border-color: #7d8590; }

.pack-card.premium {
  border-top: 4px solid #a855f7;
}
.pack-card.premium:hover { border-color: #a855f7; box-shadow: 0 8px 25px rgba(168,85,247,0.2); }

.pack-card.ultra {
  border-top: 4px solid #f5c542;
}
.pack-card.ultra:hover { border-color: #f5c542; box-shadow: 0 8px 25px rgba(245,197,66,0.2); }

.pack-icon { font-size: 3.5rem; margin-bottom: 0.75rem; }
.pack-name { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.25rem; }
.pack-cost { color: #f5c542; font-weight: 700; font-size: 1.25rem; }
.pack-max { color: #7d8590; font-size: 0.8rem; margin-top: 0.5rem; }

.pack-card.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.pack-card.disabled:hover {
  transform: none;
  box-shadow: none;
  border-color: #30363d;
}

.pack-card { padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.pack-card-main { cursor: inherit; padding: 0.5rem 0.5rem 0; }
.pack-odds-btn {
  background: #0d1117;
  border: 1px solid #30363d;
  color: #c9d1d9;
  padding: 0.5rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.pack-odds-btn:hover { background: #161b22; border-color: #f5c542; color: #f5c542; }

/* ===== DROP RATES MODAL ===== */
.odds-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; padding: 1rem;
}
.odds-modal {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 14px;
  width: 100%; max-width: 480px;
  max-height: 85vh;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.odds-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #30363d;
}
.odds-header h3 { margin: 0; font-size: 1rem; color: #f5c542; }
.odds-close {
  background: transparent; border: none; color: #7d8590;
  font-size: 1.25rem; cursor: pointer; padding: 0 0.25rem;
}
.odds-close:hover { color: #c9d1d9; }
.odds-body {
  overflow-y: auto; padding: 0.75rem 1rem 1.25rem;
}
.odds-tier { margin-bottom: 1.25rem; }
.odds-tier-header {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 0.5rem 0.25rem;
  border-bottom: 2px solid #30363d;
  margin-bottom: 0.5rem;
}
.odds-tier-name { font-size: 1rem; font-weight: 800; letter-spacing: 0.02em; }
.odds-tier-meta { font-size: 0.72rem; color: #7d8590; font-weight: 600; }
.odds-tier-header.rarity-common    .odds-tier-name { color: #c9d1d9; }
.odds-tier-header.rarity-rare      .odds-tier-name { color: #58a6ff; }
.odds-tier-header.rarity-epic      .odds-tier-name { color: #a855f7; }
.odds-tier-header.rarity-legendary .odds-tier-name { color: #f5c542; }
.odds-tier-header.rarity-chroma_shiny   .odds-tier-name { color: #22d3ee; }
.odds-tier-header.rarity-chroma_rainbow .odds-tier-name { color: #ec4899; }
.odds-tier-header.rarity-mystical       .odds-tier-name { color: #f472b6; }
.odds-tier-header.rarity-astronomical   .odds-tier-name { color: #818cf8; }
.odds-tier-header.rarity-bananarang     .odds-tier-name { color: #facc15; }
.odds-cards { display: flex; flex-direction: column; gap: 0.3rem; }
.odds-card-row {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.35rem 0.5rem;
  background: #161b22;
  border-radius: 8px;
}
.odds-card-img {
  width: 32px; height: 32px;
  border-radius: 6px;
  object-fit: cover;
  background: #0d1117;
  flex-shrink: 0;
}
.odds-card-placeholder {
  display: flex; align-items: center; justify-content: center;
  color: #30363d; font-size: 0.9rem;
}
.odds-card-name { flex: 1; font-size: 0.85rem; font-weight: 600; }
.odds-card-pct { font-size: 0.8rem; color: #f5c542; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ===== BULK PACKS ===== */
.bulk-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #30363d;
}

.bulk-header {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.bulk-subtitle {
  font-size: 0.8rem;
  font-weight: 400;
  color: #7d8590;
  margin-left: 0.5rem;
}

.bulk-packs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

.bulk-card {
  background: #161b22;
  border: 2px solid #30363d;
  border-top: 4px solid #f5c542;
  border-radius: 16px;
  padding: 1.25rem 0.75rem;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  position: relative;
  overflow: visible;
}

.bulk-card:hover {
  transform: translateY(-4px);
  border-color: #f5c542;
  box-shadow: 0 8px 25px rgba(245,197,66,0.2);
}

.bulk-card.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.bulk-card.disabled:hover {
  transform: none;
  box-shadow: none;
  border-color: #30363d;
}

.bulk-card-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.bulk-card-name { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.15rem; }
.bulk-card-cards { color: #7d8590; font-size: 0.75rem; margin-bottom: 0.25rem; }
.bulk-card-cost { color: #f5c542; font-weight: 700; font-size: 1.1rem; }
.bulk-card-discount { color: #3fb950; font-size: 0.7rem; margin-top: 0.15rem; }

/* The Banana Pack — special styling */
.bulk-card.banana-pack {
  border-color: #f5c542;
  background: linear-gradient(135deg, #161b22 0%, #2a1f00 100%);
  box-shadow: 0 0 15px rgba(245,197,66,0.15);
}

.bulk-card.banana-pack:hover {
  box-shadow: 0 8px 30px rgba(245,197,66,0.35);
}

.bulk-card.banana-pack .bulk-card-name {
  color: #f5c542;
  font-size: 1.05rem;
}

/* Bulk reveal overlay */
.bulk-reveal-container {
  max-width: 90vw;
  max-height: 95vh;
  overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom, 1rem);
}

.bulk-reveal-counter {
  color: #7d8590;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

/* Bulk summary */
.bulk-summary {
  max-height: 80vh;
  overflow-y: auto;
  padding: 1rem;
  padding-bottom: 4.5rem;
  text-align: center;
  position: relative;
}

/* Sticky close button at bottom of bulk summary */
.bulk-summary > .reveal-close {
  position: sticky;
  bottom: 0;
  margin-top: 1rem;
  z-index: 5;
  background: #238636;
  box-shadow: 0 -8px 16px rgba(0, 0, 0, 0.6);
}

.bulk-summary-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.bulk-summary-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.bulk-stat {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.bulk-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1rem;
  max-height: 50vh;
  overflow-y: auto;
}

.bulk-pull-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 10px;
  padding: 0.5rem;
  text-align: center;
  font-size: 0.7rem;
}

.bulk-pull-card img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 6px;
  margin-bottom: 0.25rem;
}

.bulk-pull-card .pull-emoji {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.bulk-pull-card .pull-name {
  font-weight: 600;
  margin-bottom: 0.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bulk-pull-card .pull-rarity {
  font-size: 0.65rem;
  color: #7d8590;
}

/* ===== INVENTORY ===== */
.inventory-stats {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.stat-box {
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  text-align: center;
}

.stat-number { font-size: 1.5rem; font-weight: 700; color: #f5c542; }
.stat-label { font-size: 0.7rem; color: #7d8590; text-transform: uppercase; letter-spacing: 1px; }

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.6rem;
}

.inv-card {
  background: #161b22;
  border: 2px solid #30363d;
  border-radius: 12px;
  padding: 0.85rem;
  text-align: center;
  position: relative;
  transition: transform 0.15s, box-shadow 0.15s;
}

.inv-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.inv-card .inv-emoji { font-size: 2.25rem; margin-bottom: 0.25rem; }
.inv-card .inv-name { font-size: 0.8rem; font-weight: 600; margin-bottom: 0.2rem; line-height: 1.2; }
.inv-card .inv-rarity { font-size: 0.65rem; text-transform: uppercase; font-weight: 700; letter-spacing: 0.5px; }
.inv-card .inv-count {
  position: absolute;
  top: 6px;
  right: 8px;
  background: #30363d;
  border-radius: 10px;
  padding: 0 6px;
  font-size: 0.7rem;
  font-weight: 700;
}

.inv-card .inv-potassium {
  position: absolute;
  top: 6px;
  left: 6px;
  background: linear-gradient(135deg, #2d5a1e, #1a3a12);
  border: 1px solid #3fb950;
  border-radius: 8px;
  padding: 1px 5px;
  font-size: 0.6rem;
  font-weight: 700;
  color: #7ee787;
  white-space: nowrap;
}

.inv-share-btn {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: #21262d;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 0.75rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}
.inv-card:hover .inv-share-btn { opacity: 1; }
.inv-share-btn:hover { background: #30363d; border-color: #f5c542; }

.reveal-potassium {
  margin-top: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: #7ee787;
  letter-spacing: 1px;
}

/* Rarity colors */
.rarity-common { color: #8b949e; }
.inv-card.rarity-common { border-color: #484f58; }

.rarity-rare { color: #58a6ff; }
.inv-card.rarity-rare { border-color: #1f6feb; }

.rarity-epic { color: #bc8cff; }
.inv-card.rarity-epic { border-color: #8957e5; }

.rarity-legendary { color: #f5c542; }
.inv-card.rarity-legendary { border-color: #d29922; box-shadow: 0 0 8px rgba(245,197,66,0.15); }

.rarity-chroma_shiny { color: #3fb950; }
.inv-card.rarity-chroma_shiny { border-color: #238636; box-shadow: 0 0 10px rgba(63,185,80,0.15); }

.rarity-chroma_rainbow .inv-rarity { color: #f5c542; }
.inv-card.rarity-chroma_rainbow {
  border-image: linear-gradient(135deg, #f85149, #f5c542, #3fb950, #58a6ff, #bc8cff) 1;
  box-shadow: 0 0 12px rgba(245,197,66,0.15);
}

.rarity-mystical { color: #f85149; }
.inv-card.rarity-mystical { border-color: #da3633; box-shadow: 0 0 12px rgba(248,81,73,0.2); }

.rarity-bananarang { color: #fef08a; }
.inv-card.rarity-bananarang {
  border-color: #f5c542;
  box-shadow: 0 0 16px rgba(245,197,66,0.3);
  animation: bananarangPulse 2s ease-in-out infinite alternate;
}
@keyframes bananarangPulse {
  from { box-shadow: 0 0 12px rgba(245,197,66,0.2); }
  to { box-shadow: 0 0 24px rgba(245,197,66,0.5); }
}

.rarity-astronomical { color: #fff; }
.inv-card.rarity-astronomical {
  border-color: #e6edf3;
  background: linear-gradient(135deg, #161b22, #1c1230);
  box-shadow: 0 0 20px rgba(255,255,255,0.15);
}

/* ===== PACK OPENING ===== */
.pack-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Persistent X close button for overlays (always visible, especially mobile) */
.overlay-close-x {
  position: fixed;
  top: max(12px, env(safe-area-inset-top, 12px));
  right: 12px;
  z-index: 110;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 1.4rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s;
}

.overlay-close-x:hover,
.overlay-close-x:active {
  background: rgba(255, 255, 255, 0.3);
}

.pack-reveal {
  text-align: center;
  width: 100%;
  max-width: 360px;
  padding: 2rem 2rem 3rem;
  max-height: 95vh;
  overflow-y: auto;
}

.pack-opening-text {
  font-size: 1.5rem;
  font-weight: 700;
  animation: pulse 0.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.reveal-card {
  background: #161b22;
  border: 3px solid #30363d;
  border-radius: 20px;
  padding: 2.5rem 2rem;
  animation: revealPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes revealPop {
  0% { transform: scale(0.3) rotateY(180deg); opacity: 0; }
  100% { transform: scale(1) rotateY(0deg); opacity: 1; }
}

.reveal-emoji { font-size: 4rem; margin: 0.5rem 0; }
.reveal-img { width: 200px; height: 200px; object-fit: cover; border-radius: 8px; margin: 0.5rem 0; }
.inv-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; margin-bottom: 0.25rem; }
.reveal-rarity {
  text-transform: uppercase;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 3px;
  margin-bottom: 0.25rem;
}
.reveal-name {
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 0.25rem;
}

.reveal-close {
  margin-top: 1.5rem;
  padding: 0.75rem 2rem;
}

.reveal-card.glow-common { border-color: #484f58; }
.reveal-card.glow-rare { border-color: #1f6feb; box-shadow: 0 0 40px rgba(31,111,235,0.4); }
.reveal-card.glow-epic { border-color: #8957e5; box-shadow: 0 0 40px rgba(137,87,229,0.4); }
.reveal-card.glow-legendary { border-color: #d29922; box-shadow: 0 0 50px rgba(245,197,66,0.5); }
.reveal-card.glow-chroma_shiny { border-color: #238636; box-shadow: 0 0 50px rgba(63,185,80,0.5); }
.reveal-card.glow-chroma_rainbow {
  border-image: linear-gradient(135deg, #f85149, #f5c542, #3fb950, #58a6ff, #bc8cff) 1;
  box-shadow: 0 0 60px rgba(245,197,66,0.4);
}
.reveal-card.glow-mystical { border-color: #da3633; box-shadow: 0 0 60px rgba(218,54,51,0.5); }
.reveal-card.glow-bananarang {
  border-color: #f5c542;
  box-shadow: 0 0 80px rgba(245,197,66,0.6);
  animation: revealPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), bananaGlow 1s ease-in-out infinite alternate;
}
@keyframes bananaGlow {
  from { box-shadow: 0 0 50px rgba(245,197,66,0.4); }
  to { box-shadow: 0 0 100px rgba(245,197,66,0.8); }
}
.reveal-card.glow-astronomical {
  border-color: #fff;
  box-shadow: 0 0 100px rgba(255,255,255,0.5);
}

/* Swipe */
.swipe-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  touch-action: none;
  user-select: none;
}

.swipe-card {
  width: 200px;
  height: 280px;
  background: linear-gradient(135deg, #161b22, #1c1500);
  border: 3px solid #f5c542;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  position: relative;
  transition: transform 0.15s ease-out, opacity 0.15s ease-out;
  cursor: grab;
  box-shadow: 0 0 30px rgba(245,197,66,0.2);
}

.swipe-card.swiping { transition: none; }
.swipe-card.swiped {
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
  transform: translateY(-120vh) rotate(5deg);
  opacity: 0;
}

.swipe-card-front { font-size: 5rem; }
.swipe-card-back { display: none; }

.swipe-hint {
  color: #7d8590;
  font-size: 0.9rem;
  font-weight: 500;
  animation: hintBounce 1.5s ease-in-out infinite;
}

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

/* ===== CRAFTING ===== */
.craft-recipes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.craft-card {
  background: #161b22;
  border: 2px solid #21262d;
  border-radius: 14px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.craft-arrow { text-align: center; font-size: 1.5rem; color: #f5c542; }

.craft-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.craft-from, .craft-to { font-weight: 600; text-transform: capitalize; }
.craft-count { color: #7d8590; font-size: 0.85rem; }

.craft-btn {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border-radius: 10px;
}

.craft-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.craft-result {
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #161b22 0%, #1c2333 100%);
  border: 2px solid #f5c542;
  border-radius: 14px;
  padding: 1.5rem;
  text-align: center;
  animation: revealPop 0.4s ease-out;
  box-shadow: 0 0 20px rgba(245, 197, 66, 0.2);
}

.craft-result-title { font-weight: 700; font-size: 1.1rem; margin-bottom: 0.5rem; color: #f5c542; }
.craft-result-img { width: 160px; height: 160px; object-fit: cover; border-radius: 10px; margin: 0.75rem 0; box-shadow: 0 4px 15px rgba(0,0,0,0.4); }

.craft-btn-row {
  display: flex;
  gap: 0.5rem;
}
.craft-btn-row .craft-btn { flex: 1; }
.craft-all-btn {
  background: linear-gradient(135deg, #f5c542 0%, #e8a820 100%) !important;
  color: #0d1117 !important;
  font-weight: 700 !important;
}
.craft-all-btn:hover {
  background: linear-gradient(135deg, #ffd866 0%, #f5c542 100%) !important;
}

.bulk-craft-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.bulk-craft-item {
  text-align: center;
  padding: 0.5rem;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
}
.bulk-craft-img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.25rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.bulk-craft-emoji {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

/* ===== TRADING ===== */
.trade-section { margin-bottom: 1.5rem; }

.trade-section h3 {
  margin-bottom: 0.75rem;
  color: #f5c542;
  font-size: 1rem;
}

.trade-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 400px;
}

.trade-form select {
  padding: 0.65rem 0.75rem;
  border: 2px solid #30363d;
  border-radius: 10px;
  background: #161b22;
  color: #e6edf3;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.9rem;
  outline: none;
}

.trade-form select:focus { border-color: #f5c542; }

.trades-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.trade-item {
  background: #161b22;
  border: 2px solid #21262d;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.trade-details { flex: 1; min-width: 200px; }
.trade-details p { margin: 0.15rem 0; font-size: 0.9rem; }

.trade-actions { display: flex; gap: 0.5rem; }
.trade-actions button {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  border-radius: 8px;
}

.btn-accept { background: #238636; color: #fff; }
.btn-accept:hover { background: #2ea043; }
.btn-decline { background: #da3633; color: #fff; }
.btn-decline:hover { background: #f85149; }
.btn-cancel { background: #30363d; color: #e6edf3; }

.no-trades { color: #484f58; font-style: italic; font-size: 0.9rem; }

/* ===== CHAT ===== */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 160px);
  max-width: 100%;
  margin-top: 0.5rem;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.chat-rooms { display: flex; gap: 0.5rem; }

.room-btn {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  background: #21262d;
  color: #7d8590;
  border-radius: 8px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
}
.room-btn:hover { box-shadow: none; transform: none; }
.room-btn.active { background: linear-gradient(135deg, #f5c542, #ff9f1c); color: #0d1117; }

.online-count { color: #3fb950; font-size: 0.8rem; font-weight: 600; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 12px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.chat-msg { padding: 0.3rem 0; font-size: 0.9rem; line-height: 1.4; }
.chat-msg .msg-user { font-weight: 700; margin-right: 0.4rem; }
.chat-msg .msg-owner { color: #f5c542; }
.chat-msg .msg-badge {
  font-size: 0.6rem;
  padding: 1px 6px;
  border-radius: 4px;
  margin-right: 0.3rem;
  font-weight: 700;
}
.chat-msg .msg-text { color: #c9d1d9; }
.chat-inline-img {
  display: block;
  max-width: 300px;
  max-height: 250px;
  border-radius: 8px;
  margin: 0.4rem 0 0.2rem;
  border: 1px solid #21262d;
  cursor: pointer;
}
.chat-inline-img:hover { border-color: #f5c542; }
.chat-msg.system-msg { color: #484f58; font-style: italic; font-size: 0.8rem; }
.chat-msg.share-msg {
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
}
.share-card-img {
  display: block;
  max-width: 120px;
  max-height: 120px;
  border-radius: 8px;
  margin-top: 0.4rem;
  border: 1px solid #30363d;
}

.chat-input-bar {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.chat-input-bar input {
  flex: 1;
  padding: 0.65rem 0.85rem;
  border: 2px solid #30363d;
  border-radius: 12px;
  background: #161b22;
  color: #e6edf3;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.9rem;
  outline: none;
}

.chat-input-bar input:focus { border-color: #f5c542; box-shadow: 0 0 0 3px rgba(245,197,66,0.1); }
.chat-input-bar button { padding: 0.65rem 1.5rem; border-radius: 12px; }

/* ===== LEADERBOARD ===== */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.lb-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #161b22;
  border: 2px solid #21262d;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  transition: transform 0.15s;
}

.lb-row:hover { transform: translateX(4px); }

.lb-row.lb-rank-1 {
  border-color: #f5c542;
  background: linear-gradient(135deg, #161b22, #1c1700);
  box-shadow: 0 0 15px rgba(245,197,66,0.15);
}
.lb-row.lb-rank-2 { border-color: #8b949e; }
.lb-row.lb-rank-3 { border-color: #cd7f32; }

.lb-rank {
  font-size: 1.5rem;
  font-weight: 800;
  width: 40px;
  text-align: center;
  flex-shrink: 0;
}

.lb-rank-1 .lb-rank { color: #f5c542; }
.lb-rank-2 .lb-rank { color: #8b949e; }
.lb-rank-3 .lb-rank { color: #cd7f32; }

.lb-info { flex: 1; }
.lb-username { font-weight: 700; font-size: 1rem; }
.lb-stats { color: #7d8590; font-size: 0.8rem; margin-top: 0.1rem; }

.lb-score { font-size: 1.25rem; font-weight: 800; color: #f5c542; text-align: right; flex-shrink: 0; }
.lb-score-label { font-size: 0.6rem; color: #7d8590; text-transform: uppercase; letter-spacing: 1px; text-align: right; }

/* ===== ADMIN ===== */
.admin-section {
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.admin-section h3 {
  color: #f5c542;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.admin-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.admin-form input, .admin-form select {
  padding: 0.5rem 0.75rem;
  border: 2px solid #30363d;
  border-radius: 10px;
  background: #0d1117;
  color: #e6edf3;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.85rem;
  outline: none;
}

.admin-form input:focus, .admin-form select:focus { border-color: #f5c542; }

.admin-form input[type="color"] {
  width: 40px;
  height: 36px;
  padding: 2px;
  cursor: pointer;
  border-radius: 8px;
}

.admin-form button {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 10px;
}

.admin-users-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.admin-user-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-user-info { font-size: 0.85rem; }
.admin-user-info .banana-inline { color: #f5c542; font-weight: 600; }
.admin-user-actions { display: flex; gap: 0.4rem; }
.admin-user-actions button {
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  border-radius: 6px;
}

/* ===== INFO TAB ===== */
.info-section {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.info-section.info-lore {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 1px solid #3a3a5e;
  padding: 1.5rem;
}
.info-lore-title {
  color: #f5c542 !important;
  font-size: 1.4rem !important;
  text-align: center;
  margin-bottom: 1rem !important;
  letter-spacing: 0.02em;
}
.info-lore .info-text {
  margin-bottom: 0.9rem;
  line-height: 1.6;
  color: #e6e6f0;
}
.info-lore .info-text:last-child { margin-bottom: 0; }
.info-lore-accent {
  color: #f5c542;
}
.info-lore-signoff {
  text-align: right;
  margin-top: 1.25rem !important;
  font-size: 1rem;
  color: #facc15 !important;
  font-style: italic;
}
.info-section h3 {
  margin: 0 0 0.5rem;
  color: #f5c542;
  font-size: 1rem;
}
.info-text {
  color: #c9d1d9;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}
.info-rarity-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.info-rarity-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  background: #0d1117;
  border-radius: 8px;
}
.info-rarity-badge {
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  min-width: 90px;
  text-align: center;
  background: #161b22;
  border: 1px solid #30363d;
}
.info-rarity-badge.rarity-common    { color: #c9d1d9; }
.info-rarity-badge.rarity-rare      { color: #58a6ff; border-color: #1f6feb; }
.info-rarity-badge.rarity-epic      { color: #a855f7; border-color: #a855f7; }
.info-rarity-badge.rarity-legendary { color: #f5c542; border-color: #f5c542; }
.info-rarity-badge.rarity-chroma_shiny   { color: #22d3ee; border-color: #22d3ee; }
.info-rarity-badge.rarity-chroma_rainbow { color: #ec4899; border-color: #ec4899; }
.info-rarity-badge.rarity-mystical       { color: #f472b6; border-color: #f472b6; }
.info-rarity-badge.rarity-astronomical   { color: #818cf8; border-color: #818cf8; }
.info-rarity-badge.rarity-bananarang     { color: #facc15; border-color: #facc15; background: #1a1400; }
.info-rarity-desc {
  flex: 1;
  color: #8b949e;
  font-size: 0.82rem;
  line-height: 1.4;
}

/* Badge management (admin panel + per-user modal) */
.admin-badges-list {
  display: flex; flex-direction: column; gap: 0.4rem;
}
.admin-badge-row, .user-badge-row {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
}
.admin-badge-pill {
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
}
.admin-badge-color {
  color: #7d8590;
  font-size: 0.7rem;
  font-family: monospace;
  flex: 1;
}
.user-badge-row .admin-badge-pill { flex: 1; }
.admin-badge-delete {
  background: #7f1d1d;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Fredoka', sans-serif;
}
.admin-badge-delete:hover { background: #991b1b; }
.user-badges-list {
  display: flex; flex-direction: column; gap: 0.4rem;
  max-height: 60vh; overflow-y: auto;
}

/* Role badges in admin user list */
.role-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-left: 0.4rem;
  vertical-align: middle;
}
.role-owner { background: #f5c542; color: #1a1a2e; }
.role-admin { background: #58a6ff; color: #0d1117; }
.role-mod   { background: #3fb950; color: #0d1117; }

/* ===== GAME PICKER ===== */

.game-picker {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0;
}

@media (min-width: 768px) {
  .game-picker {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

.game-picker-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 14px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  min-height: 150px;
}

.game-picker-card:hover,
.game-picker-card:active {
  transform: scale(1.03);
  border-color: #f5c542;
  box-shadow: 0 4px 16px rgba(245, 197, 66, 0.15);
}

.game-picker-mascot {
  width: 56px;
  height: 56px;
  user-select: none;
}

.game-picker-card h3 {
  font-size: 1rem;
  margin: 0;
  color: #e6edf3;
  line-height: 1.2;
}

.game-picker-card p {
  font-size: 0.8rem;
  color: #7d8590;
  margin: 0;
  line-height: 1.3;
}

/* Back button — top-left of each game panel */
.game-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0.45rem 0.9rem;
  margin-bottom: 0.75rem;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 10px;
  color: #e6edf3;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.game-back-btn:hover,
.game-back-btn:active {
  background: #21262d;
  border-color: #f5c542;
}

.game-panel {
  margin-top: 0;
}

/* ===== POTASSIUM WAR ===== */
.war-prize-info {
  background: linear-gradient(135deg, #1a3a1a, #0d2a0d);
  border: 1px solid #238636;
  border-radius: 10px;
  padding: 0.6rem 1rem;
  margin-bottom: 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: #7ee787;
}

.war-players-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.war-player-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #161b22;
  border: 2px solid #21262d;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  transition: border-color 0.2s;
}

.war-player-row:hover {
  border-color: #30363d;
}

.war-player-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.war-player-name .owner-tag {
  color: #f5c542;
  font-size: 0.7rem;
  margin-left: 0.3rem;
}

.war-challenge-btn {
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #238636, #2ea043);
  color: #fff;
}

.war-challenge-btn:hover {
  box-shadow: 0 2px 10px rgba(46,160,67,0.3);
}

.war-challenge-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.war-self-row {
  opacity: 0.5;
}

.war-self-row .war-player-name::after {
  content: ' (you)';
  color: #484f58;
  font-weight: 400;
  font-size: 0.8rem;
}

/* Incoming challenge popup */
.war-incoming {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: fadeIn 0.2s ease-out;
}

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

.war-incoming-inner {
  background: #161b22;
  border: 2px solid #f5c542;
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  max-width: 320px;
  width: 90%;
  box-shadow: 0 0 40px rgba(245,197,66,0.2);
}

.war-incoming-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.war-incoming-inner p {
  font-size: 1rem;
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

.war-incoming-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.war-incoming-actions button {
  padding: 0.6rem 1.5rem;
  border-radius: 10px;
  font-size: 0.9rem;
}

/* Battle result overlay */
.war-result-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: fadeIn 0.3s ease-out;
}

.war-result-inner {
  background: #161b22;
  border: 2px solid #30363d;
  border-radius: 20px;
  padding: 1.5rem;
  text-align: center;
  max-width: 500px;
  width: 95%;
}

.war-result-inner h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: #f5c542;
}

.war-battle-field {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.war-side {
  flex: 1;
  min-width: 0;
}

.war-side-name {
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.war-cards {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.war-card {
  background: #0d1117;
  border: 2px solid #30363d;
  border-radius: 10px;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  animation: warCardFlip 0.4s ease-out both;
}

.war-card:nth-child(2) { animation-delay: 0.15s; }
.war-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes warCardFlip {
  0% { transform: rotateX(90deg); opacity: 0; }
  100% { transform: rotateX(0deg); opacity: 1; }
}

.war-card-img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.war-card-info {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.war-card-name {
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.war-card-potassium {
  font-size: 0.65rem;
  color: #7ee787;
  font-weight: 700;
}

.war-vs {
  font-size: 1.5rem;
  font-weight: 800;
  color: #f85149;
  padding-top: 2.5rem;
  flex-shrink: 0;
}

.war-total {
  margin-top: 0.5rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: #7ee787;
}

.war-total.winner {
  color: #f5c542;
  text-shadow: 0 0 8px rgba(245,197,66,0.4);
}

.war-total.loser {
  color: #f85149;
}

.war-result-prize {
  font-size: 0.95rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.war-result-inner button {
  padding: 0.65rem 2rem;
  border-radius: 10px;
}

.war-status {
  text-align: center;
  padding: 0.75rem;
  font-size: 0.9rem;
  color: #f5c542;
  font-weight: 600;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0d1117; }
::-webkit-scrollbar-thumb { background: #30363d; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #484f58; }

/* ===== MASCOT & BRANDING ===== */

/* Login screen mascot */
.auth-mascot {
  width: 120px;
  height: auto;
  margin-bottom: 0.5rem;
  animation: mascotBounce 2s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(245,197,66,0.3));
}

@keyframes mascotBounce {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}

/* Header mascot */
.header-mascot {
  width: 28px;
  height: 28px;
  vertical-align: middle;
  margin-right: 2px;
  filter: drop-shadow(0 1px 3px rgba(245,197,66,0.3));
}

/* Section header with mascot */
.section-header-with-mascot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1rem 0 0.75rem;
}

.section-header-with-mascot h2 {
  margin: 0;
}

.section-mascot {
  width: 48px;
  height: auto;
  filter: drop-shadow(0 2px 6px rgba(245,197,66,0.2));
  flex-shrink: 0;
}

/* Empty states */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 1rem;
  text-align: center;
}

.empty-mascot {
  width: 100px;
  height: auto;
  margin-bottom: 1rem;
  opacity: 0.8;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.empty-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: #e6edf3;
  margin-bottom: 0.25rem;
}

.empty-subtext {
  font-size: 0.85rem;
  color: #7d8590;
}

/* Banana decorative accents on pack cards */
.pack-card::before {
  content: '🍌';
  position: absolute;
  top: -8px;
  right: -4px;
  font-size: 1.2rem;
  opacity: 0;
  transition: opacity 0.2s, transform 0.3s;
  transform: rotate(20deg);
}

.pack-card:hover::before {
  opacity: 1;
  transform: rotate(20deg) scale(1.2);
}

.pack-card {
  position: relative;
  overflow: visible;
}

/* Daily bonus banana mascot animation */
.bonus-banner {
  position: relative;
  overflow: visible;
}

.bonus-banner::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: url('/img/mascot/banana-excited.svg') no-repeat center;
  background-size: contain;
}

.bonus-banner p {
  padding-left: 32px;
}

/* Reveal mascot overlay for rare pulls */
.reveal-mascot {
  position: absolute;
  bottom: -20px;
  right: -15px;
  width: 60px;
  height: auto;
  animation: revealMascotPop 0.6s 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
  pointer-events: none;
}

@keyframes revealMascotPop {
  0% { transform: scale(0) rotate(-30deg); opacity: 0; }
  100% { transform: scale(1) rotate(5deg); opacity: 1; }
}

.reveal-card {
  position: relative;
  overflow: visible;
}

/* Banana-themed loading spinner */
.banana-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  background: url('/img/mascot/banana-peel.svg') no-repeat center;
  background-size: contain;
  animation: bananaSpinBounce 1s ease-in-out infinite;
}

@keyframes bananaSpinBounce {
  0% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(90deg) scale(1.1); }
  50% { transform: rotate(180deg) scale(1); }
  75% { transform: rotate(270deg) scale(1.1); }
  100% { transform: rotate(360deg) scale(1); }
}

/* Banana peel scatter (background decoration for auth) */
.auth-container {
  position: relative;
  overflow: hidden;
}

.auth-container::before,
.auth-container::after {
  content: '🍌';
  position: absolute;
  font-size: 2rem;
  opacity: 0.06;
  pointer-events: none;
}

.auth-container::before {
  top: 15%;
  left: 8%;
  transform: rotate(-30deg);
}

.auth-container::after {
  bottom: 20%;
  right: 10%;
  transform: rotate(25deg);
}

/* Banana count in header gets a tiny banana */
.banana-count::before {
  content: '🍌 ';
  font-size: 0.8em;
}

/* Chat room has subtle banana watermark */
.chat-messages::after {
  content: '';
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 40px;
  height: 40px;
  background: url('/img/mascot/banana-happy.svg') no-repeat center;
  background-size: contain;
  opacity: 0.04;
  pointer-events: none;
}

.chat-messages {
  position: relative;
}

/* No-trades empty state */
.no-trades {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.no-trades::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  background: url('/img/mascot/banana-sad.svg') no-repeat center;
  background-size: contain;
  opacity: 0.6;
  flex-shrink: 0;
}

/* ===== CHAT UNREAD BADGE ===== */
.tab {
  position: relative;
}

.tab-badge {
  position: absolute;
  top: 4px;
  right: 2px;
  background: #f85149;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  border-radius: 8px;
  text-align: center;
  padding: 0 4px;
  pointer-events: none;
  animation: badgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes badgePop {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

/* ===== GLOBAL CHALLENGE TOAST ===== */
.war-challenge-toast {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  display: flex;
  justify-content: center;
  padding: 0.75rem;
  animation: toastSlideDown 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes toastSlideDown {
  0% { transform: translateY(-100%); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.war-toast-inner {
  background: linear-gradient(135deg, #1c1700, #161b22);
  border: 2px solid #f5c542;
  border-radius: 14px;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 8px 32px rgba(245,197,66,0.25), 0 0 0 1px rgba(0,0,0,0.5);
  max-width: 500px;
  width: 95%;
}

.war-toast-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.war-toast-text {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
}

.war-toast-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.war-toast-actions button {
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  border-radius: 8px;
}

/* ===== WAR H2H DISPLAY ===== */
.war-h2h {
  font-size: 0.7rem;
  color: #7d8590;
  font-weight: 500;
  margin-left: 0.5rem;
  background: #21262d;
  padding: 2px 8px;
  border-radius: 6px;
}

.war-result-h2h {
  font-size: 0.85rem;
  color: #7d8590;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

/* ===== BANANA ROULETTE ===== */

.roulette-section {
  border-top: 1px solid #30363d;
  padding-top: 1.5rem;
}

/* Wager Controls */
.roulette-wager {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.roulette-wager-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.roulette-wager-tab {
  flex: 1;
  padding: 0.5rem 1rem;
  border: 1px solid #30363d;
  border-radius: 8px;
  background: #0d1117;
  color: #8b949e;
  cursor: pointer;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.roulette-wager-tab.active {
  background: #1f6feb;
  border-color: #1f6feb;
  color: #fff;
}

.roulette-wager-tab:hover:not(.active) {
  border-color: #484f58;
  color: #c9d1d9;
}

.roulette-banana-wager input[type="range"] {
  width: 100%;
  margin-bottom: 0.5rem;
  accent-color: #f5c542;
}

.roulette-amount-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.roulette-amount-row span {
  font-size: 1.3rem;
  font-weight: 700;
  color: #f5c542;
}

.roulette-amount-row input[type="number"] {
  width: 100px;
  padding: 0.4rem 0.6rem;
  border: 1px solid #30363d;
  border-radius: 8px;
  background: #0d1117;
  color: #c9d1d9;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.9rem;
  text-align: center;
}

.roulette-card-wager select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #30363d;
  border-radius: 8px;
  background: #0d1117;
  color: #c9d1d9;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.9rem;
}

.roulette-card-value {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #f5c542;
  font-weight: 600;
}

/* Wheel Container */
.roulette-wheel-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto 1rem;
  overflow: hidden;
  border: 2px solid #30363d;
  border-radius: 12px;
  background: #0d1117;
  height: 100px;
}

.roulette-pointer {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5rem;
  color: #f5c542;
  z-index: 10;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  filter: drop-shadow(0 0 6px rgba(245, 197, 66, 0.6));
}

.roulette-wheel {
  display: flex;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
}

.roulette-slot {
  width: 90px;
  min-width: 90px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #21262d;
  gap: 4px;
}

.roulette-slot-emoji {
  font-size: 1.8rem;
}

.roulette-slot-mult {
  font-size: 0.8rem;
  font-weight: 700;
  color: #8b949e;
}

/* Slot colors */
.roulette-slot-0 { background: #2d1515; } /* Rotten - dark red */
.roulette-slot-1 { background: #2d2415; } /* Half Peel - dark orange */
.roulette-slot-2 { background: #1e2228; } /* Push - neutral dark */
.roulette-slot-3 { background: #152d1a; } /* Double - dark green */
.roulette-slot-4 { background: #15202d; } /* Triple - dark blue */
.roulette-slot-5 { background: #251530; } /* Bunch - dark purple */
.roulette-slot-6 { background: #2d2a15; } /* Golden - dark gold */

.roulette-slot-0 .roulette-slot-mult { color: #f87171; }
.roulette-slot-1 .roulette-slot-mult { color: #fb923c; }
.roulette-slot-2 .roulette-slot-mult { color: #7d8590; }
.roulette-slot-3 .roulette-slot-mult { color: #4ade80; }
.roulette-slot-4 .roulette-slot-mult { color: #60a5fa; }
.roulette-slot-5 .roulette-slot-mult { color: #c084fc; }
.roulette-slot-6 .roulette-slot-mult { color: #fbbf24; }

/* Spin Button */
.roulette-spin-btn {
  display: block;
  width: 100%;
  max-width: 500px;
  margin: 0 auto 1.5rem;
  padding: 0.8rem 2rem;
  font-size: 1.3rem;
  font-weight: 700;
  font-family: 'Fredoka', sans-serif;
  background: linear-gradient(135deg, #f5c542, #e6a817);
  color: #1a1a1a;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.roulette-spin-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #ffd666, #f5c542);
  transform: scale(1.02);
  box-shadow: 0 4px 20px rgba(245, 197, 66, 0.3);
}

.roulette-spin-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Result Display */
.roulette-result {
  text-align: center;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  animation: roulette-result-pop 0.3s ease;
}

@keyframes roulette-result-pop {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.roulette-result-emoji {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.roulette-result-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: #c9d1d9;
  margin-bottom: 0.5rem;
}

.roulette-result-payout {
  font-size: 1rem;
  font-weight: 600;
}

.roulette-result-payout.win {
  color: #4ade80;
}

.roulette-result-payout.loss {
  color: #f87171;
}

.roulette-result-payout.push {
  color: #7d8590;
}

/* History */
.roulette-history {
  max-width: 500px;
  margin: 0 auto;
}

.roulette-history h3 {
  color: #c9d1d9;
  margin-bottom: 0.5rem;
}

.roulette-history-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.roulette-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
}

.roulette-history-slot {
  color: #8b949e;
  flex: 1;
}

.roulette-history-wager {
  color: #c9d1d9;
  flex: 1;
  text-align: center;
}

.roulette-history-net {
  font-weight: 700;
  min-width: 70px;
  text-align: right;
}

.roulette-history-net.win { color: #4ade80; }
.roulette-history-net.loss { color: #f87171; }
.roulette-history-net.push { color: #7d8590; }

/* ===== ADMIN SUBSECTIONS ===== */
.admin-subsection {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #21262d;
}

.admin-subsection:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.admin-subsection h4 {
  color: #c9d1d9;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.boost-admin-status {
  margin-bottom: 0.5rem;
}

/* ===== BOOST BANNER ===== */
.boost-banner {
  background: linear-gradient(135deg, #065f46, #047857);
  border: 2px solid #10b981;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  text-align: center;
  animation: boostPulse 2s ease-in-out infinite;
}

.boost-banner p {
  font-size: 0.95rem;
  color: #ecfdf5;
}

@keyframes boostPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(16, 185, 129, 0.3); }
  50% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.6); }
}

/* ===== GLITCH404 WARNING BANNER (Admin Abuse Event) ===== */
.glitch-banner {
  background: linear-gradient(135deg, #7f1d1d, #991b1b);
  border: 2px solid #ef4444;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  text-align: center;
  animation: glitchPulse 1.8s ease-in-out infinite;
  font-family: 'Courier New', 'Fredoka', monospace;
  letter-spacing: 0.02em;
}

.glitch-banner p {
  font-size: 0.95rem;
  color: #fee2e2;
}

.glitch-banner strong {
  color: #fca5a5;
  text-shadow: 0 0 4px rgba(239, 68, 68, 0.6);
}

@keyframes glitchPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(239, 68, 68, 0.35); }
  50% { box-shadow: 0 0 22px rgba(239, 68, 68, 0.7); }
}

/* ===== EVENT EXCLUSIVE badge + overlay frame (Admin Abuse Event) ===== */
.event-exclusive-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: linear-gradient(135deg, #991b1b, #7f1d1d);
  color: #fee2e2;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
  z-index: 3;
  pointer-events: none;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 3px;
}

.event-exclusive-badge::before {
  content: '🍦';
  font-size: 0.7rem;
}

/* Overlay frame — thin red "danger" outline + corner glyphs on event cards */
.inv-card.event-card,
.reveal-card.event-card,
.showcase-card.event-card {
  position: relative;
  outline: 2px solid #ef4444;
  outline-offset: -2px;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.45), inset 0 0 12px rgba(239, 68, 68, 0.2);
}

.inv-card.event-card::after,
.reveal-card.event-card::after {
  content: '404';
  position: absolute;
  bottom: 4px;
  right: 6px;
  font-family: 'Courier New', monospace;
  font-size: 0.7rem;
  color: #ef4444;
  opacity: 0.6;
  letter-spacing: 0.1em;
  pointer-events: none;
}

/* ===== BULK PACK COMPROMISED STATE (Admin Abuse Event) ===== */
.bulk-card.compromised {
  opacity: 0.45;
  cursor: not-allowed !important;
  position: relative;
  filter: grayscale(0.6);
}

.bulk-card.compromised::after {
  content: '🔒 COMPROMISED';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  background: rgba(127, 29, 29, 0.9);
  color: #fee2e2;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border: 1px solid #ef4444;
  border-radius: 6px;
  letter-spacing: 0.05em;
  pointer-events: none;
  z-index: 2;
}

/* ===== BANANA PEEL (Minesweeper) ===== */

.banana-peel-section {
  border-top: 1px solid #30363d;
  padding-top: 1.5rem;
}

.peel-bet-controls {
  text-align: center;
  margin-bottom: 1rem;
}

.peel-bet-row {
  max-width: 400px;
  margin: 0 auto 1rem;
}

.peel-bet-row input[type="range"] {
  width: 100%;
  margin-bottom: 0.5rem;
}

.peel-amount-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.peel-amount-row span {
  font-size: 1.2rem;
  font-weight: 600;
  color: #f5c542;
}

.peel-amount-row input[type="number"] {
  width: 120px;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  border: 1px solid #30363d;
  background: #161b22;
  color: #e6edf3;
  font-family: inherit;
  font-size: 1rem;
  text-align: center;
}

.peel-start-btn {
  padding: 0.75rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #f5c542, #ff9f1c);
  color: #0d1117;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.peel-start-btn:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(245, 197, 66, 0.3);
}
.peel-start-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.peel-game-area {
  text-align: center;
}

.peel-info-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.5rem 1rem;
  background: #161b22;
  border-radius: 10px;
  border: 1px solid #30363d;
}

.peel-bet-display {
  font-weight: 600;
  color: #f5c542;
}

.peel-payout-display {
  font-weight: 600;
  color: #4ade80;
  font-size: 1.1rem;
}

.peel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 300px;
  margin: 0 auto 1rem;
}

.peel-tile {
  aspect-ratio: 1;
  font-size: 2rem;
  border: 2px solid #30363d;
  border-radius: 12px;
  background: #1c2333;
  color: #e6edf3;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s, border-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.peel-tile:hover:not(:disabled):not(.revealed) {
  transform: scale(1.08);
  border-color: #f5c542;
  background: #232d3f;
}
.peel-tile:disabled {
  cursor: default;
}
.peel-tile.revealed.safe {
  background: #14532d;
  border-color: #22c55e;
  animation: peelRevealSafe 0.3s ease;
}
.peel-tile.revealed.peel {
  background: #450a0a;
  border-color: #ef4444;
  animation: peelRevealPeel 0.4s ease;
}
.peel-tile.revealed.peel-hidden {
  background: #2d1515;
  border-color: #7f1d1d;
  opacity: 0.7;
}
.peel-tile.revealed.unrevealed-safe {
  background: #1a2e1a;
  border-color: #30363d;
  opacity: 0.5;
}

@keyframes peelRevealSafe {
  0% { transform: scale(0.8); opacity: 0.5; }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes peelRevealPeel {
  0% { transform: scale(0.8); }
  30% { transform: scale(1.2); }
  60% { transform: scale(0.95) rotate(5deg); }
  100% { transform: scale(1) rotate(0); }
}

.peel-action-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.peel-cashout-btn {
  padding: 0.65rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.peel-cashout-btn:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3);
}
.peel-cashout-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.peel-next-mult {
  color: #7d8590;
  font-size: 0.9rem;
}

/* Banana Peel Result Overlay */
.peel-result-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.peel-result-inner {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  max-width: 340px;
  width: 90%;
}

.peel-result-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.peel-result-inner h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.peel-result-inner p {
  color: #7d8590;
  margin-bottom: 1.25rem;
}

.peel-result-inner button {
  padding: 0.6rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #f5c542, #ff9f1c);
  color: #0d1117;
  cursor: pointer;
}

/* Banana Peel History */
.peel-history {
  margin-top: 1rem;
}

.peel-history h3 {
  font-size: 1rem;
  color: #7d8590;
  margin-bottom: 0.5rem;
}

.peel-history-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid #21262d;
  font-size: 0.85rem;
}

.peel-history-icon { font-size: 1.1rem; }
.peel-history-tiles { color: #7d8590; min-width: 55px; }
.peel-history-bet { color: #e6edf3; flex: 1; }
.peel-history-payout { font-weight: 600; }
.peel-history-item.win .peel-history-payout { color: #4ade80; }
.peel-history-item.jackpot .peel-history-payout { color: #f5c542; }
.peel-history-item.loss .peel-history-payout { color: #f87171; }

/* ===== ROCK PAPER SCISSORS ===== */

.rps-section {
  border-top: 1px solid #30363d;
  padding-top: 1.5rem;
}

.rps-challenge-form {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 1.2rem;
  margin-bottom: 1.2rem;
}

.rps-step {
  margin-bottom: 1rem;
}

.rps-step label {
  display: block;
  color: #8b949e;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.rps-select {
  width: 100%;
  padding: 0.6rem 0.8rem;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  color: #e6edf3;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.95rem;
}

.rps-choices {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
}

.rps-choice-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.8rem 1.2rem;
  background: #21262d;
  border: 2px solid #30363d;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  flex: 1;
  max-width: 120px;
}

.rps-choice-btn:hover {
  border-color: #58a6ff;
  background: #1a2332;
}

.rps-choice-btn.selected {
  border-color: #f0b132;
  background: #2a1f00;
  box-shadow: 0 0 12px rgba(240, 177, 50, 0.3);
}

.rps-choice-emoji {
  font-size: 2rem;
}

.rps-choice-label {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.8rem;
  color: #8b949e;
}

.rps-choice-btn.selected .rps-choice-label {
  color: #f0b132;
}

.rps-send-btn {
  width: 100%;
  padding: 0.7rem;
  background: #238636;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 0.5rem;
}

.rps-send-btn:hover:not(:disabled) {
  background: #2ea043;
}

.rps-send-btn:disabled {
  background: #21262d;
  color: #484f58;
  cursor: not-allowed;
}

.rps-incoming-section, .rps-outgoing-section {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.rps-incoming-section h3, .rps-outgoing-section h3 {
  margin: 0 0 0.8rem 0;
  font-size: 1rem;
  color: #e6edf3;
}

.rps-challenge-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid #21262d;
}

.rps-challenge-item:last-child {
  border-bottom: none;
}

.rps-challenge-name {
  color: #e6edf3;
  font-weight: 500;
}

.rps-challenge-time {
  color: #484f58;
  font-size: 0.8rem;
}

.rps-respond-link {
  background: #f0b132;
  color: #000;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-family: 'Fredoka', sans-serif;
  cursor: pointer;
  font-size: 0.85rem;
}

.rps-respond-link:hover {
  background: #f5c94c;
}

.rps-history h3 {
  margin: 1rem 0 0.8rem 0;
  color: #e6edf3;
  font-size: 1rem;
}

.rps-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.8rem;
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: 8px;
  margin-bottom: 0.4rem;
}

.rps-history-players {
  color: #8b949e;
  font-size: 0.9rem;
}

.rps-history-result {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.rps-history-result.win {
  color: #3fb950;
  background: rgba(63, 185, 80, 0.1);
}

.rps-history-result.loss {
  color: #f85149;
  background: rgba(248, 81, 73, 0.1);
}

.rps-history-result.draw {
  color: #8b949e;
  background: rgba(139, 148, 158, 0.1);
}

/* RPS Respond Overlay */
.rps-respond-inner {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  max-width: 400px;
  width: 90%;
}

.rps-respond-inner h3 {
  color: #e6edf3;
  margin: 0 0 0.5rem 0;
}

.rps-respond-prompt {
  color: #8b949e;
  margin-bottom: 1.5rem;
}

.rps-respond-choices {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
}

.rps-respond-btn {
  min-width: 90px;
}

/* RPS Result Overlay */
.rps-result-inner {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  max-width: 440px;
  width: 90%;
}

.rps-result-inner h3 {
  color: #e6edf3;
  font-size: 1.3rem;
  margin: 0 0 1.5rem 0;
}

.rps-result-matchup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.rps-result-side {
  text-align: center;
}

.rps-result-name {
  color: #8b949e;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.rps-result-choice-big {
  font-size: 3rem;
}

.rps-result-vs {
  color: #484f58;
  font-size: 1.2rem;
  font-weight: 700;
}

/* RPS Champ badge in chat */
.msg-rps-champ {
  font-size: 0.7rem;
  background: linear-gradient(135deg, #f0b132, #f5c94c);
  color: #000;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 4px;
  font-weight: 600;
}

/* RPS leaderboard section */
.rps-leaderboard-section {
  margin-top: 1.5rem;
  border-top: 1px solid #30363d;
  padding-top: 1rem;
}

.rps-leaderboard-section h3 {
  color: #e6edf3;
  margin: 0 0 0.8rem 0;
}

.rps-lb-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.8rem;
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: 8px;
  margin-bottom: 0.3rem;
}

.rps-lb-rank {
  color: #484f58;
  width: 2rem;
  text-align: center;
}

.rps-lb-name {
  color: #e6edf3;
  flex: 1;
  margin-left: 0.5rem;
}

.rps-lb-stats {
  color: #8b949e;
  font-size: 0.85rem;
}

.rps-lb-stats .wins { color: #3fb950; }
.rps-lb-stats .losses { color: #f85149; }

/* ===== PROFILE MODAL ===== */
.profile-modal {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 16px;
  max-width: 480px;
  width: 92%;
  max-height: 85vh;
  overflow-y: auto;
  margin: auto;
  padding: 1.5rem;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #21262d;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #161b22;
  border: 2px solid #30363d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-name-area {
  flex: 1;
  min-width: 0;
}

.profile-name-area h2 {
  color: #e6edf3;
  margin: 0;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.3rem;
}

.profile-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 8px;
  font-weight: 600;
}

.profile-joined {
  color: #484f58;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.profile-section-title {
  color: #8b949e;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.6rem 0;
}

/* Showcase card */
.profile-showcase {
  margin-bottom: 1.25rem;
}

.profile-showcase-card {
  background: #161b22;
  border: 2px solid #30363d;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.profile-showcase-card.rarity-astronomical { border-color: #f0c800; box-shadow: 0 0 20px rgba(240,200,0,0.2); }
.profile-showcase-card.rarity-bananarang { border-color: #fef08a; box-shadow: 0 0 15px rgba(254,240,138,0.15); }
.profile-showcase-card.rarity-mystical { border-color: #da3633; box-shadow: 0 0 12px rgba(248,81,73,0.15); }
.profile-showcase-card.rarity-chroma_rainbow { border-image: linear-gradient(135deg,#f85149,#f0c800,#3fb950,#58a6ff,#bc8cff) 1; box-shadow: 0 0 12px rgba(188,140,255,0.15); }
.profile-showcase-card.rarity-chroma_shiny { border-color: #238636; box-shadow: 0 0 10px rgba(63,185,80,0.1); }
.profile-showcase-card.rarity-legendary { border-color: #d29922; box-shadow: 0 0 8px rgba(245,197,66,0.1); }
.profile-showcase-card.rarity-epic { border-color: #8957e5; }
.profile-showcase-card.rarity-rare { border-color: #1f6feb; }

.showcase-card-img {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: contain;
  background: #0d1117;
}

.showcase-card-info {
  flex: 1;
}

.showcase-card-name {
  color: #e6edf3;
  font-size: 1.05rem;
  font-weight: 600;
}

.showcase-card-rarity {
  font-size: 0.85rem;
  margin-top: 0.2rem;
}

.showcase-card-potassium {
  color: #8b949e;
  font-size: 0.8rem;
  margin-top: 0.2rem;
}

/* Stats grid */
.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.profile-stat {
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: 10px;
  padding: 0.6rem;
  text-align: center;
}

.profile-stat-value {
  color: #e6edf3;
  font-size: 1.15rem;
  font-weight: 700;
}

.profile-stat-label {
  color: #484f58;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 0.15rem;
}

/* Game records */
.profile-game-records {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.profile-game-record {
  flex: 1;
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
}

.profile-game-record-title {
  color: #8b949e;
  font-size: 0.75rem;
  margin-bottom: 0.3rem;
}

.profile-game-record-stats {
  color: #e6edf3;
  font-size: 0.9rem;
  font-weight: 600;
}

.profile-game-record-stats .wins { color: #3fb950; }
.profile-game-record-stats .losses { color: #f85149; }
.profile-game-record-stats .draws { color: #8b949e; }

/* Rarity bar breakdown */
.profile-rarity-bars {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.profile-rarity-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.profile-rarity-label {
  width: 90px;
  font-size: 0.8rem;
  text-align: right;
  flex-shrink: 0;
}

.profile-rarity-bar-track {
  flex: 1;
  height: 14px;
  background: #161b22;
  border-radius: 7px;
  overflow: hidden;
}

.profile-rarity-bar-fill {
  height: 100%;
  border-radius: 7px;
  min-width: 2px;
  transition: width 0.4s ease;
}

.profile-rarity-count {
  width: 24px;
  font-size: 0.8rem;
  color: #8b949e;
  text-align: left;
}

/* Profile actions */
.profile-actions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #21262d;
  display: flex;
  gap: 0.5rem;
}

.btn-profile-action {
  flex: 1;
  background: #238636;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
}

.btn-profile-action:hover { background: #2ea043; }

.profile-actions-row {
  display: flex;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid #21262d;
}
.profile-actions-row .btn-profile-action {
  background: #1f6feb;
}
.profile-actions-row .btn-profile-action:hover { background: #388bfd; }

/* Showcase picker */
.showcase-picker-modal {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 16px;
  max-width: 600px;
  width: 92%;
  max-height: 85vh;
  overflow-y: auto;
  margin: auto;
  padding: 1.5rem;
}

.showcase-picker-modal h2 {
  color: #e6edf3;
  margin: 0 0 0.25rem;
}

/* Clickable usernames */
.clickable-user {
  cursor: pointer;
  transition: color 0.15s;
}

.clickable-user:hover {
  text-decoration: underline;
  filter: brightness(1.2);
}

/* ===== MOBILE OVERRIDES ===== */
@media (max-height: 700px) {
  .reveal-img { width: 140px; height: 140px; }
  .reveal-emoji { font-size: 3rem; }
  .reveal-name { font-size: 1.1rem; }
  .pack-reveal { padding: 1rem 1rem 2rem; }
  .reveal-close { margin-top: 1rem; padding: 0.6rem 1.5rem; }
  .swipe-card { width: 140px; height: 180px; }
}
