body {
  background-color: #121212;
  color: #e0e0e0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  padding: 40px;
  display: block;
  text-align: left;
}

h1 {
    font-size: 4rem;
    letter-spacing: 2px;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.site-romaji {
    color: #ffb7c5;
    font-weight: 300;
    font-size: 0.75em;
    margin-left: 10px;
}

.subtitle {
    opacity: 0.7;
    font-size: 1.3rem;
    font-style: italic;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 830px;
    margin: 0 0 2rem 0;
    padding: 0;
}

.kofi-button {
    background-color: #292929;
    color: #ffb7c5;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    border: 1px solid #ffb7c5;
    transition: all 0.3s ease;
}

.kofi-button:hover {
    background-color: #ffb7c5;
    color: #121212;
}

.brand {
    text-align: left;
    flex: 1;
}

#jptext {
  width: 100%;
  max-width: 800px;
  height: 180px;
  padding: 14px;
  font-size: 16px;
  line-height: 1.6;
  color: #f5f5f5;
  background-color: #1a1d23;
  border: 1px solid #2a2f38;
  border-radius: 18px;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#jptext:focus {
  border-color: #4da3ff;
  box-shadow: 0 0 0 2px rgba(77, 163, 255, 0.2);
}

.counter-container {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  max-width: 800px;
}

/* === Counter Cards === */
#total, #kanji, #hiragana, #katakana {
  background-color: #1a1d23;
  border: 1px solid #2a2f38;
  border-radius: 18px;
  padding: 16px;
  text-align: center;
  font-size: 20px;
  color: #a8b0bf;
  transition: transform 0.15s ease, border-color 0.2s ease;
}

#total span,
#kanji span,
#hiragana span,
#katakana span {
  display: block;
  margin-top: 6px;
  font-size: 32px;
  font-weight: 600;
  color: #ffffff;
}

.counter-card {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers everything horizontally inside the card */
    padding: 16px;
    background-color: #1a1d23;
    border-radius: 18px;
    border: 1px solid #2a2f38;
}

.label-group {
    display: flex;
    flex-direction: column; /* This stacks the JP and EN text */
    align-items: center;
    margin-bottom: 8px;
}

.jp-label {
    font-size: 2.5rem;
    font-weight: bold;
    color: #e0e0e0;
}

.en-label {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.6;
    color: #ffb7c5; /* Using your Sakura Pink for the English sub-label */
}

.counter-card span {
    font-size: 2.2rem;
    font-weight: 700;
}

#total:hover,
#kanji:hover,
#hiragana:hover,
#katakana:hover {
  border-color: #4da3ff;
  transform: translateY(-2px);
}

#kanji span {
  color: #ff8585;
}

#hiragana span {
  color: #a5ff9c;
}

#katakana span {
  color: #85d7ff;
}

#total span {
  color: #ffffff;
}
