/* Additions for online play: the Play-first menu, scoreboard, connection badge. Same tokens as style.css. */
.menu, .roominfo { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 400px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field .lab { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.menu input {
  font-family: var(--font-mono); font-size: 16px; color: var(--ink); background: rgba(15, 26, 60, .55);
  border: 1px solid var(--grid); border-radius: 2px; padding: 12px 12px; min-height: 48px; min-width: 0; outline: none;
  -webkit-user-select: text; user-select: text;
}
.menu input:focus-visible { border-color: var(--player); box-shadow: 0 0 0 1px var(--player); }
.menu input.code { text-transform: uppercase; letter-spacing: .2em; }
.btn.alt { background: transparent; color: var(--ink); border: 1px solid var(--dim); }
.btn.alt:hover { border-color: var(--player); color: var(--player); }
.btn.small { min-height: 40px; padding: 8px 14px; font-size: 12px; letter-spacing: .1em; }
.btn:disabled { opacity: .4; cursor: default; }
.err { color: var(--weak); font-size: 13px; }
.hint { margin: 0; color: var(--dim); font-size: 13px; }

/* The one big button: type a name, press Play */
.btn.play { width: 100%; min-height: 60px; font-size: 22px; letter-spacing: .2em; background: var(--player); box-shadow: 0 0 24px rgba(25, 240, 255, .35); }
.btn.play:hover { box-shadow: 0 0 34px rgba(25, 240, 255, .6); }
.menu .more, .menu .join { gap: 8px; }

/* Server browser: one row per public arena, fastest first. The whole row is the button. */
.servers { display: flex; flex-direction: column; gap: 6px; }
.srvhead { display: flex; justify-content: space-between; align-items: baseline; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--player); cursor: pointer; }
#serverList { display: flex; flex-direction: column; gap: 4px; max-height: 232px; overflow-y: auto; }
.srv { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; width: 100%; text-align: left; font: 13px var(--font-mono);
  color: var(--ink); background: rgba(15, 26, 60, .55); border: 1px solid var(--grid); border-radius: 2px; padding: 8px 10px; min-height: 40px; cursor: pointer; }
.srv:hover:not(:disabled), .srv:focus-visible { border-color: var(--player); outline: none; }
.srv:disabled { opacity: .4; cursor: default; }
.srv .nm small { display: block; color: var(--dim); font-size: 11px; }
.srv .pl { color: var(--dim); }
.srv .ms { min-width: 52px; text-align: right; font-weight: 600; color: var(--dim); }
.srv .ms.good { color: #3cff8a; } .srv .ms.ok { color: var(--enemy); } .srv .ms.bad { color: var(--weak); }
.menu .join input { flex: 1 1 120px; min-height: 40px; padding: 8px 10px; font-size: 14px; }

.roomline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.roomline .lab { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.roomline b { font-family: var(--font-display); font-size: 30px; letter-spacing: .22em; color: var(--ink); }

/* Scoreboard, under the minimap (the minimap sits at left 16, top 96, at most 132 wide) */
.board { position: absolute; z-index: 2; left: 16px; top: 244px; margin: 0; padding: 0; list-style: none; pointer-events: none;
  display: flex; flex-direction: column; gap: 3px; max-width: 150px; font-size: 11px; }
.board li { display: flex; gap: 6px; align-items: baseline; text-shadow: 0 0 6px #000; }
.board li i { width: 8px; height: 8px; background: var(--c); clip-path: polygon(100% 50%, 8% 0, 8% 100%); flex: none; align-self: center; }
.board li span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board li b { font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.board li.out { opacity: .4; }
.board li.me span { color: var(--player); }
.board li.head { text-transform: uppercase; letter-spacing: .16em; font-size: 10px; color: var(--dim); }
.netstat { display: flex; align-items: center; justify-content: flex-end; gap: 7px; min-height: 22px; font-family: var(--font-display); font-weight: 700; font-size: 15px;
  letter-spacing: .05em; font-variant-numeric: tabular-nums; color: var(--dim); pointer-events: none; text-shadow: 0 0 8px #000; }
.netstat::after { content: ''; order: 3; width: 9px; height: 9px; border-radius: 50%; background: currentColor; box-shadow: 0 0 9px currentColor; }
.netstat small { order: 2; font-size: 11px; font-weight: 500; letter-spacing: .08em; color: var(--dim); }
.netstat #pingV { order: 1; }
.netstat #pingV:empty { display: none; }
.netstat.good { color: var(--rival); }
.netstat.warn { color: var(--enemy); }
.netstat.bad { color: var(--weak); }
.spec { position: absolute; z-index: 2; left: 0; right: 0; bottom: 18%; text-align: center; font-family: var(--font-display); font-weight: 700;
  font-size: 15px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); pointer-events: none; text-shadow: 0 0 10px #000; }

/* Drop-in arenas have no hulls to count */
.arena .lives, .arena .hull { display: none; }

@media (orientation: landscape) and (max-height: 560px) {
  /* short screens: the menu takes the left column's lower rows, where the diagram and Launch normally sit */
  #menu, #roominfo { grid-area: 3 / 1 / 5 / 2; }
  .menu { gap: 8px; }
  .menu input { min-height: 40px; padding: 8px 10px; font-size: 14px; }
  .btn.play { min-height: 48px; font-size: 18px; }
  .roomline b { font-size: 22px; }
  .board { top: 232px; }
}

/* Keep Play above the fold on laptops and phones: the picture is a nicety */
@media (max-height: 780px) { .diagram { display: none; } }
