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

body {
  font-family: 'Hiragino Sans', 'Yu Gothic', sans-serif;
  background: #f8f8f8;
  color: #333;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  max-width: 500px;
  width: 90%;
  text-align: center;
}

@media (max-width: 768px) {
  .container {
    width: 100%;
    border-radius: 0;
    box-shadow: none;
    padding: 1rem;
    min-height: 100vh;
  }
}

h1 {
  margin-bottom: 2rem;
  font-size: 1.8rem;
  border-bottom: 2px solid #333;
  padding-bottom: 0.5rem;
}

.era-display {
  font-size: 3rem;
  margin: 0.5rem 0 -1rem 0;
  font-weight: bold;
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.reading {
  font-size: 1rem;
  font-weight: normal;
  color: #666;
  margin-bottom: -0.6rem;
}

.era-display.hidden {
  display: none;
}

.hidden {
  display: none;
}

.hint {
  font-size: 0.9rem;
  color: #666;
  margin-top: 0.5rem;
  margin-bottom: -0.5rem;
  min-height: 0;
}

.control-buttons {
  margin-top: 1rem;
}

.small-btn {
  width: 140px;
  font-size: 0.9rem;
  padding: 0.6rem 1rem;
}

.checkbox-group {
  margin-top: 1rem;
  font-size: 0.9rem;
  display: flex;
  justify-content: center;
}

.reset-group {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
}

.checkbox-group label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

input[type='checkbox'] {
  width: auto;
}

.nav-links {
  margin-bottom: 1rem;
  margin-top: 1.5rem;
  text-align: center;
}

.nav-links a {
  color: #333;
  text-decoration: none;
  font-size: 0.9rem;
  border: 1px solid #333;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  margin: 0 0.25rem;
  display: inline-block;
}

.nav-links a:hover {
  background: #333;
  color: white;
}

.input-group {
  margin: 1rem;
}

.button-container {
  position: relative;
  height: 50px;
  width: 140px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.button-container button {
  position: absolute;
}

.action-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1rem 0;
  width: 100%;
}

.button-pair {
  display: flex;
  gap: 1rem;
  align-items: center;
}

input {
  font-size: 1.2rem;
  padding: 0.4rem;
  border: 2px solid #ddd;
  border-radius: 4px;
  width: 200px;
  text-align: center;
}

input:focus {
  outline: none;
  border-color: #333;
}

button {
  background: #333;
  color: white;
  border: none;
  padding: 0.8rem 2rem;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  margin: 0 0.5rem;
  width: 160px;
}

button:hover:not(:disabled) {
  background: #555;
}

button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.score {
  margin-top: 0;
  font-size: 1.1rem;
  text-align: center;
}

.result {
  margin: 1rem 0;
  font-weight: bold;
}

.correct {
  color: #2d5a27;
}
.incorrect {
  color: #8b0000;
}
