/* ── BEE Chicken Cross — Stake-style horizontal game ────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold:       #c9a227;
  --gold-light: #f0d060;
  --gold-dim:   #7a5f10;
  --bg:         #060608;
  --ctrl-bg:    #0e0e18;
  --ctrl-bd:    rgba(255,255,255,0.08);
  --text:       #d4b96a;
  --text-dim:   #5a4a28;
  --green:      #22c55e;
  --red:        #ef4444;
  --r6:         6px;
}

html, body { height: 100%; }
body {
  background: #070709;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Nav ─────────────────────────────────────────────────────────── */
.cc-nav {
  background: rgba(0,0,0,0.96);
  border-bottom: 1px solid rgba(201,162,39,0.18);
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(10px);
}
.cc-nav-inner {
  max-width: 1300px; margin: 0 auto;
  padding: 0 22px; height: 56px;
  display: flex; align-items: center; justify-content: space-between;
}
.cc-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.cc-logo-sm {
  width: 36px; height: 36px;
  border-radius: 50%; border: 1px solid var(--gold-dim); object-fit: cover;
}
.cc-brand-name { font-size: 16px; font-weight: 700; color: #e8e0c8; letter-spacing: 0.02em; }
.cc-gold { color: var(--gold); }
.cc-brand-sub { font-size: 9px; letter-spacing: 0.28em; color: var(--gold-dim); margin-top: 1px; font-weight: 600; }
.cc-nav-right { display: flex; align-items: center; gap: 18px; }
.cc-balance-wrap { text-align: right; }
.cc-bal-label { font-size: 9px; letter-spacing: 0.2em; color: var(--gold-dim); font-weight: 600; }
.cc-bal-val   { font-size: 15px; font-weight: 700; color: var(--gold); }
.cc-lobby-btn {
  background: transparent; border: 1px solid var(--gold-dim);
  color: var(--gold); font-size: 12px; font-weight: 600;
  padding: 5px 13px; border-radius: var(--r6); text-decoration: none;
  letter-spacing: 0.05em; transition: background 0.2s, border-color 0.2s;
}
.cc-lobby-btn:hover { background: rgba(201,162,39,0.1); border-color: var(--gold); }

/* ── Page ────────────────────────────────────────────────────────── */
.cc-page {
  max-width: 1200px; margin: 0 auto;
  padding: 18px 16px 40px;
  display: flex; flex-direction: column; gap: 0;
}

/* Result banner */
.cc-banner {
  width: 100%; border-radius: 8px; overflow: hidden;
  opacity: 0; transform: translateY(-6px);
  transition: opacity 0.3s, transform 0.3s;
  margin-bottom: 0; pointer-events: none;
}
.cc-banner.visible {
  opacity: 1; transform: translateY(0); pointer-events: auto;
  margin-bottom: 8px;
}
.cc-banner.win    { background: rgba(10,30,15,0.97); border: 1px solid rgba(34,197,94,0.4); }
.cc-banner.lose   { background: rgba(25,8,8,0.97);   border: 1px solid rgba(239,68,68,0.4); }
.cc-banner.reveal {
  background: rgba(10,25,15,0.97); border: 1px solid rgba(34,197,94,0.45);
  animation: revealBannerPulse 1.4s ease-in-out infinite;
}
@keyframes revealBannerPulse {
  0%,100% { box-shadow: 0 0 0 rgba(34,197,94,0); }
  50%     { box-shadow: 0 0 22px rgba(34,197,94,0.4); }
}
.cc-banner-inner {
  padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px;
}
.cc-bl { font-size: 10px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; }
.cc-banner.win    .cc-bl { color: var(--green); }
.cc-banner.lose   .cc-bl { color: var(--red); }
.cc-banner.reveal .cc-bl { color: var(--gold-light); }
.cc-bs  { font-size: 11px; color: var(--gold); margin-left: 8px; }
.cc-ba  { font-size: 20px; font-weight: 800; }
.cc-banner.win    .cc-ba { color: var(--green); }
.cc-banner.lose   .cc-ba { color: var(--red); }
.cc-banner.reveal .cc-ba { color: var(--green); }

/* ── Board ───────────────────────────────────────────────────────── */
.cc-board-wrap {
  position: relative;
  width: 100%;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  border-bottom: none;
  background: #11111e;
}
.cc-canvas {
  display: block; width: 100%; height: auto;
}

/* ── Payout circles (now live ON the game board, replacing manholes) ─ */
.cc-strip {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.cc-strip-track {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  will-change: transform;
}
.cc-pay-btn {
  position: absolute;
  height: 63px; width: 63px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8,8,16,0.78);
  border: 2px solid rgba(201,162,39,0.35);
  border-radius: 50%;
  color: rgba(255,255,255,0.55);
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 3px 10px rgba(0,0,0,0.4);
  backdrop-filter: blur(1px);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease,
              background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
  user-select: none;
}
.cc-pay-btn .cc-pay-amt {
  font-size: 13px; font-weight: 700; line-height: 1.15; text-align: center; padding: 0 8px;
  color: #fff;
}
.cc-pay-btn:hover:not(.cc-locked) {
  transform: scale(1.08);
  box-shadow: 0 0 18px rgba(201,162,39,0.5);
  border-color: var(--gold);
}
.cc-pay-btn:hover:not(.cc-locked) .cc-pay-amt { color: var(--gold-light); }
.cc-pay-btn.cc-locked { cursor: default; }
.cc-pay-btn.cc-future {
  background: rgba(8,8,16,0.6);
  border-color: rgba(255,255,255,0.12);
}
.cc-pay-btn.cc-future .cc-pay-amt { color: rgba(255,255,255,0.4); }
.cc-pay-btn.cc-done {
  background: rgba(20,16,6,0.7);
  border-color: rgba(201,162,39,0.5);
  cursor: default;
}
.cc-pay-btn.cc-done .cc-pay-amt { color: #a8f0c4; }
.cc-pay-btn.cc-done::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 50%;
  width: 47px; height: 11px;
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  filter: blur(2.5px);
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
}
.cc-pay-coin {
  position: relative;
  z-index: 1;
  width: 54px; height: 54px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(255,210,80,0.9)) drop-shadow(0 2px 3px rgba(0,0,0,0.45));
  animation: coinFloat 2.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes coinFloat {
  0%,100%  { transform: translateY(0) rotate(-2.5deg); }
  50%      { transform: translateY(-3px) rotate(2.5deg); }
}
.cc-pay-btn.cc-coin-pop .cc-pay-coin {
  animation: coinPop 0.4s cubic-bezier(.34,1.56,.64,1) both, coinFloat 2.4s ease-in-out infinite 0.4s;
}
@keyframes coinPop {
  0%   { transform: scale(0) rotate(-25deg); opacity: 0; }
  60%  { transform: scale(1.3) rotate(8deg);  opacity: 1; }
  100% { transform: scale(1) rotate(0deg);    opacity: 1; }
}
.cc-sparkle-dot {
  position: absolute; left: 50%; top: 50%;
  width: 4px; height: 4px; border-radius: 50%;
  background: #ffe27a; box-shadow: 0 0 6px rgba(255,226,122,0.9);
  animation: sparkleOut 0.55s ease-out forwards;
  pointer-events: none;
}
@keyframes sparkleOut {
  0%   { transform: translate(-50%,-50%) scale(1);   opacity: 1; }
  100% { transform: translate(calc(-50% + var(--sx)), calc(-50% + var(--sy))) scale(0); opacity: 0; }
}
.cc-pay-btn.cc-current {
  background: rgba(201,162,39,0.24);
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(201,162,39,0.3), 0 0 20px rgba(201,162,39,0.6);
  transform: scale(1.1);
  animation: payCurrentPulse 1.6s ease-in-out infinite;
}
.cc-pay-btn.cc-current .cc-pay-amt { color: var(--gold-light); font-weight: 800; }
@keyframes payCurrentPulse {
  0%,100% { box-shadow: 0 0 0 1px rgba(201,162,39,0.3), 0 0 20px rgba(201,162,39,0.6); }
  50%     { box-shadow: 0 0 0 1px rgba(201,162,39,0.5), 0 0 30px rgba(201,162,39,0.85); }
}
.cc-pay-btn.cc-flash {
  animation: payFlash 0.26s ease-out;
}
@keyframes payFlash {
  0%   { box-shadow: 0 0 0 1px rgba(255,255,255,0.4), 0 0 10px rgba(201,162,39,0.5); transform: scale(1); }
  40%  { box-shadow: 0 0 0 3px rgba(240,208,96,0.75), 0 0 34px rgba(201,162,39,0.95); transform: scale(1.22); }
  100% { box-shadow: 0 0 0 1px rgba(201,162,39,0.3), 0 0 20px rgba(201,162,39,0.6); transform: scale(1.1); }
}
.cc-pay-btn.cc-reveal-crash {
  background: rgba(40,8,8,0.8);
  border-color: #ef4444;
  animation: payRevealPulse 1s ease-in-out infinite;
}
.cc-pay-btn.cc-reveal-crash .cc-pay-amt { color: #ff9a9a; }
.cc-pay-btn.cc-reveal-crash::before {
  content: '✕';
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 900;
  color: #ff5050;
  text-shadow: 0 0 8px rgba(239,68,68,0.8);
}
@keyframes payRevealPulse {
  0%,100% { box-shadow: 0 0 0 1px rgba(239,68,68,0.35), 0 0 14px rgba(239,68,68,0.5); }
  50%     { box-shadow: 0 0 0 1px rgba(239,68,68,0.6), 0 0 24px rgba(239,68,68,0.85); }
}

/* ── Control bar ─────────────────────────────────────────────────── */
.cc-ctrl-bar {
  width: 100%; background: var(--ctrl-bg);
  border: 1px solid var(--ctrl-bd);
  border-radius: 0 0 10px 10px;
  padding: 14px 20px 10px;
  display: flex; align-items: flex-start; gap: 20px;
}

/* Left: Bet */
.cc-ctrl-left  { flex: 1.4; min-width: 220px; }
.cc-ctrl-mid   { flex: 1.6; }
.cc-ctrl-right { flex: 0 0 auto; display: flex; align-items: center; padding-top: 20px; }

.cc-ctrl-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.18em;
  color: rgba(255,255,255,0.35); text-transform: uppercase; margin-bottom: 6px;
}

/* Bet row */
.cc-bet-row {
  display: flex; align-items: center; gap: 0;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(201,162,39,0.35);
  border-radius: var(--r6); overflow: hidden;
  height: 38px;
}
.cc-dollar {
  padding: 0 8px; color: rgba(255,255,255,0.5); font-size: 14px;
  border-right: 1px solid rgba(255,255,255,0.08);
}
.cc-bet-chip-indicator {
  width: 30px; height: 30px; flex-shrink: 0; margin-left: 8px;
}
.cc-bet-chip-indicator .cs-chip { width: 30px; height: 30px; }
.cc-bet-chip-indicator .cs-chip-label { font-size: 8px; }
.cc-bet-input {
  flex: 1; background: transparent; border: none; outline: none;
  color: #fff; font-size: 15px; font-weight: 600;
  font-family: 'Inter', sans-serif; padding: 0 8px;
  -moz-appearance: textfield;
}
.cc-bet-input::-webkit-inner-spin-button,
.cc-bet-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.cc-bet-input.cc-err { background: rgba(239,68,68,0.12); }
.cc-bet-adj {
  background: rgba(255,255,255,0.06); border: none; border-left: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.6); font-size: 11px; font-weight: 700;
  padding: 0 10px; height: 100%; cursor: pointer; transition: background 0.15s;
  font-family: 'Inter', sans-serif;
}
.cc-bet-adj:hover { background: rgba(255,255,255,0.12); color: #fff; }
.cc-bet-adj:disabled { opacity: 0.4; cursor: not-allowed; }

/* Tabs row */
.cc-tabs-row { display: flex; gap: 16px; margin-top: 8px; }
.cc-tab {
  background: none; border: none; border-bottom: 2px solid transparent;
  color: rgba(255,255,255,0.3); font-size: 12px; font-weight: 600;
  font-family: 'Inter', sans-serif; padding: 2px 0; cursor: pointer; transition: all 0.15s;
}
.cc-tab.active { color: rgba(255,255,255,0.85); border-color: rgba(255,255,255,0.5); }
.cc-tab:hover  { color: rgba(255,255,255,0.6); }

/* Difficulty */
.cc-diff-row {
  display: flex; gap: 5px; flex-wrap: wrap;
}
.cc-diff-btn {
  flex: 1; height: 38px; min-width: 60px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r6); color: rgba(255,255,255,0.5);
  font-size: 12px; font-weight: 600; font-family: 'Inter', sans-serif;
  cursor: pointer; transition: all 0.15s;
}
.cc-diff-btn:hover { background: rgba(201,162,39,0.1); border-color: var(--gold-dim); color: var(--gold); }
.cc-diff-btn.active {
  background: rgba(201,162,39,0.18); border-color: var(--gold);
  color: var(--gold); font-weight: 700;
}
.cc-diff-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Start / Cashout button */
.cc-start-btn {
  height: 50px; min-width: 160px; padding: 0 24px;
  background: linear-gradient(135deg, #c9a227 0%, #f0d060 50%, #c9a227 100%);
  border: none; border-radius: var(--r6);
  color: #0a0700; font-size: 14px; font-weight: 800; letter-spacing: 0.06em;
  font-family: 'Inter', sans-serif; cursor: pointer;
  box-shadow: 0 4px 20px rgba(201,162,39,0.3);
  transition: all 0.2s; white-space: nowrap;
}
.cc-start-btn:hover { box-shadow: 0 6px 28px rgba(201,162,39,0.5); transform: translateY(-1px); }
.cc-start-btn:active { transform: scale(0.97); }
.cc-start-btn.cashout-mode {
  background: linear-gradient(135deg, #166534 0%, #22c55e 50%, #166534 100%);
  color: #fff; box-shadow: 0 4px 20px rgba(34,197,94,0.3);
  animation: cashoutPulse 2s ease-in-out infinite;
}
@keyframes cashoutPulse {
  0%,100% { box-shadow: 0 4px 20px rgba(34,197,94,0.3); }
  50%      { box-shadow: 0 6px 30px rgba(34,197,94,0.6); }
}
.cc-start-btn.replay-mode {
  background: rgba(201,162,39,0.15); border: 1px solid var(--gold-dim);
  color: var(--gold); box-shadow: none;
}
.cc-start-btn.replay-mode:hover { background: rgba(201,162,39,0.25); }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .cc-ctrl-bar { flex-direction: column; gap: 14px; padding: 14px; }
  .cc-ctrl-right { padding-top: 0; width: 100%; }
  .cc-start-btn { width: 100%; height: 46px; }
  .cc-hint { display: none; }
}
@media (max-width: 480px) {
  .cc-page { padding: 10px 8px 30px; }
}
