* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(to bottom, #fffbeb, #fed7aa);
  min-height: 100vh;
}

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 3rem 1rem;
}

header {
  text-align: center;
  margin-bottom: 2.5rem;
}

h1 {
  font-size: 3rem;
  font-weight: 700;
  color: #78350f;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.subtitle {
  color: #b45309;
  margin: 0;
}

#checkForm {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

#wordInput {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 1.125rem;
  border-radius: 0.5rem;
  border: 2px solid #fcd34d;
  background: #fff;
  color: #1c1917;
  outline: none;
}

#wordInput::placeholder {
  color: #fde68a;
}

#wordInput:focus {
  border-color: #d97706;
}

#checkButton {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: #d97706;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

#checkButton:hover:not(:disabled) {
  background: #b45309;
}

#checkButton:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.result {
  padding: 1.5rem;
  border-radius: 0.75rem;
  margin-bottom: 2rem;
}

.result.hidden {
  display: none;
}

.result.valid {
  background: #dcfce7;
  border: 2px solid #86efac;
}

.result.invalid {
  background: #fee2e2;
  border: 2px solid #fca5a5;
}

.result-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.result-icon {
  font-size: 1.875rem;
}

.result-word {
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.result-message {
  font-size: 1.125rem;
  margin: 0;
}

.result.valid .result-message {
  color: #166534;
}

.result.invalid .result-message {
  color: #991b1b;
}

.result-definition {
  margin: 0.75rem 0 0;
  color: #15803d;
  font-style: italic;
}

.history.hidden {
  display: none;
}

.history h2 {
  font-size: 0.8rem;
  font-weight: 600;
  color: #d97706;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.75rem;
}

.history-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.history-pill {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
}

.history-pill.valid {
  background: #bbf7d0;
  color: #166534;
}

.history-pill.invalid {
  background: #fecaca;
  color: #991b1b;
}

footer {
  margin-top: 4rem;
  text-align: center;
  color: #d97706;
  font-size: 0.875rem;
}
