  /* ===== Word Scramble Game Styles ===== */
  body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background: #f9fafb;
    color: #111;
    text-align: center;
  }

  h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #0f172a;
  }

  .intro {
    max-width: 600px;
    margin: 0 auto 20px;
    font-size: 1rem;
    color: #334155;
  }

  .game-container {
    max-width: 700px;
    margin: auto;
  }

  /* Score & Timer */
  .score-timer {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    color: #1e293b;
  }

  /* Scrambled Words Grid */
  .scramble-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
  }

  .letters-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
  }

  /* Tiles = mots (rectangles flexibles) */
  .letters-grid .tile {
    padding: 10px 10px;
    background: #e2e8f0;
    color: #111;
    font-size: 15px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    user-select: none;
    white-space: nowrap;
  }

  .letters-grid .tile:hover {
    background: #cbd5e1;
    transform: scale(1.05);
  }

  .letters-grid .tile.selected {
    background: #0ea5e9;
    color: white;
    border-color: #0284c7;
  }

  /* Answer Input */
  .answer-container {
    margin: 15px 0;
  }

  #answer-input {
    width: 80%;
    max-width: 500px;
    padding: 10px;
    font-size: 1.2rem;
    text-align: center;
    border: 2px solid #94a3b8;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
  }

  #answer-input:focus {
    border-color: #0ea5e9;
  }

  /* Controls */
  .controls {
    margin-top: 15px;
  }

  .controls button {
    background: #0ea5e9;
    color: white;
    border: none;
    padding: 10px 18px;
    margin: 5px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
  }

  .controls button:hover {
    background: #0284c7;
  }

  .controls button.d-none {
    display: none;
  }

  /* Responsive */
  @media (max-width: 600px) {
    .letters-grid {
      gap: 6px;
    }

    .letters-grid .tile {
      padding: 8px 12px;
      font-size: 15px;
    }

    #answer-input {
      width: 95%;
      font-size: 1rem;
    }
  }