body {
  font-family: Arial, sans-serif;
  text-align: center;
  background-color: #f3e5f5;
  margin: 0;
  padding: 10px;
  overflow-x: hidden;
  box-sizing: border-box;

  background-image: url('img/fundo-megasena.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
}

h1 {
  color: #6a1b9a;
  margin-bottom: 15px;
  font-size: 24px;
}

header {
  background-color: #8e24aa;
  padding: 12px;
  text-align: center;
}

header nav a {
  color: white;
  margin: 0 15px;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
}

header nav a:hover {
  text-decoration: underline;
}

.container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  max-width: 100%;
  flex-wrap: wrap;
}

.globo-area {
  position: relative;
  width: 100%;
  max-width: 250px;
}

.globo {
  width: 100%;
  max-width: 250px;
  aspect-ratio: 1/1;
  border: 3px solid #6a1b9a;
  border-radius: 50%;
  background: radial-gradient(circle at center, #ffffff 60%, #8e24aa 100%);
  position: relative;
  overflow: hidden;
  margin: 0 auto;
}

.funil {
  width: 50px;
  height: 50px;
  background: #8e24aa;
  margin: -10px auto 0;
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}

.sorteadas-container {
  margin-top: 20px;
  text-align: center;
}

.sorteadas-container h2 {
  margin-bottom: 8px;
  font-size: 18px;
}

.sorteadas {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 8px;
  border: 2px dashed #8e24aa;
  min-height: 50px;
  width: 100%;
  max-width: 250px;
  border-radius: 8px;
  background-color: #f5f5f5;
  margin: 0 auto;
}

.bola {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: 2px solid #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  font-size: 11px;
  position: absolute;
  color: white;
}

.painel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  width: 100%;
  max-width: 350px;
}

button {
  padding: 10px 20px;
  font-size: 14px;
  cursor: pointer;
  background-color: #8e24aa;
  color: white;
  border: none;
  border-radius: 6px;
  transition: background 0.3s ease;
}

button:hover {
  background-color: #6a1b9a;
}

.cartela {
  display: grid;
  grid-template-columns: repeat(5, 40px);
  gap: 8px;
  margin-top: 15px;
  width: 100%;
  max-width: 300px;
}

.cartela .numero {
  width: 40px;
  height: 40px;
  background-color: #eee;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2px solid #999;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  font-size: 12px;
}

.cartela .numero.selecionado {
  background-color: #ab47bc;
  color: white;
}

/* Responsivo */
@media screen and (max-width: 768px) {
  .container {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .globo-area, .painel {
    max-width: 100%;
  }

  .globo {
    max-width: 200px;
  }

  .cartela {
    grid-template-columns: repeat(5, 35px);
  }

  .cartela .numero {
    width: 35px;
    height: 35px;
    font-size: 11px;
  }
}

@media screen and (max-width: 480px) {
  body {
    padding: 5px;
  }

  .globo {
    max-width: 180px;
  }

  .cartela {
    grid-template-columns: repeat(5, 30px);
  }

  .cartela .numero {
    width: 30px;
    height: 30px;
    font-size: 10px;
  }

  .bola {
    width: 20px;
    height: 20px;
    font-size: 8px;
  }
}

.destaque {
  background-color: #e65100;
  color: #1b5e20 !important;
  animation: pulse 1.5s infinite;
  font-weight: bold;
  border-radius: 6px;
  padding: 8px 12px;
  box-shadow: 0 0 0 0 rgba(230, 81, 0, 0.9);
  transition: transform 0.2s ease;
}

.destaque:hover {
  background-color: #ff6d00;
  transform: scale(1.05);
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(230, 81, 0, 0.9); }
  50% { box-shadow: 0 0 0 14px rgba(230, 81, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(230, 81, 0, 0); }
}

.titulo-simulador {
  color: #fdd835;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
}
