* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #12141c;
  color: #f2f2f5;
  overscroll-behavior: none;
}
.hidden { display: none !important; }

.conn-indicator, .host-gone-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  text-align: center;
  padding: 8px;
  font-size: 0.85rem;
  z-index: 10;
}
.conn-indicator { background: #b8324a; color: #fff; }
.host-gone-banner { background: #7a5b12; color: #fff; }

#join-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
#join-screen h1 { text-align: center; font-size: 1.6rem; margin-bottom: 24px; }
#join-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 320px;
}
#join-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: #a8adbd;
}
#join-form input {
  font-size: 1.4rem;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #383d52;
  background: #1a1d29;
  color: #f2f2f5;
  text-align: center;
}
#join-form button {
  font-size: 1.1rem;
  padding: 14px;
  border-radius: 10px;
  border: none;
  background: #3a63f0;
  color: #fff;
  cursor: pointer;
  margin-top: 8px;
}
.error { color: #ff6b7f; text-align: center; }

#buzz-screen {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px;
}
.buzz-btn {
  width: min(80vw, 320px);
  height: min(80vw, 320px);
  border-radius: 50%;
  border: none;
  font-size: 1.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  background: #383d52;
  transition: background 0.1s, transform 0.1s;
  user-select: none;
  /* Winner names (up to 24 chars) can appear here, not just short fixed
     labels like BUZZ/WAIT - keep long ones readable instead of overflowing
     the circle. */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 28px;
  line-height: 1.15;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}
.buzz-btn.won, .buzz-btn.locked { font-size: 2rem; word-break: break-all; }
.buzz-btn:not(:disabled):active { transform: scale(0.96); }
.buzz-btn.ready { font-size: 4rem; background: #2f9e44; box-shadow: 0 0 40px rgba(47,158,68,0.5); }
.buzz-btn.won { background: #2563eb; box-shadow: 0 0 60px rgba(37,99,235,0.7); animation: pulse 0.6s ease-in-out infinite alternate; }
.buzz-btn.locked { background: #b8324a; }
@keyframes pulse {
  from { transform: scale(1); }
  to { transform: scale(1.04); }
}
.buzz-status { font-size: 1.1rem; color: #d4d7e0; text-align: center; }
.my-sound { font-size: 0.85rem; color: #7c8194; text-align: center; }
