/* Idiosyncratic CSS: Minimalistic modern with warm, personable touches.
   - Clean lines and ample space for minimalism.
   - Modern serif fonts with subtle elegance.
   - Warm earth tones for approachability.
   - Quirky elements: Slight asymmetry in buttons, handwritten-like accents. */

:root {
  --bg-color: #fdfaf6; /* Soft parchment white */
  --text-color: #4a3c31; /* Warm coffee brown */
  --accent-color: #d87d4a; /* Gentle terracotta */
  --highlight-color: #8ba57d; /* Muted sage green */
  --font-main: 'Merriweather', Georgia, 'Times New Roman', Times, serif; /* Serif for a classic, warm feel */
  --font-accent: 'Caveat', cursive; /* Handwritten quirk for personality, used sparingly */
  --spacing-unit: 1.5rem;
  --border-radius: 0.75rem; /* Softened edges for warmth */
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-main);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  padding: var(--spacing-unit);
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
  /* Idiosyncratic touch: Subtle texture for personable feel */
  background-image: linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 100% 2px;
}

h1, h2, h3 {
  font-weight: 600;
  margin-top: calc(var(--spacing-unit) * 2);
  margin-bottom: var(--spacing-unit);
  letter-spacing: -0.015em;
}

h1 {
  font-size: 2.5rem;
  /* Personable quirk: Slight tilt for idiosyncrasy */
  transform: rotate(-0.5deg);
  display: inline-block;
}

h2 {
  font-size: 1.75rem;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 0.25rem;
  width: max-content; /* Asymmetrical underline */
}

p {
  margin-bottom: var(--spacing-unit);
}

a {
  color: var(--accent-color);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent-color);
  transition: color 0.2s ease, border-bottom 0.2s ease;
}

a:hover {
  color: var(--highlight-color);
  border-bottom: 1px solid var(--highlight-color);
}

button {
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  border-radius: var(--border-radius);
  transition: background-color 0.2s ease;
}

button:hover {
  background-color: var(--highlight-color);
}

#submit-btn, #undo-btn, #new-btn, #restart-btn {
  background-color: var(--accent-color);
  color: var(--bg-color);
}

ul, ol {
  margin-bottom: var(--spacing-unit);
  padding-left: var(--spacing-unit);
}

li {
  margin-bottom: 0.5rem;
}

/* Personable accent class for quirky elements */
.accent-text {
  font-family: var(--font-accent);
  font-size: 1.2em;
  color: var(--accent-color);
  display: inline-block;
  transform: rotate(1deg); /* Slight handwritten tilt */
}

.used-words-area {
  font-family: sans-serif;
  font-weight: normal;
}

/* Minimalistic form styling */
input, textarea {
  background-color: #fff;
  border: 1px solid var(--text-color);
  padding: 0.75rem;
  border-radius: var(--border-radius);
  font-family: var(--font-main);
  width: 100%;
  margin-bottom: var(--spacing-unit);
  box-sizing: border-box;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(216, 125, 74, 0.2); /* Warm glow */
}

/* Responsive quirk: On small screens, reduce tilt */
@media (max-width: 768px) {
  h1 {
    transform: none;
  }
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-unit);
}

.buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.btn-danger {
  background-color: #a52a2a;
}

#theme-toggle-btn {
  background-color: var(--text-color);
  color: var(--bg-color);
  border: 1px solid var(--accent-color);
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: var(--border-radius);
  transition: background-color 0.2s ease, color 0.2s ease;
}

#theme-toggle-btn:hover {
  background-color: var(--accent-color);
  color: var(--bg-color);
}

.dark-theme {
  --bg-color: #4a3c31;
  --text-color: #fdfaf6;
  --accent-color: #d87d4a;
  --highlight-color: #8ba57d;
}
