* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  background-color: #2e7d32;
  min-height: 100vh;
  padding: 10px;
}

.container {
  max-width: 500px;
  margin: 0 auto;
}

.hidden {
  display: none !important;
}

#join-screen {
  text-align: center;
  padding-top: 50px;
}

#join-screen h1 {
  color: white;
  margin-bottom: 30px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

#name-input {
  padding: 15px;
  font-size: 18px;
  border: none;
  border-radius: 5px;
  width: 80%;
  max-width: 300px;
  margin-bottom: 15px;
}

#join-btn {
  display: block;
  margin: 0 auto;
  padding: 15px 40px;
  font-size: 18px;
  font-weight: bold;
  background-color: #ffca28;
  color: #1b5e20;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.header {
  text-align: center;
  margin-bottom: 10px;
}

.header h1 {
  color: white;
  font-size: 24px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

#player-count {
  color: white;
  font-size: 14px;
}

.bingo-header {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  margin-bottom: 5px;
}

.bingo-header span {
  text-align: center;
  font-size: 24px;
  font-weight: bold;
  color: white;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

#bingo-card {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  background-color: white;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5px;
  font-size: 10px;
  font-weight: bold;
  background-color: #f5f5f5;
  border: 2px solid #1b5e20;
  border-radius: 5px;
  cursor: pointer;
  word-break: break-word;
  line-height: 1.2;
}

.cell.called {
  background-color: #ffca28;
  color: #1b5e20;
}

.cell.marked {
  background-color: #ff5722;
  color: white;
}

.cell.free {
  background-color: #1b5e20;
  color: white;
}

.buttons {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.buttons button {
  flex: 1;
  padding: 15px;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#call-event-btn {
  background-color: #1565c0;
  color: white;
}

#bingo-btn {
  background-color: #ffca28;
  color: #1b5e20;
}

#reset-btn {
  background-color: #f44336;
  color: white;
}

#called-events {
  margin-top: 20px;
  background-color: white;
  padding: 15px;
  border-radius: 10px;
}

#called-events h3 {
  margin-bottom: 10px;
  color: #1b5e20;
}

#called-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.called-tag {
  background-color: #ffca28;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: bold;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-content {
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  width: 100%;
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
  text-align: center;
}

.modal-content h2 {
  margin-bottom: 15px;
  color: #1b5e20;
}

#event-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 15px;
  max-height: 50vh;
  overflow-y: auto;
}

.event-option {
  padding: 12px;
  background-color: #f5f5f5;
  border: 2px solid #1b5e20;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

.event-option:hover {
  background-color: #e0e0e0;
}

.event-option.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#close-modal, #close-cell-modal, #close-message {
  padding: 12px 30px;
  background-color: #9e9e9e;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
}

.vote-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
}

.vote-buttons button {
  padding: 15px 30px;
  font-size: 18px;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#vote-yes {
  background-color: #4caf50;
  color: white;
}

#vote-no {
  background-color: #f44336;
  color: white;
}

#vote-timer {
  font-size: 24px;
  font-weight: bold;
  color: #f44336;
  margin: 15px 0;
}

#vote-count {
  font-size: 14px;
  color: #666;
}

#vote-event {
  font-size: 20px;
  font-weight: bold;
  color: #1b5e20;
  margin: 10px 0;
}

#vote-description {
  color: #666;
  margin-bottom: 10px;
}

#cell-description {
  color: #666;
  margin-bottom: 20px;
}