    /* ====================== RESET & GLOBAL STYLES ====================== */
    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }
    /* Body uses flex layout in column mode to ensure the footer is at the bottom */
    body {
      font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
      background-color: #121212;
      color: #e0e0e0;
      padding: 20px;
      display: flex;
      flex-direction: column;
      min-height: 100vh;
      overflow-x: hidden;
      text-align: center;
    }
    h1 { margin-bottom: 10px; }
    button {
      padding: 8px 16px;
      margin: 4px;
      font-size: 1rem;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      background-color: #28a745;
      color: #fff;
      transition: background-color 0.3s ease;
    }
    button:hover { background-color: #218838; }
    
    /* ====================== BOARD CONTAINER ====================== */
    /* The board-container holds the tile layout and is centered. */
    #board-container {
      position: relative;
      margin: 0 auto;
      width: 100%;
      max-width: 1000px;
      height: 600px;
      background-color: #2a2a2a;
      border: 2px solid #333;
    }
    
    /* ====================== TILE STYLING ====================== */
    .tile {
      position: absolute;
      width: 80px;
      height: 100px;
      background-color: #fff;
      /* A thicker, decorative border and a subtle box shadow */
      border: 2px solid #555;
      border-radius: 8px;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
      display: flex;
      align-items: center;
      justify-content: center;
      /* Force the tile content to be nearly black for contrast */
      color: #000;
      font-size: 1.4rem;
      font-weight: bold;
      user-select: none;
      transition: opacity 0.3s ease;
      cursor: pointer;
    }
    .tile.back {
      background-color: #444;
      border: 2px solid #222;
      color: #444;
    }
    .tile.selected {
      outline: 3px solid #FFD700;
    }
    .dragging { opacity: 0.6; }      /* Lower opacity during drag */
    .drag-over { border: 2px dashed #FFD700; } /* Highlight drop area */
    
    /* ====================== MESSAGE AREA ====================== */
    #message {
      margin-top: 20px;
      padding: 8px;
      font-size: 1.1rem;
      position: relative;
      z-index: 10;
    }
    
    /* ====================== HELP MODAL ====================== */
    .modal {
      display: none;
      position: fixed;
      z-index: 10000;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      overflow: auto;
      background-color: rgba(0,0,0,0.8);
      padding: 20px;
    }
    .modal-content {
      background-color: #2a2a2a;
      margin: 10% auto;
      padding: 20px;
      border: 1px solid #888;
      width: 90%;
      max-width: 500px;
      border-radius: 6px;
      text-align: left;
      color: #e0e0e0;
    }
    .close {
      float: right;
      font-size: 28px;
      font-weight: bold;
      cursor: pointer;
      color: #ccc;
    }
    .close:hover, .close:focus { color: #fff; }
    
    /* ====================== FOOTER ====================== */
    footer {
      margin-top: auto;
      padding: 10px 0;
      background-color: #1f1f1f;
      font-size: 0.9rem;
      color: #ccc;
      text-align: center;
    }
    
    /* ====================== RESPONSIVE STYLES ====================== */
    @media (max-width: 600px) {
      .tile {
        width: 60px;
        height: 75px;
        font-size: 1.1rem;
      }
      #board-container {
        max-width: 100%;
        height: 400px;
      }
    }
