
body, h1, div, input, button {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


body {
  background: #f5f7fa;
  font-family: Arial, Helvetica, sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}


.container {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08), 0 0 1px #ddd;
  padding: 26px 28px 30px 28px;
  text-align: center;
  max-width: 340px;
  margin: 0 auto;
}

h1 {
  color: #3b82f6;
  margin-bottom: 25px;
  letter-spacing: 1px;
  font-size: 1.8em;
}


#question {
  font-size: 2em;
  font-weight: bold;
  margin: 18px 0 16px;
  letter-spacing: 2px;
  color: #334155;
}


#answerInput {
  width: 90px;
  font-size: 1.5em;
  padding: 8px 12px;
  border-radius: 7px;
  border: 2px solid #e5e7eb;
  margin-bottom: 14px;
  text-align: center;
  transition: border-color 0.2s;
}

#answerInput:focus {
  border-color: #3b82f6;
  outline: none;
}


#feedback {
  font-size: 1.1em;
  margin: 8px 0 0;
  min-height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ef4444;
  font-weight: 500;
}

#score, #timer {
  font-size: 1.2em;
  margin: 10px 0;
  color: #3b82f6;
}


#startBtn {
  background: #2196F3;
  color: white;
  font-size: 1em;
  border: none;
  border-radius: 7px;
  padding: 10px 20px;
  cursor: pointer;
  margin-top: 12px;
  transition: background 0.2s;
}

#startBtn:hover {
  background: #1976D2;
}


#keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

#keypad .key {
  padding: 14px;
  font-size: 1.2em;
  background: #e5e7eb;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

#keypad .key:hover {
  background: #d1d5db;
}


#keypad #enterKey {
  background: #3b82f6;
  color: white;
}
#keypad #enterKey:hover {
  background: #2563eb;
}

#keypad #minusKey {
  background: #fbbf24;
  font-weight: bold;
}
#keypad #minusKey:hover {
  background: #f59e0b;
}

#keypad #clearKey {
  background: #ef4444;
  color: white;
}
#keypad #clearKey:hover {
  background: #dc2626;
}


#keypad .wide {
  grid-column: span 1;
  padding: 14px 0;
}

#keypad .empty {
  background: transparent;
}


@media (max-width: 440px) {
  .container {
    max-width: 97vw;
    padding: 16px 7px 18px;
  }
  h1 {
    font-size: 1.4em;
    margin-bottom: 16px;
  }
  #question {
    font-size: 1.4em;
    letter-spacing: 1px;
  }
  #answerInput {
    width: 70vw;
    font-size: 1.2em;
    margin-bottom: 10px;
  }
  #keypad .key {
    padding: 12px;
    font-size: 1em;
  }
}
