.how-to-play {
  margin-top: 20px;
  padding: 20px;
  background: #1e293b; /* Match site dark blue */
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  font-family: 'Inter', Arial, sans-serif;
  color: #e5e7eb; /* Light gray for text */
}

.how-to-play h2 {
  margin-top: 0;
  font-size: 2em;
  font-weight: 700;
  color: #38bdf8; /* Accent blue */
  letter-spacing: 0.5px;
}

.how-to-play h3 {
  margin-top: 1.5em;
  font-size: 1.2em;
  font-weight: 600;
  color: #10b981; /* Accent green */
}

.how-to-play ol,
.how-to-play ul {
  margin: 1em 0 1em 1.5em;
  padding-left: 1.2em;
}

.how-to-play li {
  margin-bottom: 0.5em;
  line-height: 1.6;
}

.how-to-play ul ul {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  padding-left: 1.5em;
}

.how-to-play strong {
  color: #fbbf24; /* Yellow for emphasis */
}

.how-to-play span[style*="font-size:1.2em"] {
  vertical-align: middle;
}

@media (max-width: 800px) {
  .how-to-play {
    max-width: 98vw;
    padding: 1em;
    font-size: 1em;
  }
  .how-to-play h2 {
    font-size: 1.3em;
  }
  .how-to-play h3 {
    font-size: 1.05em;
  }
}

.would-have-died {
    background: rgba(255,0,0,0.15) !important;
    position: relative;
}

.chicken-game {
    background-color: #1e293b; /* Matches the bar for consistency */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding-top: 0;
}

.game-wrapper {
    position: relative;
    overflow-x: auto; /* enables horizontal scroll */
    overflow-y: hidden;
    white-space: nowrap;
    background-color: #1e293b;
    padding: 20px;
    border-radius: 10px;
    max-width: 100%;
    box-sizing: border-box;
}

#message {
    padding: 0;
    padding-bottom: 10px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.chicken-lane {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 250px;
    min-width: fit-content; /* don't shrink below content width */
    overflow: visible;
}


.sidewalk {
    width: 100px; /* Increased width for better visibility */
    height: 250px;
    background: #999;
    display: block; /* Ensure sidewalks are displayed */
    z-index: 900;
}

.road {
    position: relative;
    display: flex;
    align-items: flex-end;
    height: 250px;
    flex-grow: 1;
    box-sizing: border-box;
    background-color: #333;
    min-width: fit-content; /* allow content to define width */
    overflow-y: hidden;
    overflow-x: visible;
}


.line {
    width: 10px;
    height: 250px; /* Matches the height of the step */
    background-color: white;
}

.step {
width: 100px;
height: 250px;
position: relative;
background: #555;
display: flex;
justify-content: center;
align-items: flex-end;
flex-direction: column;
}

.step .multiplier {
font-size: 16px;
color: white;
}

.step .potential {
font-size: 14px;
color: lightgreen;
}

.road::before {
content: '';
position: absolute;
top: 0;
bottom: 0;
width: 100%;
z-index: 0;
}

.chicken {
    position: absolute;     
    z-index: 10;
    transition: left 0.4s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.car {
position: absolute;
top: -100px;
width: 60px;
height: 100px;
background: yellow;
z-index: 9;
border-radius: 10px;
transition: top 0.3s ease;
}

.barrier {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 20px;
background: repeating-linear-gradient(90deg, #f00, #f00 10px, #fff 10px, #fff 20px);
z-index: 2;
}
:root {
  --primary-color: #10b981;
  --background-color: #2e364d;
  --input-bg: #0f172a;
  --text-color: #ffffff;
  --highlight-color: #38bdf8;
  --label-color: #9ca3af;
}

/* Main Overlay Container */
.controls-overlay {
  background-color: var(--background-color);
  padding: 10px;
  border-radius: 15px;
  box-sizing: border-box;
  overflow-x: auto;
  display: flex;
  justify-content: center;
  pointer-events: none;
  width: 100%;
}

/* Inner Controls Container */
.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  width: 100%;
  max-width: 1200px;
  box-sizing: border-box;
  

}

/* Grouped Control Sections */
.difficulty-selector,
.bet-controls,
.play-display {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* Input */
#bet-input {
  width: 70px;
  padding: 6px;
  font-size: 14px;
  border: 2px solid var(--primary-color);
  border-radius: 6px;
  background-color: var(--input-bg);
  color: var(--text-color);
  text-align: center;
  box-sizing: border-box;
}

#bet-input:focus {
  outline: none;
  border-color: var(--highlight-color);
}

/* Buttons */
.controls button {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: bold;
  background-color: var(--primary-color);
  color: var(--text-color);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  box-sizing: border-box;
  flex: 1;
  padding: 10px;
  
}

.controls button:hover {
  background-color: var(--highlight-color);
  transform: scale(1.05);
}

.controls button:active {
  transform: scale(0.95);
}

/* Difficulty Selector Specific Styles */
.difficulty-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.controls label {
  grid-column: 1 / -1;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--label-color);
  text-align: center;
  margin-bottom: 4px;
}

.difficulty-selector button {
  width: 100%;
  padding: 12px;
  font-size: 12px;
  background-color: var(--input-bg);
  border: 2px solid var(--primary-color);
  border-radius: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.difficulty-selector button.selected {
  border-color: yellow;
}

/* In-Game Button Styles */
#in-game-buttons {
  display: none;
  gap: 10px;
  white-space: nowrap;
  width: 100%;
}

/* Responsive Layouts */
@media (max-width: 768px) {
  .controls {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
  }

  .difficulty-selector label {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  .difficulty-selector button {
    font-size: 13px;
    height: 36px;
  }

  .controls button,
  #bet-input {
    width: 100%;
    height: 44px;
    font-size: 15px;
  }

  .controls button {
    aspect-ratio: 3 / 1;
  }
}

#message {
text-align: center;
color: white;
margin-top: 10px;
font-weight: bold;
}

.multiplier {
    padding-right: 20px;
}

.potential {
    padding-right: 20px;
}

.bet-controls {
  display: grid;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  box-sizing: border-box;
  grid-template-columns: repeat(3, minmax(0, 1fr));

}

.bet-controls input#bet-input {
  width: 70px;
  font-size: 13px;
  padding: 5px;
  background-color: #0f172a;
  color: #fff;
  border: 2px solid #10b981;
  border-radius: 5px;
  text-align: center;
  box-sizing: border-box;
}

.bet-controls button {
  padding: 6px 10px;
  font-size: 13px;
  font-weight: bold;
  background-color: #10b981;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.bet-controls button:hover {
  background-color: #38bdf8;
  transform: scale(1.05);
}

button#play-button:active {
    transform: scale(0.95);
}

@media (max-width: 530px) {
  html.sidebar-expanded #chicken-section {
    display: none;
  }
  html.sidebar-expanded .how-to-play {
    display: none;
  }
}

@media (max-width: 480px) {
  .controls button {
    font-size: 12px;
  }
}

@media (max-width: 380px) {
  html.sidebar-collapsed #chicken-section {
    display: none;
  }
  html.sidebar-collapsed .how-to-play {
    display: none;
  }
  .controls button {
    font-size: 10px;
  }
}