/*
 * random-tools.css - Rock Paper Scissors page
 * The two-player hand match board and its per-round results rail; the shared
 * stage frame, result line and buttons come from practical-tools.css
 */

/* match setup row: rounds input plus the start button */
.match-setup {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.5rem 0 1.25rem;
}

.match-setup label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
}

.match-setup label i {
    color: var(--primary-color);
}

.match-setup input {
    width: 5rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--surface);
    color: var(--text-color);
    font-size: 0.95rem;
    text-align: center;
}

.match-setup input:focus {
    outline: 2px solid var(--primary-soft);
    border-color: var(--primary-color);
}

/* board head: running score on the left, round counter on the right */
.match-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.match-score {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--text-color);
}

.match-score .score-sep {
    margin: 0 0.4rem;
    color: var(--light-text);
    font-weight: 600;
}

.round-label {
    font-size: 0.95rem;
    color: var(--light-text);
}

/* board layout: play area on the left, round results rail on the right */
.match-board {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(190px, 240px);
    gap: 1.25rem;
    align-items: stretch;
}

.match-main {
    min-width: 0;
}

/* right rail: every settled round stays listed here until restart */
.match-side {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.9rem 0.85rem 1rem;
    background: var(--surface-muted);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.match-side h3 {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-color);
}

.match-side h3 i {
    color: var(--primary-color);
}

.history-empty {
    margin: 0;
    font-size: 0.85rem;
    color: var(--light-text);
}

/* the two player columns */
.player-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.player-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.player-col h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--light-text);
}

/* kept rounds, oldest first, inside the right rail */
.match-history {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.match-history li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    color: var(--text-color);
}

.match-history .round-no {
    flex: none;
    font-weight: 700;
    color: var(--light-text);
}

.match-history .plays {
    flex: 1 1 auto;
    min-width: 0;
}

.match-history .verdict {
    flex: none;
    font-weight: 700;
}

.match-history .verdict.left {
    color: var(--primary-color);
}

.match-history .verdict.right {
    color: var(--secondary-color);
}

.match-history .verdict.draw {
    color: var(--light-text);
}

/* final score line */
.match-summary {
    margin: 0 0 1.1rem;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
}

/* narrow screens: drop the results rail below the board, then stack players */
@media (max-width: 760px) {
    .match-board {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .player-cols {
        grid-template-columns: 1fr;
    }
}
