body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    text-align: center;
    margin: 20px;
}

header h1 {
    margin: 0;
    color: #2c5282;
}

.premio {
    font-size: 1.2em;
    font-weight: bold;
    color: #2a69b0;
}

.valor {
    font-size: 1.1em;
    font-weight: bold;
}

#grid-rifa {
    display: grid;
    /* Queremos 10 colunas. O grid fará o resto. */
    grid-template-columns: repeat(10, 1fr);
    gap: 8px;
    max-width: 600px;
    margin: 20px auto;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Estilo base de cada número */
.numero {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

.numero:hover {
    transform: scale(1.1);
}

/* --- ESTADOS DOS NÚMEROS --- */

.numero.disponivel {
    background-color: #c6f6d5; /* Verde claro */
    color: #2f855a;
    border: 1px solid #9ae6b4;
}

.numero.disponivel:hover {
    background-color: #9ae6b4;
}

.numero.reservado {
    background-color: #feebc8; /* Amarelo/Laranja claro */
    color: #c05621;
    border: 1px solid #fbd38d;
    cursor: not-allowed;
    opacity: 0.7;
}

.numero.vendido {
    background-color: #fed7d7; /* Vermelho claro */
    color: #c53030;
    border: 1px solid #fbb6b6;
    cursor: not-allowed;
    opacity: 0.7;
}

/* --- ESTILOS DO MODAL --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.8em;
    font-weight: bold;
    color: #888;
    cursor: pointer;
}

.modal-content h2 {
    margin-top: 0;
    color: #2c5282;
}

#form-comprador label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

#form-comprador input {
    width: 95%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.btn-pagar {
    width: 100%;
    padding: 12px;
    background-color: #2f855a;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-pagar:hover {
    background-color: #276749;
}