/* Online play: the panel where two players find each other, and the note on the glass during a match. */
.net {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(5, 4, 13, 0.6);
}
.net[hidden] {
    display: none;
}
.net-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 400px;
    max-height: 100%;
    overflow-y: auto;
    padding: 26px 26px 20px;
    border-radius: 16px;
    background: #16182a;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 24px 60px rgba(5, 4, 13, 0.55);
    color: #f8f6f1;
    text-align: left;
}
.net-card h2 {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.01em;
}
.net-line {
    font-size: 14px;
    line-height: 1.5;
    color: #c9ccd4;
}
.net-line strong {
    color: #fff;
}
.net-warn {
    font-family: var(--mono);
    font-size: 12px;
    color: #f5bdb0;
}
.net-actions {
    display: grid;
    gap: 8px;
}
.net-card .btn {
    text-align: center;
    text-decoration: none;
}
.net-card .btn-outline {
    color: #f8f6f1;
    border-color: rgba(255, 255, 255, 0.3);
}
.net-card .btn-outline:hover {
    color: #fff;
    border-color: #fff;
}
.net-card .btn-primary {
    background: #fff;
    color: #1b273a;
}
.net-card .btn-primary:hover {
    background: var(--brand);
    color: #fff;
}
.net-card .btn-ghost {
    color: #a3a7b0;
    justify-self: center;
}
.net-join {
    display: grid;
    gap: 8px;
}
.net-join label {
    font-family: var(--mono);
    font-size: 12px;
    color: #a3a7b0;
}
.net-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}
.net-row input {
    min-width: 0;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-family: var(--mono);
    font-size: 16px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.net-row input[name='name'] {
    letter-spacing: 0;
    text-transform: none;
}
.net-row input:focus-visible {
    outline: 2px solid var(--brand-bright);
    outline-offset: 1px;
}
.net-code {
    font-family: var(--mono);
    font-size: 44px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-align: center;
    color: #fff;
    padding: 10px 0 6px;
    user-select: all;
}

/* During a match: who the game is waiting for, or why it ended */
.net-note {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    max-width: min(360px, calc(100% - 32px));
    padding: 12px 18px;
    border-radius: 12px;
    background: rgba(18, 21, 45, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    font-family: var(--mono);
    font-size: 13px;
    text-align: center;
}
.net-note[hidden] {
    display: none;
}
.net-end {
    display: grid;
    gap: 12px;
    padding: 8px 4px;
}
.net-end p {
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
}
.net-turn {
    display: none;
}
/* Only a phone held upright: the wide picture sits small in the middle, and this says how to make it big */
@media (orientation: portrait) and (pointer: coarse) {
    .net-turn {
        display: block;
        position: absolute;
        left: 16px;
        right: 16px;
        bottom: 18%;
        z-index: 4;
        text-align: center;
        font-family: var(--mono);
        font-size: 13px;
        color: #c9ccd4;
        pointer-events: none;
    }
}
.pad-line {
    margin-top: 8px;
}
/* The game's lobby: who else is here, and each player waiting with a Play button */
.net-live {
    display: grid;
    gap: 8px;
}
.net-count {
    font-family: var(--mono);
    font-size: 12px;
    color: #a3a7b0;
}
.net-rooms {
    display: grid;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.net-rooms li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 6px 6px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.net-who {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
    color: #fff;
}
.net-dot {
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-bright, #3fb3c1);
}
.net-rooms .btn {
    flex: none;
    min-height: 36px;
    padding: 6px 14px;
}
