    /* Base Styles */
    body {
      font-family: Arial, sans-serif;
      display: flex;
      flex-direction: column;
      align-items: center;
      margin: 0;
      background: #fff;
      padding: 20px;
    }
    
    /* Header Styles */
    header {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
      margin-bottom: 20px;
      width: 100%;
      text-align: center;
    }
    header h1 {
      font-size: 2em;
      margin: 0;
    }
    #logo {
      height: 50px;
    }
    #streak {
      display: none;
    }
    
    /* Message Display: No reserved space when empty */
    #message {
      margin-top: 6px;
      min-height: 32px;
      padding: 6px 14px;
      font-size: 1.05em;
      font-weight: 600;
      color: #1f2933;
      text-align: center;
      display: block;
      visibility: hidden;
      background: #f7f7f8;
      border: 1px solid #e6e8eb;
      border-radius: 8px;
      box-sizing: border-box;
    }
    
    /* Grid Styles */
    #grid-container {
      display: grid;
      grid-template-rows: repeat(6, 50px);
      grid-gap: 5px;
      margin-top: 12px;
    }
    .row {
      display: grid;
      grid-template-columns: repeat(5, 50px);
      grid-gap: 5px;
    }
    .cell {
      width: 50px;
      height: 50px;
      border: 2px solid #ccc;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.5em;
      text-transform: uppercase;
      background: #eee;
      transition: background 0.3s, border-color 0.3s;
    }
    .correct {
      background: #6aaa64;
      border-color: #6aaa64;
      color: white;
    }
    .present {
      background: #c9b458;
      border-color: #c9b458;
      color: white;
    }
    .absent {
      background: #787c7e;
      border-color: #787c7e;
      color: white;
    }
    /* Keyboard Styles */
    #keyboard-container {
      width: 100%;
      max-width: 520px;
      margin-top: 20px;
      padding: 0 6px;
      box-sizing: border-box;
    }
    .keyboard-row {
      display: flex;
      justify-content: center;
      gap: 6px;
      margin-bottom: 8px;
    }
    .key {
      flex: 1 1 0;
      height: 58px;
      padding: 0 6px;
      min-width: 34px;
      background: #d3d6da;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      user-select: none;
      text-transform: uppercase;
      font-weight: 700;
      font-size: 1rem;
      letter-spacing: 0.02em;
      transition: background 0.2s ease, transform 0.05s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
    }
    .key:active {
      transform: translateY(1px);
    }
    .key--wide {
      flex: 1.5 1 0;
      font-size: 0.95rem;
    }
    .key.correct {
      background: #6aaa64;
      border-color: #6aaa64;
      color: white;
    }
    .key.present {
      background: #c9b458;
      border-color: #c9b458;
      color: white;
    }
    .key.absent {
      background: #787c7e;
      border-color: #787c7e;
      color: white;
    }
    /* Restart/Continue Button */
    #restart-button {
      margin-top: 20px;
      padding: 10px 20px;
      font-size: 1em;
      cursor: pointer;
      display: none;
    }

    /* Game Over Overlay */
    #game-over-overlay {
      position: fixed;
      inset: 0;
      background: rgba(15, 23, 42, 0.55);
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.2s ease;
      z-index: 10;
      padding: 24px;
      box-sizing: border-box;
    }
    #game-over-overlay.is-visible {
      opacity: 1;
      pointer-events: auto;
    }
    .game-over-card {
      background: #ffffff;
      color: #111827;
      border-radius: 14px;
      padding: 22px 24px;
      max-width: 360px;
      width: 100%;
      text-align: center;
      box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25);
    }
    .game-over-card h2 {
      margin: 0 0 10px;
      font-size: 1.4em;
    }
    .game-over-card p {
      margin: 0 0 16px;
      font-size: 1.05em;
    }
    #overlay-restart-button {
      padding: 10px 18px;
      font-size: 1em;
      font-weight: 700;
      border-radius: 8px;
      border: none;
      cursor: pointer;
      background: #111827;
      color: #ffffff;
    }
    /* Shake Animation */
    .shake {
      animation: shake 0.5s;
    }
    @keyframes shake {
      0% { transform: translateX(0); }
      20% { transform: translateX(-10px); }
      40% { transform: translateX(10px); }
      60% { transform: translateX(-10px); }
      80% { transform: translateX(10px); }
      100% { transform: translateX(0); }
    }
    
    
    
    
    /* Mobile Responsive Styles */
    @media (max-width: 600px) {
      .row {
        grid-template-columns: repeat(5, 50px);
      }
      .cell {
        width: 50px;
        height: 50px;
        font-size: 1.5em;
      }
      #keyboard-container {
        width: 100%;
        max-width: 100%;
        padding: 0px 0px;
        box-sizing: border-box;
      }
      .keyboard-row {
        display: flex;
        width: 100%;
        margin: 0 0 10px 0;
        justify-content: space-between;
        gap: 5px;
      }
      .key {
        flex: 1 1 0;
        height: 52px;
        padding: 0 6px;
        font-size: 0.95rem;
        min-width: 0;
        box-sizing: border-box;
        text-align: center;
      }
      .key--wide {
        flex: 1.6 1 0;
        font-size: 0.9rem;
      }
    }
    
@keyframes flip {
  0% {
    transform: rotateX(0deg);
  }
  50% {
    transform: rotateX(90deg);
  }
  100% {
    transform: rotateX(0deg);
  }
}

/* The .flip class will trigger the flip animation */
.flip {
  animation: flip 0.5s ease forwards;
}

@keyframes jump {
  0% { transform: translateY(0); }
  30% { transform: translateY(-12px); }
  60% { transform: translateY(0); }
  85% { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

.jump {
  animation: jump 0.6s ease;
}
