:root {
  --ink: #192238;
  --cream: #fffaf1;
  --orange: #ff7859;
  --lcd: #a3a02a;
  --body: #2c3a52;
  --body-dark: #1e293d;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: linear-gradient(135deg, #fff3d7, #ccefe6);
  font-family: Arial, sans-serif;
  color: var(--ink);
}
.game-page {
  min-height: 100vh;
  padding: 24px 16px;
  display: grid;
  place-items: center;
}
.back {
  position: fixed;
  top: 22px;
  left: 24px;
  color: var(--ink);
  text-decoration: none;
  font-weight: bold;
}
.panel {
  width: min(480px, 100%);
  padding: 24px 24px 22px;
  background: var(--cream);
  border-radius: 26px;
  text-align: center;
  box-shadow: 0 20px 60px #19223826;
}
.eyebrow {
  margin: 0;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--orange);
  font-weight: bold;
}
.panel h1 {
  font-size: 32px;
  margin: 6px 0;
}
.help {
  margin: 0 0 16px;
  color: #7b8294;
  font-size: 13px;
  line-height: 1.8;
}
kbd {
  display: inline-block;
  min-width: 18px;
  margin: 0 1px;
  padding: 0 5px;
  border: 1px solid #c9cedb;
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #fff;
  font: 700 12px Arial, sans-serif;
  color: var(--ink);
}

/* Thân máy kiểu điện thoại cục gạch */
.phone {
  width: min(100%, 396px);
  margin: 0 auto;
  padding: 22px 20px 20px;
  border-radius: 34px 34px 46px 46px;
  background: linear-gradient(160deg, #3b4c6b, var(--body) 45%, var(--body-dark));
  box-shadow:
    inset 0 2px 0 #ffffff26,
    inset 0 -4px 0 #00000040,
    0 16px 34px #19223840;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.screen {
  padding: 8px;
  border-radius: 14px 14px 22px 22px;
  background: #121a29;
  box-shadow: inset 0 3px 8px #000a;
}
.screen canvas {
  display: block;
  width: 100%;
  margin: 0 auto;
  aspect-ratio: 96 / 68;
  border-radius: 4px;
  background: var(--lcd);
  image-rendering: pixelated;
  box-shadow:
    inset 0 0 18px #5c5a1050,
    0 0 0 1px #0006;
  touch-action: none;
}

.softkeys {
  display: flex;
  justify-content: space-between;
  margin: 16px 6px 12px;
}
.phone button {
  border: 0;
  cursor: pointer;
  font-family: Arial, sans-serif;
  touch-action: manipulation;
}
.soft {
  width: 92px;
  height: 30px;
  border-radius: 16px;
  background: linear-gradient(#e9eef6, #b9c4d6);
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 3px 0 #0b1220;
}
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px 12px;
}
.keypad button {
  height: 42px;
  border-radius: 18px;
  background: linear-gradient(#f4f6fa, #c8d0dd);
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 3px 0 #0b1220;
}
.keypad button small {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  color: #6b7486;
}
.keypad button[data-key="ok"] {
  background: linear-gradient(#ffd2a8, #ff9a5e);
}
.phone button:active,
.phone button.pressed {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #0b1220;
}

.controls {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}
.controls button {
  border: 0;
  border-radius: 10px;
  height: 40px;
  padding: 0 18px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.controls button[aria-pressed="false"] {
  background: #7b8294;
}
@media (max-width: 560px) {
  .panel {
    padding: 18px 12px;
  }
  .back {
    position: static;
    display: block;
    margin-bottom: 14px;
  }
  .phone {
    padding: 18px 14px 16px;
  }
  .keypad button {
    height: 38px;
  }
}
