:root {
  --primary-color: #4a90e2;
  --secondary-color: #50e3c2;
  --background-color: #1a1a2e;
  --text-color: #e0e0e0;
  --button-color: #4a4e69;
  --button-hover-color: #6f7591;
  --section-bg-color: rgba(255, 255, 255, 0.05);
  --progress-bar-color: #50e3c2;
  --achievement-color: #ffd700;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Roboto', sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#game-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  flex-grow: 1;
}

header {
  text-align: center;
  margin-bottom: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

h1, h2, h3 {
  font-family: 'Orbitron', sans-serif;
  margin-bottom: 10px;
}

h1 {
  font-size: 2.5em;
  color: var(--primary-color);
  text-shadow: 0 0 10px rgba(74, 144, 226, 0.5);
}

h2 {
  font-size: 1.8em;
  color: var(--secondary-color);
}

h3 {
  font-size: 1.3em;
  color: var(--primary-color);
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 5px;
  margin-bottom: 15px;
}

.game-section {
  background-color: var(--section-bg-color);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.game-section:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
}

#resources-grid, #actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.resource {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  transition: all 0.3s ease;
}

.resource:hover {
  background-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.resource-name {
  font-weight: bold;
}

.resource-value {
  color: var(--secondary-color);
}

button {
  background-color: var(--button-color);
  color: var(--text-color);
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Orbitron', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
}

button:hover {
  background-color: var(--button-hover-color);
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

button:active {
  transform: translateY(0);
  box-shadow: none;
}

#progress-section {
  margin-top: 20px;
  margin-bottom: 20px;
}

#progress-bar-container {
  width: 100%;
  height: 20px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

#progress-bar {
  height: 100%;
  background-color: var(--progress-bar-color);
  transition: width 0.5s ease-in-out;
}

#tooltip {
  position: absolute;
  background-color: rgba(0, 0, 0, 0.8);
  color: var(--text-color);
  padding: 10px;
  border-radius: 5px;
  font-size: 0.9em;
  z-index: 100;
  display: none;
  max-width: 250px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

#upgrade-list, #achievements-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.upgrade-item, .achievement {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 5px;
  padding: 15px;
  transition: all 0.3s ease;
}

.upgrade-item:hover, .achievement:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.achievement {
  border: 1px solid var(--achievement-color);
}

footer {
  text-align: center;
  padding: 20px;
  margin-top: 30px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

footer button {
  margin: 0 10px;
  padding: 15px 30px;
  font-size: 1.1em;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000; 
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: var(--background-color);
  margin: 15% auto;
  padding: 20px;
  border: 1px solid var(--secondary-color);
  width: 80%;
  max-width: 600px;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(80, 227, 194, 0.3);
}

.close {
  color: var(--text-color);
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: var(--secondary-color);
  text-decoration: none;
}

#era-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 10px 20px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

#floating-buttons {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 900;  
}

.floating-button {
  width: 40px;
  height: 40px;
  background-color: var(--secondary-color);
  color: var(--background-color);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  border-radius: 50%;
  border-width: initial;
  border-style: none;
  border-color: initial;
  border-image: initial;
  transition: all 0.3s ease 0s;
}

.floating-button:hover {
  transform: scale(1.1);
  background-color: var(--primary-color);
}

#learn-more-button {
  width: auto;
  border-radius: 20px;
  padding: 0 15px;
}

#learn-more-button:hover {
  background-color: var(--primary-color);
}

.notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--secondary-color);
  color: var(--background-color);
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.3s ease;
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  z-index: 1000;
  animation: fadeIn 0.5s, fadeOut 0.5s 2.5s;
}

.notification.show {
  opacity: 1;
}

.achievement-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: var(--achievement-color);
  color: var(--background-color);
  padding: 15px;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
  z-index: 1000;
  animation: slideIn 0.5s ease-out, fadeOut 0.5s ease-in 4.5s forwards;
}

.notification.show {
  opacity: 1;
  transform: translateY(0);
}

.notification.info {
  background-color: #003822;
  color: white;
z-index: 100000
}

@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

#random-fact-section {
  font-style: italic;
  background-color: rgba(255, 255, 255, 0.08);
  border-left: 4px solid var(--secondary-color);
}

#dilemma-container .modal-content {
  background-color: rgba(26, 26, 46, 0.95);
  border: 2px solid var(--primary-color);
}

#dilemma-options button {
  display: block;
  width: 100%;
  margin-top: 10px;
  text-align: left;
  padding: 15px;
  background-color: var(--button-color);
  transition: all 0.3s ease;
}

#dilemma-options button:hover {
  background-color: var(--button-hover-color);
  transform: translateX(5px);
}

.era-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: eraTransition 1s ease;
}

.era-transition-content {
  background-color: var(--background-color);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 0 20px var(--primary-color);
}

@keyframes eraTransition {
  0% { opacity: 0; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
  100% { opacity: 1; transform: scale(1); }
}

/* Responsive design */
@media (max-width: 768px) {
  #game-container {
      padding: 10px;
  }

  #resources-grid, #actions-grid {
      grid-template-columns: 1fr;
  }

  .modal-content {
      width: 95%;
      margin: 10% auto;
  }

  footer button {
      display: block;
      width: 100%;
      margin: 10px 0;
  }
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--background-color);
}

::-webkit-scrollbar-thumb {
  background: var(--button-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--button-hover-color);
}

/* Accessibility improvements */
button:focus, .resource:focus-within {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

/* Dark mode toggle (if implemented in the future) */
.dark-mode-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: var(--button-color);
  color: var(--text-color);
  border: none;
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dark-mode-toggle:hover {
  background-color: var(--button-hover-color);
}

/* Easter egg style (for Konami code activation) */
.konami-active {
  animation: rainbow 5s linear infinite;
}

@keyframes rainbow {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

#tech-tree-section {
  background-color: var(--section-bg-color);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

#tech-tree-section:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
}

#tech-tree-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.tech-node {
  background-color: var(--button-color);
  color: var(--text-color);
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Orbitron', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
}

.tech-node:hover {
  background-color: var(--button-hover-color);
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tech-node:active {
  transform: translateY(0);
  box-shadow: none;
}

.tech-node.unlocked {
  background-color: var(--secondary-color);
  color: var(--background-color);
  box-shadow: 0 0 10px var(--secondary-color);
}

.tech-node.unlocked:hover {
  background-color: var(--primary-color);
  box-shadow: 0 0 10px var(--primary-color);
}

.tech-node::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -10px;
  transform: translateY(-50%);
  width: 20px;
  height: 2px;
  background-color: var(--text-color);
  transition: all 0.3s ease;
}

.tech-node:first-child::before {
  display: none;
}

.tech-node.unlocked::before {
  background-color: var(--secondary-color);
  box-shadow: 0 0 5px var(--secondary-color);
}

.tech-node.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.tech-node.locked:hover {
  transform: none;
  box-shadow: none;
}

/* New Styling for Ethical KPIs */
#ethical-kpi-section {
  background-color: rgba(0, 128, 128, 0.1);
  border: 1px solid teal;
  padding: 10px;
  margin-top: 20px;
  border-radius: 5px;
}

#ethical-kpi-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ethical-kpi {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 5px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.kpi-label {
  flex: 1;
  font-weight: bold;
}

.kpi-bar-container {
  flex: 2;
  height: 20px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin: 0 10px;
}

.kpi-bar {
  height: 100%;
  width: 100%;
  background-color: teal;
  transition: width 0.5s ease-in-out;
}

.kpi-value {
  flex: 0 0 30px;
  text-align: right;
}

@keyframes increaseEffect {
  0% { box-shadow: 0 0 5px 2px rgba(0, 255, 0, 0.7); }
  100% { box-shadow: none; }
}

@keyframes decreaseEffect {
  0% { box-shadow: 0 0 5px 2px rgba(255, 0, 0, 0.7); }
  100% { box-shadow: none; }
}

.kpi-bar.increase {
  animation: increaseEffect 1s ease-out;
}

.kpi-bar.decrease {
  animation: decreaseEffect 1s ease-out;
}

/* Resource group */
.resource-group {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  padding: 10px;
  margin-bottom: 10px;
}

.resource-group h4 {
  margin-top: 0;
  color: var(--secondary-color);
}

/* Aggiungi questi stili alla fine del tuo file CSS esistente */

#tutorial-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgb(0 0 0 / 41%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100000; /* Aumentato significativamente */
}

.tutorial-message {
  background-color: #ffffff;
  color: #333333;
  padding: 20px;
  border-radius: 10px;
  max-width: 80%;
  text-align: center;
  font-size: 18px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative; /* Aggiunto */
  z-index: 100001; /* Maggiore del tutorial-overlay */
}

#tutorial-next {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 10px 20px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin-top: 20px;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s;
  position: relative; /* Aggiunto */
  z-index: 100002; /* Maggiore della tutorial-message */
}

#tutorial-next:hover {
  background-color: #45a049;
}

.tutorial-highlight {
  position: relative;
  z-index: 10000;
  box-shadow: 0 0 0 5px #4CAF50;
  transition: box-shadow 0.3s ease-in-out;
}

#restart-tutorial {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 10px;
  background-color: var(--button-color);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.contextual-help {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: rgba(74, 144, 226, 0.9);
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  z-index: 900;
  transition: opacity 0.5s ease-out;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

button:disabled {
  cursor: not-allowed;
  background-color: #cccccc;
  color: #666666;
}

button:disabled:hover {
  transform: none;
  box-shadow: none;
}

#upgrade-list button {
  background-color: var(--button-color);
  color: var(--text-color);
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Orbitron', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  width: 100%;
  text-align: left;
}

#upgrade-list button:hover {
  background-color: var(--button-hover-color);
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#upgrade-list button:active {
  transform: translateY(0);
  box-shadow: none;
}

#upgrade-list button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#upgrade-list button:disabled:hover {
  transform: none;
  box-shadow: none;
}

#tab-buttons {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  background-color: var(--background-color);
  border-radius: 5px;
  overflow: hidden;
}

.tab-button {
  background-color: transparent;
  color: var(--text-color);
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  flex: 1;
  text-align: center;
}

.tab-button.active {
  background-color: var(--primary-color);
  color: var(--background-color);
}

.tab-button:hover:not(.active) {
  background-color: rgba(255, 255, 255, 0.1);
}

.tab-content {
  display: none;
}

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

.era-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.small-button {
  font-size: 12px;
  padding: 2px 6px;
  background-color: var(--secondary-color);
  color: var(--background-color);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.3s;
}

.small-button:hover {
  background-color: var(--primary-color);
  transform: scale(1.1);
}

#era-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 10px 20px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

#tab-switch-container {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

#tab-switch {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 25px;
  padding: 5px;
  display: inline-flex;
}

.switch-option {
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 20px;
  transition: background-color 0.3s;
}

.switch-option.active {
  background-color: var(--primary-color);
  color: var(--background-color);
}

.switch-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(50% - 4px);
  height: calc(100% - 4px);
  background-color: var(--primary-color);
  border-radius: 22px;
  transition: transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

#tab-switch[data-active="progress-tab"] .switch-slider {
  transform: translateX(100%);
}

.switch-option.active {
  color: var(--background-color);
}

#progress-tab #progress-section {
  display: none;
}

#random-fact-section {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: rgba(0, 0, 0, 0.7);
  padding: 10px;
  border-radius: 5px;
  max-width: 300px;
}



#random-fact-popup {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
}

#random-fact-popup .modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
}

#random-fact-popup .close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}



#random-fact-popup .close:hover,
#random-fact-popup .close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

#close-random-fact {
  margin-top: 10px;
  padding: 5px 10px;
  background-color: var(--button-color);
  color: var(--text-color);
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#random-fact-icon {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--secondary-color);
  color: var(--background-color);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  cursor: pointer;
  z-index: 1000;
}

#random-fact-icon:hover {
  background-color: var(--primary-color);
}

.action-button {
  display: none; /* Nascondi tutte le azioni per impostazione predefinita */
}

.action-button.unlocked {
  display: block; /* Mostra solo le azioni sbloccate */
}


#minigames-container button {
    background-color: #4CAF50; /* Verde di default */
    color: white;
    padding: 10px 15px;
    margin: 5px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#minigames-container button:hover {
  opacity: 0.8;
}

#minigames-container button.completed {
  background-color: #4CAF50; /* Verde */
  color: white;
  cursor: default;
}

#minigames-container button.failed {
  background-color: #f44336; /* Rosso */
  color: white;
  cursor: default;
}

#minigames-container button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Stili per l'abaco */
#abacus {
  display: flex;
  justify-content: space-around;
  margin: 20px 0;
}

.abacus-rod {
  display: flex;
  flex-direction: column-reverse;
  height: 200px;
  width: 30px;
  background-color: #8B4513;
  border-radius: 15px;
  padding: 5px;
}

.bead {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background-color: #D2691E;
  margin: 2px 0;
  cursor: pointer;
  transition: background-color 0.3s;
}

.bead.active {
  background-color: #FFD700;
}

/* Stili specifici per il minigioco dei Sillogismi */
#conclusion-options button {
  display: block;
  width: 100%;
  margin: 10px 0;
  padding: 10px;
  background-color: var(--button-color);
  color: var(--text-color);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#conclusion-options button:hover {
  background-color: var(--button-hover-color);
}

#conclusion-options button.selected {
  background-color: var(--primary-color);
}

#minigames-container button.completed {
  background-color: #4CAF50; /* Verde */
  color: white;
  cursor: default;
}

#minigames-container button.failed {
  background-color: #f44336; /* Rosso */
  color: white;
  cursor: default;
}

#minigames-container button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@keyframes unlockAnimation {
  0%, 100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
  50% { transform: translate(-50%, -50%) scale(1.1); box-shadow: 0 0 20px 10px rgba(255, 255, 255, 0.7); }
}

.minigame-unlock-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  z-index: 1000;
    animation: unlockAnimation 1s ease-in-out 3;
}

.minigame-unlock-notification h2 {
  color: #ffd700;
  margin-bottom: 10px;
}

.minigame-unlock-notification button {
  margin-top: 15px;
  padding: 10px 20px;
  background-color: #ffd700;
  color: #000;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.minigame-unlock-notification button:hover {
  background-color: #ffea00;
}

#current-level {
  font-weight: bold;
  color: var(--primary-color);
}

#game-message {
  margin-top: 10px;
  font-weight: bold;
}

#game-message.success {
  color: #4CAF50;
}

#game-message.error {
  color: #f44336;
}

/* Stili per il minigioco medievale */
#available-symbols {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

#available-symbols span {
  font-size: 24px;
  margin: 0 10px;
  cursor: pointer;
  transition: transform 0.2s;
}

#available-symbols span:hover {
  transform: scale(1.2);
}

#current-formula, #target-formula {
  font-size: 20px;
  margin: 10px 0;
  text-align: center;
}

#check-formula, #clear-formula {
  display: inline-block;
  margin: 10px;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  background-color: var(--button-color);
  color: var(--text-color);
  border: none;
  border-radius: 5px;
  transition: background-color 0.3s;
}

#check-formula:hover, #clear-formula:hover {
  background-color: var(--button-hover-color);
}

#game-message {
  margin-top: 20px;
  font-weight: bold;
  text-align: center;
}

#game-message.success {
  color: #4CAF50;
}

#game-message.error {
  color: #f44336;
}

/* Animazione per i simboli alchemici */
@keyframes glow {
  0% { text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff, 0 0 20px #ff00de, 0 0 35px #ff00de, 0 0 40px #ff00de, 0 0 50px #ff00de, 0 0 75px #ff00de; }
  100% { text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #fff, 0 0 40px #ff00de, 0 0 70px #ff00de, 0 0 80px #ff00de, 0 0 100px #ff00de, 0 0 150px #ff00de; }
}

#available-symbols span:hover {
  animation: glow 1s ease-in-out infinite alternate;
}