:root {
  --bg: #111318;
  --panel: #1a1f29;
  --panel-2: #202735;
  --border: #2d3647;
  --text: #e8edf5;
  --muted: #a5b0c2;
  --input: #0f141c;
  --button: #2b3547;
  --button-hover: #394762;
  --shadow: rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

body {
  display: flex;
  justify-content: center;
  padding: 32px 16px 48px;
}
.about-nav {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.about-content {
  width: 100%;
  max-width: 700px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 12px 30px var(--shadow);
  line-height: 1.6;
}

.about-heading {
  margin-top: 0;
  margin-bottom: 14px;
  text-align: center;
}

.about-content p {
  margin: 12px 0;
  color: var(--text);
}
.about-button-wrap {
  margin-top: 8px;
  display: flex;
  justify-content: center;
}
.about-donation {
  margin-top: 18px;
  text-align: center;
  font-weight: bold;
  color: var(--muted);
}

.page {
  width: 100%;
  max-width: 820px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.logo {
  display: block;
  max-width: 180px;
  max-height: 180px;
  width: auto;
  height: auto;
  margin-top: 8px;
}

.site-title {
  margin: 0;
  font-size: 2rem;
  text-align: center;
  letter-spacing: 0.02em;
}
.dataset-stats {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.search-panel,
.result-card,
.empty-state {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 12px 30px var(--shadow);
}

.search-panel {
  padding: 18px;
}

.search-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.search-input {
  flex: 1 1 320px;
  min-width: 240px;
  background: var(--input);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 1rem;
  outline: none;
}

.search-input:focus {
  border-color: #4b5d7f;
}

.search-wrap {
  width: 100%;
}

.search-input-wrap {
  position: relative;
  flex: 1 1 320px;
  min-width: 240px;
}

.search-input {
  width: 100%;
}

.suggestions-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 6px;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 30px var(--shadow);
  max-height: 280px;
  overflow-y: auto;
  z-index: 20;
}

.suggestion-item {
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--text);
}

.suggestion-item:hover,
.suggestion-item.active {
  background: var(--button-hover);
}

.suggestion-word {
  font-size: 0.98rem;
}

.suggestion-meta {
  margin-top: 4px;
  font-size: 0.84rem;
  color: var(--muted);
}
.about-link {
  margin: 4px 0 0;
  text-align: center;
  font-size: 0.9rem;
}

.about-link a {
  color: var(--muted);
  text-decoration: none;
}

.about-link a:hover {
  text-decoration: underline;
  color: var(--text);
}
.button {
  border: 1px solid var(--border);
  background: var(--button);
  color: var(--text);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.button:hover {
  background: var(--button-hover);
}

.button-random {
  min-width: 100px;
}

.status-text {
  margin: 12px 4px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.result-card {
  padding: 24px;
}

.result-word {
  margin: 0;
  text-align: center;
  font-size: 2rem;
  line-height: 1.2;
  word-break: break-word;
}

.result-meta {
  margin: 10px 0 22px;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.ingredients-header {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ingredients-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ingredient-row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 14px;
  align-items: center;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
}

.ingredient-icon-wrap {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ingredient-icon {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}

.ingredient-icon-fallback {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #2f3a4c;
  display: none;
}

.ingredient-name {
  font-size: 1rem;
}

.ingredient-count {
  color: var(--muted);
  font-weight: bold;
  white-space: nowrap;
}

.empty-state {
  padding: 28px 20px;
  text-align: center;
  color: var(--muted);
}

.hidden {
  display: none;
}
.subtitle-block {
  text-align: center;
  color: var(--muted);
  max-width: 620px;
}

.subtitle-line {
  margin: 4px 0;
  font-size: 0.9rem;
}

.subtitle-sub {
  font-size: 0.8rem;
  opacity: 0.85;
}
.footer {
  margin-top: 10px;
  padding: 16px 12px;
  text-align: center;
  color: var(--muted);
}

.footer-line {
  margin: 4px 0;
  font-size: 0.9rem;
}

.footer-sub {
  font-size: 0.8rem;
  opacity: 0.85;
}

@media (max-width: 640px) {
  .site-title {
    font-size: 1.6rem;
  }

  .result-word {
    font-size: 1.6rem;
  }

  .ingredient-row {
    grid-template-columns: 44px 1fr;
  }

  .ingredient-count {
    grid-column: 2;
  }
}