* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: #000;
  color: #ccc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  text-transform: lowercase;
}
.container {
  width: 100%;
  max-width: 480px;
  padding: 24px 20px;
}
.screen {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.screen.active {
  display: block;
  opacity: 1;
}
h1 { font-size: 2.4rem; font-weight: 300; letter-spacing: 0.1em; margin-bottom: 4px; }
h2 { font-size: 1.1rem; font-weight: 300; color: #666; margin-bottom: 32px; }
h3 { font-size: 1rem; font-weight: 400; margin-bottom: 16px; color: #999; }

/* buttons */
button {
  background: none;
  border: 1px solid #333;
  color: #ccc;
  padding: 12px 24px;
  font-size: 0.95rem;
  cursor: pointer;
  text-transform: lowercase;
  font-family: inherit;
  transition: border-color 0.2s, color 0.2s;
  width: 100%;
  margin-top: 8px;
}
button:hover { border-color: #666; color: #fff; }
button:disabled { opacity: 0.3; cursor: default; border-color: #222; color: #555; }
button:disabled:hover { border-color: #222; color: #555; }

/* inputs */
input[type="text"] {
  background: none;
  border: 1px solid #333;
  color: #ccc;
  padding: 12px 16px;
  font-size: 0.95rem;
  width: 100%;
  font-family: inherit;
  text-transform: lowercase;
  outline: none;
}
input[type="text"]:focus { border-color: #666; }
input[type="text"]::placeholder { color: #444; }

/* player list */
.player-list { list-style: none; margin: 16px 0; }
.player-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #1a1a1a;
}
.player-list li span { color: #999; }
.remove-btn {
  background: none;
  border: none;
  color: #444;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0 4px;
  width: auto;
  margin: 0;
}
.remove-btn:hover { color: #888; }

/* stepper controls */
.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 8px 0;
}
.stepper label { color: #999; font-size: 0.95rem; }
.stepper-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}
.stepper-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin: 0;
}
.stepper-val { font-size: 1.1rem; min-width: 20px; text-align: center; }

/* add player row */
.add-row { display: flex; gap: 8px; }
.add-row input { flex: 1; }
.add-row button { width: auto; padding: 12px 20px; }

.error { color: #a33; font-size: 0.85rem; margin-top: 8px; min-height: 1.2em; }

/* word reveal */
.reveal-card {
  text-align: center;
  padding: 60px 20px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.reveal-name { font-size: 1.3rem; color: #999; margin-bottom: 24px; }
.reveal-word { font-size: 1.8rem; color: #fff; margin-bottom: 32px; letter-spacing: 0.05em; }
.reveal-tap { color: #444; font-size: 0.85rem; }
.reveal-role { color: #555; font-size: 0.85rem; margin-top: 8px; }

/* play screen */
.round-info { color: #666; font-size: 0.9rem; margin-bottom: 20px; }
.alive-list { list-style: none; margin: 16px 0; }
.alive-list li {
  padding: 14px 16px;
  border: 1px solid #1a1a1a;
  margin-bottom: 6px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.alive-list li:hover { border-color: #333; }
.alive-list li.selected { border-color: #666; background: #111; }
.alive-list li.eliminated {
  opacity: 0.3;
  text-decoration: line-through;
  cursor: default;
  pointer-events: none;
}

/* overlay */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 100;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}
.overlay.active { display: flex; }
.overlay-role { font-size: 1rem; color: #666; margin-top: 8px; }
.overlay-word { font-size: 1.6rem; color: #fff; margin-bottom: 8px; }
.overlay-name { font-size: 1.2rem; color: #999; margin-bottom: 20px; }
.overlay button { max-width: 300px; }

/* mr white guess */
.guess-section { text-align: center; padding: 40px 0; }
.guess-section p { color: #999; margin-bottom: 20px; font-size: 0.95rem; }
.guess-section input { margin-bottom: 12px; text-align: center; }

/* game over */
.winner-text { font-size: 1.6rem; color: #fff; margin-bottom: 32px; text-align: center; }
.final-list { list-style: none; margin: 16px 0 32px; }
.final-list li {
  padding: 10px 0;
  border-bottom: 1px solid #1a1a1a;
  display: flex;
  justify-content: space-between;
}
.final-list .role-tag { color: #666; font-size: 0.85rem; }
.final-list .word-tag { color: #555; font-size: 0.85rem; margin-left: 8px; }
.final-list .elim { opacity: 0.4; }

.spacer { height: 24px; }
.divider { border: none; border-top: 1px solid #1a1a1a; margin: 24px 0; }

/* === sticker layout === */
.sticker-column {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 18px;
  pointer-events: none;
  z-index: 5;
}

.sticker-column.left {
  left: 12px;
}

.sticker-column.right {
  right: 12px;
}

/* sticker images */
.sticker {
  width: 180px;
  height: auto;
  animation: sway-jerky 4s steps(4, end) infinite;
  transform-origin: center;
}

/* jerky wiggle */
@keyframes sway-jerky {
  0%   { transform: rotate(-5deg); }
  25%  { transform: rotate(3deg); }
  50%  { transform: rotate(-2deg); }
  75%  { transform: rotate(5deg); }
  100% { transform: rotate(-5deg); }
}

.elim-image {
  width: 200px;
  height: auto;
  margin: 12px 0 16px;
  opacity: 0.95;
}

/* === responsive === */

/* mobile: stickers fill the empty bottom space */
@media (max-width: 768px) {
  .container {
    display: flex;
    flex-direction: column;
  }
  .sticker-column {
    position: static;
    transform: none;
    flex-direction: row;
    justify-content: center;
    gap: 12px;
    pointer-events: none;
  }
  .sticker-column.left {
    margin-top: 40px;
  }
  .sticker {
    width: 100px;
  }
  .sticker-column.left .sticker:nth-child(1) { transform: rotate(-7deg) translateY(10px); }
  .sticker-column.left .sticker:nth-child(2) { transform: rotate(4deg) translateY(-8px); }
  .sticker-column.left .sticker:nth-child(3) { transform: rotate(-3deg) translateY(15px); }
  .sticker-column.right .sticker:nth-child(1) { transform: rotate(5deg) translateY(-12px); }
  .sticker-column.right .sticker:nth-child(2) { transform: rotate(-6deg) translateY(6px); }
  .sticker-column.right .sticker:nth-child(3) { transform: rotate(3deg) translateY(-5px); }
  .elim-image {
    width: 150px;
  }
}

/* tablets / medium screens: smaller stickers */
@media (min-width: 769px) and (max-width: 1100px) {
  .sticker {
    width: 100px;
  }
}
