    :root { --error: #ff3333; }
    body {
      margin: 0;
      font-family: Arial, sans-serif;
      background: #f0f0f0;
      text-align: center;
    }

    /* === HAMBURGER MENU === */
    #menu-button {
      position: absolute;
      top: 15px;
      left: 15px;
      width: 30px;
      height: 24px;
      cursor: pointer;
      z-index: 2001;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }
    #menu-button span {
      display: block;
      height: 4px;
      background: #333;
      border-radius: 2px;
    }
    #menu-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.7);
      display: none;
      z-index: 2000;
    }
    #side-menu {
      position: fixed;
      top: 0;
      left: -260px;
      width: 260px;
      height: 100%;
      background: #fff;
      box-shadow: 2px 0 8px rgba(0,0,0,0.4);
      z-index: 2001;
      display: flex;
      flex-direction: column;
      transition: left 0.3s ease;
    }
    #side-menu.active { left: 0; }
    #side-menu nav {
      flex: 1;
      padding: 20px;
    }
    #side-menu nav a {
      display: block;
      padding: 10px 0;
      color: #333;
      text-decoration: none;
      font-size: 18px;
    }
    #side-menu nav a:hover { color: #3498db; }
    #side-menu footer {
      padding: 15px 20px;
      font-size: 12px;
      color: #666;
      border-top: 1px solid #ddd;
    }

    .nav-link {
      display: block;
      padding: 12px 16px;
      color: white;
      text-decoration: none;
      font-size: 16px;
    }

    .nav-link:hover {
      background: rgba(255,255,255,0.1);
    }

    .nav-link.active {
      text-decoration: underline;
      font-weight: bold;
    }

    /* === LOGO === */
    #logo {
      margin: 4px 0;
      width: 296px;
      height: auto;
    }

    /* === GAME LAYOUT === */
    #game-container {
      display: flex;
      flex-direction: column;
      align-items: center;
      margin-top: 10px;
    }
    .board-wrapper {
      display: inline-block;
      text-align: left;
    }
    .levelRow {
      display:flex;
      justify-content:space-between;
      align-items:center;
      width:100%;
      margin-bottom:4px;
    }
    #level-label {
      font-size: 18px;
      font-weight: bold;
      margin: 0;
      padding-left: 2px;
      min-width: 80px;
    }

    /* HEALTH BAR container sits to the right of the level label and stretches to board width */
    .health-container {
      flex: 1 1 auto;
      height: 18px;
      background: black; /* depleted area is black */
      border-radius: 9px;
      position: relative;
      overflow: hidden;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
    }
    /* the fill shrinks from right->left by changing width % anchored to left */
    .health-fill {
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: 100%;
      background: linear-gradient(90deg, #39ff14 0%, #ffea00 50%, #ff3333 100%); /* green -> yellow -> red */
      transition: width 0.12s linear;
      border-radius: 9px;
    }
    .health-text {
      position: absolute;
      right: 8px;
      top: 50%;
      transform: translateY(-50%);
      font-size: 12px;
      color: #111;
      font-weight: 700;
      text-shadow: 0 1px 0 rgba(255,255,255,0.7);
      pointer-events: none;
    }


    .image-row {
      display: flex;
      justify-content: center;
      align-items: flex-start;
      gap: 20px;
    }
    .image-container {
      position: relative;
      background: black;
      display: inline-block;
    }
    .image-container img {
      display: block;
      max-height: 70vh;
      height: auto;
      width: auto;
    }
    canvas {
      position: absolute;
      top: 0;
      left: 0;
    }

    .flash-overlay{position:absolute;inset:0;background:#fff;opacity:0;pointer-events:none}
    .flash-overlay.anim{animation: flashAnim 0.25s ease-in-out 3; animation-fill-mode:forwards;}
    @keyframes flashAnim {0%{opacity:0}50%{opacity:1}100%{opacity:0}}

    .controls {
      display: flex;
      justify-content: space-between;
      margin-top: 10px;
      width: 100%;
      box-sizing: border-box;
    }

    #rightControls {
      display: flex;
      gap: 8px;
      align-items: center;
      justify-content: flex-end;
    }

    .ticks { display:flex; gap:8px; align-items:center; }
    .tick, .wrong {
      width: 34px;
      height: 34px;
      border: 2px solid #bbb;
      border-radius: 6px;
      background: white;
      display:flex;
      align-items:center;
      justify-content:center;
      font-weight:700;
      color: transparent;
    }
    .tick.found { background: limegreen; color: #012; }
    .wrong.marked { color: var(--error); background: #ffecec; }

    #endOverlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.8);
      color: white;
      display: none;
      justify-content: center;
      align-items: center;
      flex-direction: column;
      z-index: 3000;
      padding: 20px;
      text-align: center;
    }
    #endOverlay h2 {
      font-size: 24px;
      margin-bottom: 20px;
    }
    #endOverlay button {
      padding: 10px 20px;
      font-size: 18px;
      border: none;
      border-radius: 6px;
      background: #3498db;
      color: white;
      cursor: pointer;
    }
    #endOverlay button:hover {
      background: #2176b8;
    }

    #info-section {
      max-width: 760px;
      margin: 40px auto 60px auto;
      padding: 20px;
      background: #ffffff;
      border-radius: 12px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.1);
      text-align: left;
    }
    #info-section h2 {
      font-size: 22px;
      color: #333;
      margin-top: 0;
    }
    #info-section p {
      font-size: 16px;
      color: #555;
      line-height: 1.6;
    }

    @media (max-width:900px){
      .image-row{ flex-direction: column; }
      .controls{ flex-direction: column; gap:8px; align-items: stretch; }
      .levelRow{ justify-content: center; }
      .board-wrapper{ width: 100%; max-width: 420px; }
      .controls{ width: 100%; }
    }


