:root {
  --bg: #0f1419;
  --bg-card: #1a222c;
  --bg-slot: #0c1014;
  --border: #2d3a47;
  --text: #e8eef4;
  --text-muted: #8b9aab;
  --accent: #5cb85c;
  --accent-dim: #3d8b3d;
  --glow: rgba(92, 184, 92, 0.15);
  --radius: 12px;
  --font: "Outfit", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

.bg-pattern {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.4;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black, transparent);
  pointer-events: none;
}

.header {
  position: relative;
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(26, 34, 44, 0.95) 0%, transparent 100%);
}

.header__inner {
  max-width: 640px;
  margin: 0 auto;
}

.logo {
  margin: 0 0 0.35rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 400;
}

.lang-toggle {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.35rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.lang-toggle:hover,
.lang-toggle:focus-within {
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px var(--glow);
}

.lang-toggle__divider {
  opacity: 0.45;
  user-select: none;
  pointer-events: none;
}

.lang-toggle__btn {
  padding: 0.2rem 0.45rem;
  font: inherit;
  font-weight: 600;
  color: inherit;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.lang-toggle__btn:hover {
  color: var(--text);
}

.lang-toggle__btn--active {
  color: var(--accent);
  background: var(--glow);
}

.main {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.intro {
  margin-bottom: 2rem;
}

.intro__text {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
}

.recipes {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .recipes {
    grid-template-columns: repeat(2, 1fr);
  }
}

.recipe-card {
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.2s;
}

.recipe-card:hover {
  border-color: #3d4f5f;
  transform: translateY(-2px);
}

.recipe-card__title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.recipe-card__desc {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.recipe-card__craft {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem;
}

.craft-grid {
  display: grid;
  grid-template-columns: repeat(3, 2.5rem);
  grid-template-rows: repeat(3, 2.5rem);
  gap: 4px;
  padding: 8px;
  background: var(--bg-slot);
  border: 2px solid #4a3728;
  border-radius: 6px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.35);
}

.craft-slot {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 4px;
  background: repeating-linear-gradient(
    45deg,
    #1e2832,
    #1e2832 2px,
    #252f3a 2px,
    #252f3a 4px
  );
  border: 1px solid #2a3540;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  line-height: 1;
}

.craft-slot--filled {
  background: linear-gradient(145deg, #3d4f63, #2a3540);
  border-color: #556a82;
}

.craft-arrow {
  font-size: 1.25rem;
  color: var(--text-muted);
  align-self: center;
}

.craft-result {
  width: 3rem;
  height: 3rem;
  border-radius: 6px;
  background: linear-gradient(145deg, #4a5d73, #354050);
  border: 2px solid var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 0 12px var(--glow);
}

.recipe-card__meta {
  flex: 1;
  min-width: 140px;
}

.recipe-card__label {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.recipe-card__ingredients {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.recipe-card__ingredients li {
  margin-bottom: 0.25rem;
}

.footer {
  padding: 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer p {
  margin: 0;
  max-width: 520px;
  margin-inline: auto;
}
