/* Word Search – game-specific styles (shared.css provides variables, base layout, buttons, overlay) */

.game-word-search h1 {
  margin-bottom: 4px;
}

.game-word-search .header {
  text-align: center;
  margin-bottom: 20px;
}

.game-word-search .header .theme-label {
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  color: var(--teal);
  margin-bottom: 8px;
}

.game-word-search .controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.game-word-search .timer {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--gold);
  background: var(--surface);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  min-width: 90px;
  text-align: center;
}

.game-word-search .game-container {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 800px;
  width: 100%;
}

.game-word-search .grid-wrapper {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.06);
  position: relative;
}

.game-word-search .grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 2px;
  background: var(--board-bg);
  border-radius: var(--radius-sm);
  padding: 6px;
  position: relative;
}

.game-word-search .cell {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  position: relative;
  z-index: 1;
}

.game-word-search .cell:hover {
  background: var(--muted);
  color: var(--text-bright);
}

.game-word-search .cell.selecting {
  background: var(--muted-light);
  color: var(--text-bright);
}

.game-word-search .cell.found {
  color: #2D2D2D;
  font-weight: 700;
}

.game-word-search .cell.found-0 { background: rgba(240, 90, 110, 0.7); }
.game-word-search .cell.found-1 { background: rgba(62, 207, 180, 0.7); }
.game-word-search .cell.found-2 { background: rgba(240, 201, 72, 0.7); }
.game-word-search .cell.found-3 { background: rgba(130, 120, 255, 0.7); }
.game-word-search .cell.found-4 { background: rgba(255, 150, 80, 0.7); }
.game-word-search .cell.found-5 { background: rgba(180, 80, 220, 0.7); }
.game-word-search .cell.found-6 { background: rgba(80, 200, 255, 0.7); }
.game-word-search .cell.found-7 { background: rgba(100, 220, 100, 0.7); }
.game-word-search .cell.found-8 { background: rgba(255, 130, 170, 0.7); }
.game-word-search .cell.found-9 { background: rgba(200, 200, 100, 0.7); }

.game-word-search .word-list-panel {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.06);
  min-width: 180px;
}

.game-word-search .word-list-panel h2 {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-bright);
  margin-bottom: 14px;
  text-align: center;
}

.game-word-search .word-list-panel .progress {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: var(--muted-light);
  text-align: center;
  margin-bottom: 14px;
}

.game-word-search .word-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.game-word-search .word-list li {
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  color: var(--text);
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--board-bg);
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s;
}

.game-word-search .word-list li.found {
  text-decoration: line-through;
  opacity: 0.5;
}

.game-word-search .word-list li.found-0 { color: #c4424e; }
.game-word-search .word-list li.found-1 { color: #2a9e82; }
.game-word-search .word-list li.found-2 { color: #c4a030; }
.game-word-search .word-list li.found-3 { color: #6860d4; }
.game-word-search .word-list li.found-4 { color: #d47838; }
.game-word-search .word-list li.found-5 { color: #9440b8; }
.game-word-search .word-list li.found-6 { color: #3a9ec4; }
.game-word-search .word-list li.found-7 { color: #48b048; }
.game-word-search .word-list li.found-8 { color: #d46888; }
.game-word-search .word-list li.found-9 { color: #a0a048; }

/* Win overlay – game-specific card content */
.game-word-search .game-overlay-card h2 {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 8px;
}

.game-word-search .game-overlay-card p {
  color: var(--text);
  margin-bottom: 24px;
  font-size: 1.05rem;
}

.game-word-search .game-overlay-card .final-time {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--teal);
  margin-bottom: 24px;
}

/* SVG lines for selection */
.game-word-search .line-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

@media (max-width: 640px) {
  .game-word-search .game-container {
    flex-direction: column;
    align-items: center;
  }

  .game-word-search .cell {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
  }

  .game-word-search .grid {
    padding: 4px;
  }

  .game-word-search .grid-wrapper {
    padding: 10px;
  }

  .game-word-search h1 {
    font-size: 1.5rem;
  }

  .game-word-search .word-list-panel {
    width: 100%;
    max-width: 360px;
  }

  .game-word-search .word-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
}
