/* ======================================================
   CHICKEN ROAD – style.css v2.6 (Elementor-safe, Mobile-ready)
   All layout-critical properties use !important
   ====================================================== */

.cr-wrap, .cr-wrap * {
  box-sizing: border-box !important;
  font-family: 'Montserrat', sans-serif !important;
}

.cr-login-notice {
  color: #fff;
  background: #1c1f2f;
  padding: 40px;
  border-radius: 12px;
  text-align: center;
}

/* ── Outer wrapper ── */
.cr-wrap {
  background: #2b2f45 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 20px 0 !important;
  width: 100% !important;
}

/* ── App shell ── */
.cr-app {
  width: 100% !important;
  max-width: 960px !important;
  display: flex !important;
  flex-direction: column !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6) !important;
}

/* ================================================
   HEADER
   ================================================ */
.cr-header {
  height: 54px !important;
  background: #1e2130 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 16px !important;
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
  flex-shrink: 0 !important;
  flex-wrap: nowrap !important;
}

.cr-header-left, .cr-header-right {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: nowrap !important;
}

.cr-back-btn, .cr-icon-btn {
  background: none !important;
  border: none !important;
  color: #7a849a !important;
  font-size: 1rem !important;
  cursor: pointer !important;
  padding: 0 !important;
  line-height: 1 !important;
}

.cr-title {
  font-weight: 900 !important;
  font-size: 1rem !important;
  letter-spacing: 2px !important;
  color: #fff !important;
  white-space: nowrap !important;
}
.cr-title span { color: #ffd600 !important; }

.cr-howto {
  background: rgba(255,255,255,0.05) !important;
  border: none !important;
  color: #7a849a !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  padding: 6px 12px !important;
  border-radius: 5px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
}

.cr-balance {
  background: #13151f !important;
  padding: 6px 12px !important;
  border-radius: 5px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 5px !important;
  font-weight: 700 !important;
  color: #fff !important;
  font-size: 0.85rem !important;
  white-space: nowrap !important;
}
.cr-cur { color: #7a849a !important; font-size: 0.75rem !important; }

/* ================================================
   GAME VIEWPORT
   ================================================ */
.cr-viewport {
  background: #343751 !important;
  height: 320px !important;
  position: relative !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  flex-shrink: 0 !important;
}

.cr-viewport::-webkit-scrollbar { height: 4px !important; }
.cr-viewport::-webkit-scrollbar-track { background: transparent !important; }
.cr-viewport::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1) !important;
  border-radius: 3px !important;
}

.cr-road-wrap {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  height: 100% !important;
  min-width: max-content !important;
}

/* ── Arch column ── */
.cr-arch-col {
  width: 110px !important;
  min-width: 110px !important;
  height: 100% !important;
  position: relative !important;
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.cr-arch {
  width: 76px !important;
  height: 116px !important;
  background: #1e2130 !important;
  border-radius: 38px 38px 0 0 !important;
  position: absolute !important;
  bottom: 0 !important;
  box-shadow: inset 0 0 28px rgba(0,0,0,0.9), 0 0 0 5px #16182a !important;
}

/* ── Road ── */
.cr-road {
  display: flex !important;
  flex-direction: row !important;
  height: 100% !important;
}

/* ── Lane ── */
.cr-lane {
  width: 130px !important;
  min-width: 130px !important;
  height: 100% !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  border-right: 2px dashed rgba(255,255,255,0.1) !important;
  flex-shrink: 0 !important;
}

.cr-lane.active {
  background: rgba(255,255,255,0.03) !important;
}

/* ── Multiplier badge ── */
.cr-badge {
  width: 88px !important;
  height: 88px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle at 38% 35%, #4a5070, #2d3050) !important;
  border: 5px solid #3d4260 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 900 !important;
  font-size: 0.95rem !important;
  color: rgba(255,255,255,0.5) !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -68%) !important;
  transition: all 0.25s ease !important;
  z-index: 3 !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4), inset 0 2px 4px rgba(255,255,255,0.05) !important;
}

.cr-lane.active .cr-badge {
  background: radial-gradient(circle at 38% 35%, #2ed47a, #0d9e47) !important;
  border-color: #1dba5a !important;
  color: #fff !important;
  font-size: 1.05rem !important;
  box-shadow: 0 0 24px rgba(39,208,124,0.55), 0 4px 16px rgba(0,0,0,0.4) !important;
  transform: translate(-50%, -68%) scale(1.07) !important;
}

/* ── Vent ── */
.cr-vent {
  width: 76px !important;
  height: 44px !important;
  background: #1a1d2e !important;
  border-radius: 5px 5px 0 0 !important;
  position: absolute !important;
  bottom: 0 !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  overflow: hidden !important;
  z-index: 2 !important;
}

.cr-vent::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px, transparent 5px,
    rgba(255,255,255,0.07) 5px, rgba(255,255,255,0.07) 7px
  ) !important;
}

/* ── Fire ── */
.cr-fire {
  display: none !important;
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 90px !important;
  z-index: 4 !important;
}

.cr-fire::before, .cr-fire::after {
  content: '' !important;
  position: absolute !important;
  bottom: 0 !important;
  border-radius: 80% 80% 0 0 !important;
  animation: cr-flicker 0.2s ease-in-out infinite alternate !important;
  transform-origin: bottom center !important;
}

.cr-fire::before {
  left: 10% !important;
  width: 80% !important;
  height: 90px !important;
  background: radial-gradient(ellipse at bottom, #ff6600 0%, #ff2200 55%, transparent 100%) !important;
  filter: blur(3px) !important;
  animation-duration: 0.18s !important;
}

.cr-fire::after {
  left: 20% !important;
  width: 60% !important;
  height: 60px !important;
  background: radial-gradient(ellipse at bottom, #ffe000 0%, #ff8800 60%, transparent 100%) !important;
  filter: blur(2px) !important;
  animation-duration: 0.22s !important;
  animation-direction: alternate-reverse !important;
}

@keyframes cr-flicker {
  0%   { transform: scaleY(1)   scaleX(1); }
  33%  { transform: scaleY(1.2) scaleX(0.9); }
  66%  { transform: scaleY(0.9) scaleX(1.1); }
  100% { transform: scaleY(1.3) scaleX(0.88); }
}

.cr-lane.on-fire .cr-fire { display: block !important; }
.cr-lane.on-fire .cr-vent {
  box-shadow: 0 -14px 40px rgba(255,100,0,0.7) !important;
}

/* ================================================
   CHICKEN
   ================================================ */
.cr-chicken {
  position: absolute !important;
  bottom: 44px !important;
  left: 50% !important;
  transform: translateX(-50%) scaleX(-1) !important; /* face right */
  width: 80px !important;
  height: 90px !important;
  z-index: 10 !important;
  pointer-events: none !important;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.7)) !important;
}

.cr-chicken svg {
  width: 80px !important;
  height: 90px !important;
  overflow: visible !important;
  display: block !important;
}

@keyframes cr-die {
  0%   { transform: translateX(-50%) scaleX(-1) scale(1)    rotate(0deg);   opacity: 1; }
  40%  { transform: translateX(-50%) scaleX(-1) scale(1.3)  rotate(-20deg); filter: brightness(2.5) saturate(3); }
  100% { transform: translateX(-50%) scaleX(-1) scale(0.2)  rotate(-90deg); opacity: 0; }
}
.cr-chicken.dead { animation: cr-die 0.9s forwards ease-in !important; }

/* ================================================
   CONTROLS  (Elementor-safe 2-row layout)
   ================================================ */
.cr-controls {
  background: #22263a !important;
  border-top: 1px solid rgba(255,255,255,0.06) !important;
  padding: 10px 14px !important;
  flex-shrink: 0 !important;
}

/* ── Row 1 ── */
.cr-row1 {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  margin-bottom: 8px !important;
  width: 100% !important;
}

/* Bet MIN|val|MAX pill */
.cr-bet-labels {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  background: #13151f !important;
  border-radius: 6px !important;
  overflow: hidden !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  flex-shrink: 0 !important;
}

.cr-minmax {
  background: #272c42 !important;
  border: none !important;
  color: #7a849a !important;
  font-size: 0.6rem !important;
  font-weight: 700 !important;
  padding: 7px 8px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}

.cr-bet-input {
  background: none !important;
  border: none !important;
  color: #fff !important;
  font-weight: 900 !important;
  font-size: 0.9rem !important;
  width: 48px !important;
  text-align: center !important;
  outline: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
.cr-bet-input::-webkit-inner-spin-button,
.cr-bet-input::-webkit-outer-spin-button { -webkit-appearance: none !important; }
.cr-bet-input { -moz-appearance: textfield !important; }

/* Difficulty label (Row 1) */
.cr-diff-label {
  color: #7a849a !important;
  font-size: 0.6rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.8px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

/* Chance of collision (Row 1 – label + %) */
.cr-chance-label-wrap {
  display: flex !important;
  flex-direction: column !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

.cr-ctrl-label {
  color: #7a849a !important;
  font-size: 0.58rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.7px !important;
  line-height: 1.2 !important;
}

.cr-chance-val {
  font-size: 1.1rem !important;
  font-weight: 900 !important;
  color: #fff !important;
  line-height: 1 !important;
}

/* Action buttons group (far right of row 1) */
.cr-action-col {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  margin-left: auto !important;
  flex-shrink: 0 !important;
  flex-wrap: nowrap !important;
}

.cr-refresh {
  background: #2e344e !important;
  border: none !important;
  color: #fff !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  font-size: 1rem !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.3s !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}
.cr-refresh:hover { transform: rotate(180deg) !important; background: #3d4560 !important; }

/* CASH OUT (orange) */
.cr-btn-cashout {
  background: #ff9100 !important;
  border: none !important;
  border-radius: 7px !important;
  color: #fff !important;
  font-weight: 900 !important;
  font-size: 0.7rem !important;
  line-height: 1.3 !important;
  padding: 8px 12px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 0 #c26500 !important;
  text-align: center !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  transition: transform 0.1s, box-shadow 0.1s !important;
}
.cr-btn-cashout:active { transform: translateY(2px) !important; box-shadow: 0 2px 0 #c26500 !important; }

#crCashoutAmt {
  display: block !important;
  font-size: 0.85rem !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

/* GO / Play (green) */
.cr-btn-go {
  background: #27d07c !important;
  border: none !important;
  border-radius: 7px !important;
  color: #fff !important;
  font-weight: 900 !important;
  font-size: 1rem !important;
  padding: 0 22px !important;
  height: 48px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 0 #0e8a46 !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  transition: transform 0.1s, box-shadow 0.1s !important;
}
.cr-btn-go:active { transform: translateY(2px) !important; box-shadow: 0 2px 0 #0e8a46 !important; }
.cr-btn-go:disabled { background: #444 !important; box-shadow: none !important; cursor: not-allowed !important; opacity: 0.6 !important; }

/* ── Row 2 ── */
.cr-row2 {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  width: 100% !important;
}

.cr-row2-spacer { flex: 1 !important; }

/* Quick bets */
.cr-quick {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 5px !important;
  flex-shrink: 0 !important;
  flex-wrap: nowrap !important;
}

.cr-quick button {
  background: #2e344e !important;
  border: none !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 0.62rem !important;
  padding: 5px 9px !important;
  border-radius: 14px !important;
  cursor: pointer !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 2px !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}
.cr-quick button span { color: #ffd600 !important; font-size: 0.55rem !important; }
.cr-quick button:hover { background: #3d4560 !important; }

/* Difficulty pills */
.cr-diff-pills {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  background: #13151f !important;
  border-radius: 6px !important;
  padding: 3px !important;
  gap: 2px !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  flex-shrink: 0 !important;
  flex-wrap: nowrap !important;
}

.cr-pill {
  background: none !important;
  border: none !important;
  color: #7a849a !important;
  font-size: 0.65rem !important;
  font-weight: 700 !important;
  padding: 6px 10px !important;
  border-radius: 5px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: 0.2s !important;
  line-height: 1 !important;
}
.cr-pill.active { background: #2e344e !important; color: #fff !important; }
.cr-pill:hover:not(.active) { color: #bbb !important; }

/* ================================================
   RESPONSIVE – TABLET  (≤768px)
   ================================================ */
@media (max-width: 768px) {

  /* Outer wrapper: remove side padding gap */
  .cr-wrap {
    padding: 0 !important;
  }

  /* App: full width, no horizontal overflow */
  .cr-app {
    max-width: 100% !important;
    border-radius: 0 !important;
  }

  /* Header: shrink to two items per side */
  .cr-header {
    height: auto !important;
    min-height: 48px !important;
    padding: 6px 12px !important;
    flex-wrap: nowrap !important;
  }

  .cr-title {
    font-size: 0.85rem !important;
    letter-spacing: 1px !important;
  }

  .cr-howto {
    font-size: 0.65rem !important;
    padding: 5px 8px !important;
  }

  .cr-balance {
    font-size: 0.78rem !important;
    padding: 5px 8px !important;
  }

  /* Viewport: shorter on tablet */
  .cr-viewport {
    height: 260px !important;
  }

  /* Lane slightly narrower */
  .cr-lane {
    width: 110px !important;
    min-width: 110px !important;
  }

  /* Badge slightly smaller */
  .cr-badge {
    width: 78px !important;
    height: 78px !important;
    font-size: 0.85rem !important;
  }

  /* Controls: more padding room */
  .cr-controls {
    padding: 8px 10px !important;
  }

  /* Row 1: allow wrapping so nothing is clipped */
  .cr-row1 {
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin-bottom: 6px !important;
  }

  /* Bet labels & diff label & chance: stay left, wrap as group */
  .cr-bet-labels {
    flex-shrink: 0 !important;
  }

  .cr-diff-label {
    font-size: 0.58rem !important;
  }

  .cr-chance-label-wrap {
    /* grow to push action col to next line */
    flex-grow: 1 !important;
  }

  .cr-chance-val {
    font-size: 0.95rem !important;
  }

  /* Action col: move to second sub-row by giving it full width */
  .cr-action-col {
    width: 100% !important;
    margin-left: 0 !important;
    justify-content: flex-end !important;
  }

  /* GO button: fill more width */
  .cr-btn-go {
    flex: 1 !important;
    max-width: 140px !important;
    font-size: 0.9rem !important;
    height: 44px !important;
    padding: 0 14px !important;
  }

  .cr-btn-cashout {
    font-size: 0.65rem !important;
    padding: 7px 10px !important;
  }

  /* Row 2: allow wrapping */
  .cr-row2 {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  .cr-quick {
    flex-wrap: wrap !important;
    gap: 4px !important;
  }

  .cr-diff-pills {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
  }
}

/* ================================================
   RESPONSIVE – MOBILE  (≤480px)
   ================================================ */
@media (max-width: 480px) {

  /* Header: hide non-essential icons to save space */
  .cr-header {
    padding: 5px 10px !important;
  }

  /* Hide the gear/menu icon buttons on very small screens */
  .cr-header-right .cr-icon-btn {
    display: none !important;
  }

  .cr-title {
    font-size: 0.78rem !important;
    letter-spacing: 0.5px !important;
  }

  .cr-howto {
    display: none !important;   /* hide "How to play?" to reclaim header space */
  }

  .cr-balance {
    font-size: 0.75rem !important;
    padding: 4px 7px !important;
  }

  /* Viewport: compact height for small phones */
  .cr-viewport {
    height: 220px !important;
  }

  /* Arch column narrower */
  .cr-arch-col {
    width: 80px !important;
    min-width: 80px !important;
  }

  .cr-arch {
    width: 60px !important;
    height: 90px !important;
    border-radius: 30px 30px 0 0 !important;
  }

  /* Lane */
  .cr-lane {
    width: 95px !important;
    min-width: 95px !important;
  }

  /* Badge */
  .cr-badge {
    width: 68px !important;
    height: 68px !important;
    font-size: 0.78rem !important;
    border-width: 3px !important;
  }

  /* Chicken */
  .cr-chicken,
  .cr-chicken svg {
    width: 64px !important;
    height: 72px !important;
  }

  /* Controls */
  .cr-controls {
    padding: 8px 8px !important;
  }

  /* Row 1 */
  .cr-row1 {
    flex-wrap: wrap !important;
    gap: 5px !important;
    margin-bottom: 5px !important;
    align-items: center !important;
  }

  /* Bet pill */
  .cr-minmax {
    font-size: 0.55rem !important;
    padding: 6px 6px !important;
  }

  .cr-bet-input {
    width: 40px !important;
    font-size: 0.85rem !important;
  }

  /* Diff + Chance: sit in a flex row */
  .cr-diff-label {
    font-size: 0.55rem !important;
  }

  .cr-ctrl-label {
    font-size: 0.52rem !important;
    white-space: normal !important;
    max-width: 60px !important;
    line-height: 1.1 !important;
  }

  .cr-chance-val {
    font-size: 0.85rem !important;
  }

  /* Action buttons row */
  .cr-action-col {
    width: 100% !important;
    margin-left: 0 !important;
    justify-content: flex-end !important;
    gap: 6px !important;
  }

  .cr-refresh {
    width: 36px !important;
    height: 36px !important;
    font-size: 0.9rem !important;
  }

  .cr-btn-go {
    flex: 1 !important;
    max-width: unset !important;
    height: 40px !important;
    font-size: 0.85rem !important;
    padding: 0 10px !important;
  }

  .cr-btn-cashout {
    font-size: 0.6rem !important;
    padding: 6px 8px !important;
  }

  #crCashoutAmt {
    font-size: 0.75rem !important;
  }

  /* Row 2 */
  .cr-row2 {
    flex-wrap: wrap !important;
    gap: 5px !important;
  }

  .cr-quick {
    flex-wrap: wrap !important;
    gap: 3px !important;
  }

  .cr-quick button {
    font-size: 0.58rem !important;
    padding: 4px 7px !important;
  }

  /* Difficulty pills: scrollable row instead of wrapping */
  .cr-diff-pills {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    max-width: 100% !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }

  .cr-diff-pills::-webkit-scrollbar {
    display: none !important;
  }

  .cr-pill {
    font-size: 0.6rem !important;
    padding: 5px 8px !important;
  }
}

/* ================================================
   RESPONSIVE – VERY SMALL  (≤360px)
   ================================================ */
@media (max-width: 360px) {

  .cr-viewport {
    height: 190px !important;
  }

  .cr-lane {
    width: 82px !important;
    min-width: 82px !important;
  }

  .cr-badge {
    width: 58px !important;
    height: 58px !important;
    font-size: 0.7rem !important;
  }

  .cr-arch-col {
    width: 68px !important;
    min-width: 68px !important;
  }

  .cr-arch {
    width: 50px !important;
    height: 76px !important;
    border-radius: 25px 25px 0 0 !important;
  }

  .cr-chicken,
  .cr-chicken svg {
    width: 54px !important;
    height: 60px !important;
  }
}
