/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #303f9f 0, #121212 45%, #000000 100%);
    color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.bingo-container {
    background: rgba(18, 18, 18, 0.92);
    border-radius: 18px;
    padding: 24px 26px 28px;
    max-width: 900px;
    width: 100%;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Cabeçalho */
header {
    text-align: center;
    margin-bottom: 20px;
}

header h1 {
    font-size: 2.1rem;
    letter-spacing: 1px;
}

header p {
    margin-top: 6px;
    font-size: 0.9rem;
    color: #bbbbbb;
}

/* Display principal */
.display-section {
    text-align: center;
    margin: 10px 0 20px;
}

.last-number-label {
    font-size: 0.95rem;
    color: #aaaaaa;
    margin-bottom: 6px;
}

.last-number {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    padding: 12px 24px;
    border-radius: 14px;
    display: inline-block;
    background: linear-gradient(135deg, #1e88e5, #7e57c2);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    min-width: 190px;
}

.status-msg {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #c5cae9;
}

/* Botões */
.controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
}

button {
    border: none;
    padding: 10px 22px;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
}

#btn-sortear {
    background: linear-gradient(135deg, #43a047, #66bb6a);
    color: #fff;
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

#btn-sortear:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.6);
}

#btn-sortear:disabled {
    background: #455a64;
    box-shadow: none;
    cursor: not-allowed;
}

.secondary {
    background: #263238;
    color: #eceff1;
}

.secondary:hover {
    background: #37474f;
    transform: translateY(-1px);
}

/* Contador */
.info {
    text-align: center;
    margin-bottom: 16px;
}

.contador {
    font-size: 0.9rem;
    color: #cfd8dc;
}

/* Grid de números */
.grid-section {
    margin-bottom: 18px;
}

.grid-section h2,
.history-section h2 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #e0e0e0;
}

.grid-numeros {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
    gap: 6px;
    background: #111827;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.grid-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 0;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #cbd5f5;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.3);
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, border 0.12s ease;
}

.grid-item.sorteado {
    background: linear-gradient(135deg, #4caf50, #81c784);
    color: #ffffff;
    font-weight: 700;
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 6px 14px rgba(76, 175, 80, 0.55);
    border-color: rgba(255, 255, 255, 0.7);
}

/* Histórico */
.history-section {
    margin-top: 10px;
}

.history {
    min-height: 42px;
    background: #111827;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.9rem;
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, 0.4);
    line-height: 1.4;
}

/* Responsivo */
@media (max-width: 600px) {
    .bingo-container {
        padding: 18px;
    }

    .last-number {
        font-size: 2.3rem;
        letter-spacing: 0.15em;
        min-width: 150px;
    }

    header h1 {
        font-size: 1.6rem;
    }
}
