* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        radial-gradient(
            circle at 15% 20%,
            rgba(25, 90, 150, 0.12),
            transparent 35%
        ),
        radial-gradient(
            circle at 85% 80%,
            rgba(20, 130, 75, 0.08),
            transparent 35%
        ),
        #080a0d;

    color: white;
    font-family: Arial, Helvetica, sans-serif;
}

.historico-controle {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #888;
    font-size: 11px;
}

.historico-controle input {
    width: 70px;
    height: 28px;
    background: #17191e;
    border: 1px solid #292c33;
    border-radius: 5px;
    color: #fff;
    text-align: center;
}

.historico-controle button {
    height: 28px;
    padding: 0 10px;
    background: #292c33;
    border: 1px solid #41454e;
    border-radius: 5px;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
}

.historico-controle button:hover {
    background: #41454e;
}

.valdo {
    display: block;
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

.pagamentos {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-left: 25px;
    font-size: 12px;
    font-weight: bold;
    color: #aaa;
}

.pagamento.black {
    color: #aaa;
}

.pagamento.blue {
    color: #65a9ff;
}

.pagamento.green {
    color: #63d98b;
}

.pagamento.red {
    color: #ff7777;
}


/* =====================================================
   TOPO
===================================================== */

.topo {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    background: #17191e;
    border-bottom: 1px solid #292c33;
    box-shadow:
        0 4px 15px rgba(0,0,0,.20);
}

.titulo {
    font-size: 21px;
    font-weight: bold;
    letter-spacing: .3px;
}

.status {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 12px;
    color: #aaa;
}

.online {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ponto {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #3bd16f;
    box-shadow:
        0 0 8px rgba(59,209,111,.8);
}

.relogio {
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 1px;
    font-variant-numeric:
        tabular-nums;
}


/* =====================================================
   CONTAINER
===================================================== */

.container {
    padding: 22px 25px 35px;
    max-width: 1800px;
    margin: auto;
}


/* =====================================================
   TITULOS DAS SEÇÕES
===================================================== */

.secao-titulo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: #ddd;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 1px;
}

.secao-titulo::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #292c33;
}


/* =====================================================
   CARDS
===================================================== */

.info {
    display: grid;
    grid-template-columns:
        repeat(5, 160px);

    gap: 12px;
    margin-bottom: 22px;
}

.card {
    background: #17191e;
    border: 1px solid #292c33;
    border-radius: 10px;
    padding: 10px 14px;
    min-height: 70px;

    box-shadow:
        0 5px 18px rgba(0,0,0,.15);

    transition:
        border-color .2s,
        transform .2s;
}

.card:hover {
    transform: translateY(-2px);
    border-color: #41454e;
}

.card span.titulo-card {
    display: block;
    color: #777;
    font-size: 10px;
    margin-bottom: 7px;
    letter-spacing: 1px;
    font-weight: bold;
}

.card strong {
    display: block;
    font-size: 21px;
}


/* =====================================================
   COR DO ÚLTIMO
===================================================== */

.cor-ultimo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cor-ponto {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.25);
}

.cor-ponto.RED {
    background: #e53935;
}

.cor-ponto.BLACK {
    background: #252525;
    border-color: #666;
}

.cor-ponto.GREEN {
    background: #16a34a;
}

.cor-ponto.BLUE {
    background: #1976d2;
}


/* =====================================================
   SEQUÊNCIA
===================================================== */

.sequencia {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 25px;
    overflow: hidden;
}

.seq-bola {
    width: 16px;
    height: 16px;
    min-width: 16px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.25);
}

.seq-bola.RED {
    background: #e53935;
}

.seq-bola.BLACK {
    background: #252525;
    border-color: #666;
}

.seq-bola.GREEN {
    background: #16a34a;
}

.seq-bola.BLUE {
    background: #1976d2;
}

.seq-text {
    margin-left: 5px;
    color: #aaa;
    font-size: 11px;
    white-space: nowrap;
}


/* =====================================================
   PORCENTAGENS
===================================================== */

.porcentagens {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pct-item {
    display: grid;
    grid-template-columns: 75px 1fr 38px;
    align-items: center;
    gap: 7px;
    font-size: 9px;
    color: #888;
}

.pct-barra {
    height: 5px;
    background: #292c33;
    border-radius: 10px;
    overflow: hidden;
}

.pct-preenchimento {
    height: 100%;
    width: 0%;
    border-radius: 10px;
    transition: width .4s;
}

.pct-red {
    background: #e53935;
}

.pct-black {
    background: #777;
}

.pct-green {
    background: #16a34a;
}

.pct-blue {
    background: #1976d2;
}

.pct-valor {
    text-align: right;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
}


/* =====================================================
   ÚLTIMOS 10
===================================================== */

.ultimos-box {
    background: #17191e;
    border: 1px solid #292c33;
    border-radius: 10px;
    padding: 15px 18px;
    margin-bottom: 22px;

    box-shadow:
        0 5px 18px rgba(0,0,0,.15);
}

.ultimos-lista {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 3px;
}

.ultimo-item {
    min-width: 55px;
    text-align: center;
}

.ultimo-bola {
    width: 32px;
    height: 32px;
    margin: auto auto 5px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.2);
}

.ultimo-bola.RED {
    background: #e53935;
    border-color: #ff7777;
}

.ultimo-bola.BLACK {
    background:
        radial-gradient(
            circle at 35% 30%,
            #555 0%,
            #252525 35%,
            #111 75%,
            #080808 100%
        );

    border: 2px solid #888;

    box-shadow:
        0 0 0 1px rgba(255,255,255,.12),
        0 0 8px rgba(255,255,255,.18);
}

.ultimo-bola.GREEN {
    background: #16a34a;
    border-color: #63d98b;
}

.ultimo-bola.BLUE {
    background: #1976d2;
    border-color: #65a9ff;
}

.ultimo-numero {
    font-size: 11px;
    font-weight: bold;
    color: #fff;
}

.ultimo-hora {
    margin-top: 3px;
    font-size: 10px;
    color: #63d98b;
    font-weight: bold;
}

.ultimos-resumo {
    display: flex;
    gap: 20px;
    margin-top: 13px;
    padding-top: 11px;
    border-top: 1px solid #292c33;
    font-size: 11px;
    color: #888;
}

.ultimos-resumo strong {
    color: #fff;
}


/* =====================================================
   HISTÓRICO
===================================================== */

.historico-cabecalho {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.historico-info {
    color: #666;
    font-size: 10px;
}


/* =====================================================
   GRADE
===================================================== */

.grade {
    display: grid;
    grid-template-columns:
        repeat(20, 62px);

    grid-auto-flow: row;
    gap: 2px;
    width: max-content;
    direction: rtl;
}


/* =====================================================
   CASA
===================================================== */

.casa {
    width: 60px;
    height: 80px;
    background: #17191e;
    border: 1px solid #292c33;
    border-radius: 8px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 5px;
    overflow: hidden;

    transition:
        transform .15s,
        border-color .15s,
        box-shadow .15s;
}

.casa:hover {
    transform: translateY(-2px);
    border-color: #555;

    box-shadow:
        0 5px 15px rgba(0,0,0,.25);
}


/* =====================================================
   ÚLTIMO GIRO
===================================================== */

.casa.primeiro {
    border-color: #5a5f69;

    box-shadow:
        0 0 12px rgba(255,255,255,.06);
}


/* =====================================================
   BOLA
===================================================== */

.bola {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    flex-shrink: 0;

    border-radius: 50%;
    display: block;

    border: 2px solid rgba(255,255,255,.20);

    font-size: 0;
    line-height: 0;
    color: transparent;
    text-indent: -9999px;
}


/* =====================================================
   CORES
===================================================== */

.BLACK {
    background:
        radial-gradient(
            circle at 35% 30%,
            #555 0%,
            #252525 35%,
            #111 75%,
            #080808 100%
        );

    border: 2px solid #888;

    box-shadow:
        0 0 0 1px rgba(255,255,255,.12),
        0 0 8px rgba(255,255,255,.18);
}

.RED {
    background: #e53935;
    border: 2px solid #ff7777;
}

.BLUE {
    background: #1976d2;
    border: 2px solid #65a9ff;
}

.GREEN {
    background: #16a34a;
    border: 2px solid #63d98b;
}


/* =====================================================
   HORA
===================================================== */

.hora {
    display: block !important;
    width: 90%;
    height: 16px;
    line-height: 16px;

    margin: 0;
    padding: 0;

    text-align: center;
    font-size: 11px;
    font-weight: bold;

    color: #fff !important;
    background: #30343b;

    border-radius: 4px;

    opacity: 1 !important;
    visibility: visible !important;
    white-space: nowrap;
}


/* =====================================================
   ID
===================================================== */

.id {
    display: block;
    width: 100%;
    height: 9px;
    line-height: 9px;

    text-align: center;
    font-size: 8px;
    color: #666;

    white-space: nowrap;
}


/* =====================================================
   RESPONSIVO
===================================================== */

@media(max-width: 1250px) {

    .info {
        grid-template-columns:
            repeat(3, minmax(150px, 1fr));
    }

}

@media(max-width: 900px) {

    .info {
        grid-template-columns:
            repeat(2, minmax(150px, 1fr));
    }

    .grade {
        grid-template-columns:
            repeat(8, minmax(65px, 1fr));
    }

}

@media(max-width: 600px) {

    .container {
        padding: 12px;
    }

    .topo {
        padding: 0 12px;
    }

    .titulo {
        font-size: 17px;
    }

    .status {
        gap: 8px;
    }

    .relogio {
        font-size: 13px;
    }

    .info {
        grid-template-columns:
            repeat(2, minmax(120px, 1fr));

        gap: 8px;
    }

    .card {
        min-width: 0;
        padding: 12px;
    }

    .grade {
        grid-template-columns:
            repeat(4, minmax(60px, 1fr));

        gap: 5px;
    }

    .casa {
        height: 82px;
    }

    .bola {
        width: 34px;
        height: 34px;
        min-width: 34px;
        min-height: 34px;
    }

}

#coresPorHora {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 0;
}

#coresPorHora div {
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #aaa;
    font-size: 10px;
    font-weight: bold;
    line-height: 16px;
    white-space: nowrap;
}