/* style.css — Duck Hunt: menu nowoczesny DOM, gra = canvas 4:3 letterbox. */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #0b1c2c; color: #eee;
  font-family: system-ui, -apple-system, sans-serif; overflow: hidden;
  -webkit-user-select: none; user-select: none; }

#stage { position: fixed; inset: 0; display: grid; place-items: center; }
#game { background: #3cbcfc; max-width: 100vw; max-height: 100dvh;
  width: min(100vw, calc(100dvh * 4 / 3)); aspect-ratio: 4 / 3;
  image-rendering: auto; cursor: none; touch-action: none; }
body:not(.ingame) #game { filter: blur(3px) brightness(0.5); cursor: default; }

.screen { position: fixed; inset: 0; display: none; overflow-y: auto;
  padding: 16px; z-index: 10; }
.screen.show { display: block; }
#gameui { pointer-events: none; overflow: hidden; }
#gameui > * { pointer-events: auto; }

#menu, #lobby, #endscreen { max-width: 780px; margin: 0 auto; position: relative; }
#menu.show, #lobby.show, #endscreen.show { display: block; }

h1 { font-size: 42px; margin: 18px 0 2px; letter-spacing: 4px;
  color: #ffdc00; text-shadow: 3px 3px 0 #b10; }
h2 { color: #ffdc00; } h3 { margin: 4px 0 8px; color: #7fdbff; }
.sub { margin: 0 0 14px; color: #9bd; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.panel { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px; padding: 10px 14px; margin: 10px 0; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .cols { grid-template-columns: 1fr; } }

input, select, button { font: inherit; border-radius: 8px; border: 1px solid #467;
  background: #12283c; color: #eee; padding: 7px 10px; }
button { cursor: pointer; background: #1c4; border-color: #1c4; color: #052; font-weight: 700; }
button:hover { filter: brightness(1.1); }
button.alt { background: #247; border-color: #247; color: #cde; }
button.big { font-size: 17px; padding: 10px 22px; }
button.mini { padding: 3px 10px; font-size: 13px; background: rgba(0,0,0,0.6);
  border-color: #555; color: #eee; }

.list { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.item { display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: rgba(0,0,0,0.25); padding: 6px 10px; border-radius: 8px; font-size: 14px; }
.dim { color: #9ab; font-size: 14px; }
.err { color: #ff6b6b; min-height: 20px; font-weight: 600; }
.foot { color: #789; font-size: 13px; margin-top: 18px; }
.foot a { color: #7fdbff; }
.share a { color: #7fdbff; word-break: break-all; }

.seats { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.seat { border: 2px solid #fff; border-radius: 8px; padding: 6px 12px;
  background: rgba(0,0,0,0.3); }

.chatlog { max-height: 120px; overflow-y: auto; font-size: 14px; margin-bottom: 6px; }
.chatlog b { color: #7fdbff; }

/* overlay w grze */
.gametop { position: absolute; top: 8px; left: 8px; display: flex; gap: 6px; }
.chatlog.game { position: absolute; left: 8px; bottom: 152px; width: min(46vw, 340px);
  max-height: 132px; text-shadow: 1px 1px 2px #000; font-size: 13px; }
#gameui input { position: absolute; left: 8px; bottom: 118px; width: min(46vw, 340px);
  background: rgba(0,0,0,0.55); border-color: #666; }
.replaybar { position: absolute; left: 50%; transform: translateX(-50%); top: 8px;
  display: flex; gap: 8px; align-items: center; background: rgba(0,0,0,0.6);
  padding: 6px 12px; border-radius: 10px; }
.replaybar input[type=range] { width: min(40vw, 320px); }

.endrow { display: flex; justify-content: space-between; border-left: 6px solid #fff;
  background: rgba(0,0,0,0.3); margin: 4px 0; padding: 8px 12px; border-radius: 6px; }
.endrow.bot { opacity: 0.75; }

@media (orientation: portrait) and (max-width: 700px) {
  #menu h1 { font-size: 30px; }
}
