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

body {
  font-family: 'Noto Sans', sans-serif;
  background: #fff;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 400px;
}

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

.input-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.digit-inputs {
  display: flex;
  gap: 12px;
}

.digit-input {
  width: 60px;
  height: 70px;
  font-size: 32px;
  text-align: center;
  border: 2px solid #ddd;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
}

.digit-input:focus {
  border-color: #333;
}

.digit-input:disabled {
  background: #f5f5f5;
  cursor: not-allowed;
  opacity: 0.6;
}

.submit-btn,
.restart-btn,
.give-up-btn {
  padding: 14px 32px;
  font-size: 16px;
  border: 2px solid #333;
  background: #333;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 600;
}

.submit-btn:hover,
.restart-btn:hover,
.give-up-btn:hover {
  background: #555;
  border-color: #555;
}

.give-up-btn {
  background: white;
  color: #333;
  width: 100%;
  order: -1;
  margin-bottom: 8px;
}

.give-up-btn:hover {
  background: #f5f5f5;
  border-color: #555;
}

.submit-btn:disabled {
  background: #ddd;
  border-color: #ddd;
  cursor: not-allowed;
}

.history {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guess-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f5f5f5;
  border-radius: 8px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.guess-number {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 4px;
}

.guess-result {
  font-size: 16px;
  font-weight: 600;
}

.hit {
  color: #d32f2f;
}

.blow {
  color: #f57c00;
}

.result {
  text-align: center;
  padding: 24px;
  background: #f5f5f5;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.result-text {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.6;
}

.hidden {
  display: none;
}

@media (max-width: 480px) {
  .digit-input {
    width: 50px;
    height: 60px;
    font-size: 28px;
  }
  
  .digit-inputs {
    gap: 8px;
  }
}