:root {
  --bg: #fdf6e3;
  --text: #333;
  --primary: #4db6ac;
  --card-bg: #ffffff;
  --border: #ccc;
  --letter-bg: #00897b;
  --letter-color: #ffffff;
}

body.dark {
  --bg: #121212;
  --text: #e0e0e0;
  --primary: #81c784;
  --card-bg: #1e1e1e;
  --border: #444;
  --letter-bg: #43a047;
  --letter-color: #ffffff;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 20px;
  transition: background 0.3s, color 0.3s;
}

h1 {
  font-size: 2rem;
  margin: 0 0 20px 0;
  text-align: center;
}

header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px;
}

.top-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 10px;
}

.difficulty button {
  padding: 10px 20px;
  border: none;
  background-color: var(--primary);
  color: white;
  font-weight: bold;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}
.difficulty button:hover {
  background-color: #00796b;
}

.board {
  display: flex;
  justify-content: space-around;
  gap: 30px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.column {
  width: 300px;
  min-height: 240px;
  background: var(--card-bg);
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 16px;
  transition: background 0.3s;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.column h2 {
  margin-top: 0;
  font-size: 1.2rem;
  text-align: center;
  margin-bottom: 12px;
  color: var(--primary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.letters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: 14px;
  max-width: 800px;
  margin: 0 auto;
  padding: 10px;
}

.letter {
  font-size: 32px;
  padding: 12px;
  background: var(--letter-bg);
  color: var(--letter-color);
  border-radius: 10px;
  text-align: center;
  font-weight: bold;
  cursor: grab;
  user-select: none;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
  transition: transform 0.2s, background 0.3s;
}
.letter:hover {
  transform: scale(1.1);
}

.letter.medium {
  font-family: 'Courier New', monospace;
}

.letter.hard {
  font-family: 'Impact', fantasy;
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 26px; width: 26px;
  left: 4px; bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: #2196F3;
}
input:checked + .slider:before {
  transform: translateX(26px);
}
