/* ── TON Budds — Cannabis Community Game ── */
:root {
  --bg:         #0d0d1a;
  --bg2:        #141428;
  --bg3:        #1a1a35;
  --accent:     #00c896;
  --accent2:    #0088cc;
  --gold:       #ffd700;
  --purple:     #9b59b6;
  --red:        #e74c3c;
  --text:       #e8e8f0;
  --text2:      #8888aa;
  --card-bg:    #1e1e3a;
  --border:     #2a2a4a;
  --radius:     14px;
  --nav-h:      62px;
  --top-h:      52px;
}

* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

#app { padding-top: var(--top-h); padding-bottom: calc(var(--nav-h) + 8px); }

/* ── TOP BAR ── */
.top-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--top-h);
  background: linear-gradient(135deg, #0d0d20 0%, #1a1040 100%);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  backdrop-filter: blur(12px);
}
.balance-chip {
  display: flex; align-items: center; gap: 6px;
  background: rgba(0,200,150,0.12);
  border: 1px solid rgba(0,200,150,0.3);
  border-radius: 20px; padding: 4px 12px;
}
.balance-icon { font-size: 14px; }
#balance-display { font-size: 15px; font-weight: 700; color: var(--accent); }
.currency { font-size: 11px; color: var(--text2); }
.username-chip {
  font-size: 13px; color: var(--text2);
  background: var(--bg3); border-radius: 12px; padding: 4px 10px;
}

/* ── BOTTOM NAV ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: var(--bg2);
  border-top: 1px solid var(--border);
  display: flex;
}
.nav-btn {
  flex: 1; background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--text2); transition: color 0.2s;
}
.nav-btn.active { color: var(--accent); }
.nav-btn.active .nav-icon { transform: scale(1.2); }
.nav-icon { font-size: 20px; transition: transform 0.2s; }
.nav-label { font-size: 10px; font-weight: 500; }

/* ── TABS ── */
.tab { display: none; padding: 12px 12px 8px; }
.tab.active { display: block; }
.section-title {
  font-size: 17px; font-weight: 700; margin-bottom: 12px;
  color: var(--text); letter-spacing: 0.3px;
}

/* ── GARDEN / PLOTS ── */
.plots-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.plot-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px; cursor: pointer;
  transition: all 0.2s; position: relative; overflow: hidden;
}
.plot-card:active { transform: scale(0.97); }
.plot-card.empty { border-style: dashed; border-color: rgba(255,255,255,0.1); }
.plot-card.harvest-ready { border-color: var(--gold); box-shadow: 0 0 12px rgba(255,215,0,0.2); }

.plot-stage-icon { font-size: 36px; text-align: center; display: block; margin-bottom: 6px; }
.plot-strain-name { font-size: 12px; font-weight: 600; color: var(--text); text-align: center; }
.plot-stage-label { font-size: 10px; color: var(--text2); text-align: center; margin-top: 2px; }
.plot-progress { margin-top: 8px; height: 4px; background: var(--border); border-radius: 4px; overflow: hidden; }
.plot-progress-bar { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), #00ff9d); transition: width 0.3s; }
.plot-empty-label { font-size: 12px; color: var(--text2); text-align: center; padding: 20px 0; }
.plot-action-hint { font-size: 10px; color: var(--accent); text-align: center; margin-top: 4px; }

/* Health/Water/Nutrient mini bars */
.plot-stats { display: flex; gap: 4px; margin-top: 6px; }
.mini-stat { flex: 1; }
.mini-stat-bar { height: 3px; background: var(--border); border-radius: 3px; overflow: hidden; }
.mini-stat-fill { height: 100%; border-radius: 3px; }
.mini-stat-fill.water { background: var(--accent2); }
.mini-stat-fill.light { background: var(--gold); }
.mini-stat-fill.health { background: var(--accent); }

/* ── STRAIN CARDS ── */
.search-bar { margin-bottom: 10px; }
.search-bar input {
  width: 100%; padding: 10px 14px; border-radius: 12px;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); font-size: 14px; outline: none;
}
.filter-chips { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; padding-bottom: 4px; }
.chip {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); border-radius: 20px; padding: 5px 12px;
  font-size: 12px; cursor: pointer; white-space: nowrap;
  transition: all 0.2s;
}
.chip.active { background: var(--accent); border-color: var(--accent); color: #000; font-weight: 600; }

.strains-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.strain-card {
  border-radius: var(--radius); overflow: hidden; cursor: pointer;
  transition: transform 0.15s; border: 1px solid var(--border);
  position: relative;
}
.strain-card:active { transform: scale(0.96); }
.strain-card-img {
  height: 100px; position: relative; display: flex;
  align-items: center; justify-content: center;
  font-size: 44px;
}
.strain-card-body { padding: 8px 10px 10px; background: var(--card-bg); }
.strain-card-name { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.strain-card-type { font-size: 10px; color: var(--text2); }
.strain-card-thc { font-size: 11px; color: var(--accent); font-weight: 600; }
.rarity-badge {
  position: absolute; top: 6px; right: 6px;
  font-size: 10px; font-weight: 700; padding: 2px 6px;
  border-radius: 8px; text-transform: uppercase; letter-spacing: 0.5px;
}
.rarity-legendary { background: rgba(255,215,0,0.2); color: var(--gold); border: 1px solid rgba(255,215,0,0.4); }
.rarity-rare      { background: rgba(155,89,182,0.2); color: #c39bd3; border: 1px solid rgba(155,89,182,0.4); }
.rarity-uncommon  { background: rgba(0,200,150,0.15); color: var(--accent); border: 1px solid rgba(0,200,150,0.3); }
.rarity-common    { background: rgba(255,255,255,0.05); color: var(--text2); border: 1px solid var(--border); }

.locked-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; border-radius: var(--radius);
}

/* ── BREED LAB ── */
.breed-lab {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin: 16px 0;
}
.breed-slot {
  flex: 1; background: var(--card-bg);
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 16px 8px; cursor: pointer; text-align: center;
  transition: all 0.2s;
}
.breed-slot:hover, .breed-slot.selected { border-color: var(--accent); background: rgba(0,200,150,0.05); }
.breed-slot-icon { font-size: 32px; display: block; margin-bottom: 4px; }
.breed-slot-label { font-size: 10px; color: var(--text2); }
.breed-slot-name { font-size: 13px; color: var(--accent); font-weight: 600; display: block; margin-top: 4px; }
.breed-cross { font-size: 28px; color: var(--text2); font-weight: 300; }
.btn-breed {
  width: 100%; padding: 14px; border: none; border-radius: var(--radius);
  background: linear-gradient(135deg, #00c896, #00a070);
  color: #000; font-size: 16px; font-weight: 700; cursor: pointer;
  transition: all 0.2s; letter-spacing: 0.3px;
}
.btn-breed:disabled { background: var(--bg3); color: var(--text2); cursor: not-allowed; }
.btn-breed:not(:disabled):active { transform: scale(0.98); }

.breed-result {
  background: var(--card-bg); border: 1px solid var(--accent);
  border-radius: var(--radius); padding: 16px; margin: 12px 0; text-align: center;
}
.breed-history-title { font-size: 14px; font-weight: 600; color: var(--text2); margin: 16px 0 8px; }
.breed-history-item {
  background: var(--card-bg); border-radius: 10px; padding: 10px 12px;
  margin-bottom: 6px; display: flex; align-items: center; gap: 10px;
  font-size: 13px;
}

/* ── MARKET ── */
.market-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.market-tab-btn {
  flex: 1; padding: 8px; border: 1px solid var(--border);
  background: var(--bg3); color: var(--text2);
  border-radius: 10px; font-size: 12px; cursor: pointer; transition: all 0.2s;
}
.market-tab-btn.active { background: var(--accent); border-color: var(--accent); color: #000; font-weight: 600; }

.trade-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px; margin-bottom: 8px;
}
.trade-card-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.trade-arrow { color: var(--accent); font-weight: 700; }
.trade-action { margin-top: 10px; }
.btn-accept { background: var(--accent); color: #000; border: none; border-radius: 8px; padding: 8px 16px; font-weight: 700; cursor: pointer; font-size: 13px; }

.create-trade-form { background: var(--card-bg); border-radius: var(--radius); padding: 16px; }
.create-trade-form label { font-size: 12px; color: var(--text2); margin: 10px 0 4px; display: block; }
.select-input, .number-input, .input-field {
  width: 100%; padding: 10px 12px; background: var(--bg3);
  border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); font-size: 14px; outline: none; margin-bottom: 6px;
}
.btn-primary {
  width: 100%; padding: 12px; margin-top: 8px;
  background: var(--accent2); color: #fff; border: none;
  border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer;
}

/* ── PROFILE ── */
.profile-card {
  background: var(--card-bg); border-radius: var(--radius);
  padding: 20px; text-align: center; margin-bottom: 16px;
  border: 1px solid var(--border);
}
.profile-avatar { font-size: 48px; margin-bottom: 8px; }
.profile-name { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.profile-stats { display: flex; gap: 10px; }
.stat-box {
  flex: 1; background: var(--bg3); border-radius: 12px; padding: 12px;
}
.stat-val { font-size: 20px; font-weight: 700; color: var(--accent); }
.stat-lbl { font-size: 11px; color: var(--text2); margin-top: 2px; }

.achievements-title { font-size: 14px; font-weight: 600; color: var(--text2); margin: 12px 0 8px; }
.achievements-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.achievement-card {
  background: var(--card-bg); border-radius: 12px; padding: 12px;
  border: 1px solid var(--border); display: flex; align-items: center; gap: 10px;
}
.achievement-card.earned { border-color: var(--gold); background: rgba(255,215,0,0.05); }
.achievement-card.locked { opacity: 0.4; }
.achievement-icon { font-size: 24px; }
.achievement-info { flex: 1; min-width: 0; }
.achievement-name { font-size: 12px; font-weight: 600; }
.achievement-desc { font-size: 10px; color: var(--text2); margin-top: 2px; }

.withdraw-section {
  background: var(--card-bg); border-radius: var(--radius); padding: 16px;
  border: 1px solid var(--border);
}
.withdraw-title { font-size: 14px; font-weight: 600; margin-bottom: 12px; }

/* ── MODALS ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  z-index: 200; backdrop-filter: blur(4px);
}
.modal {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 201;
  background: var(--bg2); border-radius: 20px 20px 0 0;
  max-height: 85vh; overflow-y: auto;
  border-top: 1px solid var(--border);
}
.modal-header {
  padding: 16px; display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border); position: relative;
}
.modal-strain-img { width: 50px; height: 50px; border-radius: 12px; font-size: 32px; display: flex; align-items: center; justify-content: center; }
.modal-strain-name { font-size: 17px; font-weight: 700; flex: 1; }
.modal-close {
  background: var(--bg3); border: none; color: var(--text2);
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
  font-size: 14px; display: flex; align-items: center; justify-content: center;
}
.modal-body { padding: 16px; }
.modal-actions { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; gap: 8px; }

.info-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text2); }
.info-val { font-weight: 600; }

.flavour-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; }
.flavour-tag {
  background: rgba(0,200,150,0.1); color: var(--accent);
  border: 1px solid rgba(0,200,150,0.2); border-radius: 20px;
  padding: 3px 8px; font-size: 11px;
}

.btn-plant { flex: 1; padding: 12px; border: none; border-radius: 10px; background: var(--accent); color: #000; font-weight: 700; cursor: pointer; font-size: 14px; }
.btn-secondary { flex: 1; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: transparent; color: var(--text); cursor: pointer; font-size: 14px; }

.picker-list { padding: 0 12px 20px; }
.picker-item {
  display: flex; align-items: center; gap: 10px; padding: 12px 10px;
  border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.1s;
}
.picker-item:active { background: var(--bg3); }
.picker-item-icon { font-size: 24px; }
.picker-item-info { flex: 1; }
.picker-item-name { font-size: 14px; font-weight: 600; }
.picker-item-type { font-size: 11px; color: var(--text2); }

/* Grad-Hintergrunds für Strain Cards nach Typ */
.strain-bg-indica  { background: linear-gradient(135deg, #2d1b4e 0%, #1a0d2e 100%); }
.strain-bg-sativa  { background: linear-gradient(135deg, #1a3a1a 0%, #0d2010 100%); }
.strain-bg-hybrid  { background: linear-gradient(135deg, #1a2a3a 0%, #0d1a25 100%); }
.strain-bg-ruderalis { background: linear-gradient(135deg, #2a2010 0%, #1a1508 100%); }

/* Rarity glow */
.glow-legendary { box-shadow: 0 0 20px rgba(255,215,0,0.25); border-color: rgba(255,215,0,0.5) !important; }
.glow-rare      { box-shadow: 0 0 16px rgba(155,89,182,0.2); border-color: rgba(155,89,182,0.4) !important; }

/* Toast */
.toast {
  position: fixed; bottom: calc(var(--nav-h) + 16px); left: 50%; transform: translateX(-50%);
  background: var(--bg3); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 20px; font-size: 14px; z-index: 300;
  animation: toast-in 0.2s ease;
}
@keyframes toast-in { from { opacity:0; transform: translateX(-50%) translateY(10px); } }

/* Spinner */
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Plant growth animation */
.growing-anim { animation: grow-pulse 2s ease-in-out infinite; }
@keyframes grow-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }

/* ── MUTTERPFLANZE & TIER BADGES ── */
.mother-plant { border-color: var(--gold) !important; box-shadow: 0 0 16px rgba(255,215,0,0.2); }
.mother-badge {
  position: absolute; top: 6px; right: 8px; font-size: 16px;
  color: var(--gold); text-shadow: 0 0 8px rgba(255,215,0,0.6);
}
.seed-tier-badge {
  position: absolute; top: 6px; left: 8px;
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  padding: 2px 6px; border-radius: 8px; letter-spacing: 0.5px;
}
.tier-selected  { background: rgba(0,200,83,0.2);  color: #00C853; border: 1px solid #00C853; }
.tier-elite     { background: rgba(0,152,234,0.2);  color: #0098EA; border: 1px solid #0098EA; }
.tier-legendary { background: rgba(255,215,0,0.2);  color: var(--gold); border: 1px solid var(--gold); }

/* ── STAKING UI ── */
.stake-options-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.stake-option {
  flex: 1; min-width: 60px; text-align: center;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 6px; cursor: pointer; transition: all 0.15s;
}
.stake-option:active { background: rgba(0,200,150,0.12); border-color: var(--accent); }
.stake-option-days { font-size: 16px; font-weight: 700; }
.stake-option-apy  { font-size: 12px; color: var(--accent); font-weight: 600; }

.stake-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px; margin-bottom: 8px;
}
.stake-card-row { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.btn-small { padding: 7px 12px; border: none; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 600; width: 100%; margin-top: 6px; }

/* ── PLOT CARD RELATIVE POSITIONING FÜR BADGES ── */
.plot-card { position: relative; }

/* ── BTN-ACCENT ── */
.btn-accent { flex: 1; padding: 12px; border: 1px solid var(--accent); border-radius: 10px; background: rgba(0,200,150,0.12); color: var(--accent); cursor: pointer; font-size: 13px; font-weight: 600; }

/* ── AD BONUS ── */
.ad-bonus-card {
  background: linear-gradient(135deg, rgba(0,200,150,0.08) 0%, rgba(0,136,204,0.08) 100%);
  border: 1px solid rgba(0,200,150,0.25);
  border-radius: var(--radius); padding: 14px; margin: 16px 0 8px;
}
.ad-bonus-header { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.btn-ad-claim {
  width: 100%; padding: 11px; margin-top: 8px; border: none; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #000; font-weight: 700; font-size: 14px; cursor: pointer;
}
.btn-ad-disabled { background: var(--bg3) !important; color: var(--text2) !important; cursor: not-allowed; }

/* ── REFERRAL ── */
.referral-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px; margin-bottom: 8px;
}
.referral-stats-row { display: flex; gap: 8px; margin-bottom: 12px; }
.ref-stat { flex: 1; text-align: center; background: var(--bg2); border-radius: 10px; padding: 8px 4px; }
.ref-stat-val { font-size: 20px; font-weight: 700; color: var(--accent); }
.ref-stat-lbl { font-size: 10px; color: var(--text2); margin-top: 2px; }
.referral-link-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; cursor: pointer; overflow: hidden;
}
.referral-link-text { flex: 1; font-size: 11px; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.referral-copy-icon { font-size: 16px; flex-shrink: 0; }

/* ── CONSENT GATE ── */
.cg-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(9,9,18,0.97);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  backdrop-filter: blur(12px);
}
.cg-card {
  background: #0e0e1a;
  border: 1px solid rgba(0,200,150,0.25);
  border-radius: 20px;
  padding: 28px 22px;
  max-width: 420px; width: 100%;
  text-align: center;
  box-shadow: 0 0 60px rgba(0,200,150,0.08);
}
.cg-logo { font-size: 48px; margin-bottom: 8px; }
.cg-title { font-size: 22px; font-weight: 800; color: #00C853; }
.cg-subtitle { font-size: 12px; color: #8888aa; margin-bottom: 20px; }
.cg-warning {
  background: rgba(255,80,50,0.1); border: 1px solid rgba(255,80,50,0.3);
  border-radius: 10px; padding: 10px 14px;
  font-size: 14px; font-weight: 700; color: #ff6040;
  margin-bottom: 14px;
}
.cg-text {
  font-size: 12px; color: #8888aa; margin-bottom: 20px; line-height: 1.6;
}
.cg-check {
  display: flex; align-items: flex-start; gap: 10px;
  text-align: left; margin-bottom: 14px; cursor: pointer;
  font-size: 13px; color: #e8e8f0;
}
.cg-check input[type=checkbox] { display: none; }
.cg-check-box {
  flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px;
  border: 2px solid rgba(0,200,150,0.4); border-radius: 5px;
  background: #141428; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.cg-check input:checked + .cg-check-box {
  background: #00C853; border-color: #00C853;
}
.cg-check input:checked + .cg-check-box::after {
  content: '✓'; font-size: 13px; color: #000; font-weight: 700;
}
.cg-link { color: #00C853; text-decoration: underline; }
.cg-btn {
  width: 100%; padding: 14px; margin-top: 8px;
  background: linear-gradient(135deg, #00C853, #009624);
  border: none; border-radius: 12px;
  color: #000; font-size: 15px; font-weight: 800;
  cursor: pointer; transition: opacity 0.2s;
}
.cg-btn:not(:disabled):hover { opacity: 0.9; }
.cg-btn:disabled { cursor: not-allowed; }
.cg-footer {
  margin-top: 16px; font-size: 10px; color: #555577; line-height: 1.8;
}
#consent-gate { display: none; }
