/* casino.css — Slop Casino game UI styles
   Loads after slop.css. Only casino-specific changes. */

.casino-page .card {
  --tilt: -0.8deg;
}

/* HUD — top status bar */
.hud {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 3vw, 32px);
  padding: 12px 16px;
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 12px 18px 8px 16px;
  box-shadow: 4px 4px 0 var(--shadow);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.hud div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 70px;
}
.hud .label {
  font: 700 11px ui-monospace, monospace;
  color: var(--ink);
  opacity: 0.7;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.hud strong {
  font: 700 clamp(18px, 3vw, 24px)/1 ui-monospace, monospace;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.hud #credits { color: var(--slime-dark); }
.hud #highscore { color: var(--gold); }
.hud #round { color: var(--accent); }
.hud #streak { color: var(--pink); }

/* Play layout — game area + shop sidebar */
.play-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px) {
  .play-layout {
    grid-template-columns: 1fr;
  }
  .shop {
    order: -1;
  }
}

/* Game area */
.game-area {
  min-height: 300px;
}
.game-container {
  width: 100%;
  min-height: 300px;
}

/* Shop sidebar — game selection */
.shop {
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 12px 18px 8px 16px;
  box-shadow: 4px 4px 0 var(--shadow);
  padding: 16px;
  position: sticky;
  top: 16px;
}
.shop-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 2px dashed var(--ink);
}
.shop-title h2 {
  margin: 0;
  font: 700 16px "Comic Neue", cursive;
  color: var(--ink);
}
.shop-title span {
  font: 700 12px ui-monospace, monospace;
  color: var(--ink);
  opacity: 0.6;
}
.shop-hint {
  margin: 8px 0 12px;
  font-size: 13px;
  opacity: 0.8;
  color: var(--ink);
}
#game-shop {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Game cards in shop */
.game-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 10px 14px 8px 12px;
  box-shadow: 3px 3px 0 var(--shadow);
  cursor: pointer;
  text-align: left;
  transition: translate 0.1s, box-shadow 0.1s, background 0.1s;
  min-height: 56px;
}
.game-card:hover {
  translate: 0 -2px;
  box-shadow: 5px 5px 0 var(--accent);
  background: var(--card);
}
.game-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.game-card[aria-pressed="true"] {
  background: var(--mustard);
  box-shadow: 2px 2px 0 var(--shadow);
  border-color: var(--ink);
  translate: 2px 2px;
}
.game-icon {
  font-size: 24px;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
}
.game-card span {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.game-card b {
  font: 700 14px "Comic Neue", cursive;
  color: var(--ink);
}
.game-card small {
  font-size: 11px;
  opacity: 0.7;
  color: var(--ink);
}
.game-card strong {
  font: 700 13px ui-monospace, monospace;
  color: var(--slime-dark);
  white-space: nowrap;
}
.game-card kbd {
  font: 700 11px ui-monospace, monospace;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 4px 2px 6px 3px;
  padding: 2px 8px;
  box-shadow: 1px 1px 0 var(--shadow);
  flex-shrink: 0;
}

/* Toolbar — game controls */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 12px 18px 8px 16px;
  box-shadow: 4px 4px 0 var(--shadow);
  margin-top: 16px;
}
.mode-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 700 13px ui-monospace, monospace;
  color: var(--ink);
}
.mode-label select {
  font: 700 13px ui-monospace, monospace;
  padding: 6px 10px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}
.toolbar button {
  min-height: 44px;
  min-width: 44px;
}
.toolbar #spin {
  flex: 1;
  min-width: 120px;
}
.toolbar #best {
  font: 700 14px ui-monospace, monospace;
  color: var(--gold);
  margin-left: auto;
}
@media (max-width: 600px) {
  .toolbar {
    justify-content: center;
  }
  .toolbar #best {
    width: 100%;
    text-align: center;
    margin-left: 0;
    margin-top: 8px;
  }
}

/* Arcade sign */
.arcade-sign {
  text-align: center;
  margin-bottom: 20px;
}
.arcade-sign span {
  font: 700 clamp(24px, 5vw, 36px)/1 "Rubik Wet Paint", "Comic Neue", cursive;
  color: var(--ink);
  display: block;
}
.arcade-sign small {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  opacity: 0.7;
  color: var(--ink);
}

/* Game-specific containers */
.wheel-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.wheel-container canvas {
  border: 4px solid var(--ink);
  border-radius: 50%;
  box-shadow: 6px 6px 0 var(--shadow);
  background: var(--paper);
}
.wheel-pointer {
  position: relative;
  top: -320px;
  left: 140px;
  font-size: 32px;
  color: var(--ink);
  text-shadow: 2px 2px 0 var(--paper);
  animation: pointer-bounce 1s ease-in-out infinite;
  pointer-events: none;
}
@keyframes pointer-bounce {
  0%, 100% { transform: translateY(0) rotate(-15deg); }
  50% { transform: translateY(-8px) rotate(15deg); }
}
@media (prefers-reduced-motion: reduce) {
  .wheel-pointer { animation: none; }
}
.wheel-result {
  font: 700 18px "Comic Neue", cursive;
  min-height: 30px;
  text-align: center;
}
.wheel-result.win { color: var(--greentext); }
.wheel-result.lose { color: var(--red); }

.dice-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.dice-pair {
  display: flex;
  gap: 16px;
}
.die {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: var(--paper);
  border: 4px solid var(--ink);
  border-radius: 14px;
  box-shadow: 4px 4px 0 var(--shadow);
  transition: transform 0.1s;
}
.dice-result {
  font: 700 18px "Comic Neue", cursive;
  min-height: 30px;
  text-align: center;
}
.dice-result.win { color: var(--greentext); }
.dice-result.lose { color: var(--red); }
.dice-rules {
  font-size: 13px;
  opacity: 0.7;
  color: var(--ink);
  text-align: center;
  margin-top: 8px;
}

.cards-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.hand-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 500px;
}
.hand-label {
  font: 700 14px ui-monospace, monospace;
  color: var(--ink);
  opacity: 0.7;
}
.hand {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  min-height: 60px;
}
.playing-card {
  width: 60px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 8px;
  box-shadow: 3px 3px 0 var(--shadow);
  color: var(--ink);
}
.playing-card.back {
  background: linear-gradient(135deg, #16152a 0%, #2a254a 100%);
  color: var(--gold);
}
.hand-value {
  font: 700 14px ui-monospace, monospace;
  color: var(--ink);
}
.card-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.card-actions button {
  min-width: 100px;
}
.cards-result {
  font: 700 18px "Comic Neue", cursive;
  min-height: 30px;
  text-align: center;
}
.cards-result.win { color: var(--greentext); }
.cards-result.lose { color: var(--red); }

.slots-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.slots-reels {
  display: flex;
  gap: 8px;
}
.slot-reel {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: var(--paper);
  border: 4px solid var(--ink);
  border-radius: 12px;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.3), 4px 4px 0 var(--shadow);
  overflow: hidden;
}
.slots-result {
  font: 700 18px "Comic Neue", cursive;
  min-height: 30px;
  text-align: center;
}
.slots-result.win { color: var(--greentext); }
.slots-result.lose { color: var(--red); }
.slots-rules {
  font-size: 13px;
  opacity: 0.7;
  color: var(--ink);
  text-align: center;
  margin-top: 8px;
}

.coinflip-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.coinflip-area {
  display: flex;
  gap: 24px;
}
.coin {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  background: linear-gradient(135deg, #ffd700 0%, #b8860b 100%);
  border: 4px solid var(--ink);
  border-radius: 50%;
  box-shadow: 4px 4px 0 var(--shadow);
  transition: transform 0.3s;
}
.coin.flipping {
  animation: coin-flip 0.8s ease-in-out;
}
@keyframes coin-flip {
  0% { transform: rotateX(0deg) scale(1); }
  50% { transform: rotateX(180deg) scale(1.1); }
  100% { transform: rotateX(360deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .coin.flipping { animation: none; }
}
.bet-chooser {
  display: flex;
  gap: 24px;
  margin: 8px 0;
}
.bet-chooser label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font: 700 14px "Comic Neue", cursive;
  color: var(--ink);
}
.bet-chooser input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: var(--slime);
}
.coinflip-result {
  font: 700 18px "Comic Neue", cursive;
  min-height: 30px;
  text-align: center;
}
.coinflip-result.win { color: var(--greentext); }
.coinflip-result.lose { color: var(--red); }

.scratchcard-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.scratchcard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.scratch-panel {
  aspect-ratio: 1;
  min-width: 80px;
  max-width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: linear-gradient(135deg, #c0c0c0 0%, #a0a0a0 100%);
  border: 4px solid var(--ink);
  border-radius: 12px;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.2), 4px 4px 0 var(--shadow);
  cursor: pointer;
  transition: transform 0.1s;
  user-select: none;
}
.scratch-panel:hover {
  transform: scale(1.02);
}
.scratch-panel.revealed {
  background: var(--paper);
  cursor: default;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.1), 2px 2px 0 var(--shadow);
}
.scratch-result {
  font: 700 18px "Comic Neue", cursive;
  min-height: 30px;
  text-align: center;
}
.scratch-result.win { color: var(--greentext); }
.scratch-result.lose { color: var(--red); }
.scratchcard-rules {
  font-size: 13px;
  opacity: 0.7;
  color: var(--ink);
  text-align: center;
  margin-top: 8px;
}

/* Help section */
.help-section {
  margin-top: 24px;
}
.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.help-item {
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 12px 18px 8px 16px;
  box-shadow: 4px 4px 0 var(--shadow);
  padding: 16px;
}
.help-item h3 {
  margin: 0 0 8px;
  font: 700 16px "Comic Neue", cursive;
  color: var(--ink);
}
.help-item p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
}

/* Message area */
.message {
  text-align: center;
  min-height: 40px;
  font: 700 15px "Comic Neue", cursive;
  color: var(--ink);
  margin-top: 12px;
}

/* Stats panel — additional casino stats */
.casino-stats-panel {
  margin-top: 24px;
}
.casino-stats-panel h2 {
  margin: 0 0 16px;
  font: 700 22px "Comic Neue", cursive;
  color: var(--ink);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.stat-card {
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 12px 18px 8px 16px;
  box-shadow: 4px 4px 0 var(--shadow);
  padding: 16px;
  text-align: center;
}
.stat-card .stat-label {
  font: 700 12px ui-monospace, monospace;
  color: var(--ink);
  opacity: 0.7;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.stat-card .stat-value {
  font: 700 28px ui-monospace, monospace;
  color: var(--slime-dark);
  font-variant-numeric: tabular-nums;
}
.stat-card .stat-value.gold { color: var(--gold); }
.stat-card .stat-value.pink { color: var(--pink); }
.stat-card .stat-value.accent { color: var(--accent); }

/* Win/lose badges */
.badge {
  display: inline-block;
  font: 700 11px ui-monospace, monospace;
  padding: 2px 8px;
  border-radius: 4px 2px 6px 3px;
  background: var(--mustard);
  color: var(--ink);
  box-shadow: 1px 1px 0 var(--shadow);
}

/* Daily Challenge Banner */
.daily-challenge-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(90deg, var(--gold), var(--mustard));
  border: 3px solid var(--ink);
  border-radius: 12px 18px 8px 16px;
  box-shadow: 4px 4px 0 var(--shadow);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.daily-challenge-banner.hidden {
  display: none;
}
.challenge-icon {
  font-size: 24px;
}
.challenge-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.challenge-label {
  font: 700 14px "Comic Neue", cursive;
  color: var(--ink);
}
.challenge-text {
  font: 700 16px ui-monospace, monospace;
  color: var(--ink);
}
.challenge-btn {
  font: 700 13px ui-monospace, monospace;
  padding: 8px 16px;
  background: var(--ink);
  color: var(--gold);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--shadow);
}
.challenge-btn:hover {
  background: var(--slime-dark);
}

/* Bet Selector */
.bet-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--card);
  border: 2px dashed var(--ink);
  border-radius: 10px;
  margin-bottom: 12px;
}
.bet-label {
  font: 700 13px ui-monospace, monospace;
  color: var(--ink);
  display: block;
  margin-bottom: 4px;
}
.bet-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bet-input {
  width: 100%;
  max-width: 120px;
  padding: 8px;
  font: 700 14px ui-monospace, monospace;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  text-align: center;
}
.bet-input:focus {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.bet-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.bet-preset {
  padding: 4px 10px;
  font: 700 12px ui-monospace, monospace;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 6px;
  cursor: pointer;
  color: var(--ink);
}
.bet-preset:hover {
  background: var(--mustard);
}
.bet-info {
  font-size: 12px;
  color: var(--ink);
  opacity: 0.7;
}

/* Play History Log */
.play-history {
  margin-top: 24px;
}
.play-history h2 {
  font: 700 18px "Comic Neue", cursive;
  color: var(--ink);
  margin: 0 0 12px;
}
.play-log {
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 12px 18px 8px 16px;
  box-shadow: 4px 4px 0 var(--shadow);
  padding: 12px 16px;
  min-height: 60px;
}
.play-log-entry {
  font: 700 14px ui-monospace, monospace;
  padding: 4px 8px;
  margin: 2px 0;
  background: var(--paper);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
}

/* Responsive */
@media (max-width: 600px) {
  .daily-challenge-banner {
    flex-direction: column;
    text-align: center;
  }
  .challenge-btn {
    align-self: center;
  }
  .bet-selector {
    padding: 8px;
  }
}

/* Responsive */
@media (max-width: 600px) {
  .hud {
    gap: 8px 16px;
  }
  .hud div {
    min-width: 60px;
  }
  .shop {
    position: static;
  }
  .die, .slot-reel, .coin, .scratch-panel, .playing-card {
    width: 60px;
    height: 60px;
    font-size: 36px;
  }
  .slot-reel { height: 60px; }
  .coin { width: 80px; height: 80px; font-size: 48px; }
  .hand { gap: 4px; }
  .playing-card { width: 45px; height: 66px; font-size: 16px; }
  .scratchcard-grid { gap: 8px; }
  .bet-chooser { gap: 16px; }
  .card-actions { flex-direction: column; width: 100%; }
  .card-actions button { width: 100%; }
}
