/* Estilos para a página de compra de cartelas */
body {
    background-color: #1a1a2e;
    color: #e0e0e0;
    font-family: 'Montserrat', sans-serif;
}

.container {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background-color: #2a2a4e;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

.header { 
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(248, 197, 55, 0.2);
}

.header h1 {
    font-size: 2rem;
    color: #f8c537;
    text-shadow: 0 0 10px rgba(248, 197, 55, 0.5);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

#user-greeting {
    font-weight: bold;
}

.wallet-button {
    background-color: #f8c537;
    color: #1a1a2e;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
}

.wallet-button:hover {
    background-color: #ffd700;
    transform: translateY(-2px);
}

.purchase-container {
    background-color: #3a3a5e;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 30px;
    border: 2px solid var(--primary);
}

.purchase-container h2 {
    color: #f8c537;
    margin-bottom: 10px;
}

.purchase-container p {
    margin-bottom: 25px;
    color: #c0c0c0;
}

.quantity-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.quantity-btn {
    background-color: #f8c537;
    color: #1a1a2e;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.quantity-btn:hover {
    background-color: #ffd700;
    transform: scale(1.1);
}

.increment-options-grid {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.increment-option-btn {
    background-color: #4a4a6e;
    color: #f8c537;
    border: 1px solid #f8c537;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.increment-option-btn:hover {
    background-color: #f8c537;
    color: #1a1a2e;
    transform: scale(1.05);
}

#quantity-input {
    width: 80px;
    height: 50px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: bold;
    background-color: #2a2a4e;
    color: #fff;
    border: 2px solid #f8c537;
    border-radius: 8px;
    appearance: textfield;
}

#quantity-input::-webkit-outer-spin-button,
#quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.total-price {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

#total-price-value {
    font-weight: bold;
    color: #f8c537;
    margin-left: 10px;
}

.confirm-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    max-width: 400px;
}

.confirm-btn:hover {
    background-color: #45a049;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.cards-display-container {
    margin-top: 20px;
    padding: 20px;
    background-color: #1a1a2e;
    border-radius: 8px;
    display: none; /* Hidden by default */
}

.cards-display-container h3 {
    text-align: center;
    color: #f8c537;
    margin-bottom: 20px;
}

.purchased-cards-grid {
    display: grid;
    /* Cria um grid responsivo que se ajusta ao tamanho da tela */
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    justify-content: center;
}

/* Adiciona responsividade para telas menores, como tablets e celulares */
@media (max-width: 768px) {
    .purchased-cards-grid {
        /* Em tablets, as cartelas podem ser um pouco menores para caber mais ou ter mais espaço */
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .purchased-cards-grid {
        /* Em celulares, as cartelas ficam ainda menores e o espaçamento é reduzido */
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
}

/* Reusing player-card styles from style.css */
.player-card {
    background-color: #2a2a4e;
    border: 1.5px solid #4a4a6e;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.player-card h4 {
    color: #f8c537;
    margin-bottom: 6px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: bold;
}

/* Estilos para o container de prêmios da rodada */
.prizes-container {
    background-color: #2c3e50;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.prizes-container h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #ecf0f1;
    text-align: center;
    font-size: 1.4em;
    border-bottom: 2px solid #34495e;
    padding-bottom: 10px;
}

#round-prizes-list .loading-prizes {
    color: #bdc3c7;
    text-align: center;
    font-style: italic;
}

/* Estilo para cada item de prêmio, similar ao da sala de espera */
#round-prizes-list .prize {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 5px;
    background-color: #34495e;
    border-left: 5px solid transparent;
}

/* Cores para diferenciar os prêmios */
#round-prizes-list .prize-1 { border-left-color: #f1c40f; } /* Ouro - Cartela Cheia */
#round-prizes-list .prize-2 { border-left-color: #95a5a6; } /* Prata - Linha */
#round-prizes-list .prize-3 { border-left-color: #e67e22; } /* Bronze - 4 números /**/

#round-prizes-list .prize-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

#round-prizes-list .prize-user { /* Reutilizando a classe para o nome do prêmio */
    font-size: 1.1em;
    color: #ecf0f1;
}

#round-prizes-list .prize-badge {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    margin-right: 10px;
    font-weight: bold;
}

#round-prizes-list .prize-value {
    font-size: 1.2em;
    font-weight: bold;
    color: #2ecc71; /* Verde para o valor */
}

/* Estilos para o Cronômetro Flutuante */
.floating-countdown {
    position: fixed;
    top: 90px; /* 70px do header + 20px de margem */
    right: 20px;
    background-color: rgba(31, 31, 58, 0.9);
    border: 1px solid #f8c537;
    border-radius: 8px;
    padding: 10px 20px;
    z-index: 999;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    text-align: center;
    min-width: 150px;
    transition: opacity 0.3s, transform 0.3s;
    display: none; /* Oculto por padrão, exibido via JS */
}

.floating-countdown.visible {
    display: block;
    animation: slide-in-right 0.5s ease-out;
}

@keyframes slide-in-right {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.countdown-label {
    display: block;
    font-size: 0.8rem;
    color: #ccc;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.countdown-value {
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.7);
}

/* Estilo para quando o cronômetro vira um link "Em andamento" */
.floating-countdown.in-progress .countdown-label {
    display: none; /* Esconde o rótulo "Próxima Rodada" */
}

.floating-countdown.in-progress .countdown-value {
    font-size: 1.4rem; /* Ajusta o tamanho da fonte para o texto */
    line-height: 1.2;
    text-transform: uppercase;
}
