@import url("https://fonts.googleapis.com/css2?family=Henny+Penny&family=Peralta&display=swap");

:root {
  --bg: #ffffff;
  --panel: #fff7e8;
  --accent: #ffbf00;
  --accent-2: #ff1f1f;
  --text: #2a1b1b;
  --muted: #7a5757;
  --line: #ff1a1a;
  --durak-accent: #2d6a4f;
  --durak-line: #1b4332;
}

* {
  box-sizing: border-box;
  font-family: "Peralta", "Courier New", Courier, serif;
  image-rendering: pixelated;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
}

#menu {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 16px 48px;
  text-align: center;
}

.menu-title {
  margin: 0 0 10px;
  line-height: 1;
}

.menu-title-frame {
  display: inline-block;
  padding: 0.08em 0.42em 0.12em;
  font-size: clamp(2rem, 7vw, 2.8rem);
  letter-spacing: 0.06em;
  color: var(--accent);
  background: #ff1a1a;
  line-height: 1.05;
  border: 3px solid #2b1717;
  border-radius: 12px;
}

.menu-subtitle {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 15px;
}

.game-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 20px 22px;
  text-align: left;
  text-decoration: none;
  color: var(--text);
  background: var(--panel);
  border: 3px solid var(--line);
  border-radius: 12px;
  box-shadow: 4px 4px 0 #2b1717;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.game-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #2b1717;
}

.game-card--anagrams {
  align-items: center;
  text-align: center;
  border-color: #6b4f10;
  background: #f7d44a;
}

.game-card--anagrams:hover {
  box-shadow: 6px 6px 0 #6b4f10;
}

.game-card-name {
  font-size: clamp(1.4rem, 5vw, 1.75rem);
  letter-spacing: 0.04em;
  color: var(--accent-2);
}

.game-card-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 6px;
  justify-content: center;
}

.tile-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5em;
  height: 1.5em;
  aspect-ratio: 1 / 1;
  font-family: "Courier New", "Lucida Console", monospace;
  font-size: clamp(1.3rem, 4.6vw, 1.75rem);
  font-weight: 700;
  line-height: 1;
  color: #2c2418;
  background: url("/cards/assets/tile.png") center / 100% 100% no-repeat;
  image-rendering: pixelated;
}

.tile-letter:nth-child(odd) {
  transform: rotate(-3deg);
}

.tile-letter:nth-child(even) {
  transform: rotate(3deg);
}

.game-card--anagrams .game-card-desc {
  margin-top: 6px;
  color: #5a4408;
}

.game-card-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.game-card-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 8px;
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--durak-accent);
  background: #d8f3dc;
  border: 2px solid var(--durak-line);
  border-radius: 6px;
}
