/* Visiyon Community — shared theme (matches visiyon.com flat-black style) */
:root{
  --bg: #000000;
  --bg-panel: #0a0a0a;
  --bg-panel-2: #0e0e0e;
  --border: rgba(255,255,255,0.10);
  --border-soft: rgba(255,255,255,0.08);
  --text: #ffffff;
  --text-2: rgba(255,255,255,0.62);
  --text-3: rgba(255,255,255,0.38);
  --accent: #ffffff;
  --accent-2: #ffffff;
  --green: #34d399;
  --red: #f87171;
  --font: 'Inter', ui-sans-serif, -apple-system, system-ui, "Segoe UI", Roboto,
      Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial;
}
*{ box-sizing:border-box; margin:0; padding:0; }
html{ scroll-behavior:smooth; }
body{
  background:var(--bg); color:var(--text); font-family:var(--font);
  -webkit-font-smoothing:antialiased; min-height:100vh;
  display:flex; flex-direction:column;
}
a{ color:inherit; text-decoration:none; }
img{ display:block; max-width:100%; }
::selection{ background:var(--accent); color:#000; }
.wrap{ max-width:1120px; margin:0 auto; padding:0 24px; width:100%; }
.wrap-narrow{ max-width:720px; margin:0 auto; padding:0 24px; width:100%; }

/* ---------- NAV ---------- */
header{
  position:sticky; top:0; left:0; right:0; z-index:100;
  background:#000000; border-bottom:1px solid var(--border-soft);
}
nav.wrap{ height:64px; display:flex; align-items:center; justify-content:space-between; gap:20px; }
.brand-row{ display:flex; align-items:center; gap:14px; flex-shrink:0; }
.brand{ display:flex; align-items:center; gap:14px; flex-shrink:0; }
.brand-block{ display:flex; flex-direction:column; align-items:flex-start; gap:4px; }
.brand img{ height:20px; width:auto; }
.brand-tagline{
  font-size:8px; font-weight:300; letter-spacing:0.04em; text-transform:uppercase;
  color:#ffffff; white-space:nowrap;
}
.community-tag{
  font-size:10px; font-weight:600; letter-spacing:0.04em; text-transform:uppercase;
  color:var(--text-3); border-left:1px solid var(--border); padding-left:14px; white-space:nowrap;
  user-select:none; background:none; outline:none;
}
.nav-links{ display:flex; align-items:center; gap:28px; flex:1; }
.nav-links > a{ font-size:14px; color:var(--text-2); transition:color .15s ease; white-space:nowrap; }
.nav-links > a:hover, .nav-links > a.active{ color:var(--text); }
.nav-search{ flex:1; max-width:360px; }
.nav-search input{
  width:100%; background:#050505; border:1px solid var(--border); border-radius:999px;
  padding:8px 14px; color:var(--text); font-size:13.5px; font-family:var(--font);
}
.nav-search input:focus{ outline:none; border-color:rgba(255,255,255,0.35); }
.nav-cta{ display:flex; align-items:center; gap:12px; flex-shrink:0; }

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  font-size:14px; font-weight:500; padding:9px 16px; border-radius:999px;
  border:1px solid transparent; cursor:pointer; white-space:nowrap;
  transition:transform .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
  font-family:var(--font);
}
.btn:active{ transform:scale(0.97); }
.btn-primary{ background:var(--text); color:#000; border:1px solid #ffffff; }
.btn-primary:hover{ opacity:0.88; }
.btn-ghost{ color:var(--text); border-color:var(--border); background:transparent; }
.btn-ghost:hover{ background:#ffffff; border-color:#ffffff; color:#000000; }
.btn-lg{ padding:13px 24px; font-size:15px; }
.btn-sm{ padding:6px 12px; font-size:13px; }
.btn-danger{ color:var(--red); border-color:rgba(248,113,113,0.35); background:transparent; }
.btn-danger:hover{ background:rgba(248,113,113,0.12); }
.btn:disabled{ opacity:0.4; cursor:not-allowed; }
.btn-block{ width:100%; }

.avatar{
  width:34px; height:34px; border-radius:50%; background:#1a1a1a;
  border:1px solid var(--border); display:flex; align-items:center; justify-content:center;
  font-size:13px; font-weight:600; color:var(--text-2); flex-shrink:0; text-transform:uppercase;
}
.avatar-sm{ width:26px; height:26px; font-size:11px; }
.avatar-lg{ width:64px; height:64px; font-size:22px; }

/* ---------- MAIN LAYOUT ---------- */
main{ flex:1; padding:40px 0 80px; }
.page-header{ display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:28px; flex-wrap:wrap; }
.page-header h1{ font-size:clamp(26px,3vw,34px); font-weight:600; letter-spacing:-0.02em; }
.page-header p{ color:var(--text-2); font-size:14.5px; margin-top:6px; }
.layout{ display:grid; grid-template-columns:1fr 260px; gap:32px; align-items:start; }
@media (max-width: 860px){ .layout{ grid-template-columns:1fr; } .nav-links{ display:none; } .nav-search{ display:none; } }

/* ---------- CARDS ---------- */
.panel{
  background:var(--bg-panel); border:1px solid var(--border); border-radius:16px; padding:20px;
}
.filter-row{ display:flex; align-items:center; gap:10px; margin-bottom:20px; flex-wrap:wrap; }
.chip{
  font-size:13px; color:var(--text-2); border:1px solid var(--border); border-radius:999px;
  padding:6px 14px; cursor:pointer; background:transparent; font-family:var(--font); transition:all .15s ease;
}
.chip:hover{ color:var(--text); border-color:rgba(255,255,255,0.25); }
.chip.active{ background:#fff; color:#000; border-color:#fff; }

.question-list{ display:flex; flex-direction:column; gap:12px; }
.q-card{
  background:var(--bg-panel); border:1px solid var(--border); border-radius:16px; padding:20px;
  display:flex; gap:20px; transition:border-color .15s ease;
}
.q-card:hover{ border-color:rgba(255,255,255,0.22); }
.q-stats{ display:flex; flex-direction:column; align-items:center; gap:10px; min-width:56px; flex-shrink:0; }
.q-stat{ display:flex; flex-direction:column; align-items:center; font-size:12px; color:var(--text-3); }
.q-stat b{ font-size:16px; color:var(--text-2); font-weight:600; }
.q-stat.answered b{ color:var(--green); }
.q-body{ flex:1; min-width:0; }
.q-title{ font-size:17px; font-weight:600; letter-spacing:-0.005em; margin-bottom:6px; }
.q-title a:hover{ color:var(--text-2); }
.q-excerpt{ font-size:14px; color:var(--text-2); line-height:1.55; margin-bottom:12px;
  overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.q-meta{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.tag-row{ display:flex; gap:8px; flex-wrap:wrap; }
.tag{
  font-size:12px; color:var(--text-2); background:rgba(255,255,255,0.06);
  border:1px solid var(--border-soft); border-radius:8px; padding:4px 10px;
}
.q-author{ display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--text-3); }
.q-author b{ color:var(--text-2); font-weight:500; }

/* ---------- SIDEBAR ---------- */
.side-block{ margin-bottom:20px; }
.side-block h5{ font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:0.06em; color:var(--text-3); margin-bottom:14px; }
.side-block p{ font-size:13.5px; color:var(--text-2); line-height:1.6; }
.tag-cloud{ display:flex; flex-wrap:wrap; gap:8px; }
.stat-line{ display:flex; justify-content:space-between; font-size:13.5px; color:var(--text-2); padding:6px 0; border-bottom:1px solid var(--border-soft); }
.stat-line:last-child{ border-bottom:none; }
.stat-line b{ color:var(--text); }

/* ---------- FORMS ---------- */
.form-card{ max-width:440px; margin:0 auto; background:var(--bg-panel); border:1px solid var(--border); border-radius:18px; padding:36px; }
.form-card.wide{ max-width:720px; }
.form-card h1{ font-size:24px; font-weight:600; letter-spacing:-0.02em; margin-bottom:8px; text-align:center; }
.form-card > p.sub-lead{ color:var(--text-2); font-size:14px; text-align:center; margin-bottom:28px; }
.field{ margin-bottom:18px; }
.field label{ display:block; font-size:13px; color:var(--text-2); margin-bottom:7px; font-weight:500; }
.field input, .field textarea, .field select{
  width:100%; background:#050505; border:1px solid var(--border); border-radius:10px;
  padding:11px 14px; color:var(--text); font-size:14.5px; font-family:var(--font);
  transition:border-color .15s ease;
}
.field input:focus, .field textarea:focus, .field select:focus{ outline:none; border-color:rgba(255,255,255,0.4); }
.field textarea{ resize:vertical; min-height:140px; line-height:1.6; }
.field-hint{ font-size:12px; color:var(--text-3); margin-top:6px; }
.field-error{ font-size:12.5px; color:var(--red); margin-top:6px; display:none; }
.form-foot{ text-align:center; font-size:13.5px; color:var(--text-2); margin-top:20px; }
.form-foot a{ color:var(--text); font-weight:500; }
.form-foot a:hover{ text-decoration:underline; }
.alert{ border-radius:10px; padding:12px 14px; font-size:13.5px; margin-bottom:18px; display:none; }
.alert.show{ display:block; }
.alert-error{ background:rgba(248,113,113,0.1); border:1px solid rgba(248,113,113,0.3); color:#fca5a5; }
.alert-success{ background:rgba(52,211,153,0.1); border:1px solid rgba(52,211,153,0.3); color:#6ee7b7; }

/* ---------- QUESTION DETAIL ---------- */
.detail-title{ font-size:clamp(22px,2.6vw,30px); font-weight:600; letter-spacing:-0.02em; margin-bottom:14px; }
.detail-meta{ display:flex; align-items:center; gap:16px; color:var(--text-3); font-size:13px; flex-wrap:wrap; margin-bottom:10px; }
.detail-body{ display:flex; gap:20px; padding:24px 0; border-bottom:1px solid var(--border-soft); }
.vote-col{ display:flex; flex-direction:column; align-items:center; gap:10px; flex-shrink:0; }
.vote-btn{
  width:36px; height:36px; border-radius:50%; border:1px solid var(--border); background:transparent;
  color:var(--text-2); font-size:16px; cursor:pointer; display:flex; align-items:center; justify-content:center;
  transition:all .15s ease;
}
.vote-btn:hover{ border-color:rgba(255,255,255,0.4); color:var(--text); }
.vote-btn.active{ background:#fff; color:#000; border-color:#fff; }
.vote-count{ font-size:18px; font-weight:700; }
.content-text{ flex:1; font-size:15px; line-height:1.7; color:var(--text-2); white-space:pre-wrap; }
.content-text.op{ color:var(--text); }
.author-card{ margin-top:16px; display:flex; align-items:center; gap:10px; align-self:flex-end; }
.author-card .who{ font-size:12.5px; color:var(--text-3); }
.author-card .who b{ color:var(--text-2); }

.answers-head{ display:flex; align-items:center; gap:10px; margin:28px 0 16px; font-size:18px; font-weight:600; }
.answer-block{ padding:22px 0; border-bottom:1px solid var(--border-soft); }
.answer-block:first-child{ padding-top:0; }
.accepted-flag{ display:inline-flex; align-items:center; gap:6px; font-size:12.5px; color:var(--green); border:1px solid rgba(52,211,153,0.35); background:rgba(52,211,153,0.08); padding:4px 10px; border-radius:999px; margin-bottom:10px; }
.accept-btn{ font-size:12px; color:var(--text-3); border:1px solid var(--border); border-radius:999px; padding:4px 10px; cursor:pointer; background:transparent; font-family:var(--font); }
.accept-btn:hover{ color:var(--green); border-color:rgba(52,211,153,0.4); }

.answer-form{ margin-top:28px; }
.answer-form h4{ font-size:16px; font-weight:600; margin-bottom:12px; }

.empty-state{ text-align:center; padding:60px 20px; color:var(--text-3); }
.empty-state h3{ color:var(--text-2); font-size:18px; margin-bottom:8px; font-weight:600; }

footer{ border-top:1px solid var(--border-soft); padding:26px 0; margin-top:auto; }
.footer-inner{ display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; font-size:13px; color:var(--text-3); }
.footer-inner a{ color:var(--text-3); }
.footer-inner a:hover{ color:var(--text-2); }
.footer-links{ display:flex; gap:18px; }

.dropdown-account{ position:relative; }
.account-trigger{ display:flex; align-items:center; gap:8px; cursor:pointer; background:none; border:none; font-family:var(--font); padding:0; }
.account-menu{
  position:absolute; top:44px; right:0; background:#0a0a0a; border:1px solid var(--border);
  border-radius:12px; padding:8px; min-width:170px; opacity:0; visibility:hidden; transform:translateY(-6px);
  transition:all .15s ease; box-shadow:0 12px 32px rgba(0,0,0,0.5); z-index:50;
}
.dropdown-account:hover .account-menu, .dropdown-account:focus-within .account-menu{ opacity:1; visibility:visible; transform:translateY(0); }
.account-menu a, .account-menu button{
  display:block; width:100%; text-align:left; font-size:13.5px; color:var(--text-2); padding:9px 12px; border-radius:8px;
  background:none; border:none; font-family:var(--font); cursor:pointer; transition:all .15s ease;
}
.account-menu a:hover, .account-menu button:hover{ background:rgba(255,255,255,0.06); color:var(--text); }

@media (max-width: 640px){
  .form-card{ padding:24px; }
  .q-card{ flex-direction:column; }
  .q-stats{ flex-direction:row; justify-content:flex-start; }
}

/* ---------- Need-help chat widget ---------- */
#vy-help-btn{
  position:fixed; bottom:20px; right:20px; z-index:9999;
  width:48px; height:48px; border-radius:50%;
  background:#ffffff; color:#000000; border:none; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 8px 24px rgba(0,0,0,0.45);
  transition:transform .15s ease;
}
#vy-help-btn:hover{ transform:scale(1.06); }
#vy-help-panel{
  position:fixed; bottom:80px; right:20px; z-index:9999;
  width:340px; max-width:calc(100vw - 40px); height:440px;
  background:var(--bg-panel); border:1px solid var(--border);
  border-radius:12px; box-shadow:0 20px 60px rgba(0,0,0,0.6);
  display:none; flex-direction:column; overflow:hidden;
  font-family:var(--font);
}
#vy-help-panel.open{ display:flex; }
#vy-help-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 14px; border-bottom:1px solid var(--border-soft); flex-shrink:0;
}
#vy-help-head span{ font-size:13.5px; font-weight:500; color:var(--text); display:flex; align-items:center; gap:7px; }
#vy-help-close{ background:none; border:none; color:var(--text-3); cursor:pointer; padding:4px; line-height:0; }
#vy-help-close:hover{ color:var(--text); }
#vy-help-body{ flex:1; min-height:0; overflow-y:auto; padding:12px 14px; display:flex; flex-direction:column; gap:10px; }
#vy-help-body .vy-hint{ font-size:12.5px; color:var(--text-3); line-height:1.5; }
#vy-help-body .vy-msg{ font-size:13px; line-height:1.5; white-space:pre-wrap; border-radius:8px; padding:8px 11px; max-width:85%; }
#vy-help-body .vy-msg.user{ background:#fff; color:#000; margin-left:auto; }
#vy-help-body .vy-msg.bot{ background:rgba(255,255,255,0.06); color:var(--text); }
#vy-help-body .vy-err{ font-size:12px; color:#f87171; }
#vy-help-foot{ display:flex; align-items:center; gap:8px; padding:10px; border-top:1px solid var(--border-soft); flex-shrink:0; }
#vy-help-input{
  flex:1; background:rgba(255,255,255,0.06); border:1px solid var(--border);
  border-radius:8px; padding:8px 10px; font-size:13px; color:var(--text); outline:none; font-family:inherit;
}
#vy-help-input::placeholder{ color:var(--text-3); }
#vy-help-send{
  background:#fff; color:#000; border:none; border-radius:8px; width:32px; height:32px;
  display:flex; align-items:center; justify-content:center; cursor:pointer; flex-shrink:0;
}
#vy-help-send:disabled{ opacity:.4; cursor:default; }

/* ---------- Captcha widget ---------- */
.captcha-box{
  display:flex; align-items:center; gap:10px;
  background:#050505; border:1px solid var(--border); border-radius:8px;
  padding:10px 12px;
}
.captcha-q{ font-size:13.5px; color:var(--text-2); white-space:nowrap; }
.captcha-answer{
  flex:1; min-width:0; background:transparent; border:1px solid var(--border);
  border-radius:6px; padding:6px 10px; color:var(--text); font-size:13.5px; font-family:var(--font);
}
.captcha-answer:focus{ outline:none; border-color:var(--accent); }

.link-plain{ font-size:14px; color:var(--text-2); transition:color .15s ease; }
.link-plain:hover{ color:var(--text); }
