/* The Higher Club — dark green, mobile-first theme */
:root {
  --bg: #0d1512;
  --card: #14201a;
  --card2: #182720;
  --line: #24382d;
  --green: #3ddc84;
  --green-dim: #2a9d5f;
  --gold: #e8c547;
  --text: #e9f2ec;
  --muted: #8fa89a;
  --danger: #e06c6c;
  --radius: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px; line-height: 1.45;
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: #0a100d; border-bottom: 1px solid var(--line);
}
.brand { font-weight: 800; font-size: 18px; color: var(--text); }
.nav { display: flex; align-items: center; gap: 12px; font-size: 17px; }
.nav a { color: var(--text); }
.wrap { max-width: 640px; margin: 0 auto; padding: 14px 12px 60px; }
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 12px; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; margin-bottom: 12px;
}
.card.narrow { max-width: 440px; margin: 24px auto; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flash {
  background: #1d3a26; border: 1px solid var(--green-dim); color: var(--text);
  padding: 10px 14px; border-radius: var(--radius); margin-bottom: 12px;
}
.notice {
  background: #2a2410; border: 1px solid var(--gold); color: var(--text);
  padding: 10px 14px; border-radius: var(--radius); margin-bottom: 12px; font-size: 14px;
}
.tag {
  background: var(--green-dim); color: #06110b; font-size: 12px; font-weight: 700;
  border-radius: 20px; padding: 2px 8px; margin-left: 6px;
}

h2 { margin: 6px 0 12px; } h3 { margin: 18px 0 8px; }

.btn {
  display: inline-block; background: var(--green); color: #06110b; border: none;
  font-weight: 700; font-size: 16px; padding: 10px 18px; border-radius: 10px;
  cursor: pointer; text-align: center;
}
.btn.ghost { background: transparent; color: var(--green); border: 1px solid var(--green-dim); }
.btn.danger { background: var(--danger); color: #1a0b0b; }
.btn.big { width: 100%; padding: 13px; font-size: 17px; }
.btn.twitch { background: #9146FF; color: #fff; text-decoration: none; display: block; }
.btn.twitch:hover { background: #7c3aed; }
.divider { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: var(--muted); }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--green-dim); }
.twitch-linked { background: rgba(145,70,255,.12); border: 1px solid #9146FF; border-radius: 10px;
  padding: 10px 14px; margin: 8px 0; }
/* Jarvis 3D stage (landing hero) */
.jarvis-stage { position: relative; height: 300px; margin: 4px 0; }
.jarvis-stage canvas { display: block; cursor: pointer; }
.jarvis-tag { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%);
  font-size: 13px; color: var(--muted); background: rgba(0,0,0,.4);
  padding: 4px 14px; border-radius: 20px; pointer-events: none; white-space: nowrap; }
.btn.sm { padding: 7px 12px; font-size: 14px; }
.linkbtn { background: none; border: none; color: var(--text); font-size: 17px; cursor: pointer; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.form label { display: block; margin-bottom: 12px; font-weight: 600; }
.form input, .form textarea {
  width: 100%; margin-top: 6px; padding: 11px; font-size: 16px;
  background: var(--card2); border: 1px solid var(--line); border-radius: 10px; color: var(--text);
}
.form textarea { resize: vertical; }
.filebtn { cursor: pointer; font-size: 22px; }

.tabs { display: flex; gap: 8px; margin: 4px 0 12px; }
.tabs a {
  padding: 8px 16px; border-radius: 20px; border: 1px solid var(--line); color: var(--muted);
}
.tabs a.on { background: var(--green-dim); color: #06110b; border-color: var(--green-dim); font-weight: 700; }

/* posts */
.post-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.who { font-weight: 700; color: var(--text); }
.uname { color: var(--muted); font-size: 13px; }
.when { color: var(--muted); font-size: 12px; }
.post-body { margin: 6px 0 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-img { width: 100%; border-radius: 10px; margin: 4px 0 8px; }
.post-actions { display: flex; gap: 8px; align-items: center; margin: 8px 0; flex-wrap: wrap; }
.post-actions form { margin: 0; }
.pill {
  background: var(--card2); border: 1px solid var(--line); color: var(--text);
  border-radius: 20px; padding: 7px 13px; font-size: 14px; cursor: pointer;
}
.pill.on { border-color: var(--green); }
.pill.ghost { cursor: default; }
.pill.danger { color: var(--danger); }
.pill.warn { color: var(--gold); }
.comments { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.comment { font-size: 14px; padding: 5px 0; }
.comment-form { display: flex; gap: 8px; margin-top: 8px; }
.comment-form input {
  flex: 1; padding: 9px 12px; font-size: 15px; background: var(--card2);
  border: 1px solid var(--line); border-radius: 10px; color: var(--text);
}

/* avatars */
.avatar { border-radius: 50%; object-fit: cover; background: var(--card2); }
.avatar.sm { width: 42px; height: 42px; }
.avatar.lg { width: 76px; height: 76px; }
.avatar.fallback {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--green-dim); color: #06110b; font-weight: 800; font-size: 20px;
}
.avatar.lg.fallback { font-size: 32px; }

/* profile */
.profile-top { display: flex; gap: 14px; align-items: center; }
.profile-top h2 { margin: 0; }
.profile-act { margin-left: auto; display: flex; gap: 8px; }
.bio { margin: 10px 0; }
.counts { display: flex; gap: 18px; margin-top: 6px; }
.counts a { color: var(--text); }
.twitch { color: #b892ff; font-size: 14px; }
.person { display: flex; gap: 10px; align-items: center; }

/* hero */
.hero { text-align: center; padding: 30px 10px; }
.hero-leaf { font-size: 54px; }
.hero h1 { font-size: 34px; margin: 8px 0; }
.hero .sub { color: var(--muted); max-width: 440px; margin: 0 auto 20px; }
.cta-row { display: flex; gap: 10px; justify-content: center; margin-bottom: 26px; }
.cta-row .btn { width: auto; padding: 13px 28px; }
.hero-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; max-width: 440px; margin: 0 auto; }
.hcard {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; display: flex; flex-direction: column; gap: 2px; font-size: 22px;
}
.hcard b { font-size: 15px; } .hcard span { font-size: 12px; color: var(--muted); }

/* leaderboard / sportsbook */
table.board { width: 100%; border-collapse: collapse; }
table.board th, table.board td { padding: 10px 8px; text-align: left; border-bottom: 1px solid var(--line); }
table.board tr.top td { color: var(--gold); font-weight: 700; }
.game { padding: 10px 0; border-bottom: 1px solid var(--line); }
.game:last-child { border-bottom: none; }
.odds { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 14px; margin-top: 4px; }

/* grow */
.tent .stats { display: flex; gap: 22px; margin: 10px 0; }
.tent .stats div { display: flex; flex-direction: column; }
.tent .stats b { font-size: 20px; color: var(--green); }
.tent .stats span { font-size: 12px; color: var(--muted); }

/* DMs */
a.convo { display: flex; gap: 10px; align-items: center; color: var(--text); }
a.convo:hover { text-decoration: none; border-color: var(--green-dim); }
#conv { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px;
        max-height: 55vh; overflow-y: auto; }
.dm { max-width: 80%; padding: 9px 13px; border-radius: 16px; font-size: 15px; }
.dm.me { align-self: flex-end; background: var(--green-dim); color: #06110b; }
.dm.them { align-self: flex-start; background: var(--card2); }
.dm-when { font-size: 11px; opacity: 0.7; margin-top: 3px; }
.dm-form { display: flex; gap: 8px; }
.dm-form input {
  flex: 1; padding: 11px; font-size: 16px; background: var(--card2);
  border: 1px solid var(--line); border-radius: 10px; color: var(--text);
}

.report-post { background: var(--card2); border-radius: 8px; padding: 8px 10px; margin: 8px 0; }

@media (max-width: 480px) {
  .nav { gap: 9px; font-size: 15px; }
  .brand { font-size: 16px; }
  .profile-act { flex-direction: column; }
}

/* --- 21+ age gate + cannabis touches --- */
.agegate { margin-top: 8vh; padding: 28px 22px; }
.age-leaf { font-size: 64px; line-height: 1; margin-bottom: 6px; }
.agegate h1 { margin: 4px 0 10px; }
.age-sub { font-size: 16px; }
.age-denied { font-size: 17px; }
.age-note { margin-top: 14px; }
.dob-row { display: flex; gap: 10px; margin-bottom: 14px; }
.dob-row label { flex: 1; margin-bottom: 0; font-size: 13px; color: var(--muted); }
.dob-row input { text-align: center; }
.age21 {
  display: inline-block; border: 2px solid var(--gold); color: var(--gold);
  font-weight: 800; font-size: 12px; border-radius: 8px; padding: 2px 8px;
  letter-spacing: 1px; vertical-align: middle; margin-left: 8px;
}

/* ---- game currency: wallets, exchange, shop ---- */
.wallet-row { display: flex; justify-content: space-between; align-items: center; }
.wallet-bal { font-size: 22px; font-weight: 800; color: var(--gold); }
.txn { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px;
  background: var(--card2); border-radius: 10px; margin-bottom: 6px; }
.btn.big { font-size: 17px; padding: 12px 20px; margin: 8px 0; }

/* ---- avatar frames (shop collectibles) ---- */
.avatar.frame-gold { border: 3px solid var(--gold); box-shadow: 0 0 14px rgba(232,197,71,.7); }
.avatar.frame-emerald { border: 3px solid var(--green); box-shadow: 0 0 14px rgba(61,220,132,.7); }
.avatar.frame-purple { border: 3px solid #b092ff; box-shadow: 0 0 14px rgba(176,146,255,.8); }
.avatar.frame-fire { border: 3px solid #ff7a45; box-shadow: 0 0 16px rgba(255,122,69,.8); }
/* BudzBook 3D avatars — append to app/static/style.css */

/* 3D avatar viewer (profile + crew) */
.avatar3d {
  width: 220px;
  height: 220px;
  border-radius: 18px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 35%, rgba(145,70,255,.10), rgba(0,0,0,.25));
  border: 1px solid var(--green-dim);
  cursor: grab;
  touch-action: none;
}
.avatar3d:active { cursor: grabbing; }
.avatar3d canvas { width: 100% !important; height: 100% !important; display: block; }
.avatar3d-sm { width: 140px; height: 140px; border-radius: 14px; }
.avatar3d-failed {
  display: flex; align-items: center; justify-content: center;
}
.avatar3d-fallback { font-size: 64px; }

/* Ready Player Me creator modal */
.rpm-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(4, 8, 6, .92);
  display: flex;
  flex-direction: column;
}
.rpm-modal[hidden] { display: none; }
.rpm-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 18px;
}
.rpm-modal iframe {
  flex: 1;
  width: 100%;
  border: none;
  background: #101418;
}

/* 3D Crew showcase page */
.crew-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.crew-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  border-radius: 14px;
  background: var(--card, #14201a);
  border: 1px solid var(--green-dim);
  text-decoration: none;
  color: inherit;
  transition: transform .12s ease, border-color .12s ease;
}
.crew-card:hover { transform: translateY(-3px); border-color: var(--green); }
.crew-name { font-weight: 700; font-size: 15px; }

hr.sep { border: none; border-top: 1px solid var(--green-dim); margin: 18px 0; }
/* Avatar gear chips on profiles */
.gear-row { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }

/* BMG employee badge (Blindman Gaming staff) */
.bmg-badge{background:linear-gradient(135deg,#8a6d1c,#f5d76e 60%,#b8860b);
  color:#1a1206;font-weight:700;border:1px solid #6e5516;cursor:default;
  text-transform:uppercase;letter-spacing:.4px;font-size:12px}

/* BMG VIP badge (honored community VIPs) */
.bmg-vip-badge{background:linear-gradient(135deg,#5a6472,#eef2f8 60%,#9aa5b5);
  color:#141a24;font-weight:700;border:1px solid #7c8798;cursor:default;
  text-transform:uppercase;letter-spacing:.4px;font-size:12px}

/* Watch page: stream + chat */
.watch-grid{display:grid;grid-template-columns:1fr;gap:12px;margin:10px 0}
.watch-player{position:relative;width:100%;aspect-ratio:16/9}
.watch-player iframe{position:absolute;inset:0;width:100%;height:100%;border:0;border-radius:12px}
.watch-chat iframe{width:100%;height:70vh;min-height:420px;border:0;border-radius:12px}
@media (min-width:900px){.watch-grid{grid-template-columns:1fr 340px;align-items:start}
.watch-chat iframe{height:calc(100vh - 220px);min-height:500px}}

/* ---- mobile polish: bottom tab bar, safe areas, tap targets ---- */
.tabbar { display: none; }

@media (max-width: 700px) {
  /* top nav collapses to the bottom tab bar on phones */
  .nav { display: none; }

  .tabbar {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 50;
    background: #0a100d;
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .tabbar a {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px;
    min-height: 60px;
    padding: 8px 2px 6px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.2;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }
  .tabbar a .ti { font-size: 22px; line-height: 1; }
  .tabbar a.on { color: var(--green); }
  .tabbar a.on .tl { font-weight: 700; }
  .tabbar a:active { background: rgba(61,220,132,.08); }

  /* clearance so content and footer clear the fixed tab bar + notch */
  .wrap { padding-bottom: 120px; }
  .foot { padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }

  /* 44px minimum tap targets for thumbs */
  .pill, .tabs a { min-height: 44px; display: inline-flex; align-items: center; }
  .post-actions .pill { padding: 10px 16px; }
  .btn { min-height: 44px; }
  .linkbtn { min-height: 44px; min-width: 44px; }

  /* tables scroll horizontally instead of squishing */
  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -12px;
    padding: 0 12px;
  }
  table.board { min-width: 430px; }
  table.board th, table.board td { padding: 12px 10px; }

  /* 16px inputs stop iOS auto-zoom on focus */
  .comment-form input, .dm-form input,
  .form input, .form textarea { font-size: 16px; }
}
/* ---- social v2: hashtags, trending, groups, clips ---- */
.htag { color: var(--green); font-weight: 700; }
.htag.big { font-size: 20px; }
a.htag:hover { text-decoration: underline; }
.tag.group-tag { background: var(--card2); border: 1px solid var(--green-dim);
  color: var(--green); margin-left: 6px; }
.trend-row {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 8px;
  color: var(--text);
}
.trend-row:hover { text-decoration: none; border-color: var(--green-dim); }
.quicklinks { display: flex; gap: 8px; margin: 0 0 12px; flex-wrap: wrap; }
.quicklinks a {
  padding: 8px 14px; border-radius: 20px; border: 1px solid var(--line);
  color: var(--text); font-size: 14px; background: var(--card);
}
.quicklinks a:hover { text-decoration: none; border-color: var(--green-dim); }
.group-card { display: block; color: var(--text); }
.group-card:hover { text-decoration: none; border-color: var(--green-dim); }
.group-card b { font-size: 17px; display: block; margin-bottom: 4px; }
.post-video {
  width: 100%; border-radius: 10px; margin: 4px 0 8px;
  background: #000; max-height: 60vh;
}
.clip-card { padding: 14px; }
.clip-video {
  width: 100%; border-radius: 12px; background: #000;
  max-height: 72vh; display: block; margin: 6px 0 10px;
}
@media (max-width: 700px) {
  .quicklinks a { min-height: 44px; display: inline-flex; align-items: center; }
}

/* Slim two-line score ribbon fixed across the top */
.ticker {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background: #0a0f0d;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.ticker[hidden] { display: none; }
.ticker-line {
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
}
.ticker-line:last-child { border-bottom: none; }
.ticker-line-dim { background: rgba(255, 255, 255, .015); }
.ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 1.4rem;
  padding: 0.22rem 0;
  animation: tickscroll 90s linear infinite;
  will-change: transform;
}
.ticker-line-dim .ticker-track { animation-duration: 110s; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes tickscroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ticker-item { font-size: 0.72rem; color: var(--text-dim, #9fb3a8); }
.ticker-item .live { color: #ff5d5d; }
.ticker-item .cover { color: #7dffa8; font-weight: 600; }
.ticker-item .push { color: #ffd479; }
.tick-sep { color: #2c3f36; font-size: 0.7rem; }
.ticker-link a { color: var(--green, #7dffa8); font-weight: 600; }
body.has-ticker { padding-top: 50px; }
@media (max-width: 700px) {
  .ticker-item { font-size: 0.6rem; line-height: 1.2; }
  .ticker-track { animation-duration: 60s; gap: 0.9rem; padding: 0.1rem 0; }
  .ticker-line-dim .ticker-track { animation-duration: 75s; }
  body.has-ticker { padding-top: 32px; }
}

/* ---- Gold trim ---- */
.topbar { border-bottom: 2px solid var(--gold); }
.brand { color: var(--gold); }
.btn { border: 1px solid rgba(232, 197, 71, .55); }
.tabbar { border-top: 2px solid var(--gold); }
.card { border-top: 2px solid rgba(232, 197, 71, .35); }
h2 { color: var(--gold); }
/* keep the sticky header visible below the fixed score ribbon */
body.has-ticker .topbar { top: 50px; }
@media (max-width: 700px) {
  body.has-ticker .topbar { top: 32px; }
}

/* in-house avatar builder */
#builder-wrap { margin-top: 10px; }
#builder-preview {
  width: 256px; height: 256px; margin: 4px auto 8px;
  border-radius: 18px; border: 1px solid var(--green-dim);
  overflow: hidden; background: rgba(0,0,0,.25);
}
#builder-preview.bg-transparent {
  background: repeating-conic-gradient(rgba(255,255,255,.06) 0 25%, transparent 0 50%) 0 0 / 24px 24px;
}
#builder-preview canvas { width: 100%; height: 100%; display: block; }
.builder-row { margin: 12px 0; }
.builder-label { display: block; font-weight: 700; margin-bottom: 8px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch {
  width: 46px; height: 46px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 2px solid rgba(255,255,255,.18);
}
.swatch[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.swatch-clear {
  background: repeating-conic-gradient(rgba(255,255,255,.25) 0 25%, transparent 0 50%) 0 0 / 16px 16px;
}
.optbtns { display: flex; flex-wrap: wrap; gap: 10px; }
.optbtn {
  min-height: 46px; padding: 10px 16px; border-radius: 12px; cursor: pointer;
  background: var(--card2); color: inherit; border: 2px solid rgba(255,255,255,.18);
  font-size: 15px; font-weight: 600;
}
.optbtn[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }

/* avatar coin */
.avatar-coin { width: 76px; height: 76px; border-radius: 50%; }
.avatar-coin canvas { width: 100%; height: 100%; display: block; border-radius: 50%; }
.avatar-coin.frame-gold { box-shadow: 0 0 14px rgba(232,197,71,.7); outline: 3px solid var(--gold); }
.avatar-coin.frame-emerald { box-shadow: 0 0 14px rgba(61,220,132,.7); outline: 3px solid var(--green); }
.avatar-coin.frame-purple { box-shadow: 0 0 16px rgba(176,146,255,.8); outline: 3px solid #b092ff; }
.avatar-coin.frame-fire { box-shadow: 0 0 16px rgba(255,122,69,.8); outline: 3px solid #ff7a45; }

/* Spinnable figurine avatars (profiles) */
.figurine { width: 88px; height: 88px; border-radius: 20px; position: relative; overflow: hidden; cursor: grab; background: var(--card2); flex: none; }
.figurine:active { cursor: grabbing; }
.figurine canvas { width: 100% !important; height: 100% !important; display: block; }
.figurine-fallback { width: 100%; height: 100%; object-fit: cover; display: block; }
.figurine.frame-gold { border: 3px solid var(--gold); box-shadow: 0 0 14px rgba(232,197,71,.7); }
.figurine.frame-emerald { border: 3px solid var(--green); box-shadow: 0 0 14px rgba(61,220,132,.7); }
.figurine.frame-purple { border: 3px solid #b092ff; box-shadow: 0 0 14px rgba(176,146,255,.8); }
.figurine.frame-fire { border: 3px solid #ff7a45; box-shadow: 0 0 16px rgba(255,122,69,.8); }
