/* Farm Game — warm dark-green earthy theme.
   Leaf-green + harvest-gold accents. Plain CSS, no build step. */

:root {
  --bg: #0c1710;
  --bg-soft: #102016;
  --panel: #16281b;
  --panel-2: #1b3221;
  --line: #2c4d31;
  --text: #eef5e6;
  --muted: #a9bfa2;
  --leaf: #69c24a;
  --leaf-bright: #93e06a;
  --leaf-dark: #3f7d2c;
  --gold: #f0b64a;
  --gold-dark: #c78f27;
  --danger: #e0684f;
  --radius: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(105, 194, 74, 0.14), transparent 60%),
    radial-gradient(700px 420px at -10% 30%, rgba(240, 182, 74, 0.07), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}

a { color: var(--leaf-bright); }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: rgba(12, 23, 16, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--leaf), var(--leaf-dark));
  color: #0c1710;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 14px rgba(105, 194, 74, 0.35);
}

.brand-name { font-weight: 700; font-size: 19px; letter-spacing: 0.2px; }
.brand-name em { font-style: normal; color: var(--gold); }

.main-nav { display: flex; gap: 4px; }
.main-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 10px;
}
.main-nav a:hover { color: var(--text); background: var(--panel); }
.main-nav a.current { color: var(--text); background: var(--panel-2); }

.connect-btn { margin-left: auto; flex: 0 0 auto; }

/* ---------- banners & notices ---------- */

.preview-banner {
  background: linear-gradient(90deg, #4a380f, #5d4a16);
  color: #ffe9b0;
  border-bottom: 1px solid var(--gold-dark);
  padding: 10px 18px;
  font-size: 14.5px;
  text-align: center;
}
.preview-banner strong { color: #fff3cf; }

.wallet-notice {
  background: #3d1d16;
  color: #ffcdbd;
  border-bottom: 1px solid #7a3a28;
  padding: 10px 18px;
  font-size: 14.5px;
  text-align: center;
}

/* ---------- layout ---------- */

.wrap { max-width: 1080px; margin: 0 auto; padding: 24px 18px 56px; }

.section { margin-top: 34px; }
.section h2 {
  font-size: 22px;
  margin: 0 0 6px;
  letter-spacing: 0.2px;
}
.section .section-sub { color: var(--muted); margin: 0 0 16px; font-size: 15px; }

/* ---------- hero ---------- */

.hero { padding: 34px 0 6px; text-align: left; }
.hero .kicker {
  display: inline-block;
  color: var(--gold);
  border: 1px solid var(--gold-dark);
  background: rgba(240, 182, 74, 0.08);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(34px, 6.4vw, 54px);
  line-height: 1.12;
  margin: 16px 0 12px;
  font-weight: 800;
}
.hero h1 .leaf { color: var(--leaf-bright); }
.hero h1 .gold { color: var(--gold); }
.hero p { color: var(--muted); font-size: 17px; max-width: 640px; margin: 0 0 22px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  padding: 13px 22px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.06s ease, filter 0.15s ease, opacity 0.15s ease;
  min-height: 50px;
}
.btn:active { transform: translateY(1px); }
.btn-leaf { background: linear-gradient(145deg, var(--leaf), var(--leaf-dark)); color: #08130a; }
.btn-leaf:hover { filter: brightness(1.08); }
.btn-gold { background: linear-gradient(145deg, var(--gold), var(--gold-dark)); color: #221503; }
.btn-gold:hover { filter: brightness(1.07); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--panel); }
.btn-big { width: 100%; font-size: 17px; padding: 15px 22px; }
.btn[disabled], .btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.35);
}
.btn[disabled]:active { transform: none; }

/* ---------- cards & grids ---------- */

.card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--gold);
  color: #221503;
  font-weight: 800;
  margin-bottom: 10px;
}
.step h3 { margin: 0 0 6px; font-size: 17px; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; }

.kv { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px dashed rgba(169, 191, 162, 0.18); font-size: 15px; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 700; text-align: right; word-break: break-all; }
.kv .v.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px; font-weight: 600; }

.claim-amount { font-size: 34px; font-weight: 800; color: var(--gold); margin: 2px 0 2px; }
.reason { color: var(--muted); font-size: 13.5px; margin: 10px 0 0; min-height: 18px; }
.reason.warn { color: #ffcdbd; }

/* ---------- balances ---------- */

.balances {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}
.balance-card {
  flex: 1 1 200px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
}
.balance-coin {
  width: 42px; height: 42px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; flex: 0 0 auto;
}
.coin-bnb { background: rgba(240, 182, 74, 0.16); color: var(--gold); border: 1px solid var(--gold-dark); }
.coin-token { background: rgba(105, 194, 74, 0.16); color: var(--leaf-bright); border: 1px solid var(--leaf-dark); }
.balance-label { color: var(--muted); font-size: 13px; }
.balance-value { font-size: 21px; font-weight: 800; line-height: 1.25; }
.pool-line {
  flex: 1 1 100%;
  color: var(--muted);
  font-size: 14.5px;
  margin: 2px 0 0;
}
.pool-line strong { color: var(--gold); }

/* ---------- shop ---------- */

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.shop-card { display: flex; flex-direction: column; gap: 10px; }
.art {
  height: 92px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 2px;
  color: rgba(12, 23, 16, 0.85);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}
.art-crop { background: repeating-linear-gradient(135deg, #79c957, #79c957 14px, #67b847 14px, #67b847 28px); }
.art-animal { background: repeating-linear-gradient(135deg, #eec25e, #eec25e 14px, #e2af3c 14px, #e2af3c 28px); }
.shop-card h3 { margin: 0; font-size: 18px; }
.tag {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 9px;
}
.tag-crop { background: rgba(105, 194, 74, 0.18); color: var(--leaf-bright); }
.tag-animal { background: rgba(240, 182, 74, 0.16); color: var(--gold); }
.shop-meta { color: var(--muted); font-size: 14px; display: grid; gap: 2px; }
.shop-meta b { color: var(--text); }
.shop-card .btn { margin-top: auto; }

/* ---------- farm ---------- */

.farm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.slot {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: var(--panel);
  min-height: 148px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.slot .art { height: 54px; font-size: 20px; border-radius: 9px; }
.slot-name { font-weight: 700; font-size: 15.5px; }
.slot-state { color: var(--muted); font-size: 13.5px; }
.slot-empty {
  border-style: dashed;
  color: var(--muted);
  align-items: center;
  justify-content: center;
  text-align: center;
}
.slot-empty .slot-name { color: var(--muted); font-weight: 600; }
.countdown {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 17px;
  font-weight: 700;
  color: var(--gold);
}
.slot.ready { border-color: var(--gold-dark); box-shadow: 0 0 0 1px var(--gold-dark), 0 8px 22px rgba(240, 182, 74, 0.14); }
.slot.ready .slot-state { color: var(--gold); font-weight: 700; }
.slot .btn { margin-top: auto; padding: 11px 14px; min-height: 46px; font-size: 15px; }
.farm-subhead { font-size: 17px; margin: 22px 0 10px; }
.farm-subhead:first-of-type { margin-top: 4px; }

/* ---------- how it works / footer ---------- */

.how-list { color: var(--muted); font-size: 15px; padding-left: 20px; margin: 8px 0 0; }
.how-list li { margin-bottom: 8px; }
.how-list b { color: var(--text); }

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding: 22px 18px 30px;
  color: var(--muted);
  font-size: 13.5px;
  text-align: center;
}
.site-footer .fineprint { max-width: 720px; margin: 6px auto 0; }

/* ---------- toasts ---------- */

#toasts {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 18px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(92vw, 440px);
}
.toast {
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14.5px;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  word-break: break-word;
}
.toast.ok { border-color: var(--leaf-dark); background: #1d3a1e; }
.toast.err { border-color: #7a3a28; background: #3d1d16; color: #ffd9cd; }
.toast.pending { border-color: var(--gold-dark); background: #3a2f10; color: #ffe9b0; }

@media (max-width: 560px) {
  .site-header { padding: 10px 12px; gap: 8px; }
  .brand-name { font-size: 17px; }
  .main-nav a { padding: 7px 8px; font-size: 14px; }
  .connect-btn { padding: 11px 14px; min-height: 44px; font-size: 14.5px; }
  .wrap { padding: 18px 12px 44px; }
  .hero { padding-top: 22px; }
  .shop-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .farm-grid { grid-template-columns: repeat(2, 1fr); }
  .claim-amount { font-size: 28px; }
}
