/* lobby — lifebuoy countdown, seat cards, invite code, host controls.
   Loaded after style.css, so it overrides the base lobby rules there. */

.lobby-body { padding-top: 2px; }

/* ------------------------------------------------------------ hero / clock */
.lobby-hero {
  display: flex; align-items: center; gap: 14px;
  margin: 2px 0 14px;
}
.lb-clock {
  position: relative; flex: 0 0 auto;
  width: 132px; height: 132px;
  animation: lbBob 4.6s ease-in-out infinite alternate;
}
@keyframes lbBob {
  from { transform: translateY(-3px) rotate(-3deg); }
  to   { transform: translateY(3px) rotate(3deg); }
}
.lb-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lb-ring circle { fill: none; }
.lb-shadow { stroke: rgba(60, 40, 15, 0.22); stroke-width: 20; }
.lb-white { stroke: #fbf6ea; stroke-width: 18; }
.lb-red { stroke: #d8432f; stroke-width: 18; stroke-dasharray: 12.5 12.5; stroke-dashoffset: 6.25; }
.lb-ghost { opacity: 0.28; }
.lb-edge { stroke: rgba(107, 58, 20, 0.55); stroke-width: 1.4; }
.lb-rope { stroke: rgba(107, 58, 20, 0.4); stroke-width: 1.3; stroke-dasharray: 1.2 1.8; }

.lb-face {
  position: absolute; left: 50%; top: 50%;
  width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background:
    repeating-linear-gradient(0deg, rgba(150, 115, 60, 0.06) 0 1px, transparent 1px 5px),
    radial-gradient(circle at 50% 35%, #fffdf6, #efe0c0);
  box-shadow: inset 0 2px 6px rgba(60, 40, 15, 0.25);
  color: var(--ink);
}
.lb-face b {
  display: block;
  font-family: Bangers, Impact, sans-serif; font-weight: 400;
  font-size: 30px; line-height: 1; letter-spacing: 1px;
  color: #0a86b4;
  font-variant-numeric: tabular-nums;
}
.lb-face small {
  display: block; margin-top: 1px;
  font-size: 9px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase;
  color: rgba(43, 29, 16, 0.55);
}
.lb-clock.idle .lb-face b { color: rgba(43, 29, 16, 0.35); }
.lb-clock.urgent .lb-face b { color: var(--red); }
.lb-clock.tick-a .lb-face b { animation: lbTickA 0.45s cubic-bezier(.2, .9, .3, 1.3); }
.lb-clock.tick-b .lb-face b { animation: lbTickB 0.45s cubic-bezier(.2, .9, .3, 1.3); }
@keyframes lbTickA { from { transform: scale(1.28); } to { transform: scale(1); } }
@keyframes lbTickB { from { transform: scale(1.28); } to { transform: scale(1); } }

.lb-info { flex: 1; min-width: 0; }
.lb-head {
  font-family: Bangers, Impact, sans-serif; font-size: 27px; line-height: 1; letter-spacing: 1.5px;
  color: #ffe14a;
  -webkit-text-stroke: 1.5px #5d3100;
  paint-order: stroke fill;
  text-shadow: 0 3px 0 #a85f00, 0 6px 10px rgba(60, 40, 15, 0.35);
  transform: rotate(-2deg); transform-origin: left center;
}
.lobby-hero .lobby-status {
  margin: 8px 0 0; font-size: 13.5px; line-height: 1.25; align-items: flex-start;
  font-variant-numeric: tabular-nums;
}
.lobby-hero .pulse-dot {
  position: relative; flex: 0 0 auto; margin-top: 5px;
  animation: none;
}
.lobby-hero .pulse-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: #ffe14a;
  animation: lbPing 1.8s ease-out infinite;
}
@keyframes lbPing { from { transform: scale(1); opacity: 0.7; } to { transform: scale(2.8); opacity: 0; } }

.lb-extend {
  margin-top: 10px; padding: 6px 16px 7px;
  flex-direction: column; gap: 0; line-height: 1;
  transform: rotate(-1.5deg);
}
.lb-extend b { font-family: Bangers, Impact, sans-serif; font-weight: 400; font-size: 21px; letter-spacing: 1px; color: #5a2c0c; }
.lb-extend span { font-size: 11px; }
.lb-extend:active { transform: translateY(2px) rotate(-3deg); }
.lb-extend.capped { opacity: 0.55; }

/* --------------------------------------------------------------- invite code */
.room-code-card { padding: 12px 14px 12px; margin-bottom: 14px; }
.room-code-card .code-row { margin-top: 4px; }
.room-code-card .code {
  font-size: 40px; letter-spacing: 7px; line-height: 1.05;
  padding: 2px 8px 0 4px; margin-left: -4px; border-radius: 10px;
  min-height: 48px;
  transition: transform 0.12s;
}
.room-code-card .code:active { transform: scale(0.96); }
.code-btns { display: flex; gap: 6px; flex: 0 0 auto; }

/* --------------------------------------------------------------------- seats */
.seats-lobby { gap: 10px; }
.lobby-seat {
  position: relative;
  min-height: 116px; padding: 14px 8px 10px;
  border-radius: 16px;
  align-items: center; justify-content: center; gap: 3px; text-align: center;
}
.lobby-seat.filled { box-shadow: 0 7px 14px rgba(60, 40, 15, 0.24), inset 0 1px 0 #fff; }
.lobby-seat.me { border-color: #22a9d8; box-shadow: 0 0 0 2px rgba(34, 169, 216, 0.35), 0 7px 14px rgba(60, 40, 15, 0.24); }
.lobby-seat.away .ls-av { opacity: 0.55; }

.ls-av {
  position: relative;
  width: 50px; height: 50px; font-size: 21px; margin-bottom: 3px;
  border-width: 3px;
}
.lobby-seat.bot .ls-av { border-style: dashed; }
.ls-dot {
  position: absolute; right: -3px; bottom: -2px;
  width: 13px; height: 13px; border-radius: 50%;
  background: #34c26a; border: 2px solid #fffdf6;
}
.lobby-seat.away .ls-dot { background: #a99c86; }
.lobby-seat.bot .ls-dot { background: #22a9d8; }

.lobby-seat .ls-name {
  max-width: 100%; font-size: 15px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ls-name em {
  font-style: normal; font-size: 10px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase;
  color: #fff; background: #22a9d8; border-radius: 6px; padding: 1px 5px; vertical-align: 2px;
}
.lobby-seat .ls-rating { font-size: 11px; color: rgba(43, 29, 16, 0.55); }

.ls-host {
  position: absolute; left: 8px; top: -9px;
  padding: 2px 9px 3px; border-radius: 3px;
  font-family: "Bree Serif", Georgia, serif; font-size: 11.5px; color: var(--wood-edge);
  background: linear-gradient(180deg, var(--wood-1), var(--wood-2) 60%, var(--wood-3));
  box-shadow: 0 2px 3px rgba(60, 40, 15, 0.35);
  text-shadow: 0 1px 0 rgba(255, 240, 205, 0.9);
  transform: rotate(-6deg);
}
.ls-kick {
  position: absolute; right: 4px; top: 4px;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; color: rgba(43, 29, 16, 0.55);
}
.ls-kick:active { transform: scale(0.9); }

.lobby-seat.empty {
  width: 100%; font: inherit; cursor: pointer;
  background: rgba(255, 255, 255, 0.14);
  border: 2px dashed rgba(255, 255, 255, 0.7);
  color: #fff; text-shadow: 0 1px 2px rgba(60, 40, 15, 0.45);
  transition: transform 0.12s, background-color 0.15s;
}
.lobby-seat.empty:active { transform: scale(0.97); background: rgba(255, 255, 255, 0.26); }
@media (hover: hover) { .lobby-seat.empty:hover { background: rgba(255, 255, 255, 0.24); } }
.ls-plus {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.85);
  font-size: 24px; font-weight: 600; line-height: 1;
  animation: lbBreathe 2.6s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 0.3s);
}
@keyframes lbBreathe { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.6; transform: scale(0.92); } }
.ls-inv { font-family: "Bree Serif", Georgia, serif; font-size: 15px; margin-top: 2px; }
.lobby-seat.empty small { font-size: 10.5px; opacity: 0.85; }

.lobby-seat.pop { animation: lbPop 0.55s cubic-bezier(.2, .9, .3, 1.25) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes lbPop {
  0%   { opacity: 0; transform: translateY(16px) scale(0.6) rotate(-6deg); }
  60%  { opacity: 1; transform: translateY(-3px) scale(1.05) rotate(1deg); }
  100% { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------------ actions */
.lobby-actions { margin: 14px 0 2px; }
.lobby-actions #startBtn { flex: 2; font-family: Bangers, Impact, sans-serif; font-size: 25px; letter-spacing: 2px; color: #5a2c0c; }
.lobby-actions #addBotBtn { flex: 1; }
.lobby-hint {
  margin: 6px 0 0; text-align: center;
  font-size: 11.5px; color: #fff; text-shadow: 0 1px 2px rgba(60, 40, 15, 0.5);
}
.lobby-hint:empty { display: none; }

/* -------------------------------------------------------------- small/large */
@media (max-width: 350px) {
  .lb-clock { width: 112px; height: 112px; }
  .lb-face { width: 62px; height: 62px; margin: -31px 0 0 -31px; }
  .lb-face b { font-size: 25px; }
  .lb-head { font-size: 23px; }
  .room-code-card .code { font-size: 32px; letter-spacing: 5px; }
}
@media (min-width: 480px) {
  .lb-clock { width: 150px; height: 150px; }
  .lb-face { width: 82px; height: 82px; margin: -41px 0 0 -41px; }
  .lb-face b { font-size: 35px; }
}

@media (prefers-reduced-motion: reduce) {
  .lb-clock, .ls-plus, .lobby-hero .pulse-dot::after,
  .lobby-seat.pop, .lb-clock.tick-a .lb-face b, .lb-clock.tick-b .lb-face b { animation: none !important; }
}
