:root {
  --mc-green: #3b8526;
  --mc-green-dark: #1f4f16;
  --mc-green-light: #6fbd45;
  --mc-brown: #8b5a2b;
  --mc-brown-dark: #4a2f18;
  --mc-stone: #777777;
  --mc-stone-dark: #3b3b3b;
  --mc-cream: #f6f0c4;
  --mc-gold: #ffd83d;
  --mc-blue: #55c7ff;
  --mc-red: #d63a2f;
  --shadow: rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: white;
  background:
    linear-gradient(45deg, rgba(0, 0, 0, 0.08) 25%, transparent 25%) 0 0 / 32px 32px,
    linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.08) 75%) 0 0 / 32px 32px,
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.05) 75%) 16px 16px / 32px 32px,
    linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%) 16px 16px / 32px 32px,
    linear-gradient(180deg, #5aa832 0%, #2f741f 45%, #7a4f28 45%, #4b2d16 100%);
  overflow: hidden;
}

.app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: clamp(18px, 4vw, 36px);
}

.panel {
  width: min(100%, 680px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px, 2.6vw, 22px);
  padding-top: clamp(6px, 2vh, 18px);
}


.top-bar {
  width: min(100%, 680px);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 48px;
}

.settings {
  position: relative;
  z-index: 5;
}

.settings-button {
  width: 48px;
  height: 48px;
  border: 5px solid var(--mc-stone-dark);
  background: rgba(30, 30, 30, 0.78);
  color: var(--mc-cream);
  font-size: 26px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.28);
  touch-action: manipulation;
}

.settings-button:active {
  transform: translateY(5px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.28);
}

.group-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(82vw, 280px);
  padding: 14px;
  border: 5px solid var(--mc-stone-dark);
  background: rgba(30, 30, 30, 0.94);
  box-shadow: 0 10px 22px var(--shadow);
}

.group-label {
  display: block;
  margin-bottom: 8px;
  color: var(--mc-cream);
  font-size: 15px;
  font-weight: 900;
}

.group-select {
  width: 100%;
  min-height: 48px;
  border: 4px solid var(--mc-brown-dark);
  background: var(--mc-cream);
  color: var(--mc-brown-dark);
  font-size: 18px;
  font-weight: 900;
}

.title {
  padding: 10px 18px;
  font-size: clamp(28px, 8vw, 56px);
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1;
  text-align: center;
  color: var(--mc-cream);
  text-shadow:
    4px 4px 0 var(--mc-brown-dark),
    0 5px 18px var(--shadow);
}

.subtitle {
  margin-top: -8px;
  font-size: clamp(15px, 3.5vw, 24px);
  font-weight: 800;
  color: var(--mc-gold);
  text-shadow: 3px 3px 0 var(--mc-brown-dark);
}

.word-circle {
  width: min(78vw, 430px);
  height: min(78vw, 430px);
  border-radius: 50%;
  border: 10px solid var(--mc-stone-dark);
  background:
    radial-gradient(circle at 35% 30%, #8bd85c 0 16%, transparent 17%),
    radial-gradient(circle at 50% 50%, var(--mc-green-light), var(--mc-green) 58%, var(--mc-green-dark) 100%);
  box-shadow:
    inset 0 -16px 0 rgba(0, 0, 0, 0.25),
    inset 0 12px 0 rgba(255, 255, 255, 0.15),
    0 16px 0 #202020,
    0 28px 36px var(--shadow);
  display: grid;
  place-items: center;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    filter 120ms ease;
}

.word-circle:active,
.word-circle.pressed {
  transform: translateY(10px) scale(0.98);
  box-shadow:
    inset 0 -10px 0 rgba(0, 0, 0, 0.25),
    inset 0 9px 0 rgba(255, 255, 255, 0.15),
    0 6px 0 #202020,
    0 14px 24px var(--shadow);
  filter: brightness(1.05);
}

.question {
  font-size: clamp(120px, 34vw, 220px);
  font-weight: 1000;
  line-height: 1;
  color: var(--mc-cream);
  text-shadow:
    7px 7px 0 var(--mc-green-dark),
    0 8px 18px rgba(0, 0, 0, 0.35);
}

.word-content {
  width: 88%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 3vw, 18px);
  text-align: center;
}

.ru-word {
  max-width: 100%;
  font-size: clamp(34px, 10vw, 72px);
  font-weight: 1000;
  line-height: 0.95;
  color: var(--mc-cream);
  overflow-wrap: anywhere;
  text-shadow:
    5px 5px 0 var(--mc-green-dark),
    0 6px 18px rgba(0, 0, 0, 0.38);
}

.en-word {
  max-width: 100%;
  padding: 5px 12px 7px;
  border: 5px solid var(--mc-brown-dark);
  background: var(--mc-brown);
  font-size: clamp(18px, 5.2vw, 38px);
  font-weight: 900;
  line-height: 1.05;
  color: var(--mc-blue);
  overflow-wrap: anywhere;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.28);
  text-shadow: 3px 3px 0 #123447;
}

.counter {
  padding: 9px 16px;
  border: 5px solid var(--mc-stone-dark);
  background: rgba(30, 30, 30, 0.72);
  color: var(--mc-cream);
  font-size: clamp(18px, 4vw, 26px);
  font-weight: 900;
  box-shadow: 0 7px 0 rgba(0, 0, 0, 0.25);
}

.new-game {
  width: min(100%, 520px);
  min-height: 66px;
  margin-top: 20px;
  border: 6px solid var(--mc-brown-dark);
  border-radius: 0;
  background:
    linear-gradient(180deg, #a9743d 0%, var(--mc-brown) 55%, #633b1c 100%);
  color: var(--mc-cream);
  font-size: clamp(22px, 5vw, 34px);
  font-weight: 1000;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-shadow: 4px 4px 0 var(--mc-brown-dark);
  box-shadow:
    inset 0 8px 0 rgba(255, 255, 255, 0.14),
    0 10px 0 #2c1a0c,
    0 20px 28px var(--shadow);
  cursor: pointer;
  touch-action: manipulation;
}

.new-game:active {
  transform: translateY(8px);
  box-shadow:
    inset 0 5px 0 rgba(255, 255, 255, 0.14),
    0 2px 0 #2c1a0c,
    0 10px 18px var(--shadow);
}

.hidden {
  display: none;
}

@media (max-height: 720px) {
  .app {
    padding-top: 12px;
    padding-bottom: 16px;
  }

  
.top-bar {
  width: min(100%, 680px);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 48px;
}

.settings {
  position: relative;
  z-index: 5;
}

.settings-button {
  width: 48px;
  height: 48px;
  border: 5px solid var(--mc-stone-dark);
  background: rgba(30, 30, 30, 0.78);
  color: var(--mc-cream);
  font-size: 26px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.28);
  touch-action: manipulation;
}

.settings-button:active {
  transform: translateY(5px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.28);
}

.group-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(82vw, 280px);
  padding: 14px;
  border: 5px solid var(--mc-stone-dark);
  background: rgba(30, 30, 30, 0.94);
  box-shadow: 0 10px 22px var(--shadow);
}

.group-label {
  display: block;
  margin-bottom: 8px;
  color: var(--mc-cream);
  font-size: 15px;
  font-weight: 900;
}

.group-select {
  width: 100%;
  min-height: 48px;
  border: 4px solid var(--mc-brown-dark);
  background: var(--mc-cream);
  color: var(--mc-brown-dark);
  font-size: 18px;
  font-weight: 900;
}

.title {
    font-size: clamp(24px, 6vw, 44px);
  }

  .word-circle {
    width: min(62vh, 78vw, 380px);
    height: min(62vh, 78vw, 380px);
  }

  .new-game {
    min-height: 58px;
  }
}
