#gameCanvas {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  cursor: crosshair;
  touch-action: none;
}

.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  color: var(--primary-text-color, #e0e0e0);
  flex-wrap: wrap;
  gap: 8px;
}

.game-header h1 {
  margin: 0;
  font-size: 1.8rem;
}

#timer {
  font-size: 1.4rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--primary-text-color, #e0e0e0);
  min-width: 70px;
  text-align: right;
}

/* Difficulty tabs */
.difficulty-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.tab {
  padding: 7px 18px;
  border: 2px solid rgba(128, 128, 255, 0.35);
  border-radius: 20px;
  background: transparent;
  color: var(--primary-text-color, #e0e0e0);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.tab:hover {
  background: rgba(128, 128, 255, 0.15);
  border-color: rgba(128, 128, 255, 0.65);
}

.tab.active {
  background: rgba(100, 160, 240, 0.8);
  border-color: rgba(100, 160, 240, 0.9);
  color: #fff;
}

.tab:focus {
  outline: 2px solid rgba(100, 160, 240, 0.9);
  outline-offset: 2px;
}

/* Controls */
.game-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 14px;
  flex-wrap: wrap;
}

.game-controls button {
  padding: 8px 20px;
  border: 2px solid rgba(128, 128, 200, 0.4);
  border-radius: 6px;
  background: rgba(60, 60, 100, 0.5);
  color: var(--primary-text-color, #e0e0e0);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.game-controls button:hover {
  background: rgba(100, 100, 160, 0.7);
  border-color: rgba(128, 128, 220, 0.8);
}

.game-controls button:focus {
  outline: 2px solid rgba(100, 160, 240, 0.9);
  outline-offset: 2px;
}

/* Win message */
.win-message {
  text-align: center;
  margin-top: 20px;
  padding: 20px;
  border-radius: 12px;
  background: rgba(60, 180, 100, 0.15);
  border: 2px solid rgba(60, 180, 100, 0.5);
  color: var(--primary-text-color, #e0e0e0);
}

.win-message .win-emoji {
  font-size: 2.5rem;
  display: block;
}

.win-message h2 {
  margin: 8px 0 6px;
  font-size: 1.5rem;
}

.win-message p {
  margin: 0 0 14px;
}

.win-message button {
  padding: 10px 28px;
  border: none;
  border-radius: 6px;
  background: rgba(60, 180, 100, 0.7);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.win-message button:hover {
  background: rgba(60, 180, 100, 0.9);
}

/* How to play */
.how-to-play {
  margin-top: 22px;
  border: 1px solid rgba(128, 128, 200, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--primary-text-color, #d0d0d0);
  font-size: 0.88rem;
  text-align: left;
}

.how-to-play summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(160, 190, 255, 0.9);
  user-select: none;
}

.how-to-play p,
.how-to-play ul {
  margin: 8px 0 0;
}

.how-to-play ul {
  padding-left: 20px;
}

.how-to-play li {
  margin-bottom: 4px;
}

/* Responsive */
@media (max-width: 480px) {
  .game-header h1 {
    font-size: 1.4rem;
  }

  #timer {
    font-size: 1.1rem;
  }

  .tab {
    padding: 6px 14px;
    font-size: 0.82rem;
  }

  .game-controls button {
    padding: 7px 14px;
    font-size: 0.82rem;
  }

  .how-to-play {
    font-size: 0.82rem;
  }
}
