* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: url('assets/cursor.gif'), auto !important;
}

/* Seleção de texto em verde */
::selection {
    background-color: #25B582;
    color: #fff;
}

::-moz-selection {
    background-color: #25B582;
    color: #fff;
}

/* Cursor personalizado para elementos clicáveis */
button,
button *,
a,
a *,
.numero-item,
.numero-item *,
input[type="checkbox"],
select,
label,
.tab-btn,
.tab-btn *,
.modal-close,
.modal-close * {
    cursor: url('assets/pointer.gif'), pointer !important;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: #25B582;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1a8563;
}

body {
    background-color: #1a3a2e;
    padding: 10px;
    color: #000;
    overflow-y: auto;
    min-height: 100vh;
    font-size: 16px;
    font-family: monospace;
    position: relative;
}

/* Background GIF com filtro de cor */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/background.gif');
    background-repeat: repeat;
    background-position: 0 0;
    background-size: auto;
    z-index: -1;
    transition: filter 0.5s ease;
    filter: hue-rotate(0deg);
}

/* Animações de movimento do background */
@keyframes bg-scroll-lento {
    from { background-position: 0 0; }
    to { background-position: 640px 480px; }
}

@keyframes bg-scroll-medio {
    from { background-position: 0 0; }
    to { background-position: 640px 480px; }
}

@keyframes bg-scroll-rapido {
    from { background-position: 0 0; }
    to { background-position: 640px 480px; }
}

/* Efeitos durante autoplay - verde para vermelho */
body.autoplay-ativo.velocidade-lenta::before {
    filter: hue-rotate(0deg);
    animation: bg-scroll-lento 5s linear infinite;
}

body.autoplay-ativo.velocidade-media::before {
    filter: hue-rotate(50deg);
    animation: bg-scroll-medio 3s linear infinite;
}

body.autoplay-ativo.velocidade-rapida::before {
    filter: hue-rotate(100deg);
    animation: bg-scroll-rapido 2s linear infinite;
}

.container {
    max-width: 1400px;
    min-height: calc(100vh - 70px);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transform: scale(0.9);
    transform-origin: top center;
}

/* Título Principal */
.titulo-principal {
    text-align: center;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.titulo-gif {
    max-width: 400px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.ranqueada-text {
    text-align: right;
    font-style: italic;
    font-weight: bold;
    font-size: 1.2em;
    margin-top: 5px;
    margin-right: 35%;
    animation: rainbow 3s linear infinite;
}

@keyframes rainbow {
    0% { color: #ff0000; }
    16.66% { color: #ff7f00; }
    33.33% { color: #ffff00; }
    50% { color: #00ff00; }
    66.66% { color: #0000ff; }
    83.33% { color: #8b00ff; }
    100% { color: #ff0000; }
}

/* Sistema de Abas */
.tabs-header {
    display: flex;
    gap: 10px;
    background: none;
    padding: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

.tab-btn {
    flex: 1;
    padding: 10px 20px;
    background: linear-gradient(to bottom, #555, #444);
    color: #ccc;
    border: none !important;
    outline: none !important;
    font-weight: bold;
    font-size: 1em;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

.tab-btn:hover {
    background: linear-gradient(to bottom, #666, #555);
    color: #fff;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4) !important;
}

.tab-btn.active {
    background: linear-gradient(to bottom, #26b884, #1a8563);
    color: #fff;
    box-shadow: 0 3px 8px rgba(37, 181, 130, 0.4) !important;
}

.tab-content {
    display: none;
    flex: 1;
    overflow: hidden;
}

.tab-content.active {
    display: block;
}

#tab-jogo {
    display: none;
}

#tab-jogo.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

#tab-estatisticas.active {
    display: flex;
    height: 100%;
}

.main-layout {
    display: flex;
    gap: 10px;
    width: 100%;
    height: 100%;
    align-items: flex-start;
}

.stats-side {
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    max-height: 100%;
    flex-shrink: 0;
}

.bilhete-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 600px;
    min-width: 0;
}

.config-side {
    width: 320px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: 100%;
    flex-shrink: 0;
}

/* Bilhete */
.bilhete-container {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    border: 1px solid #999;
    border-radius: 3px;
    position: relative;
}

.bilhete-header {
    background: linear-gradient(to bottom, #26b884, #1a8563);
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #15694d;
}

.bilhete-title {
    color: #fff;
    font-size: 1.6em;
    font-weight: bold;
    font-style: italic;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.bilhete-titulo-gif {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.bilhete-instrucao {
    background: #f9f9f9;
    padding: 6px 12px;
    font-size: 0.7em;
    border-bottom: 1px solid #ddd;
}

.bilhete-body {
    background: #FDFFE9;
    padding: 15px 12px;
}

.numeros-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 6px 5px;
    max-width: 520px;
    margin: 0 auto;
}

.numero-item {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    position: relative;
    aspect-ratio: 1;
    border-radius: 2px;
}

.numero-item span {
    color: #d32f2f;
    font-size: 1.25em;
    font-weight: bold;
    position: relative;
    z-index: 2;
}

.numero-item.selected::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 75%;
    height: 75%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
    border-radius: 2px;
}

.numero-item:hover:not(.selected) {
    background: rgba(211, 47, 47, 0.1);
}

.bilhete-footer {
    background: #f9f9f9;
    padding: 6px 12px;
    font-size: 0.7em;
    color: #d32f2f;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-limpar {
    background: linear-gradient(to bottom, #e53935, #c62828);
    color: #fff;
    border: none;
    padding: 4px 12px;
    font-size: 0.9em;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.btn-limpar:hover {
    background: linear-gradient(to bottom, #d32f2f, #b71c1c);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.btn-limpar:active {
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
}

/* Info Bilhete */
.info-bilhete {
    padding: 10px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    border: 1px solid #999;
    border-radius: 3px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.info-row b {
    color: #209F77;
}

.preco-display b {
    font-size: 1.4em;
    transition: all 0.3s ease;
}

#preco {
    display: inline-block;
}

#preco.warning {
    animation: pulse-warning 1s ease-in-out infinite;
    color: #ff9800 !important;
}

#preco.danger {
    animation: pulse-danger 0.5s ease-in-out infinite;
    color: #d32f2f !important;
}

@keyframes pulse-warning {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes pulse-danger {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    25% {
        transform: scale(1.2) rotate(-2deg);
    }
    50% {
        transform: scale(1.3) rotate(0deg);
        opacity: 0.9;
    }
    75% {
        transform: scale(1.2) rotate(2deg);
    }
}

#jogar-btn {
    width: 100%;
    padding: 12px;
    font-size: 1.2em;
    font-weight: bold;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    background: linear-gradient(to bottom, #26b884, #1a8563);
    color: #fff;
    border-radius: 4px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

#jogar-btn:hover:not(:disabled) {
    background: linear-gradient(to bottom, #1a8563, #15694d);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.4);
}

#jogar-btn:active:not(:disabled) {
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.4);
}

#jogar-btn:disabled {
    background: #ccc;
    color: #999;
    cursor: not-allowed;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#jogar-btn.parar {
    background: linear-gradient(to bottom, #e53935, #c62828);
}

#jogar-btn.parar:hover {
    background: linear-gradient(to bottom, #d32f2f, #b71c1c);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.4);
}

/* Config Box */
.config-box {
    padding: 0;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    border: 1px solid #999;
    border-radius: 3px;
    overflow: hidden;
}

.config-header {
    background: linear-gradient(to bottom, #26b884, #1a8563);
    color: #fff;
    text-align: center;
    font-weight: bold;
    padding: 10px;
    border-bottom: 1px solid #15694d;
    font-size: 1em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.config-section {
    margin: 0;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.config-section:last-of-type {
    border-bottom: none;
}

.config-section label {
    display: block;
    font-weight: bold;
    margin-bottom: 4px;
    font-size: 0.85em;
}

.config-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: normal;
}

.config-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

#velocidade, #qtd-surpresinha {
    width: 100%;
    padding: 4px;
    border: 1px solid #999;
    background: #fff;
    font-size: 0.85em;
    border-radius: 3px;
}

.config-opcoes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.config-opcoes label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: normal;
    font-size: 0.8em;
}

.config-opcoes input[type="checkbox"] {
    width: 14px;
    height: 14px;
}

.surpresinha-controls {
    display: flex;
    gap: 6px;
    align-items: stretch;
}

.surpresinha-controls select {
    flex: 1;
}

#btn-surpresinha {
    padding: 5px 12px;
    background: linear-gradient(to bottom, #26b884, #1a8563);
    color: #fff;
    border: none;
    font-size: 0.8em;
    font-weight: bold;
    cursor: pointer;
    border-radius: 3px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

#btn-surpresinha:hover {
    background: linear-gradient(to bottom, #1a8563, #15694d);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

#btn-surpresinha:active {
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
}

.parar-valor {
    margin-top: 6px;
}

.parar-valor input {
    width: 100%;
    padding: 4px;
    border: 1px solid #999;
    border-radius: 3px;
    font-size: 0.85em;
}

#zerar-btn {
    width: 100%;
    padding: 6px;
    font-size: 0.8em;
    font-weight: normal;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    background: linear-gradient(to bottom, #f5f5f5, #e0e0e0);
    color: #666;
    border-radius: 3px;
    margin-top: 8px;
}

#zerar-btn:hover {
    background: linear-gradient(to bottom, #e0e0e0, #d0d0d0);
    color: #333;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

#zerar-btn:active {
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

/* Tabelas de Estatísticas */
.stats-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    border: 1px solid #999;
    border-radius: 3px;
    overflow: hidden;
}

.stats-table th {
    background: linear-gradient(to bottom, #26b884, #1a8563);
    color: #fff;
    padding: 8px;
    border: 1px solid #15694d;
    font-weight: bold;
    text-align: center;
    font-size: 1.05em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.stats-table td {
    padding: 8px 10px;
    border: 1px solid #ddd;
    font-size: 1em;
}

.stats-table td:first-child {
    background: #f5f5f5;
    font-weight: bold;
}

.stats-table td:not(:first-child) {
    text-align: right;
    color: #209F77;
    font-weight: bold;
}

#resultado-final.positive {
    color: #27ae60 !important;
}

#resultado-final.negative {
    color: #d32f2f !important;
}

#roi.positive {
    color: #27ae60 !important;
}

#roi.negative {
    color: #d32f2f !important;
}

/* Sorteio Overlay */
.sorteio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sorteio-overlay.show {
    display: flex;
    opacity: 1;
}

.sorteio-content {
    background: #fff;
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    max-width: 90%;
}

.sorteio-header {
    background: linear-gradient(to bottom, #26b884, #1a8563);
    color: #fff;
    text-align: center;
    font-weight: bold;
    padding: 12px;
    margin: -20px -20px 15px -20px;
    border-radius: 5px 5px 0 0;
    font-size: 1.2em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    letter-spacing: 1px;
}

#numeros-sorteados {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 15px 0;
}

.numero-resultado {
    width: 48px;
    height: 48px;
    background: linear-gradient(to bottom, #fff, #f0f0f0);
    border: 2px solid #999;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.numero-resultado.acertou {
    background: linear-gradient(to bottom, #2ecc71, #27ae60);
    color: #fff;
    border-color: #1e8449;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.sorteio-info {
    text-align: center;
    padding: 10px 0 0 0;
    border-top: 1px solid #ddd;
}

.sorteio-info p {
    margin: 5px 0;
    font-size: 1em;
}

#acertos-text {
    font-weight: bold;
    color: #209F77;
    font-size: 1.1em;
}

#premio-text {
    color: #666;
    font-size: 0.95em;
}

#premio-text.ganhou {
    color: #27ae60;
    font-weight: bold;
    font-size: 1.15em;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    border: 1px solid #999;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    width: 90%;
    border-radius: 5px;
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(to bottom, #26b884, #1a8563);
    padding: 18px;
    text-align: center;
    border-bottom: 1px solid #15694d;
}

.modal-header h2 {
    color: #fff;
    font-size: 1.6em;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.modal-body {
    padding: 18px;
}

.modal-section {
    margin-bottom: 15px;
}

.modal-section h3 {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 8px;
    font-weight: bold;
    text-transform: uppercase;
}

.modal-numeros {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.modal-numero {
    width: 42px;
    height: 42px;
    background: linear-gradient(to bottom, #fff, #f0f0f0);
    border: 1px solid #999;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95em;
    font-weight: bold;
    color: #333;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.modal-numero.acertou {
    background: linear-gradient(to bottom, #2ecc71, #27ae60);
    color: #fff;
    border-color: #1e8449;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.modal-valores {
    background: #f5f5f5;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.modal-valor-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.95em;
}

.modal-valor-item b {
    font-weight: bold;
}

.premio-destaque {
    color: #27ae60 !important;
    font-size: 1.2em !important;
}

.modal-close {
    width: 100%;
    padding: 12px;
    background: linear-gradient(to bottom, #26b884, #1a8563);
    color: #fff;
    border: none;
    border-top: 1px solid #15694d;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.modal-close:hover {
    background: linear-gradient(to bottom, #1a8563, #15694d);
}

.modal-close:active {
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

/* Aba de Estatísticas */
.stats-layout {
    display: flex;
    gap: 10px;
    width: 100%;
    max-height: 700px;
    overflow: hidden;
}

.historico-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #999;
    border-radius: 3px;
    overflow: hidden;
    min-height: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.historico-header {
    background: linear-gradient(to bottom, #26b884, #1a8563);
    color: #fff;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #15694d;
    flex-shrink: 0;
}

.historico-header h3 {
    margin: 0;
    font-size: 1em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

#exportar-csv {
    padding: 5px 14px;
    background: linear-gradient(to bottom, #fff, #e0e0e0);
    color: #333;
    border: none;
    font-size: 0.8em;
    font-weight: bold;
    cursor: pointer;
    border-radius: 3px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

#exportar-csv:hover {
    background: linear-gradient(to bottom, #e0e0e0, #d0d0d0);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

#exportar-csv:active {
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.historico-table-container {
    flex: 1;
    overflow-y: scroll;
    min-height: 0;
}

.historico-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85em;
}

.historico-table thead {
    position: sticky;
    top: 0;
    background: #f5f5f5;
    z-index: 1;
}

.historico-table th {
    padding: 6px 8px;
    border: 1px solid #ddd;
    font-weight: bold;
    text-align: left;
}

.historico-table td {
    padding: 4px 8px;
    border: 1px solid #ddd;
}

.historico-table tr:nth-child(even) {
    background: #fafafa;
}

.historico-table tr:hover {
    background: #f0f0f0;
}

.resultado-positivo {
    color: #27ae60;
    font-weight: bold;
}

.resultado-negativo {
    color: #d32f2f;
    font-weight: bold;
}

.analises-side {
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    flex-shrink: 0;
}

/* Aba de Ranking */
.ranking-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: 700px;
    overflow: hidden;
    padding: 20px;
}

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

.ranking-header h2 {
    color: #26b884;
    font-size: 1.8em;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.ranking-descricao {
    color: #fcfafa;
    font-style: italic;
    margin: 0;
}

.ranking-table-container {
    flex: 1;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #999;
    border-radius: 3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.ranking-table thead {
    position: sticky;
    top: 0;
    background: linear-gradient(to bottom, #26b884, #1a8563);
    color: #fff;
    z-index: 10;
}

.ranking-table th {
    padding: 12px;
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid #15694d;
}

.ranking-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
}

.ranking-table tbody tr:hover {
    background: #f0f0f0;
}

.ranking-table tbody tr:nth-child(1) {
    background: linear-gradient(to right, #ffd70020, transparent);
}

.ranking-table tbody tr:nth-child(2) {
    background: linear-gradient(to right, #c0c0c020, transparent);
}

.ranking-table tbody tr:nth-child(3) {
    background: linear-gradient(to right, #cd7f3220, transparent);
}

.score-display {
    font-weight: bold;
    font-size: 1.1em;
    color: #26b884;
}

/* Torneio Semanal - Countdown */
.torneio-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.countdown-container {
    background: linear-gradient(to right, #ff6b6b, #ee5a6f);
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
}

.countdown-label {
    color: white;
    font-weight: bold;
    font-size: 1em;
}

.countdown-timer {
    color: #fff;
    font-family: 'Courier New', monospace;
    font-size: 1.3em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    letter-spacing: 2px;
    animation: pulse-countdown 2s ease-in-out infinite;
}

@keyframes pulse-countdown {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.countdown-timer.urgente {
    animation: pulse-urgente 0.5s ease-in-out infinite;
    color: #ffeb3b;
}

@keyframes pulse-urgente {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* Debug Panel */
.debug-panel {
    position: fixed;
    bottom: 10px;
    right: 10px;
    z-index: 9999;
}

.debug-btn {
    background: linear-gradient(to bottom, #ff6b6b, #c92a2a);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 0.8em;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}

.debug-btn:hover {
    background: linear-gradient(to bottom, #ff8787, #e03131);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.debug-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Modal de Ranking */
.modal-ranking-content {
    max-width: 600px;
}

.ranking-header h2 {
    color: #ffd700;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.5);
    animation: pulse-glow 1.5s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { text-shadow: 3px 3px 6px rgba(0,0,0,0.5); }
    50% { text-shadow: 3px 3px 20px rgba(255,215,0,0.8); }
}

.ranking-stats {
    background: linear-gradient(to bottom, #f9f9f9, #fff);
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 2px solid #26b884;
}

.ranking-stats h3 {
    margin: 0 0 15px 0;
    color: #26b884;
    text-align: center;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-row span {
    color: #666;
}

.stat-row b {
    color: #333;
}

.score-highlight {
    color: #ffd700 !important;
    font-size: 1.5em !important;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.lucro-highlight {
    color: #27ae60 !important;
    font-size: 1.2em !important;
}

.ranking-input-section {
    text-align: center;
}

.ranking-input-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #333;
}

.ranking-input-section input {
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
    border: 2px solid #26b884;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    transition: all 0.3s;
}

.ranking-input-section input:focus {
    outline: none;
    border-color: #1a8563;
    box-shadow: 0 0 10px rgba(38, 184, 132, 0.3);
}

.ranking-hint {
    font-size: 0.85em;
    color: #999;
    font-style: italic;
    margin-top: 8px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-cancelar, .btn-salvar {
    flex: 1;
    padding: 12px;
    font-size: 1em;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancelar {
    background: linear-gradient(to bottom, #999, #777);
    color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-cancelar:hover {
    background: linear-gradient(to bottom, #aaa, #888);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.btn-salvar {
    background: linear-gradient(to bottom, #26b884, #1a8563);
    color: white;
    box-shadow: 0 4px 8px rgba(38, 184, 132, 0.3);
}

.btn-salvar:hover {
    background: linear-gradient(to bottom, #2dd396, #1f9670);
    box-shadow: 0 6px 12px rgba(38, 184, 132, 0.5);
}

.btn-salvar:active, .btn-cancelar:active {
    transform: translateY(2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Torneio Semanal - Countdown */
.torneio-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.countdown-container {
    background: linear-gradient(to right, #ff6b6b, #ee5a6f);
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
}

.countdown-label {
    color: white;
    font-weight: bold;
    font-size: 1em;
}

.countdown-timer {
    color: #fff;
    font-family: 'Courier New', monospace;
    font-size: 1.3em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    letter-spacing: 2px;
    animation: pulse-countdown 2s ease-in-out infinite;
}

@keyframes pulse-countdown {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.countdown-timer.urgente {
    animation: pulse-urgente 0.5s ease-in-out infinite;
    color: #ffeb3b;
}

@keyframes pulse-urgente {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* Rodapé */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to right, #1a1a1a, #2d2d2d);
    color: #fff;
    padding: 10px 20px;
    text-align: center;
    font-size: 0.9em;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
    z-index: 1000;
}

.site-footer p {
    margin: 0;
}

.site-footer strong {
    color: #26b884;
}

.site-footer a {
    color: #26b884;
    text-decoration: none;
    transition: all 0.2s;
    margin-left: 5px;
}

.site-footer a:hover {
    color: #2dd396;
    text-shadow: 0 0 5px rgba(38, 184, 132, 0.5);
}

.site-footer i {
    margin-right: 5px;
}

.site-footer .bug-report {
    color: #ff6b6b;
    transition: all 0.2s;
}

.site-footer .bug-report:hover {
    color: #ff8787;
    text-shadow: 0 0 5px rgba(255, 107, 107, 0.5);
}

/* Ajuste para não ficar por cima do footer */
body {
    padding-bottom: 50px;
}

/* ========================================
   MOBILE RESPONSIVENESS
   ======================================== */

/* Telas médias - reorganiza layout antes de cortar */
@media (max-width: 1200px) {
    .stats-side {
        width: 250px;
    }

    .config-side {
        width: 280px;
    }

    .bilhete-side {
        max-width: 500px;
    }
}

@media (max-width: 1000px) {
    .main-layout {
        flex-wrap: wrap;
    }

    .stats-side {
        width: 280px;
        order: 1;
    }

    .bilhete-side {
        width: 100%;
        max-width: 100%;
        order: 0;
    }

    .config-side {
        width: 280px;
        order: 2;
    }

    /* Grid de números ajustado */
    .numeros-grid {
        grid-template-columns: repeat(10, 1fr);
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    /* Container principal */
    .container {
        max-width: 100%;
        height: auto;
        min-height: 100vh;
        padding: 10px 5px;
        transform: scale(1);
    }

    /* Background */
    body::before {
        background-size: 320px 240px;
    }

    /* Título */
    .titulo-principal {
        margin-bottom: 5px;
    }

    .titulo-gif {
        max-width: 250px;
    }

    .ranqueada-text {
        font-size: 0.9em;
        margin-right: 0;
        text-align: center;
    }

    /* Abas */
    .tabs-header {
        flex-direction: row;
        gap: 5px;
        padding: 5px;
    }

    .tab-btn {
        font-size: 0.8em;
        padding: 8px 10px;
    }

    /* Layout principal - empilha verticalmente */
    .main-layout {
        flex-direction: column;
        gap: 10px;
    }

    .stats-side,
    .bilhete-side,
    .config-side {
        width: 100%;
        max-width: 100%;
    }

    /* Tabelas de estatísticas */
    .stats-table {
        font-size: 0.75em;
    }

    .stats-table th,
    .stats-table td {
        padding: 4px;
    }

    /* Bilhete */
    .bilhete-container {
        max-width: 100%;
    }

    .bilhete-title {
        font-size: 1.2em;
    }

    .bilhete-instrucao {
        font-size: 0.65em;
        padding: 4px 8px;
    }

    /* Grid de números - 10 colunas em mobile */
    .numeros-grid {
        grid-template-columns: repeat(10, 1fr);
        gap: 3px;
        padding: 5px;
    }

    .numero-item {
        padding: 6px 2px;
        font-size: 0.7em;
    }

    /* Botões */
    .btn-limpar,
    #jogar-btn,
    #btn-surpresinha,
    #zerar-btn,
    #exportar-csv {
        padding: 8px 12px;
        font-size: 0.85em;
    }

    /* Configurações */
    .config-box {
        padding: 10px;
    }

    .config-header {
        font-size: 1em;
        padding: 8px;
    }

    .config-section {
        padding: 8px;
        font-size: 0.85em;
    }

    /* Modal */
    .modal-content {
        width: 95%;
        max-width: 95%;
        margin: 20px auto;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-numeros {
        grid-template-columns: repeat(6, 1fr);
        gap: 4px;
    }

    .modal-numero {
        padding: 6px;
        font-size: 0.8em;
    }

    /* Modal de Ranking */
    .modal-ranking-content {
        max-width: 95%;
    }

    .ranking-stats {
        padding: 10px;
    }

    .stat-row {
        font-size: 0.85em;
    }

    .score-highlight {
        font-size: 1.2em !important;
    }

    /* Aba de Estatísticas */
    .stats-layout {
        flex-direction: column;
        max-height: none;
        gap: 10px;
    }

    .historico-side,
    .analises-side {
        width: 100%;
        max-width: 100%;
    }

    .historico-table {
        font-size: 0.7em;
    }

    .historico-table th,
    .historico-table td {
        padding: 3px 4px;
    }

    /* Aba de Ranking */
    .ranking-layout {
        padding: 10px;
        max-height: none;
    }

    .ranking-header h2 {
        font-size: 1.2em;
    }

    .ranking-descricao {
        font-size: 0.8em;
    }

    .countdown-container {
        flex-direction: column;
        padding: 8px 12px;
        gap: 5px;
    }

    .countdown-timer {
        font-size: 1em;
    }

    .ranking-table {
        font-size: 0.7em;
    }

    .ranking-table th,
    .ranking-table td {
        padding: 6px 4px;
    }

    /* Debug button */
    .debug-panel {
        bottom: 60px;
        right: 5px;
    }

    .debug-btn {
        padding: 6px 10px;
        font-size: 0.7em;
    }

    /* Footer */
    .site-footer {
        font-size: 0.75em;
        padding: 8px 10px;
    }

    body {
        padding-bottom: 40px;
    }

    /* Sorteio Overlay */
    .sorteio-content {
        padding: 15px;
        max-width: 90%;
    }

    .sorteio-header {
        font-size: 1.2em;
        padding: 8px;
    }
}

/* Tablets e telas médias */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 100%;
        padding: 10px;
    }

    .main-layout {
        gap: 10px;
    }

    .stats-side {
        width: 250px;
    }

    .config-side {
        width: 280px;
    }

    .numeros-grid {
        grid-template-columns: repeat(10, 1fr);
    }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .container {
        height: auto;
    }

    .main-layout {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .stats-side,
    .config-side {
        width: calc(50% - 5px);
    }

    .bilhete-side {
        width: 100%;
        order: -1;
    }
}

/* Telas muito pequenas - evita corte */
@media (max-width: 460px) {
    /* Reduz fonte dos números da cartela */
    .numero-item {
        padding: 4px 1px;
        font-size: 0.7em;
    }

    .numero-item span {
        font-size: 1em;
    }

    /* Reduz gap do grid */
    .numeros-grid {
        gap: 2px;
        padding: 3px;
    }

    /* Reduz padding geral */
    .bilhete-body {
        padding: 10px 5px;
    }

    /* Ajusta títulos */
    .bilhete-title {
        font-size: 1em;
    }

    .bilhete-instrucao,
    .bilhete-footer {
        font-size: 0.6em;
        padding: 3px 6px;
    }

    /* Botões menores */
    .btn-limpar {
        padding: 3px 8px;
        font-size: 0.75em;
    }
}
