* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  background: #000000;
  color: #ffffff;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}

.content {
  width: 100%;
  max-width: 760px;
}

/* Column legend / headers */
.legend {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr 1fr;
  gap: 0.75rem;
  padding-bottom: 0.85rem;
  margin-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.legend-item {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}

.legend-item.rtl {
  direction: rtl;
  text-align: right;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.7rem;
}

.word-list {
  list-style: none;
}

.word-row {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr 1fr;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.7rem 0;
  opacity: 0;
  transform: translateY(8px);
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Clickable cell */
.cell {
  font-family: "Newsreader", Georgia, serif;
  cursor: pointer;
  transition: color 0.25s ease, transform 0.15s ease, text-shadow 0.25s ease;
  border-radius: 4px;
  user-select: none;
  outline: none;
}

.cell:hover {
  color: #ffffff;
}

.cell:focus-visible {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3);
}

/* Pulse when speaking */
.cell.speaking {
  color: #ffffff;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.65);
  transform: translateY(-1px);
}

/* French — the star of the show */
.cell-fr {
  font-size: 1.45rem;
  font-weight: 400;
  color: #ffffff;
  letter-spacing: 0.01em;
}

.cell-en {
  font-size: 1rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.5);
}

.cell-fa,
.cell-ckb {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.6);
}

.cell.rtl {
  direction: rtl;
  text-align: right;
}

.hint {
  margin-top: 2.75rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.22);
  text-align: center;
  font-style: italic;
}

.meta {
  margin-top: 0.9rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
}

.footer {
  margin-top: 1.25rem;
  text-align: center;
}

.footer a {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.22);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 640px) {
  .screen {
    padding: 2rem 1rem;
  }
  .legend,
  .word-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem 0.9rem;
  }
  .legend {
    padding-bottom: 0.6rem;
  }
  .legend-item {
    font-size: 0.55rem;
  }
  .legend-item.rtl {
    font-size: 0.62rem;
  }
  .word-row {
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  .cell-fr {
    font-size: 1.25rem;
  }
  .cell-en {
    font-size: 0.9rem;
  }
  .cell-fa,
  .cell-ckb {
    font-size: 1.05rem;
  }
}