body {
  font-family: 'Inter', Arial, sans-serif;
  background: linear-gradient(135deg, #e0eaff 0%, #fcf8ff 100%);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  color: #232946;
}
.container {
  max-width: 560px;
  margin: 32px auto;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 6px 32px 0 #e6eaff;
  padding: 28px;
}
h1 {
  text-align: center;
  font-weight: 700;
  font-size: 2.2em;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.room-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  align-items: center;
}
.bingo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 9px;
  margin: 26px 0;
  user-select: none;
  width: 100%;
}
.bingo-cell {
  background: #e8edff;
  border-radius: 18px;
  aspect-ratio: 1 / 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, color 0.16s, box-shadow 0.12s;
  cursor: pointer;
  box-shadow: 0 2px 6px #e0eaff;
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
}
.bingo-cell .cell-text {
  width: 95%;
  height: 95%;
  display: flex;
  align-items: center;
  justify-content: center;
  word-break: break-word;
  text-align: center;
  padding: 2px;
  line-height: 1.16em;
  font-size: clamp(0.68em, 2vw, 1.05em);
  overflow-wrap: anywhere;
  hyphens: auto;
  position: relative;
  z-index: 1;
}
.bingo-cell.marked-by-you {
  background: #36cfc9;
  color: #fff;
  box-shadow: 0 4px 16px #c9faf8;
  animation: pop .3s;
  font-weight: bold;
}
@keyframes pop { 0% {transform: scale(0.92);} 100%{transform: scale(1);} }
.bingo-cell.free {
  background: #feca57;
  color: #222;
  font-weight: bold;
  box-shadow: 0 2px 10px #ffe1a0;
  cursor: default;
  pointer-events: none;
}
.bingo-outline {
  position: absolute;
  inset: 0;
  border: 3.5px dotted;
  border-radius: 14px;
  pointer-events: none;
  z-index: 2;
  box-sizing: border-box;
  /* Strong white outer glow to increase visibility */
  filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 4px #fff);
}
.bingo-outline + .bingo-outline {
  /* stack effect for multi-claimed (rainbow) */
  margin: 2.5px;
}
.player-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.98em;
  justify-content: center;
}
.player-badge {
  background: #f4f7ff;
  padding: 5px 13px;
  border-radius: 14px;
  border: 1px solid #e4eaff;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}
.player-color-dot {
  width: 14px;
  height: 14px;
  border-radius: 100%;
  display: inline-block;
  margin-right: 3px;
  vertical-align: middle;
  border: 1.7px solid #fff;
  box-shadow: 0 0 0 1.5px #ddd;
}
.player-badge.self {
  background: #b7e4ea;
  color: #222;
  font-weight: bold;
  border: 1.5px solid #36cfc9;
}
.win-banner {
  background: #36cfc9;
  color: #232946;
  text-align: center;
  font-size: 1.2em;
  font-weight: bold;
  margin-top: 15px;
  padding: 10px 0;
  border-radius: 12px;
  animation: pop .38s;
}
details {
  margin-top: 16px;
  border-radius: 12px;
  background: #f8fbff;
  box-shadow: 0 2px 8px #e8edff;
  padding: 14px 18px;
}
summary {
  font-weight: 600;
  font-size: 1.04em;
  cursor: pointer;
  outline: none;
}
textarea {
  width: 100%;
  min-height: 50px;
  resize: vertical;
  border-radius: 10px;
  border: 1px solid #d0daec;
  padding: 8px;
  font-size: 1em;
  font-family: inherit;
  margin-top: 8px;
}
button, input[type="text"] {
  font-family: inherit;
  font-size: 1em;
  padding: 7px 16px;
  border-radius: 9px;
  border: 1px solid #bed6ff;
  outline: none;
  margin: 0 3px;
}
button {
  background: #4f8cff;
  color: #fff;
  cursor: pointer;
  transition: background 0.18s;
  border: none;
  margin-top: 0;
}
button:hover { background: #3772ff;}
.subtitle {
  text-align: center;
  color: #536;
  margin-bottom: 5px;
  font-size: 1.1em;
}
.room-id {
  background: #f0f6ff;
  font-weight: 700;
  border-radius: 8px;
  padding: 5px 13px;
  margin: 0 4px;
  font-size: 1em;
  letter-spacing: 1px;
  user-select: all;
  cursor: pointer;
}
@media (max-width: 600px) {
  .container { max-width: 97vw; padding: 7vw 3vw; }
  .bingo-cell { border-radius: 10px; }
  .bingo-grid { gap: 5px; }
  .bingo-cell .cell-text { font-size: clamp(0.62em, 2vw, 0.94em);}
}
