/* PP6 additions. Panels reuse the game's own .player-list-ui layout and colour variables;
   the chat follows PolyCup's chat panel. Nothing here restyles vanilla screens. */

.menu-ui.pp6-covered > * { visibility: hidden; }

/* Server list and leaderboards: the vanilla player list, opened over the menu. */
.pp6-servers, .pp6-boards { z-index: 5; pointer-events: auto; }
.pp6-servers .content > button.pp6-server-row,
.pp6-boards .content > button.pp6-server-row {
  display: flex; align-items: stretch; margin: 0 10px 5px 10px; padding: 0; height: 60px;
  font: inherit; font-size: 28px; color: var(--text-color); background: none; text-align: left; cursor: pointer;
  border: none; outline: none; clip-path: none;
}
.pp6-server-row > div { background-color: var(--button-color); transition: background-color 0.1s ease-out; }
.pp6-server-row:hover > div, .pp6-server-row:focus-visible > div { background-color: var(--button-hover-color); }
.pp6-server-row:active > div { background-color: var(--button-active-color); }
.pp6-server-row.self > div { background-color: #2e4182; }
.pp6-server-row > .position { display: flex; align-items: center; justify-content: center; padding: 0 10px; min-width: 66px; margin-right: 5px; }
.pp6-server-row > .nickname { display: flex; flex-direction: column; justify-content: center; flex-grow: 1; min-width: 0; padding: 0 10px; margin-right: 5px; }
.pp6-server-row > .time { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 110px; margin-right: 5px; }
.pp6-server-row > .time:last-child { margin-right: 0; }
.pp6-server-name { font-size: 26px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp6-server-map { font-size: 18px; line-height: 1.2; opacity: 0.6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp6-players { font-size: 24px; }
.player-list-ui .content > div > .time.pp6-wide, .pp6-server-row > .time.pp6-wide { width: 150px; font-size: 22px; }
.pp6-empty { margin: 20px; font-size: 22px; text-align: center; color: var(--text-color); opacity: 0.6; }
.pp6-section { margin: 10px 10px 6px 10px; font-size: 18px; color: var(--text-color); opacity: 0.6; }
.pp6-difficulty { display: inline-block; width: 18px; height: 18px; background: var(--surface-tertiary-color); clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%); }

/* In-server HUD: top right, same text treatment as the game's server messages. */
.pp6-room-hud {
  position: absolute; right: 0; top: 0; margin: 4px 10px; text-align: right; pointer-events: none;
  color: var(--text-color); font-weight: normal;
  text-shadow: 1px 1px 1px var(--surface-color), -1px 1px 1px var(--surface-color), -1px -1px 1px var(--surface-color), 1px -1px 1px var(--surface-color);
}
.pp6-room-title { font-size: 22px; opacity: 0.9; }
.pp6-room-left { font-size: 40px; line-height: 1.1; }
.pp6-room-left.pp6-ending { color: #ffd76b; }
.pp6-room-stats { font-size: 18px; opacity: 0.8; }

/* Chat: PolyCup's lobby chat panel, bottom left. */
.pp6-chat { position: absolute; left: 16px; bottom: 76px; z-index: 4; width: min(460px, calc(100% - 32px)); pointer-events: none; }
.pp6-chat-preview { padding: 8px 12px; background: #192042c9; opacity: 0; transition: opacity 0.3s ease-out; }
.pp6-chat-preview.pp6-visible { opacity: 1; }
.pp6-chat-preview:empty { display: none; }
.pp6-chat-panel { pointer-events: auto; background: var(--surface-tertiary-color); border-top: 3px solid #ffd76b; box-shadow: 0 8px 28px #0005; padding: 0 14px 12px; }
.pp6-chat-panel[hidden] { display: none; }
.pp6-chat-heading { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; font-size: 22px; color: var(--text-color); }
.pp6-chat-hint { font-size: 16px; opacity: 0.6; }
.pp6-chat-history { height: min(180px, 26vh); overflow-y: auto; overscroll-behavior: contain; padding: 4px 4px 8px 0; }
.pp6-chat-line { margin: 0 0 3px; font-size: 20px; line-height: 1.35; color: var(--text-color); overflow-wrap: anywhere; }
.pp6-chat-line time { color: #a9b8d2; font-size: 15px; margin-right: 7px; }
.pp6-chat-name { margin-right: 6px; }
.pp6-chat-name::after { content: ':'; }
.pp6-chat-text { white-space: pre-wrap; }
.pp6-chat-system .pp6-chat-text { color: #ffd76b; }
.pp6-chat-compose { display: flex; gap: 6px; margin-top: 8px; }
.pp6-chat-compose input {
  flex: 1; min-width: 0; padding: 8px 12px; border: none; outline: none;
  font: inherit; font-size: 20px; color: var(--text-color); background: var(--surface-secondary-color);
}
.pp6-chat-compose input::placeholder { color: #a6b9d3; }
.pp6-chat-compose .button { font-size: 18px; padding: 8px 14px; }
.pp6-chat-status { margin: 6px 0 0; font-size: 18px; color: #ffd76b; }
.pp6-chat-status:empty { display: none; }
