  :root {
  --green: #2c6e49;
  --red: #c62828;
  --light-green: #a5d6a7;
  --light-red: #ef9a9a;
  --card-bg: #f9f9f9;
  --marker-green: #2e7d32;
  --marker-red: #c62828;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--light-green);
  color: var(--green);
  margin: 0;
  padding: 0;
}

header {
  background: var(--green);
  color: white;
  padding: 1rem;
  text-align: center;
  font-size: 1.5rem;
  font-weight: bold;
}

#modeToggle {
  margin: 1rem auto;
  text-align: center;
}

button {
  background-color: var(--green);
  border: none;
  color: white;
  padding: 0.5rem 1rem;
  margin: 0.2rem;
  cursor: pointer;
  font-weight: bold;
  border-radius: 4px;
  user-select: none;
  transition: background 0.2s;
}
button:hover {
  background-color: var(--red);
}

#container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 1rem;
}

/* Panel styles */
#playerPanel, #hostPanel {
  max-width: auto;
  width: 90%;
  margin: 2rem auto;
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: fit-content;
}

/* Bingo card grid styles */
#bingoCard {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 5px;
  background: var(--card-bg);
  border: 4px solid var(--green);
  border-radius: 8px;
  width: 100%;
  max-width: 800px;
  aspect-ratio: 1 / 1;
  user-select: none;
}

.cell {
  background: white;
  border: 2px solid var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5px;
  font-size: 0.9rem;
  cursor: pointer;
  position: relative;
}

.free-space {
  background: var(--light-green);
  font-weight: bold;
  color: var(--green);
  cursor: default;
  font-size: 1rem;
}

.marked {
  color: white;
  font-weight: bold;
}

#markerSelect {
  margin: 1rem auto;
  text-align: center;
}

.marker-option {
  cursor: pointer;
  font-size: 1.5rem;
  margin: 0 10px;
  user-select: none;
}

.selected {
  text-shadow: 0 0 5px black;
}

#calledStatement {
  font-size: 1.2rem;
  font-weight: bold;
  margin: 1rem 0;
  color: var(--red);
}

#historyList {
  max-height: 300px;
  overflow-y: auto;
  border-top: 1px solid var(--green);
  padding-top: 0.5rem;
}

#historyList li {
  margin: 0.3rem 0;
  font-size: 0.9rem;
}

@media (max-width:800px) {
  #container {
    flex-direction: column;
    align-items: center;
  }
  #hostPanel, #playerPanel {
    width: 95%;
    margin-left: 0;
    margin-top: 1rem;
    padding: 1rem;
    max-width: none;
  }
  #bingoCard {
    max-width: 95vw;
    min-width: 250px;
  }
}
