/* =====================================
   VARIABLES
===================================== */

:root {

    --background: #10131a;

    --panel: #191e28;

    --panel-light: #222936;

    --input: #0e1117;

    --text: #f4f6f8;

    --muted: #aab3c0;

    --border: #303846;

    --green: #55d68b;

    --blue: #4ea1ff;

    --red: #ff647c;

    --yellow: #f4c95d;
}


/* =====================================
   GENERAL
===================================== */

* {
    box-sizing: border-box;
}


body {

    margin: 0;

    background: var(--background);

    color: var(--text);

    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}


button,
input {

    font: inherit;
}


button {

    cursor: pointer;

    border: none;

    border-radius: 10px;

    padding: 10px 15px;

    color: white;

    transition: 0.15s;
}


button:hover {

    filter: brightness(1.12);
}


input {

    width: 100%;

    padding: 10px;

    border-radius: 9px;

    border: 1px solid var(--border);

    background: var(--input);

    color: white;
}


label {

    display: block;

    margin-bottom: 6px;

    color: var(--muted);

    font-size: 0.9rem;
}


h1,
h2,
h3 {

    margin-top: 0;
}


p {

    margin-top: 5px;
}


.hidden {

    display: none !important;
}


.muted {

    color: var(--muted);
}


.small {

    font-size: 0.85rem;
}


/* =====================================
   APP
===================================== */

.app {

    max-width: 1200px;

    margin: auto;

    padding: 20px;
}


/* =====================================
   HEADER
===================================== */

.topbar {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 15px;

    flex-wrap: wrap;

    margin-bottom: 20px;
}


.topbar h1 {

    margin-bottom: 4px;
}


.top-actions {

    display: flex;

    flex-wrap: wrap;

    gap: 8px;
}


/* =====================================
   PANELES
===================================== */

.panel {

    background: var(--panel);

    border: 1px solid var(--border);

    border-radius: 16px;

    padding: 18px;

    margin-bottom: 16px;
}


/* =====================================
   BOTONES
===================================== */

.primary {

    background: var(--green);

    color: #07140d;

    font-weight: bold;
}


.blue {

    background: var(--blue);

    color: #07111f;

    font-weight: bold;
}


.danger {

    background: var(--red);

    color: #21070c;

    font-weight: bold;
}


.secondary {

    background: #343d4c;
}


.warning {

    background: var(--yellow);

    color: #1d1604;

    font-weight: bold;
}


.big-button {

    margin-top: 18px;

    width: 100%;

    padding: 14px;

    font-size: 1.05rem;
}


/* =====================================
   GRID
===================================== */

.grid {

    display: grid;

    gap: 12px;
}


.grid.two {

    grid-template-columns:
        repeat(2, minmax(0, 1fr));
}


.grid.three {

    grid-template-columns:
        repeat(3, minmax(0, 1fr));
}


@media (max-width: 750px) {

    .grid.two,
    .grid.three {

        grid-template-columns: 1fr;
    }

}


/* =====================================
   SETUP
===================================== */

.setup-title {

    margin-top: 25px;
}


#setupPlayers {

    display: grid;

    gap: 12px;
}


.setup-player {

    background: var(--panel-light);

    border: 1px solid var(--border);

    padding: 12px;

    border-radius: 12px;
}


/* =====================================
   ESTADÍSTICAS
===================================== */

.stat-box {

    display: flex;

    flex-direction: column;

    gap: 5px;
}


.stat-box span {

    color: var(--muted);
}


.stat-box strong {

    font-size: 1.6rem;
}


/* =====================================
   MESA
===================================== */

.section-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 15px;

    flex-wrap: wrap;
}


.actions {

    display: flex;

    flex-wrap: wrap;

    gap: 8px;
}


.players-grid {

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 12px;

    margin-top: 15px;
}


@media (max-width: 750px) {

    .players-grid {

        grid-template-columns: 1fr;
    }

}


.player-card {

    background: var(--panel-light);

    border: 1px solid var(--border);

    border-radius: 12px;

    padding: 14px;
}


.player-card.active {

    outline: 2px solid var(--green);
}


.player-card.folded {

    opacity: 0.45;
}


.player-header {

    display: flex;

    justify-content: space-between;

    gap: 10px;

    align-items: center;

    margin-bottom: 8px;
}


.badge {

    background: #293140;

    border-radius: 999px;

    padding: 5px 9px;

    font-size: 0.78rem;
}


.stat {

    display: flex;

    justify-content: space-between;

    gap: 10px;

    padding: 8px 0;

    border-bottom: 1px solid var(--border);
}


.stat:last-child {

    border-bottom: none;
}


.money {

    font-variant-numeric:
        tabular-nums;
}


/* =====================================
   AVISOS
===================================== */

.notice,
.success,
.warning-box {

    padding: 12px;

    border-radius: 10px;

    margin-bottom: 15px;
}


.notice {

    background: #172331;

    border: 1px solid #29435c;
}


.success {

    background: #12291d;

    border: 1px solid #245a38;
}


.warning-box {

    background: #302912;

    border: 1px solid #5a4b1b;
}


/* =====================================
   TURNO
===================================== */

.turn-box {

    border-left: 4px solid var(--green);

    padding-left: 12px;

    margin-bottom: 12px;
}


/* =====================================
   HISTORIAL
===================================== */

.history-item {

    background: var(--panel-light);

    border: 1px solid var(--border);

    padding: 14px;

    border-radius: 12px;

    margin-bottom: 10px;
}


/* =====================================
   MODAL
===================================== */

.modal {

    position: fixed;

    inset: 0;

    background: rgba(0, 0, 0, 0.7);

    display: flex;

    justify-content: center;

    align-items: center;

    padding: 18px;

    z-index: 100;
}


.modal-content {

    width: 100%;

    max-width: 550px;

    max-height: 90vh;

    overflow-y: auto;

    background: var(--panel);

    border: 1px solid var(--border);

    border-radius: 16px;

    padding: 20px;
}