body {
  margin: 0;
  padding: 0;
  font-size: 14pt;
  font-family: "Trebuchet MS", Arial, sans-serif;
  background: #111;
  color: #EEE;
  /* Disable double-tap-zoom functionality */
  touch-action: manipulation;
}

.wrapper {
  width: 100%;
  height: 100%;
  margin: 0 auto;
}

.title {
  margin-top: 40px;
  font-size: 22pt;
  text-align: center;
}

.game {
  width: 100%;
  margin: 60px auto 60px auto;
}

.row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
}

.letter {
  display: flex;
  width: 65px;
  height: 65px;
  margin: 5px;
  justify-content: center;
  align-items: center;
  font-size: 26pt;
  text-transform: uppercase;
  border: 2px #333 solid;
}

.placeholder {
  background-color: rgba(255, 255, 0, 0.1);
}

.keyboard {
  width: 680px;
}

.keyboard .row {
  display: flex;
  width: 680px;
  justify-content: center;
}

.keyboard .l {
  width: 40px;
  height: 50px;
  margin: 4px;
  padding-top: 6px;
  padding-left: 10px;
  border-radius: 8px;
  background: #707070;
  cursor: pointer;
}

/* ---- Flashcard Styles ---- */

.progress {
  text-align: center;
  font-size: 14px;
  color: #999;
  margin-bottom: 20px;
}

.card-container {
  perspective: 1200px;
  width: 800px;
  height: 800px;
  max-width: calc(100vw - 40px);
  max-height: calc(3 * (100vw - 40px) / 4);
  margin: 0 auto 20px auto;
  cursor: pointer;
}

.card {
  width: 100%;
  height: 100%;
  position: relative;
}

.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.5s ease;
  transform-style: preserve-3d;
}

.card-inner.flipped {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  box-sizing: border-box;
  font-size: 18pt;
  line-height: 1.5;
  text-align: center;
  border: 2px solid #444;
}

.card-front {
  background: #1e1e1e;
  color: #eee;
  overflow: hidden;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.card-answer {
  font-size: 16pt;
  line-height: 1.5;
  text-align: center;
  margin: 0;
  clear: both;
}

.answer-header {
  color: #AA5555;
  padding-right: 40px;
}

.card-back {
  background: #252525;
  color: #4fc3f7;
  transform: rotateY(180deg);
}

.card-back td {
  text-align: left;
}

.controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.btn {
  padding: 10px 24px;
  font-size: 14pt;
  font-family: inherit;
  color: #eee;
  background: #333;
  border: 2px solid #555;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.btn:hover {
  background: #444;
}

.btn:active {
  background: #555;
}

.btn-sm {
  padding: 6px 16px;
  font-size: 18pt;
  line-height: 1;
}

.image-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 60px auto 20px auto;
}

.img-counter {
  font-size: 14px;
  color: #999;
  min-width: 32px;
  text-align: center;
}

.hint {
  text-align: center;
  font-size: 12px;
  color: #666;
  margin-top: 14px;
}
