* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a2a3a, #2c3e50);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 20px;
    padding: 15px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    position: relative;
}

/* ===== POPUP VENCEDOR ===== */
.vencedor-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.95), rgba(255,215,0,0.3));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.5s;
    backdrop-filter: blur(5px);
    padding: 5px;
}

.vencedor-card {
    background: linear-gradient(135deg, #FF416C, #FF4B2B, #FFD700, #FFA500);
    background-size: 400% 400%;
    animation: gradientBG 10s ease infinite;
    width: 95%;
    max-width: 450px;
    max-height: 98vh;
    border-radius: 15px;
    padding: 6px 10px;
    text-align: center;
    color: white;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5), 0 0 15px gold;
    border: 2px solid gold;
    position: relative;
    overflow-y: auto;
    margin: auto;
}

.vencedor-card::-webkit-scrollbar {
    width: 3px;
}

.vencedor-card::-webkit-scrollbar-thumb {
    background: gold;
    border-radius: 5px;
}

.vencedor-titulo {
    font-size: 14px;
    font-weight: bold;
    margin: 2px 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    background: linear-gradient(135deg, white, gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.vencedor-numero {
    font-size: 22px;
    font-weight: bold;
    background: linear-gradient(135deg, gold, orange, red);
    padding: 4px 8px;
    border-radius: 12px;
    margin: 2px 0;
    border: 1px solid white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    box-shadow: 0 0 15px gold;
}

.senna-quote {
    font-size: 10px;
    font-style: italic;
    margin: 2px 0;
    color: white;
    background: linear-gradient(135deg, rgba(0,0,0,0.4), rgba(255,215,0,0.3));
    padding: 3px;
    border-radius: 6px;
    border-left: 2px solid gold;
}

.vencedor-instrucoes {
    background: linear-gradient(135deg, rgba(0,0,0,0.5), rgba(255,215,0,0.2));
    border-radius: 10px;
    padding: 5px;
    margin: 3px 0;
    font-size: 10px;
    text-align: left;
    border: 1px solid gold;
}

.vencedor-instrucoes h3 {
    font-size: 11px;
    margin: 2px 0 4px 0;
    color: gold;
    text-align: center;
}

.info-box {
    background: rgba(0,0,0,0.3);
    padding: 4px;
    border-radius: 6px;
    margin: 2px 0;
}

.info-box p {
    font-size: 10px;
    margin: 1px 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.info-box strong {
    font-size: 11px;
    color: gold;
    min-width: 65px;
    text-align: left;
}

.info-box span {
    font-size: 11px;
    font-weight: bold;
    color: white;
    flex: 1;
    text-align: left;
}

#bar-ganhador-destaque {
    font-size: 10px;
    font-weight: bold;
    color: gold;
    text-shadow: 0 0 5px rgba(255,215,0,0.5);
    display: block;
    margin: 2px 0;
    background: rgba(0,0,0,0.3);
    padding: 3px;
    border-radius: 5px;
    text-align: left;
}

/* WHATSAPP CARD */
.whatsapp-card, [style*="background: linear-gradient(135deg, #25D366"] {
    background: linear-gradient(135deg, #25D366, #128C7E) !important;
    border-radius: 10px !important;
    padding: 8px !important;
    margin: 5px 0 !important;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3) !important;
    border: 1px solid gold !important;
}

.whatsapp-card div:first-child {
    gap: 4px !important;
    margin-bottom: 6px !important;
}

.whatsapp-card div:first-child span {
    font-size: 18px !important;
}

.whatsapp-card div:first-child span:not(.material-icons) {
    font-size: 14px !important;
}

#mensagem-texto {
    background: rgba(255,255,255,0.15) !important;
    padding: 12px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    margin-bottom: 10px !important;
    min-height: 60px !important;
    max-height: none !important;
    overflow-y: visible !important;
    border: 1px dashed gold !important;
    font-family: 'Courier New', monospace !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    text-align: left !important;
    color: #0000FF !important;
}

.button-container, [style*="display: flex; gap: 8px;"] {
    gap: 4px !important;
    margin-bottom: 4px !important;
}

.btn-whatsapp, button, [onclick*="copiar"], [onclick*="compartilhar"] {
    padding: 5px 8px !important;
    border-radius: 25px !important;
    font-size: 11px !important;
    gap: 4px !important;
    min-width: 80px !important;
}

.btn-whatsapp span, button span, [onclick*="copiar"] span, [onclick*="compartilhar"] span {
    font-size: 14px !important;
}

.whatsapp-number, [style*="margin-top: 8px;"] {
    margin-top: 4px !important;
    padding-top: 4px !important;
}

.whatsapp-number span:first-child {
    font-size: 10px !important;
}

.whatsapp-number span:last-child {
    font-size: 14px !important;
}

.contador {
    background: rgba(0,0,0,0.4);
    padding: 3px;
    border-radius: 15px;
    text-align: center;
    font-size: 10px;
    color: white;
    border: 1px solid gold;
    margin: 3px 0 2px 0;
}

#tempo-restante {
    font-size: 14px;
    font-weight: bold;
    color: gold;
}

.vencedor-fechar {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: 1px solid white;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 2px;
    transition: all 0.3s;
    width: 100%;
}

.vencedor-fechar:hover {
    transform: scale(1.02);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ===== PRÊMIO DESTAQUE ===== */
.premio-destaque {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-radius: 15px;
    padding: 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border: 2px solid white;
}

.premio-imagem {
    width: 70px;
    height: 70px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.premio-imagem img {
    width: 90%;
    height: 90%;
    object-fit: contain;
}

.premio-info {
    flex: 1;
}

.premio-titulo {
    color: white;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.premio-valor {
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.premio-desc {
    color: white;
    font-size: 11px;
    opacity: 0.9;
}

/* ===== RIFA HEADER ===== */
.rifa-numero {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
}

.bebida-link-container {
    background: linear-gradient(135deg, #00b09b, #96c93d);
    border-radius: 50px;
    margin-bottom: 12px;
    padding: 8px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.bebida-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 16px;
}

.bebida-link img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: white;
    padding: 3px;
}

.rifa-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50px;
    padding: 10px 15px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}

.rifa-titulo {
    font-size: 16px;
    font-weight: bold;
}

.saldo-area {
    background: rgba(0,0,0,0.2);
    padding: 5px 15px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.saldo-label {
    font-size: 12px;
}

.saldo-valor {
    font-size: 20px;
    font-weight: bold;
}

.btn-adicionar {
    background: #ffd700;
    color: #333;
    border: none;
    padding: 6px 15px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-adicionar:hover {
    transform: scale(1.05);
    background: #ffed4a;
}

/* ===== INFO CARDS ===== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.info-card {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    padding: 8px 5px;
    border-radius: 10px;
    color: white;
    text-align: center;
    font-size: 11px;
}

.info-card.premio-liberado {
    background: linear-gradient(135deg, #11998e, #38ef7d);
    animation: pulse 1s infinite;
}

.info-numero {
    font-size: 20px;
    font-weight: bold;
    margin: 2px 0;
}

/* ===== PROGRESSO ===== */
.progresso-container {
    background: #ecf0f1;
    padding: 8px 12px;
    border-radius: 30px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.progresso-texto {
    font-size: 12px;
    font-weight: bold;
    color: #2c3e50;
    white-space: nowrap;
}

.progresso-bar {
    flex: 1;
    height: 12px;
    background: #bdc3c7;
    border-radius: 20px;
    overflow: hidden;
}

.progresso-preenchido {
    height: 100%;
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    transition: width 0.3s;
    width: 0%;
}

/* ===== MENSAGEM ===== */
.mensagem-area {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 10px;
    border-radius: 30px;
    text-align: center;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 12px;
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== NÚMEROS GRID ===== */
.numeros-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 4px;
    margin-bottom: 12px;
}

.numero-card {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.numero-disponivel {
    background: linear-gradient(135deg, #FF6B6B, #FF8E8E);
}

.numero-disponivel:nth-child(10n+1) { background: linear-gradient(135deg, #FF6B6B, #FF8E8E); }
.numero-disponivel:nth-child(10n+2) { background: linear-gradient(135deg, #4ECDC4, #45B7AF); }
.numero-disponivel:nth-child(10n+3) { background: linear-gradient(135deg, #FFD93D, #FDB827); color: #333; }
.numero-disponivel:nth-child(10n+4) { background: linear-gradient(135deg, #6C5CE7, #5A4BC7); }
.numero-disponivel:nth-child(10n+5) { background: linear-gradient(135deg, #FF8C42, #FF6B2B); }
.numero-disponivel:nth-child(10n+6) { background: linear-gradient(135deg, #A8E6CF, #7DC9A8); color: #333; }
.numero-disponivel:nth-child(10n+7) { background: linear-gradient(135deg, #FFB6B9, #FF9A9E); color: #333; }
.numero-disponivel:nth-child(10n+8) { background: linear-gradient(135deg, #C06C84, #6C5B7B); }
.numero-disponivel:nth-child(10n+9) { background: linear-gradient(135deg, #45B7AF, #4ECDC4); }
.numero-disponivel:nth-child(10n) { background: linear-gradient(135deg, #FDB827, #FFD93D); color: #333; }

.numero-disponivel:hover:not(.numero-comprado) {
    transform: scale(1.1);
    filter: brightness(1.2);
    z-index: 10;
}

.numero-comprado {
    background: #95a5a6 !important;
    cursor: not-allowed;
    opacity: 0.6;
    color: white !important;
}

/* ===== HISTÓRICO ===== */
.historico-area {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 12px;
    margin-top: 10px;
}

.historico-titulo {
    font-size: 14px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px;
}

.historico-lista {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 150px;
    overflow-y: auto;
}

.historico-item {
    background: white;
    border-radius: 10px;
    padding: 10px;
    border-left: 5px solid gold;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    font-size: 12px;
}

.historico-rifa {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 3px 8px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 11px;
}

.historico-numero {
    background: gold;
    color: #333;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 14px;
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    display: none;
    z-index: 999;
    pointer-events: none;
}

/* ===== VITRINE DO PRÊMIO ===== */
.vitrine-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(3px);
    padding: 10px;
}

.vitrine-card {
    background: linear-gradient(135deg, #1e2b38, #2c3e50);
    max-width: 95%;
    width: 450px;
    border-radius: 24px;
    padding: 15px 15px 20px 15px;
    text-align: center;
    color: white;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 215, 0, 0.5);
    border: 2px solid gold;
    position: relative;
    animation: slideIn 0.4s ease;
    max-height: 85vh;
    overflow-y: auto;
}

.vitrine-fechar {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(220, 20, 60, 0.9);
    color: white;
    border: 2px solid white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.vitrine-titulo {
    font-size: 20px;
    margin: 5px 0 12px 0;
    color: gold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    padding-right: 25px;
}

.vitrine-imagem-container {
    background: white;
    border-radius: 14px;
    padding: 10px;
    margin: 5px 0 10px 0;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
    border: 2px solid gold;
}

.vitrine-imagem {
    width: 100%;
    max-width: 180px;
    height: auto;
    margin: 0 auto;
    display: block;
    border-radius: 8px;
}

.vitrine-descricao {
    text-align: left;
    background: rgba(255, 255, 255, 0.08);
    padding: 12px;
    border-radius: 12px;
    margin: 8px 0;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.vitrine-descricao h3 {
    color: gold;
    font-size: 16px;
    margin-bottom: 8px;
    text-align: center;
    border-bottom: 1px solid gold;
    padding-bottom: 5px;
}

.vitrine-descricao p {
    font-size: 13px;
    margin: 5px 0;
    padding-left: 16px;
    line-height: 1.3;
    position: relative;
}

.vitrine-valor {
    font-size: 18px !important;
    font-weight: bold;
    color: gold !important;
    text-align: center !important;
    margin: 10px 0 !important;
    background: rgba(0, 0, 0, 0.4);
    padding: 8px !important;
    border-radius: 25px;
    border: 1px solid gold;
}

.vitrine-valor:before {
    content: "💰" !important;
    position: static !important;
    margin-right: 8px;
    font-size: 20px;
}

.vitrine-timer {
    background: rgba(0, 0, 0, 0.4);
    padding: 8px;
    border-radius: 25px;
    font-size: 14px;
    color: white;
    border: 1px solid gold;
    margin-top: 10px;
    font-weight: bold;
    text-align: center;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

#vitrine-tempo {
    font-size: 24px;
    font-weight: bold;
    color: gold;
    padding: 0 5px;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.vitrine-card::-webkit-scrollbar {
    width: 4px;
}

.vitrine-card::-webkit-scrollbar-thumb {
    background: gold;
    border-radius: 10px;
}

/* ===== AJUSTE PARA TV - TODOS OS NÚMEROS VISÍVEIS ===== */
@media (min-width: 1200px) {
    .numeros-grid {
        grid-template-columns: repeat(10, 1fr);
        gap: 2px;
        max-height: none;
        overflow-y: visible;
    }

    .numero-card {
        font-size: 14px !important;
        min-height: 28px;
        line-height: 28px;
        aspect-ratio: auto;
        padding: 0 !important;
    }

    .bar-header {
        margin-bottom: 4px;
        padding: 6px;
        font-size: 16px;
    }

    .premio-destaque {
        padding: 6px;
        margin-bottom: 4px;
    }

    .rifa-header {
        padding: 4px 8px;
        margin-bottom: 4px;
    }

    .info-grid {
        gap: 4px;
        margin-bottom: 4px;
    }

    .info-card {
        padding: 3px;
        font-size: 10px;
    }

    .info-numero {
        font-size: 16px;
    }

    .progresso-container {
        padding: 4px 8px;
        margin-bottom: 4px;
    }

    .mensagem-area {
        padding: 4px;
        margin-bottom: 4px;
        min-height: 30px;
        font-size: 12px;
    }

    .historico-area {
        margin-top: 4px;
        padding: 6px;
    }

    .historico-lista {
        max-height: 60px;
    }

    .historico-item {
        padding: 4px;
        font-size: 10px;
    }
}

/* ===== MODAIS DO USUÁRIO ===== */
.modal-login-usuario, .modal-cadastro-usuario, .modal-relatorio-usuario {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
    z-index: 20002;
}

.modal-login-usuario.active, .modal-cadastro-usuario.active, .modal-relatorio-usuario.active {
    display: flex;
}

.modal-login-usuario-content, .modal-cadastro-usuario-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.relatorio-usuario-content {
    background: white;
    border-radius: 20px;
    padding: 20px;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.modal-header h2 {
    color: #333;
    font-size: 22px;
}

.fechar-modal {
    background: #e74c3c;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
}

.modal-login-usuario-content input,
.modal-cadastro-usuario-content input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.btn-login-submit, .btn-cadastro-submit {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

.link-cadastro, .link-login {
    margin-top: 15px;
    color: #667eea;
    cursor: pointer;
    font-size: 13px;
}

.link-cadastro:hover, .link-login:hover {
    text-decoration: underline;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#modal-adicionar-saldo {
    animation: fadeIn 0.3s ease;
}



/* Botões do usuário */
.btn-usuario {
    position: fixed;
    top: 15px;
    right: 80px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.btn-logout {
    position: fixed;
    top: 15px;
    right: 15px;
    background: #e74c3c;
    color: white;
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 8px;
}