body {
  background: #111;
  color: white;
  font-family: Arial, sans-serif;
  text-align: center;
  margin: 0;
  padding: 50px 20px;
}

h1 {
  font-size: 60px;
  margin-bottom: 40px;
}

button {
  margin-top: 40px;
  padding: 18px 55px;
  font-size: 24px;
  font-weight: bold;
  border: none;
  border-radius: 12px;
  cursor: pointer;
}

#community-cards {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;

  margin-top: 35px;
  margin-bottom: 0;
}

#hole-cards,
#flop,
#turn,
#river {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;

  margin: 0 !important;
  padding: 0;
}

#hole-cards {
  margin-right: 6px;
}

#hole-cards {
  margin-bottom: 35px;
}

#flop {
  margin-bottom: 25px;
}

#turn {
  margin-bottom: 25px;
}

.card {
  width: 80px;
  height: 115px;
  background: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-size: 28px;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.card.red {
  color: #d00;
}

.card.black {
  color: #111;
}
.card {
  flex-direction: column;
  font-size: 28px;
}

.card.red {
  color: #d00;
}

.card.black {
  color: #111;
}
#developer-tools {
  margin-top: 40px;
  padding: 20px;
  border-top: 1px solid #444;
}

#developer-tools h2 {
  font-size: 40px;
  font-weight: 700;
}

#test-cards {
  width: 320px;
  max-width: 80%;
  padding: 12px;
  font-size: 16px;
  border-radius: 8px;
  border: none;
}

#test-deal-button {
  margin-left: 10px;
}

#developer-tools p {
  opacity: 0.65;
  font-size: 14px;
  margin-top: 10px;
}
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  background: radial-gradient(
    circle at top,
    #17351f 0%,
    #0d1f13 40%,
    #07110a 100%
  );
  color: white;
}

button,
input {
  font: inherit;
}

.game-shell {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 50px;
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 4px;
  color: #9cc7a7;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4rem);
}

h2 {
  font-size: 1rem;
  color: #cfe6d5;
  margin-bottom: 10px;
}

#deal-button,
#test-deal-button {
  border: 0;
  border-radius: 12px;
  padding: 12px 20px;
  font-weight: 700;
  cursor: pointer;
  background: white;
  color: #0c1d12;
  transition:
    transform 0.15s ease,
    opacity 0.15s ease;
}

#deal-button:hover,
#test-deal-button:hover {
  transform: translateY(-2px);
}

#deal-button:disabled,
#test-deal-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.table-area {
  background: radial-gradient(
    circle at center,
    #1f6436 0%,
    #174a2a 55%,
    #12381f 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  padding: 28px;
  box-shadow:
    inset 0 0 50px rgba(0, 0, 0, 0.22),
    0 18px 45px rgba(0, 0, 0, 0.28);
}

.card-section {
  margin-bottom: 24px;
}

.card-row {
  min-height: 118px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.street-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.card {
  width: 78px;
  height: 108px;
  border-radius: 12px;
  background: #f7f4ec;
  border: 2px solid rgba(0, 0, 0, 0.18);
  display: grid;
  place-items: center;
  color: #111;
  font-size: 1.45rem;
  font-weight: 800;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.card.red {
  color: #c62026;
}

.card.black {
  color: #151515;
}

.dealdle-card-reveal {
  animation: cardReveal 0.28s ease both;
}

@keyframes cardReveal {
  from {
    opacity: 0;
    transform: translateY(-18px) scale(0.92);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.results-section {
  margin-top: 24px;
  background: rgba(10, 20, 13, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 22px;
}

.results-header {
  margin-bottom: 10px;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.placeholder-text {
  color: #91a998;
  margin: 0;
}

.badge-reveal {
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: badgeReveal 0.24s ease both;
}

@keyframes badgeReveal {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.total-xp-reveal,
.overall-roll-rarity {
  margin-top: 8px;
  border-radius: 14px;
  padding: 14px;
  font-weight: 800;
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
}

.rarity-common {
  border-left: 4px solid #b9b9b9;
}

.rarity-uncommon {
  border-left: 4px solid #5cc978;
}

.rarity-rare {
  border-left: 4px solid #5691ff;
}

.rarity-epic {
  border-left: 4px solid #b16cff;
}

.rarity-legendary {
  border-left: 4px solid #ffb545;
}

.rarity-all-in {
  border-left: 4px solid #ff3b19;
  box-shadow:
    0 0 18px rgba(255, 80, 30, 0.42),
    inset 0 0 18px rgba(255, 80, 30, 0.1);
}

.developer-panel {
  margin-top: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
}

.developer-panel summary {
  cursor: pointer;
  font-weight: 700;
}

.developer-panel p {
  color: #a9b9ad;
  margin: 14px 0 8px;
}

.test-example {
  font-size: 0.9rem;
}

#test-deal-input {
  width: 100%;
  margin: 8px 0 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #0b160e;
  color: white;
  outline: none;
}

@media (max-width: 700px) {
  .game-header {
    align-items: flex-end;
  }

  .table-area {
    padding: 20px;
  }

  .street-row {
    grid-template-columns: 1fr;
  }

  .card {
    width: 68px;
    height: 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
.card-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.card-label {
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 1px;
  opacity: 0.55;
  line-height: 1;
}
.badge-viewport {
  width: min(520px, 92vw);
  margin: 20px auto 0;
  overflow: visible;
  position: relative;
  height: auto;
}

.badge-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.deal-badge-layout {
  display: flex;
  align-items: center;
}

.deal-badge-emoji {
  font-size: 20px;
  width: 42px;
  flex-shrink: 0;
  text-align: center;
  margin-left: 8px;
  margin-right: 4px;
}

.deal-badge-content {
  flex: 1;
  min-width: 0;
}

.badge-review-mode .badge-slide-away {
  transform: none;
  opacity: 1;
  filter: none;
}
.live-xp-box {
  min-width: 95px;
  margin: 26px auto 0;
  padding: 9px 18px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  border-radius: 999px;

  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);

  font-weight: bold;
  font-size: 1rem;
}

#live-xp {
  font-size: 1.15rem;
}

.live-xp-label {
  opacity: 0.7;
  font-size: 0.9rem;
}

#badge-roll-area {
  width: min(560px, 92vw);
  margin: 18px auto 0;

  display: flex;
  flex-direction: column;
  gap: 10px;

  min-height: 220px;
}
.final-roll-result {
  margin: 24px auto 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.final-roll-rarity {
  padding: 5px 12px;
  border-radius: 5px;

  font-size: 1.25rem;
  font-weight: bold;
  letter-spacing: 0.5px;

  background: rgba(0, 255, 180, 0.06);
  border: 1px solid rgba(0, 255, 180, 0.35);
}

.final-roll-xp {
  padding: 8px 16px;
  border-radius: 999px;

  font-size: 1.15rem;
  font-weight: bold;
  letter-spacing: 0.5px;

  background: rgba(0, 255, 180, 0.07);
  border: 1px solid rgba(0, 255, 180, 0.35);
}
/* COMMON — Grey */
.final-rarity-fold {
  color: #b8b8b8;
  border-color: #777777;
  background: rgba(150, 150, 150, 0.1);
}

/* UNCOMMON — Green */
.final-rarity-uncommon {
  color: #4dff88;
  border-color: #35c96a;
  background: rgba(53, 201, 106, 0.1);
}

/* RARE — Blue */
.final-rarity-rare {
  color: #4da6ff;
  border-color: #348ee8;
  background: rgba(52, 142, 232, 0.1);
}

/* EPIC — Purple */
.final-rarity-epic {
  color: #c56cff;
  border-color: #a64de8;
  background: rgba(166, 77, 232, 0.1);
}

/* LEGENDARY — Gold */
.final-rarity-legendary {
  color: #ffd84d;
  border-color: #e6b936;
  background: rgba(230, 185, 54, 0.11);
}

/* ALL IN — Multi-chrome */
.final-rarity-all-in {
  color: transparent;

  background:
    linear-gradient(#111, #111) padding-box,
    linear-gradient(
        90deg,
        #ff3b3b,
        #ffb13b,
        #fff23b,
        #4dff88,
        #4da6ff,
        #b84dff,
        #ff4dc4,
        #ff3b3b
      )
      border-box;

  border: 1px solid transparent;

  background-size:
    100% 100%,
    300% 100%;

  -webkit-background-clip: padding-box, border-box;
}

/* Multichrome text for ALL IN */
.final-rarity-all-in,
.badge-rarity-all-in {
  color: white;
  border: 1px solid #ff2b2b;

  background: #111;

  text-shadow:
    0 0 6px #ff2b2b,
    0 0 12px #ff2b2b;

  animation: allInRedBlack 0.65s infinite;
}

@keyframes allInRedBlack {
  0%,
  100% {
    background: #090909;
    border-color: #ff2b2b;
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.35);
  }

  50% {
    background: #c40000;
    border-color: #111;
    box-shadow: 0 0 18px rgba(255, 0, 0, 0.8);
  }
}

.final-roll-rarity.rarity-up,
.final-roll-xp.rarity-up {
  animation: rarityUpgrade 0.45s ease-out;
}

@keyframes rarityUpgrade {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.3);
  }

  100% {
    transform: scale(1);
  }
}
.badge-rarity-common {
  color: #b8b8b8;
  border-color: #777777;
  background: rgba(150, 150, 150, 0.1);
}

.badge-rarity-uncommon {
  color: #4dff88;
  border-color: #35c96a;
  background: rgba(53, 201, 106, 0.1);
}

.badge-rarity-rare {
  color: #4da6ff;
  border-color: #348ee8;
  background: rgba(52, 142, 232, 0.1);
}

.badge-rarity-epic {
  color: #c56cff;
  border-color: #a64de8;
  background: rgba(166, 77, 232, 0.1);
}

.badge-rarity-legendary {
  color: #ffd84d;
  border-color: #e6b936;
  background: rgba(230, 185, 54, 0.11);
}

.badge-rarity-all-in {
  color: white;
  border: 1px solid transparent;

  background:
    linear-gradient(#111, #111) padding-box,
    linear-gradient(
        90deg,
        #ff3b3b,
        #ffb13b,
        #fff23b,
        #4dff88,
        #4da6ff,
        #b84dff,
        #ff4dc4,
        #ff3b3b
      )
      border-box;

  background-size:
    100% 100%,
    300% 100%;

  text-shadow:
    0 0 6px #ff4dc4,
    0 0 12px #4da6ff,
    0 0 18px #4dff88;

  animation:
    dealdleBadgeReveal 0.35s ease-out both,
    allInRedBlack 0.65s infinite;
}
/* FORCE ALL IN TO RED + BLACK */
.badge-rarity-all-in,
.final-rarity-all-in {
  color: white !important;
  border: 1px solid #ff2020 !important;
  background: #080808 !important;
  background-image: none !important;

  text-shadow:
    0 0 6px #ff2020,
    0 0 12px #ff2020 !important;

  animation:
    dealdleBadgeReveal 0.35s ease-out both,
    allInRedBlack 0.8s ease-in-out infinite !important;
}

@keyframes allInRedBlack {
  0%,
  100% {
    background: #080808;
    border-color: #ff2020;
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.4);
  }

  50% {
    background: #d00000;
    border-color: #080808;
    box-shadow: 0 0 18px rgba(255, 0, 0, 0.9);
  }
}
.profile-panel {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.profile-panel.hidden {
  display: none;
}

.profile-card {
  width: min(900px, 92vw);
  max-height: 85vh;
  overflow-y: auto;
  background: #111;
  border: 1px solid #333;
  border-radius: 14px;
  padding: 24px;
  position: relative;
}

.profile-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.profile-stats {
  margin-bottom: 24px;
}

#profile-badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
#top-controls {
  display: flex;
  flex-direction: column;
  align-items: center; /* <-- this is the important line */
  justify-content: center;
}

#top-controls #deal-button {
  position: relative;
  top: -180px;
}

#profile-button {
  position: absolute;
  right: 20px;
}
/* DEAL BUTTON - FINAL RESULT POSITION */
#deal-button,
#test-deal-button {
  background: #062e16;
  color: #1f7a4d;

  font-size: 18px;
  font-weight: 900;
  letter-spacing: 1px;

  padding: 13px 32px;
  min-width: 120px;
  min-height: 52px;

  border: 2px solid #1f7a4d;
  border-radius: 12px;

  box-shadow:
    0 0 10px hwb(#1f7a4d / 0.35),
    inset 0 0 10px rgba(#1f7a4d, 0.08);

  cursor: pointer;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

#deal-button:hover,
#test-deal-button:hover {
  background: #140000;

  transform: scale(1.06);

  box-shadow:
    0 0 18px rgba(#1f7a4d, 0.65),
    inset 0 0 12px rgba(#1f7a4d, 0.12);
}

.final-roll-result #deal-button {
  margin-top: 30px;
  margin-bottom: 30px;
}
.final-roll-result #deal-button:hover {
  background: #111;
  transform: scale(1.05);
}
#results > #deal-button {
  display: block;
  margin: 25px auto 20px;
}
.final-roll-result {
  margin: 25px auto 20px;
}
.final-roll-rarity,
.final-roll-xp {
  min-width: 220px;
  min-height: 55px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 1.5rem;
  font-weight: 900;

  padding: 12px 24px;
  box-sizing: border-box;
}
.final-roll-result.placeholder .final-roll-rarity,
.final-roll-result.placeholder .final-roll-xp {
  color: #d0d0d0;
  background: rgba(180, 180, 180, 0.08);
  border-color: rgba(200, 200, 200, 0.35);
  box-shadow: 0 0 10px rgba(200, 200, 200, 0.12);
}
:root {
  --flop-center-offset: -18px;
}

h1,
.final-roll-result,
#top-controls,
#badge-roll-area {
  position: relative;
  left: var(--flop-center-offset);
}
#deal-button {
  position: static;
  margin: 24px auto 20px;
  display: block;
}
.final-roll-rarity.final-rarity-fold,
.final-roll-xp.final-rarity-fold .final-roll-percentile.final-rarity-fold {
  color: #d0d0d0 !important;
  border-color: rgba(200, 200, 200, 0.35) !important;
  background: rgba(180, 180, 180, 0.08) !important;
}

.final-roll-rarity.final-rarity-uncommon,
.final-roll-xp.final-rarity-uncommon
  .final-roll-percentile.final-rarity-uncommon {
  color: #63d471 !important;
  border-color: rgba(99, 212, 113, 0.45) !important;
  background: rgba(99, 212, 113, 0.08) !important;
  box-shadow: 0 0 12px rgba(99, 212, 113, 0.2) !important;
}

.final-roll-rarity.final-rarity-rare,
.final-roll-xp.final-rarity-rare .final-roll-percentile.final-rarity-rare {
  color: #4da3ff !important;
  border-color: rgba(77, 163, 255, 0.45) !important;
  background: rgba(77, 163, 255, 0.08) !important;
  box-shadow: 0 0 12px rgba(77, 163, 255, 0.2) !important;
}

.final-roll-rarity.final-rarity-epic,
.final-roll-xp.final-rarity-epic .final-roll-percentile.final-rarity-epic {
  color: #c46cff !important;
  border-color: rgba(196, 108, 255, 0.45) !important;
  background: rgba(196, 108, 255, 0.08) !important;
  box-shadow: 0 0 12px rgba(196, 108, 255, 0.2) !important;
}

.final-roll-rarity.final-rarity-legendary,
.final-roll-xp.final-rarity-legendary
  .final-roll-percentile.final-rarity-legendary {
  color: #ffd34d !important;
  border-color: rgba(255, 211, 77, 0.5) !important;
  background: rgba(255, 211, 77, 0.08) !important;
  box-shadow: 0 0 12px rgba(255, 211, 77, 0.2) !important;
}
#deal-button {
  transform: translateX(0px);
}
#results #deal-button {
  transform: translateX(-18px);
}
.final-roll-info-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.final-roll-percentile {
  min-width: 140px;
  min-height: 55px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 12px 20px;
  box-sizing: border-box;

  border-radius: 999px;

  font-size: 1.1rem;
  font-weight: 900;

  color: #d0d0d0;
  background: rgba(180, 180, 180, 0.08);
  border: 1px solid rgba(200, 200, 200, 0.35);

  letter-spacing: 0.5px;
}
.final-roll-percentile.final-rarity-fold {
  color: var(--common);
  border-color: var(--common);
}

.final-roll-percentile.final-rarity-uncommon {
  color: var(--uncommon);
  border-color: var(--uncommon);
}

.final-roll-percentile.final-rarity-rare {
  color: var(--rare);
  border-color: var(--rare);
}

.final-roll-percentile.final-rarity-epic {
  color: var(--epic);
  border-color: var(--epic);
}

.final-roll-percentile.final-rarity-legendary {
  color: var(--legendary);
  border-color: var(--legendary);
}

.final-roll-percentile.final-rarity-all-in {
  color: var(--all-in);
  border-color: var(--all-in);
}
.final-roll-rarity.final-rarity-all-in,
.final-roll-xp.final-rarity-all-in,
.final-roll-percentile.final-rarity-all-in {
  color: #ff1744;
  border-color: #ff1744;
  box-shadow: 0 0 18px rgba(255, 23, 68, 0.45);
}
.final-roll-percentile {
  display: none !important;
}
/* LIVE XP RARITY COLOURS */

.final-roll-xp.final-rarity-fold {
  color: #b8b8b8 !important;
  border-color: #b8b8b8 !important;
}

.final-roll-xp.final-rarity-uncommon {
  color: #4caf50 !important;
  border-color: #4caf50 !important;
}

.final-roll-xp.final-rarity-rare {
  color: #2196f3 !important;
  border-color: #2196f3 !important;
}

.final-roll-xp.final-rarity-epic {
  color: #a855f7 !important;
  border-color: #a855f7 !important;
}

.final-roll-xp.final-rarity-legendary {
  color: #ff9800 !important;
  border-color: #ff9800 !important;
}

.final-roll-xp.final-rarity-all-in {
  color: white !important;
  border-color: #ff1744 !important;
  background: #0a0a0a !important;

  text-shadow:
    0 0 6px #ff1744,
    0 0 12px #ff1744,
    0 0 20px rgba(255, 23, 68, 0.9);

  box-shadow:
    0 0 10px rgba(255, 23, 68, 0.9),
    0 0 22px rgba(255, 23, 68, 0.55);
}
#custom-deal-label {
  display: none;
  text-align: center;
  font-size: 0.8rem;
  font-weight: bold;
  letter-spacing: 1.5px;
  color: #888;
  margin-top: 6px;
  margin-bottom: 6px;
}
#custom-deal-label {
  display: none;
  color: #fff;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  margin-top: 10px;
}
@media (max-width: 700px) {
  body {
    padding: 10px 6px;
    overflow-x: hidden;
  }

  h1 {
    font-size: 30px;
    margin-bottom: 14px;
  }

  .game-shell {
    width: 100%;
    padding: 8px 0 20px;
  }

  .final-roll-result {
    margin: 10px auto 8px;
    gap: 5px;
    left: 0 !important;
  }

  .final-roll-rarity,
  .final-roll-xp {
    min-width: 135px;
    min-height: 38px;
    font-size: 0.9rem;
    padding: 6px 12px;
  }

  #custom-deal-label {
    font-size: 0.7rem;
    margin-top: 4px;
    margin-bottom: 2px;
  }

  #community-cards {
    width: 100%;
    gap: 6px;
    margin-top: 10px;
    margin-bottom: 0;
    flex-wrap: nowrap;
    justify-content: center;
  }

  #hole-cards,
  #flop,
  #turn,
  #river {
    gap: 2px;
    margin: 0 !important;
    padding: 0;
    flex-wrap: nowrap;
  }

  .poker-card-flip {
    width: 40px;
    height: 58px;
    flex: 0 0 auto;
  }

  .poker-card-face {
    border-radius: 5px;
  }

  .card {
    font-size: 0.65rem;
  }

  .card-label {
    font-size: 8px;
  }

  #deal-button,
  #test-deal-button {
    font-size: 13px;
    padding: 7px 14px;
    min-width: 84px;
    min-height: 36px;
    margin-top: 10px;
  }

  #results #deal-button {
    transform: none !important;
    margin: 12px auto 10px;
  }

  #badge-roll-area {
    width: calc(100vw - 18px);
    margin-top: 10px;
    gap: 5px;
    min-height: 0;
    left: 0 !important;

    display: flex;
    flex-direction: column;
  }

  #developer-tools {
    padding: 10px;
    margin-top: 14px;
  }

  #developer-tools h2 {
    font-size: 18px;
    margin-bottom: 6px;
  }

  #test-cards {
    width: 100%;
    max-width: 100%;
    padding: 8px;
    font-size: 12px;
    margin-bottom: 6px;
  }

  #developer-tools p {
    font-size: 10px;
    margin-top: 6px;
    margin-bottom: 0;
  }

  :root {
    --flop-center-offset: 0px;
  }
}
@media (max-width: 700px) {
  #community-cards {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-top: 10px !important;
  }

  #hole-cards,
  #flop,
  #turn,
  #river {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 2px !important;
    margin: 0 !important;
  }

  .poker-card-flip {
    width: 65px !important;
    height: 92px !important;
  }

  .card-label {
    font-size: 8px !important;
  }

  #badge-roll-area {
    width: 90vw !important;
    min-height: 0 !important;
    gap: 4px !important;
    margin-top: 8px !important;
  }

  .dealdle-badge-reveal {
    font-size: 10px !important;
    padding: 6px 8px !important;
    margin: 1px 0 !important;
  }

  #top-controls {
    position: static !important;
    left: 0 !important;
    transform: none !important;
  }

  #deal-button {
    position: static !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    margin: 10px auto !important;
  }

  .final-roll-result {
    left: 0 !important;
    margin: 8px auto !important;
  }

  :root {
    --flop-center-offset: 0px;
  }
}
#menu-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 12px 0 18px;
}

#profile-menu-button,
#badge-menu-button {
  background: #050505;
  color: #1f7a4d;
  border: 2px solid #1f7a4d;
  border-radius: 10px;
  padding: 9px 18px;
  font-weight: 800;
  cursor: pointer;
}

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;
  background: rgba(0, 0, 0, 0.78);
}

.menu-overlay.hidden {
  display: none;
}

.menu-panel {
  width: min(520px, 92vw);
  max-height: 85vh;
  overflow-y: auto;

  position: relative;

  background: #101010;
  border: 1px solid #333;
  border-radius: 16px;
  padding: 24px;
}

.badge-menu-panel {
  width: min(1400px, 94vw);
}

.menu-panel h2 {
  color: white;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.menu-close {
  position: absolute;
  top: 10px;
  right: 12px;

  background: transparent;
  color: white;
  border: none;

  font-size: 28px;
  cursor: pointer;
}

.profile-stat {
  display: flex;
  justify-content: space-between;
  gap: 20px;

  padding: 12px 0;
  border-bottom: 1px solid #2a2a2a;
}

.profile-stat span {
  color: #999;
}

#badge-collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}

.collection-badge {
  padding: 14px;
  border-radius: 12px;

  background: #181818;
  border: 1px solid #333;
}

.collection-badge.locked {
  opacity: 0.3;
  filter: grayscale(1);
}

.collection-badge-name {
  font-weight: 800;
  margin-bottom: 5px;
}

.collection-badge-rarity {
  font-size: 0.8rem;
  opacity: 0.7;
}

@media (max-width: 700px) {
  #menu-buttons {
    margin: 6px 0 10px;
  }

  #profile-menu-button,
  #badge-menu-button {
    font-size: 12px;
    padding: 7px 12px;
  }

  .menu-panel {
    padding: 18px;
  }

  #badge-collection-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .collection-badge {
    padding: 9px;
    font-size: 12px;
  }
}
/* PROFILE + BADGE MENU BUTTON FIX */

#profile-menu-button,
#badge-menu-button {
  margin: 0 !important;

  padding: 9px 18px !important;

  min-width: auto !important;
  min-height: auto !important;

  position: static !important;
  top: auto !important;
  left: auto !important;

  transform: none !important;

  font-size: 14px !important;

  background: #050505 !important;
  color: #1f7a4d !important;

  border: 2px solid #1f7a4d !important;
  border-radius: 10px !important;
}

#profile-menu-button:hover,
#badge-menu-button:hover {
  transform: scale(1.04) !important;
  background: #111 !important;
}
.menu-close {
  margin: 0 !important;
  padding: 4px 8px !important;

  min-width: 0 !important;
  min-height: 0 !important;

  background: transparent !important;
  border: none !important;

  color: white !important;

  font-size: 28px !important;
  line-height: 1 !important;

  position: absolute !important;
  top: 12px !important;
  right: 12px !important;

  transform: none !important;
}
#badge-collection-progress {
  margin-bottom: 20px;
  color: #ddd;
  font-size: 1.1rem;
  font-weight: 800;
}
.collection-badge {
  border: 1px solid #333;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.collection-badge.locked {
  opacity: 0.45;
}

.collection-badge.locked .collection-badge-name {
  color: #777;
}

.collection-badge.badge-rarity-common {
  border-color: #777;
}

.collection-badge.badge-rarity-uncommon {
  border-color: #35c96a;
  box-shadow: 0 0 8px rgba(53, 201, 106, 0.15);
}

.collection-badge.badge-rarity-rare {
  border-color: #348ee8;
  box-shadow: 0 0 8px rgba(52, 142, 232, 0.18);
}

.collection-badge.badge-rarity-epic {
  border-color: #a64de8;
  box-shadow: 0 0 8px rgba(166, 77, 232, 0.2);
}

.collection-badge.badge-rarity-legendary {
  border-color: #e6b936;
  box-shadow: 0 0 10px rgba(230, 185, 54, 0.22);
}

.collection-badge.badge-rarity-all-in {
  border-color: #ff2020;
  box-shadow: 0 0 12px rgba(255, 32, 32, 0.28);
}
.collection-badge-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.collection-badge.locked .collection-badge-icon {
  opacity: 0;
}
.collection-badge-emoji {
  font-size: 30px;
  line-height: 1;
  margin-bottom: 8px;
  text-align: center;
}
.deal-badge-emoji {
  width: 42px;
  min-width: 42px;
  font-size: 30px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-left: -10px;
  margin-right: 4px;
}
.dealdle-badge-reveal {
  width: min(560px, 92vw);
  max-width: 560px;

  margin-left: auto;
  margin-right: auto;

  padding: 14px 16px;
  border-radius: 14px;
}

.collection-badge-description {
  margin-top: 6px;
  margin-bottom: 6px;
  font-size: 12px;
  line-height: 1.35;
  opacity: 0.7;
  text-align: center;
}
/* Bigger + perfectly equal collection badges */
.collection-badge {
  display: flex;
  flex-direction: column;
  align-items: center;

  height: 190px;
  padding: 14px 12px;

  box-sizing: border-box;
}

/* Emoji always occupies same area */
.collection-badge-emoji {
  height: 32px;
  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* Reserve TWO lines for every badge name */
.collection-badge-name {
  height: 46px;
  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  text-align: center;
  line-height: 1.2;
}

/* Description gets equal space on every badge */
.collection-badge-description {
  height: 48px;
  flex-shrink: 0;

  display: flex;
  align-items: flex-start;
  justify-content: center;

  margin-top: 3px;

  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

/* Rarity always sits at same height */
.collection-badge-rarity {
  margin-top: auto;

  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}
#badge-menu .menu-close {
  position: fixed;
  top: 18px;
  right: 22px;

  z-index: 9999;

  margin: 0;
}
.menu-overlay:not(.hidden) .menu-close {
  position: fixed !important;
  top: 20px !important;
  right: 20px !important;
  left: auto !important;

  margin: 0 !important;
  z-index: 99999 !important;
  font-size: 70px !important;
}
#badge-sort-button {
  display: block;
  width: 190px;
  margin: 10px 0 18px 0;
  padding: 9px 16px;

  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;

  background: rgba(255, 255, 255, 0.08);
  color: white;

  font-size: 13px;
  font-weight: 700;
  text-align: center;

  cursor: pointer;

  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;

  background: rgba(255, 255, 255, 0.08);
  color: white;

  font-size: 13px;
  font-weight: 700;

  cursor: pointer;
}

#badge-sort-button:hover {
  background: rgba(255, 255, 255, 0.13);
}
.collection-badge.badge-rarity-all-in {
  animation: none !important;

  background: #080808 !important;
  border-color: #ff2020 !important;

  box-shadow: 0 0 12px rgba(255, 32, 32, 0.28) !important;
}
/* Badge Collection title */
#badge-menu h2 {
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 16px;
  text-align: center;
}

#badge-menu h2 {
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  margin-top: 0;
  margin-bottom: 10px;
  text-align: center;
}

#badge-collection-progress {
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
  margin: 0;
  text-align: center;
}
#badge-collection-progress {
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  margin: 0 !important;
}

/* Pull the sort button + badges closer to the header */
#badge-sort-button {
  margin-top: -2px !important;
  margin-bottom: 8px !important;
}

#badge-collection-grid {
  margin-top: 0 !important;
}
#profile-auth-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}

#profile-auth-controls button {
  margin: 0;
  padding: 10px 18px;

  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;

  background: rgba(255, 255, 255, 0.08);
  color: white;

  font-size: 13px;
  font-weight: 800;

  cursor: pointer;
}

#profile-auth-controls button:hover {
  background: rgba(255, 255, 255, 0.13);
}
.profile-auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.profile-auth-form.hidden {
  display: none;
}

.profile-auth-form input {
  width: 100%;
  padding: 10px 12px;

  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;

  background: rgba(255, 255, 255, 0.06);
  color: white;

  font-size: 14px;
  outline: none;
}

.profile-auth-form button {
  margin: 0;
  padding: 10px 16px;

  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;

  background: rgba(255, 255, 255, 0.08);
  color: white;

  font-size: 13px;
  font-weight: 800;

  cursor: pointer;
}
.profile-auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-auth-form.hidden {
  display: none;
}
#profile-menu-button {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
}

#profile-menu-button:hover,
#profile-menu-button:active,
#profile-menu-button:focus {
  background: none;
  border: none;
  box-shadow: none;
  transform: none;
}

#profile-menu-button svg {
  width: 58px;
  height: 58px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#profile-menu-button,
#profile-menu-button:hover,
#profile-menu-button:focus,
#profile-menu-button:active {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;

  padding: 0 !important;
  width: 70px;
  height: 70px;

  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#profile-menu-button svg {
  width: 58px;
  height: 58px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
#profile-menu-button {
  position: fixed !important;
  top: 20px;
  right: 20px;
  z-index: 1000;
}
/* ========================================
   BADGES — BLACK POKER CHIP BUTTON
   ======================================== */

#badge-menu-button {
  position: fixed !important;
  top: 95px;
  right: 20px;
  z-index: 1000;

  width: 70px;
  height: 70px;
  padding: 0 !important;

  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;

  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#badge-menu-button:hover,
#badge-menu-button:focus,
#badge-menu-button:active {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  transform: none !important;
}

#badge-menu-button {
  position: fixed !important;
  top: 20px;
  right: 100px;
  z-index: 1000;

  width: 70px;
  height: 70px;
  padding: 0 !important;

  background: transparent !important;
  border: none !important;
  box-shadow: none !important;

  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#badge-menu-button:hover,
#badge-menu-button:active,
#badge-menu-button:focus {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  transform: none !important;
}

#badge-menu-button img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  display: block;
}
#badge-menu-button {
  position: fixed !important;
  top: 110px;
  right: 20px;
  z-index: 1000;

  width: 70px;
  height: 70px;
  padding: 0 !important;

  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;

  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
/* PROFILE + BADGES ICON STACK */

#profile-menu-button,
#badge-menu-button {
  position: fixed !important;
  right: 20px !important;

  width: 70px !important;
  height: 70px !important;

  padding: 0 !important;
  margin: 0 !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Profile on top */
#profile-menu-button {
  top: 20px !important;
}

/* Badges directly below */
#badge-menu-button {
  top: 150px !important;
}

#profile-menu-button svg {
  width: 100px !important;
  height: 100px !important;
}

#badge-menu-button img {
  width: 100px !important;
  height: 100px !important;
  object-fit: contain;
}
#badge-menu-button img {
  filter: drop-shadow(2px 0 0 Black) drop-shadow(-2px 0 0 Black)
    drop-shadow(0 2px 0 Black) drop-shadow(0 -2px 0 Black);
}
#profile-menu-button svg {
  stroke: white !important;
}
#profile-menu-button,
#badge-menu-button {
  position: absolute !important;
}
#badge-menu .menu-panel {
  position: relative;
}

#badge-collection-progress {
  position: absolute !important;
  top: 75px !important;
  left: 0;
  right: 0;

  text-align: center;
  margin: 0 !important;
}
#badge-collection-progress {
  pointer-events: none !important;
}

#badge-sort-button {
  position: relative !important;
  z-index: 5 !important;
  pointer-events: auto !important;
}
.badge-times-earned {
  margin-top: 4px;
  font-size: 13px;
  opacity: 0.75;
  font-weight: 600;
}
/* Give badge cards more room for obtained count */
.collection-badge {
  min-height: 180px !important;
  height: auto !important;
  padding-bottom: 14px !important;
}

/* Obtained counter */
.collection-badge-count {
  margin-top: 4px;

  font-size: inherit;
  font-weight: inherit;
  font-family: inherit;

  line-height: 1.2;
  text-align: center;
}
#profile-logout-button {
  width: 100%;
  margin-top: 18px;
  padding: 12px;
  font-weight: 700;
  cursor: pointer;
}
#profile-logout-button {
  width: 100%;
  margin-top: 18px;
  padding: 12px;

  background: #dc2626 !important;
  color: white !important;

  border: none;
  border-radius: 8px;

  font-weight: 700;
  cursor: pointer;
}

#profile-logout-button:hover {
  background: #b91c1c !important;
}
/* More vertical room inside Profile */
#profile-menu {
  padding-bottom: 32px;
}

/* Smaller centered logout button */
#profile-logout-button {
  display: block;
  width: 180px !important;

  margin: 32px auto 0 !important;
  padding: 11px 20px;

  background: #dc2626 !important;
  color: white !important;

  border: none;
  border-radius: 8px;

  font-weight: 700;
  cursor: pointer;
}
.logout-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.logout-confirm-overlay.hidden {
  display: none;
}

.logout-confirm-box {
  width: min(360px, calc(100% - 40px));
  padding: 28px;
  background: #111;
  border: 1px solid #444;
  border-radius: 16px;
  text-align: center;
}

.logout-confirm-box h2 {
  margin: 0 0 10px;
  color: white;
}

.logout-confirm-box p {
  margin: 0 0 24px;
  color: #aaa;
}

.logout-confirm-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.logout-confirm-buttons button {
  padding: 10px 22px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
}

#logout-cancel-button {
  background: #333;
  color: white;
}

#logout-confirm-button {
  background: #e5252a;
  color: white;
}

#logout-confirm-button:hover {
  background: #ff3035;
}
