    body {
      font-family: 'Nunito', sans-serif;
      margin: 0;
      padding: 10px;
      text-align: center;
      background-color: #f0f8ff;
      color: #333;
      line-height: 1.6;
    }
    @font-face {
  font-display: swap; 
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/nunito-v26-latin-regular.woff2') format('woff2'); 
}
/* nunito-700 - latin */
@font-face {
  font-display: swap; 
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 700;
  src: url('../fonts/nunito-v26-latin-700.woff2') format('woff2'); 
}
/* nunito-800 - latin */
@font-face {
  font-display: swap; 
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 800;
  src: url('../fonts/nunito-v26-latin-800.woff2') format('woff2'); 
}


    /* Link to go back */
    .back-link {
      display: inline-block;
      margin-bottom: 15px;
      padding: 8px 15px;
      background-color: #840A04;
      color: #FFCC80;
      text-decoration: none;
      border-radius: 20px;
      font-weight: 700;
      font-size: 0.9rem;
      transition: background-color 0.3s, transform 0.2s;
    }

    .back-link:hover, .back-link:active {
      background-color: #530804;
      transform: scale(1.05);
    }

    .container {
      width: 100%;
      max-width: 750px;
      margin: 0 auto;
      padding: 15px;
      background-color: white;
      border-radius: 15px;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
      box-sizing: border-box;
    }

    h1 {
      color: #db4437;
      font-weight: 800;
      margin-bottom: 10px;
      font-size: 1.8rem;
      word-wrap: break-word;
    }

    h3 {
      font-size: 1.2rem;
      color: #555;
      margin-bottom: 15px;
      font-weight: 700;
    }

    #score {
      color: #ff6f61;
      font-weight: 800;
      font-size: 1.5rem;
      vertical-align: middle;
    }

    /* Settings Area */
    .settings {
      margin-bottom: 20px;
      padding: 15px;
      background-color: #ffebee;
      border-radius: 10px;
    }

    .settings h4 {
      font-size: 1rem;
      color: #c62828;
      margin-top: 0;
      margin-bottom: 15px;
      font-weight: 700;
    }

    /* Table Selector Buttons */
    .table-selector {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 8px;
    }

    .table-option {
      padding: 8px 12px;
      border: 2px solid #ffcdd2;
      border-radius: 20px;
      cursor: pointer;
      transition: all 0.3s;
      font-weight: 700;
      background-color: #fff;
      color: #D83B3B;
      min-width: 35px;
      font-size: 0.9rem;
      text-align: center;
      touch-action: manipulation;
    }

    .table-option:hover, .table-option:active {
      background-color: #ffcdd2;
      color: #c62828;
    }

    .table-option.selected {
      background-color: #E51510;
      color: white;
      border-color: #e53935;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    }

    .table-option.range-option {
      background-color: #ffcc80;
      color: #612D00;
      border-color: #ffa726;
    }

    .table-option.range-option:hover, .table-option.range-option:active {
      background-color: rgb(202, 92, 9);
      color: white;
    }

    /* Quiz Area */
    .quiz-area {
      margin-top: 20px;
    }

    #question {
      font-size: 2rem;
      margin: 20px 0;
      color: #333;
      font-weight: 700;
      min-height: 60px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    input[type='number'] {
      padding: 12px;
      font-size: 1.3rem;
      width: 120px;
      text-align: center;
      border: 3px solid #ddd;
      border-radius: 10px;
      margin-bottom: 15px;
      box-sizing: border-box;
      font-family: 'Nunito', sans-serif;

    }

    /* Hide number input arrows */
    input[type='number']::-webkit-inner-spin-button,
    input[type='number']::-webkit-outer-spin-button {
      -webkit-appearance: none;
      margin: 0;
    }



    #submit-btn {
      background-color: #D73328;
      color: white;
      border: none;
      padding: 12px 30px;
      font-size: 1rem;
      border-radius: 25px;
      cursor: pointer;
      transition: background-color 0.3s, transform 0.2s;
      margin: 5px;
      font-weight: 700;
      font-family: 'Nunito', sans-serif;
      touch-action: manipulation;
    }

    #submit-btn:hover, #submit-btn:active {
      background-color: #DD4746;
      transform: scale(1.05);
    }

    /* Result Message Area */
    #result-message {
      margin-top: 20px;
      font-size: 1rem;
      font-weight: 700;
      min-height: 40px;
      padding: 10px;
      border-radius: 8px;
    }

    /* Specific styles applied via JavaScript */
    .result-correct {
      color: #2e7d32;
      background-color: #c8e6c9;
    }

    .result-incorrect {
      color: #c62828;
      background-color: #ffcdd2;
      line-height: 1.4;
    }

    .result-warning {
      color: #ff8f00;
      background-color: #fff8e1;
    }

    .footer {
      text-align: center;
      padding: 25px;
      background-color: #840a04;
      color: #FFCC80;
      margin-top: 30px;
      font-size: 0.9rem;
    }
    
    .footer-link {
      color: #FFCC80;
      text-decoration:underline;
    }
/* Instructions and Related Games */
.instructions, .related-games {
  margin-top: 30px;
  text-align: left;
  background-color: #f5f5f5;
  padding: 15px;
  border-radius: 10px;
}

.instructions h2, .related-games h2 {
  font-size: 1.3rem;
  margin-top: 0;
  color: #333;
}

.instructions ol, .related-games ul {
  margin-left: 10px;
  padding-left: 15px;
}

.related-games a {
  color: #0277bd;
  text-decoration: none;
  font-weight: 700;
}

.related-games a:hover {
  text-decoration: underline;
}
 /* Mobile Keypad Styles */
.number-keypad {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 300px;
  margin: 15px auto;
}

.keypad-row {
  display: contents;
}

.keypad-btn {
  background-color: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 8px;
  color: #333;
  font-size: 1.3rem;
  font-weight: 700;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.keypad-btn:active {
  background-color: #e0e0e0;
  transform: scale(0.95);
}

.keypad-clear {
  background-color: #ffcdd2;
  color: #c62828;
}

.keypad-submit {
  background-color: #c8e6c9;
  color: #2e7d32;
  font-size: 1.4rem;
}

/* Make input field readonly on mobile to prevent keyboard popup */
@media (max-width: 768px) {
  .number-keypad {
    display: grid;
  }
  
  /* Hide keyboard on mobile when interacting with answer input */
  input[type="number"] {
    pointer-events: none;
  }
  
  /* Improve mobile layout */
  .container {
    padding: 15px 10px;
  }
  
  /* Better spacing for mobile */
  #question {
    font-size: 1.8rem;
    margin: 15px 0;
    min-height: 45px;
  }
  
  /* Make table selection more touch-friendly */
  .table-option {
    padding: 10px 12px;
    min-width: 40px;
    margin: 4px;
  }
  
  /* Hide the browser's default submit button */
@media (max-width: 768px) {
  /* Hide regular submit button but show restart button */
  #submit-btn:not(.celebrate-button) {
    display: none;
  }
  
  /* Make the restart button more visible when in that state */
  #submit-btn.celebrate-button {
    display: block;
    width: 80%;
    margin: 10px auto;
    padding: 15px;
    font-size: 1.2rem;
  }
  
  /* Adjust the keypad when game is over */
  body.game-over .number-keypad {
    display: none;
  }
}
  
  /* Make results more readable on mobile */
  #result-message {
    font-size: 1rem;
    padding: 8px;
  }
}