#score-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Ensure it appears on top */
  }
  
  #score-box {
    background-color: rgba(70, 70, 70, 0.95); /* Semi-transparent dark gray */
    color: white;
    border-radius: 10px;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }
  
  #score-box h2 {
    font-size: 26px;
    margin-bottom: 20px;
  }
  
  .word-display {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
  }
  
  .letter {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    margin: 0 2px;
    text-transform: uppercase;
  }
  
  .letter.correct {
    background-color: var(--color-correct);
  }
  
  .score-breakdown {
    width: 100%;
    margin-bottom: 20px;
  }
  
  .score-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
  }
  
  .score-row.total {
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    margin-top: 8px;
    padding-top: 12px;
    font-weight: bold;
  }
  
  #next-btn {
    background-color: white;
    color: #333;
    border: none;
    border-radius: 5px;
    padding: 8px 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
  }
  
  #next-btn:hover {
    background-color: #f0f0f0;
  }
  
  /* Animation for appearing/disappearing */
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  #score-overlay {
    animation: fadeIn 0.15s ease-in-out;
    opacity: 0;
    transition: opacity 0.15s ease-in-out;
    display: none; /* Initially hidden */
  }
