:root {
  --primary-color: #6e45e2;
  --secondary-color: #88d3ce;
  --accent-color: #ff7e5f;
  --dark-color: #1a1a2e;
  --light-color: #f8f9fa;
  --success-color: #4caf50;
  --warning-color: #ff9800;
  --error-color: #f44336;
  --background-color: #121212;
  --card-bg: rgba(26, 26, 46, 0.8);
  --text-color: #f8f9fa;
  --border-color: rgba(255, 255, 255, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  color: var(--light-color);
  background-color: var(--background-color);
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.stars, .twinkling {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: -1;
}

.stars {
  background: #000 url('https://www.script-tutorials.com/demos/360/images/stars.png') repeat top center;
}

.twinkling {
  background: transparent url('https://www.script-tutorials.com/demos/360/images/twinkling.png') repeat top center;
  animation: twinkle 200s linear infinite;
}

@keyframes twinkle {
  from { background-position: 0 0; }
  to { background-position: -10000px 5000px; }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.header {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.title {
  font-family: 'Orbitron', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 10px rgba(110, 69, 226, 0.3);
  position: relative;
  z-index: 2;
}

.highlight {
  display: inline-block;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.game-selector-container {
  position: relative;
  margin: 1.5rem auto;
  max-width: 400px;
}

.game-selector {
  width: 100%;
  padding: 0.8rem 2.5rem 0.8rem 1rem;
  border-radius: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--light-color);
  font-size: 1rem;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}

/* Seta personalizada */
.game-selector-container::after {
  content: "▼";
  font-size: 0.8rem;
  color: var(--light-color);
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.game-selector:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(110, 69, 226, 0.3);
}

/* Estilo para as opções */
.game-selector option {
  background: var(--dark-color);
  color: var(--light-color);
  padding: 0.5rem;
}

.main-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.control-panel, .results-panel {
  background: var(--card-bg);
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.control-panel:hover, .results-panel:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

.game-info {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.game-info h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: var(--secondary-color);
}

.game-info p {
  margin-bottom: 0.5rem;
  color: rgba(255, 255, 255, 0.7);
}

.game-rules {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--accent-color);
}

.input-group {
  margin-bottom: 1.5rem;
}

.input-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 300;
  color: var(--secondary-color);
}

.input-group input {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--light-color);
  font-size: 1rem;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(110, 69, 226, 0.3);
}

.number-selection {
  margin: 2rem 0;
}

.number-selection h3 {
  margin-bottom: 1rem;
  color: var(--secondary-color);
  font-weight: 400;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.badge {
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.number-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.number-btn {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--light-color);
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}

.number-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
  transform: scale(0);
  transition: transform 0.5s ease;
}

.number-btn:hover::before {
  transform: scale(1);
}

.number-btn.selected {
  background: var(--primary-color);
  box-shadow: 0 0 15px var(--primary-color);
  transform: scale(1.1);
}

.number-btn.excluded {
  background: var(--error-color);
  box-shadow: 0 0 15px var(--error-color);
  transform: scale(0.9);
  opacity: 0.7;
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.glow-button {
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  color: white;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  z-index: 1;
  box-shadow: 0 5px 15px rgba(110, 69, 226, 0.4);
}

.glow-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.glow-button:hover::before {
  opacity: 1;
}

.glow-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(110, 69, 226, 0.6);
}

.glow-button:active {
  transform: translateY(1px);
}

.secondary-button {
  width: 100%;
  padding: 0.8rem;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--light-color);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid var(--border-color);
}

.secondary-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.secondary-button:active {
  transform: translateY(1px);
}

.button-icon {
  font-size: 1.2rem;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.results-header h2 {
  color: var(--secondary-color);
  font-weight: 400;
  font-size: 1.5rem;
}

.export-buttons {
  display: flex;
  gap: 12px; /* Aumentei o gap */
}

.export-btn {
  background: rgba(255,255,255,0.1);
  border: none;
  width: 40px; /* Aumentei o tamanho */
  height: 40px;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.2); /* Adicionei borda sutil */
  box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* Sombra para profundidade */
}

/* Cores específicas para cada tipo */
.export-btn.pdf { color: #ff5252; } /* Vermelho para PDF */
.export-btn.csv { color: #4caf50; } /* Verde para CSV */
.export-btn.txt { color: #2196f3; } /* Azul para TXT */

.export-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px currentColor;
  background: rgba(255, 255, 255, 0.2);
}

.export-btn i {
  font-size: 18px;
  transition: transform 0.3s ease;
}

.export-btn:hover i {
  transform: scale(1.2);
}

.results-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 5px;
}

.result-combination {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  border-left: 3px solid var(--primary-color);
  transition: all 0.3s ease;
}

.result-combination:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(5px);
}

.result-number {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.result-number::before {
  content: '';
  position: absolute;
  top: -10%;
  left: -10%;
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.result-number:hover::before {
  opacity: 1;
}

.notification {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: 8px;
  background: var(--card-bg);
  color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1000;
  transition: bottom 0.3s ease;
  border-left: 4px solid;
}

.notification.show {
  bottom: 20px;
}

.notification.success {
  border-color: var(--success-color);
}

.notification.error {
  border-color: var(--error-color);
}

.notification i {
  font-size: 1.2em;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--light-color);
  transition: color 0.3s ease;
}

.close-modal:hover {
  color: var(--accent-color);
}

#save-name {
  width: 100%;
  padding: 0.8rem;
  margin: 1rem 0;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.1);
  color: var(--light-color);
}

.saved-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 1rem;
  margin: 0.5rem 0;
  border-radius: 8px;
  border-left: 3px solid var(--secondary-color);
}

.saved-item h4 {
  color: var(--secondary-color);
  margin-bottom: 0.3rem;
}

.saved-item p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.saved-item button {
  padding: 0.5rem 1rem;
  margin-right: 0.5rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.saved-item .load-item {
  background: var(--primary-color);
  color: white;
}

.saved-item .delete-item {
  background: rgba(255, 255, 255, 0.1);
  color: var(--light-color);
}

.saved-item button:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

@media (max-width: 768px) {
  .main-content {
      grid-template-columns: 1fr;
  }
  
  .title {
      font-size: 2rem;
  }
  
  .number-grid {
      grid-template-columns: repeat(5, 1fr);
  }
  
  .results-header {
      flex-direction: column;
      align-items: flex-start;
      gap: 1rem;
  }
  
  .export-buttons {
      align-self: flex-end;
  }
}
