/* The /play wrapper (resources/views/play/index.blade.php): dark, game first. */
body.play { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(circle at 20% 0%, #182231 0%, var(--bg) 55%); }
.play-top { padding: .5rem 1.5rem; min-height: 116px; border-bottom: 1px solid var(--line); background: rgba(22, 27, 34, .92); }
/* phones: a long connection status is cut with an ellipsis (the dot stays) */
.play-top .connection { max-width: 100%; min-width: 0; }
.play-top .connection .dot { flex: 0 0 auto; }
.play-top .connection #connection-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .play-top { padding: .5rem .75rem; min-height: 0; } .play-top .connection { padding: .2rem .5rem; font-size: .8rem; } }
.play-footer { text-align: center; padding: 1rem; font-size: .85rem; margin-top: auto; }

.connection { display: inline-flex; align-items: center; gap: .5rem; padding: .2rem .75rem; border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; color: var(--muted); }
.connection .dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--muted); }
.connection[data-state=loading] .dot { background: var(--warn); animation: pulse 1.2s infinite; }
.connection[data-state=ready] .dot, .connection[data-state=idle] .dot { background: var(--accent); }
.connection[data-state=connected] { color: var(--ok); border-color: var(--ok); }
.connection[data-state=connected] .dot { background: var(--ok); }
.connection[data-state=disconnected] .dot { background: var(--warn); }
.connection[data-state=error] { color: var(--bad); border-color: var(--bad); }
.connection[data-state=error] .dot { background: var(--bad); }
@keyframes pulse { 50% { opacity: .35; } }

.play-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.25rem; width: 100%; max-width: 1500px; margin: 0 auto; padding: 1.25rem 1.5rem; }
.play-narrow { max-width: 760px; margin: 2rem auto; padding: 0 1.5rem; width: 100%; }
@media (max-width: 1000px) { .play-grid { grid-template-columns: 1fr; } }

/* the game keeps the Xbox's 4:3 */
.game-frame { position: relative; aspect-ratio: 4 / 3; width: 100%; background: #000; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: 0 10px 40px rgba(0, 0, 0, .45); }
.game-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.game-frame:fullscreen { border: 0; border-radius: 0; aspect-ratio: auto; }
.game-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 1.5rem; background: rgba(14, 17, 22, .94); overflow: auto; }
.game-overlay[hidden] { display: none; }
.game-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: .75rem 0 1.25rem; }
.toolbar-hint { margin-left: auto; font-size: .85rem; }

.side-column .panel h2, .chat h2 { margin-top: 0; }
.server-list { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; gap: .4rem; }
.server-list .server { width: 100%; text-align: left; display: flex; flex-direction: column; gap: .1rem; padding: .5rem .7rem; background: var(--bg); }
.server-list .server.selected { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.server-list .server[data-status=online] .server-name::before { content: "● "; color: var(--ok); }
.server-list .server:not([data-status=online]) .server-name::before { content: "● "; color: var(--muted); }
.server-name { font-weight: 600; }
.server-meta { font-size: .85rem; color: var(--muted); }
.server-info h3 { margin: .25rem 0 .5rem; font-size: 1rem; }
.server-info dl { display: grid; grid-template-columns: auto 1fr; gap: .2rem .9rem; margin: 0 0 .75rem; }
.server-info dt { color: var(--muted); }
.server-info dd { margin: 0; }

.controls table { background: transparent; font-size: .88rem; }
.controls td, .controls th { padding: .3rem .4rem; }
kbd { display: inline-block; min-width: 1.4em; margin: 0 .2rem .2rem 0; padding: .05rem .35rem; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: var(--bg); font: .8rem ui-monospace, monospace; text-align: center; }

.chat-log { list-style: none; margin: 0 0 .6rem; padding: .6rem; min-height: 5rem; max-height: 16rem; overflow-y: auto; border: 1px dashed var(--line); border-radius: 6px; overflow-wrap: anywhere; }
.chat[data-state=joined] .chat-log { border-style: solid; }
.chat-line { padding: .1rem 0; }
.chat-name { font-weight: 600; color: var(--accent); }
.chat-mine .chat-name { color: var(--ok); }
.chat-system { color: var(--muted); font-style: italic; }
.chat-members { font-size: .8em; font-weight: normal; }
.chat-form { display: flex; gap: .5rem; }
.chat-form input { flex: 1; }

/* the build placeholder inside the iframe (resources/views/play/missing) */
body.game-placeholder { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; background: #05070a; }
.placeholder-card { max-width: 560px; text-align: center; }
.placeholder-beer { font-size: 4rem; line-height: 1; margin-bottom: .5rem; }
/* the name and server pick (/play/join) */
.game-pick { flex-direction: column; text-align: center; gap: .25rem; }
.game-pick p { margin: 0; }
.player-form input { width: 100%; box-sizing: border-box; font-size: 1.05rem; }
.hint.error { color: var(--bad); }
