/* Word Search Styles */
body {
  background: url('../assets/wordsearch-bg.jpg') center/cover fixed;
}
body::after {
  content: ''; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(26,26,46,0.85); z-index: -1;
}

.game-container {
  max-width: 700px; margin: 0 auto; padding: 60px 12px 20px;
  min-height: 100vh;
}

.menu-screen { text-align: center; padding-top: 30px; }
.menu-screen h1 {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(1.2rem, 5vw, 2rem);
  background: linear-gradient(180deg, var(--poke-yellow), var(--poke-blue));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.menu-screen .menu-icon { font-size: 4rem; margin: 16px 0; }

.category-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 16px 0;
}
.cat-btn {
  padding: 12px 8px; border-radius: 12px; font-size: 0.9rem; font-weight: 900;
  background: #2a2a4a; border: 2px solid var(--poke-blue); color: white;
  cursor: pointer; transition: all 0.2s; font-family: 'Nunito';
}
.cat-btn:hover, .cat-btn.selected { border-color: var(--poke-yellow); background: #3a3a5a; }
.cat-btn.selected::after { content: ' ✓'; color: var(--poke-yellow); }

.diff-btns { display: flex; gap: 10px; margin: 16px 0; justify-content: center; flex-wrap: wrap; }

/* Game screen */
.game-screen { display: none; }

.game-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; flex-wrap: wrap; gap: 8px;
}
.game-header .stat {
  font-family: 'Press Start 2P', monospace; font-size: 0.6rem;
  text-align: center;
}
.game-header .stat-val { color: var(--poke-yellow); font-size: 0.85rem; margin-top: 4px; }

.grid-container {
  display: flex; justify-content: center; margin: 12px 0;
  user-select: none; -webkit-user-select: none;
  touch-action: none;
}

.grid {
  display: inline-grid; gap: 2px;
  background: rgba(0,0,0,0.3); padding: 8px; border-radius: 12px;
  border: 3px solid var(--poke-yellow);
}

.cell {
  width: clamp(44px, 8vw, 48px); height: clamp(44px, 8vw, 48px);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: clamp(1rem, 2.8vw, 1.2rem);
  background: #2a2a4a; border-radius: 6px;
  cursor: pointer; transition: all 0.15s;
  color: white; text-transform: uppercase;
  border: 2px solid transparent;
}

@media (max-width: 400px) {
  .grid-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .cell {
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }
}
.cell:hover { background: #3a3a5a; }
.cell.selecting { background: var(--poke-blue); border-color: var(--poke-yellow); }
.cell.found { background: var(--poke-green); color: white; border-color: #8BC34A; }
.cell.hint { border-color: var(--poke-yellow); animation: glow 1s infinite; }

.word-list {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin: 16px 0;
}
.word-tag {
  padding: 6px 14px; border-radius: 20px; font-size: 0.85rem; font-weight: 700;
  background: #2a2a4a; border: 2px solid var(--poke-blue); color: #ccc;
  transition: all 0.3s;
}
.word-tag.found {
  background: var(--poke-green); border-color: #8BC34A; color: white;
  text-decoration: line-through;
}

.hint-btn {
  font-family: 'Nunito'; font-weight: 700; font-size: 0.9rem;
  padding: 8px 20px; border-radius: 20px;
  background: rgba(255,203,5,0.2); border: 2px solid var(--poke-yellow);
  color: var(--poke-yellow); cursor: pointer; transition: all 0.2s;
}
.hint-btn:hover { background: var(--poke-yellow); color: var(--poke-dark); }

.game-actions { display: flex; gap: 10px; justify-content: center; margin: 12px 0; flex-wrap: wrap; }

.feedback-msg {
  text-align: center; font-weight: 900; font-size: 1.1rem;
  padding: 8px; min-height: 40px; margin: 8px 0;
}

/* Result */
.result-screen { display: none; text-align: center; padding-top: 40px; }
.result-screen h2 {
  font-family: 'Press Start 2P', monospace; font-size: 1.3rem;
  color: var(--poke-yellow);
}
.result-icon { font-size: 4rem; margin: 16px 0; }
