/* Minecraft Potion Recipes — dark fantasy theme
   Styling for Grace's app.js markup (card / potion-name / ing-card etc.)
   Responsive down to phone widths. */

:root {
  --bg-deep: #0f0c2b;
  --bg-mid: #1a1040;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-solid: #1d1540;
  --border: rgba(255, 255, 255, 0.14);
  --text: #e8e2f7;
  --text-dim: rgba(232, 226, 247, 0.62);
  --accent: #b48bff;
  --accent-2: #6fd6c8;
  --gold: #ffd166;
  --danger: #ff7a8a;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 700px at 15% -10%, rgba(120, 80, 220, 0.35), transparent 60%),
    radial-gradient(900px 600px at 90% 0%, rgba(40, 180, 190, 0.22), transparent 55%),
    linear-gradient(160deg, var(--bg-deep), var(--bg-mid));
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  padding: 0 1rem 3rem;
}

header {
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
}

header h1 {
  font-size: clamp(1.9rem, 6vw, 3rem);
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

header p {
  margin-top: 0.4rem;
  color: var(--text-dim);
}

main {
  max-width: 1180px;
  margin: 0 auto;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0 0.75rem;
}

.controls input,
.controls select {
  flex: 1 1 220px;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 1rem;
  outline: none;
}

.controls input:focus,
.controls select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(180, 139, 255, 0.18);
}

.controls select option {
  background: var(--panel-solid);
  color: var(--text);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin: 0.5rem 0 1.5rem;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.lvl {
  display: inline-block;
  min-width: 1.6rem;
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.lvl-2 {
  background: rgba(255, 209, 102, 0.22);
  color: var(--gold);
}

.lvl-1 {
  background: rgba(111, 214, 200, 0.18);
  color: var(--accent-2);
}

/* ---- Potion cards (app.js: .card) ---- */

.potions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.potion-name {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

.level-badge {
  display: inline-block;
  min-width: 1.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: 7px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(255, 209, 102, 0.22);
  color: var(--gold);
  border: 1px solid rgba(255, 209, 102, 0.35);
}

.effect {
  color: var(--accent-2);
  font-size: 0.92rem;
  font-weight: 600;
}

.type-tag {
  align-self: flex-start;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: rgba(180, 139, 255, 0.18);
  border: 1px solid rgba(180, 139, 255, 0.32);
  color: var(--accent);
}

.duration {
  font-size: 0.82rem;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.ingredients {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.ingredients-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-right: 0.15rem;
}

.ingredient {
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(180, 139, 255, 0.16);
  border: 1px solid rgba(180, 139, 255, 0.3);
  font-size: 0.78rem;
}

.card.positive { border-left: 3px solid var(--accent-2); }
.card.negative { border-left: 3px solid var(--danger); }
.card.other    { border-left: 3px solid var(--accent); }

.empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-dim);
  padding: 2.5rem 1rem;
  font-size: 1rem;
}

/* ---- Ingredient reference (app.js: .ing-card) ---- */

.ingredients-section,
.brewing-guide {
  max-width: 1180px;
  margin: 3rem auto 0;
}

.ingredients-section h2,
.brewing-guide h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.ingredients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.85rem;
}

.ing-card {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
}

.ing-icon {
  font-size: 1.35rem;
  line-height: 1.2;
}

.ing-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ing-name {
  font-size: 0.97rem;
  font-weight: 700;
}

.ing-note {
  font-size: 0.83rem;
  color: var(--text-dim);
}

/* ---- Brewing guide ---- */

.brewing-guide ol {
  padding-left: 1.2rem;
  display: grid;
  gap: 0.5rem;
  color: var(--text-dim);
}

.brewing-guide strong {
  color: var(--text);
}

.brewing-guide em {
  color: var(--accent-2);
  font-style: normal;
}

footer {
  text-align: center;
  margin-top: 3rem;
  color: var(--text-dim);
  font-size: 0.9rem;
}

@media (max-width: 560px) {
  header { padding-top: 1.75rem; }
  .potions-grid { grid-template-columns: 1fr; }
  .ingredients-grid { grid-template-columns: 1fr; }
  .controls input,
  .controls select { flex-basis: 100%; }
}
