/* community.css — $AI Community Tools */

/* ── HERO ── */
.comm-hero {
  position: relative; padding: 10rem 2rem 4rem;
  text-align: center; overflow: hidden; background: var(--bg2);
  border-bottom: 1px solid var(--border);
}
.comm-hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(0,245,255,.04) 1px,transparent 1px),
    linear-gradient(90deg,rgba(0,245,255,.04) 1px,transparent 1px);
  background-size: 50px 50px; pointer-events: none;
}
.comm-hero-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(2.5rem,7vw,5.5rem);
  font-weight: 900; line-height: 1; margin-bottom: 1rem;
  display: flex; flex-direction: column; align-items: center;
}
.comm-hero-sub {
  font-family: 'Share Tech Mono', monospace;
  font-size: .95rem; letter-spacing: .15em;
  color: rgba(255,255,255,.5); margin-bottom: 2.5rem;
}
.comm-hero-tabs {
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
}
.ctab {
  font-family: 'Orbitron', sans-serif; font-size: .78rem; font-weight: 700;
  letter-spacing: .1em; padding: .75rem 2rem;
  border: 1px solid var(--border); border-radius: 8px;
  background: transparent; color: rgba(255,255,255,.5);
  cursor: pointer; transition: all .2s;
}
.ctab:hover { border-color: var(--cyan); color: var(--cyan); }
.ctab--active {
  background: linear-gradient(135deg,var(--red),var(--violet));
  border-color: transparent; color: #fff;
  box-shadow: 0 4px 20px rgba(255,34,68,.35);
}

/* ── TOOL SECTIONS ── */
.tool-section { padding: 3rem 0 5rem; }

/* ── MEME STUDIO ── */
.meme-studio {
  display: grid; grid-template-columns: 340px 1fr;
  gap: 2rem; align-items: start;
}
.ms-section-label {
  font-family: 'Share Tech Mono', monospace; font-size: .68rem;
  letter-spacing: .2em; color: var(--cyan); opacity: .7;
  margin-bottom: .6rem;
}
.ms-templates {
  max-height: 280px; overflow-y: auto; padding-right: 4px;
}
.ms-templates::-webkit-scrollbar { width: 4px; }
.ms-templates::-webkit-scrollbar-track { background: transparent; }
.ms-templates::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.ms-cat-label {
  font-family: 'Share Tech Mono', monospace; font-size: .6rem;
  letter-spacing: .18em; color: rgba(0,245,255,.5);
  margin: .6rem 0 .3rem; padding-left: 2px;
}
.ms-tpl-group { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .25rem; }
.ms-tpl-chip {
  padding: 4px 10px; border-radius: 20px; border: 1px solid var(--border);
  background: rgba(255,255,255,.04); color: rgba(255,255,255,.6);
  cursor: pointer; font-size: .78rem; transition: all .15s; white-space: nowrap;
}
.ms-tpl-chip:hover { border-color: var(--red); color: var(--red); }
.ms-tpl-chip.active {
  border-color: var(--red); background: rgba(255,34,68,.12);
  color: #fff; box-shadow: 0 0 10px rgba(255,34,68,.25);
}
.ms-loading { font-family: 'Share Tech Mono',monospace; font-size: .75rem; color: rgba(255,255,255,.3); padding: .5rem; }

.ms-status {
  margin-top: .75rem; padding: .55rem .85rem;
  border-radius: 7px; font-family: 'Share Tech Mono',monospace; font-size: .75rem;
}
.ms-status--info    { background: rgba(0,245,255,.08); color: var(--cyan); border: 1px solid rgba(0,245,255,.2); }
.ms-status--success { background: rgba(0,255,136,.08); color: var(--green); border: 1px solid rgba(0,255,136,.2); }
.ms-status--warn    { background: rgba(255,170,0,.08);  color: #ffaa00; border: 1px solid rgba(255,170,0,.2); }
.ms-status--error   { background: rgba(255,34,68,.08);  color: var(--red); border: 1px solid rgba(255,34,68,.2); }

.ms-tg-btn {
  width: 100%; margin-top: .6rem; padding: .7rem;
  font-family: 'Orbitron',sans-serif; font-size: .72rem; font-weight: 700;
  letter-spacing: .1em; border-radius: 8px; cursor: pointer; transition: all .2s;
  background: transparent; border: 1px solid var(--cyan); color: var(--cyan);
}
.ms-tg-btn:hover { background: rgba(0,245,255,.1); box-shadow: 0 0 16px rgba(0,245,255,.3); }
.ms-tg-btn:disabled { opacity: .4; cursor: not-allowed; }

.ms-alt-caption {
  margin-top: .75rem; background: rgba(0,245,255,.04);
  border: 1px solid rgba(0,245,255,.15); border-radius: 8px; padding: .75rem;
}
.ms-alt-text { font-size: .85rem; color: rgba(255,255,255,.7); line-height: 1.5; margin-top: .3rem; }

.ms-field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .6rem; }
.ms-label { font-family: 'Share Tech Mono',monospace; font-size: .63rem; letter-spacing: .15em; color: rgba(255,255,255,.4); }
.ms-input {
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  border-radius: 7px; padding: .55rem .85rem; color: #fff;
  font-family: 'Inter',sans-serif; font-size: .9rem; outline: none;
  transition: border-color .2s; width: 100%;
}
.ms-input:focus { border-color: var(--cyan); }
.ms-input::placeholder { color: rgba(255,255,255,.2); }
.ms-range { width: 100%; accent-color: var(--red); cursor: pointer; }

.ms-style-row { display: flex; gap: .75rem; }
.ms-color-opts { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.ms-color-dot {
  width: 22px; height: 22px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: all .15s;
}
.ms-color-dot.active { border-color: #fff; transform: scale(1.2); }
.ms-toggle-row { display: flex; align-items: center; gap: .6rem; }
.ms-checkbox { accent-color: var(--red); width: 16px; height: 16px; cursor: pointer; }
.ms-toggle-label { font-size: .85rem; color: rgba(255,255,255,.6); }

.ms-generate-btn {
  position: relative; overflow: hidden; width: 100%;
  margin-top: 1rem; padding: .8rem 1rem;
  font-family: 'Orbitron',sans-serif; font-size: .75rem; font-weight: 700;
  letter-spacing: .1em; background: linear-gradient(135deg,var(--red),var(--violet));
  border: none; border-radius: 8px; color: #fff; cursor: pointer;
  transition: all .2s; box-shadow: 0 4px 20px rgba(255,34,68,.25);
}
.ms-generate-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(255,34,68,.4); }
.ms-generate-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.ms-download-btn, .ms-tweet-btn {
  width: 100%; margin-top: .6rem; padding: .7rem;
  font-family: 'Orbitron',sans-serif; font-size: .72rem; font-weight: 700;
  letter-spacing: .1em; border-radius: 8px; cursor: pointer; transition: all .2s;
}
.ms-download-btn {
  background: transparent; border: 1px solid var(--green); color: var(--green);
}
.ms-download-btn:hover { background: rgba(0,255,136,.1); box-shadow: 0 0 16px rgba(0,255,136,.3); }
.ms-tweet-btn {
  background: transparent; border: 1px solid var(--violet); color: var(--violet);
}
.ms-tweet-btn:hover { background: rgba(123,47,255,.1); box-shadow: 0 0 16px rgba(123,47,255,.3); }

.ms-preview { display: flex; flex-direction: column; gap: .75rem; }
.ms-preview-label { font-family: 'Share Tech Mono',monospace; font-size: .68rem; letter-spacing: .2em; color: var(--cyan); opacity: .7; }
.ms-canvas-wrap {
  position: relative; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border); background: #000;
  box-shadow: 0 0 40px rgba(255,34,68,.12);
}
.ms-canvas-wrap canvas { display: block; width: 100%; height: auto; }
.ms-canvas-overlay {
  position: absolute; inset: 0; background: rgba(0,0,10,.85);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem; font-family: 'Share Tech Mono',monospace; font-size: .85rem;
  color: var(--cyan); letter-spacing: .15em;
}
.ms-spinner {
  width: 36px; height: 36px; border: 3px solid rgba(0,245,255,.2);
  border-top-color: var(--cyan); border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.ms-preview-hint {
  font-family: 'Share Tech Mono',monospace; font-size: .65rem;
  letter-spacing: .1em; color: rgba(255,255,255,.25); text-align: center;
}

/* ── BRAIN FEED ── */
.brain-feed-layout {
  display: grid; grid-template-columns: 300px 1fr;
  gap: 2rem; align-items: start;
}
.bf-status-card, .bf-thought-card, .bf-stats-card {
  background: rgba(255,255,255,.03); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.25rem; margin-bottom: 1rem;
}
.bf-status-row {
  display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem;
}
.bf-dot {
  width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.2);
  flex-shrink: 0; transition: all .3s;
}
.bf-dot.online { background: var(--green); box-shadow: 0 0 10px rgba(0,255,136,.6); animation: pulse 1.5s infinite; }
.bf-dot.offline { background: rgba(255,255,255,.2); }
.bf-status-text { font-family: 'Share Tech Mono',monospace; font-size: .75rem; letter-spacing: .12em; color: rgba(255,255,255,.6); }
.bf-market { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.bf-mkt-item { display: flex; flex-direction: column; gap: .2rem; }
.bf-mkt-label { font-family: 'Share Tech Mono',monospace; font-size: .58rem; letter-spacing: .15em; color: rgba(255,255,255,.3); }
.bf-mkt-val { font-family: 'Orbitron',sans-serif; font-size: .78rem; font-weight: 700; color: #fff; }

.bf-thought-text {
  font-size: .9rem; color: rgba(255,255,255,.8); line-height: 1.6;
  font-style: italic; margin: .6rem 0 .4rem;
}
.bf-thought-mood { font-family: 'Share Tech Mono',monospace; font-size: .7rem; color: rgba(255,255,255,.35); }

.bf-stat-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: .4rem 0; border-bottom: 1px solid rgba(255,255,255,.05);
  font-size: .82rem; color: rgba(255,255,255,.5);
}
.bf-stat-row:last-child { border-bottom: none; }
.bf-stat-val { font-family: 'Orbitron',sans-serif; font-size: .8rem; color: var(--cyan); }

.bf-open-btn {
  display: block; width: 100%; padding: .75rem; text-align: center;
  font-family: 'Orbitron',sans-serif; font-size: .72rem; font-weight: 700;
  letter-spacing: .1em; background: rgba(255,34,68,.08);
  border: 1px solid rgba(255,34,68,.3); border-radius: 8px;
  color: var(--red); text-decoration: none; transition: all .2s;
}
.bf-open-btn:hover { background: rgba(255,34,68,.16); box-shadow: 0 0 20px rgba(255,34,68,.25); }

.bf-feed {
  min-height: 280px; max-height: 400px; overflow-y: auto;
  display: flex; flex-direction: column; gap: .5rem;
  margin-bottom: 1.5rem;
}
.bf-feed::-webkit-scrollbar { width: 4px; }
.bf-feed::-webkit-scrollbar-track { background: transparent; }
.bf-feed::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.bf-empty { color: rgba(255,255,255,.25); font-size: .82rem; font-family: 'Share Tech Mono',monospace; padding: 1rem; }

.bf-task-item {
  background: rgba(255,255,255,.03); border: 1px solid var(--border);
  border-radius: 10px; padding: .75rem 1rem;
  animation: fadeUp .3s ease;
}
@keyframes fadeUp { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }
.bf-task-top { display: flex; align-items: center; gap: .5rem; margin-bottom: .3rem; }
.bf-task-skill {
  font-family: 'Share Tech Mono',monospace; font-size: .62rem; letter-spacing: .1em;
  color: rgba(255,255,255,.35); padding: 2px 6px; background: rgba(255,255,255,.05);
  border-radius: 4px;
}
.bf-task-status { font-family: 'Share Tech Mono',monospace; font-size: .62rem; margin-left: auto; }
.bf-task-status.done { color: var(--green); }
.bf-task-status.running { color: #ffaa00; }
.bf-task-status.error { color: var(--red); }
.bf-task-status.queued { color: rgba(255,255,255,.3); }
.bf-task-goal { font-size: .82rem; color: rgba(255,255,255,.65); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bf-task-age { font-family: 'Share Tech Mono',monospace; font-size: .6rem; color: rgba(255,255,255,.25); margin-top: .25rem; }

.bf-ask {
  background: rgba(255,255,255,.03); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.25rem;
}
.bf-ask-row { display: flex; gap: .5rem; margin-bottom: .6rem; }
.bf-ask-btn {
  padding: .55rem 1rem; border-radius: 8px; border: none;
  background: var(--red); color: #fff; font-size: 1.1rem;
  cursor: pointer; transition: all .15s; flex-shrink: 0;
}
.bf-ask-btn:hover { background: #cc1133; }
.bf-quick-asks { display: flex; gap: .4rem; flex-wrap: wrap; }
.bf-qa-btn {
  padding: 4px 10px; border-radius: 20px; border: 1px solid var(--border);
  background: transparent; color: rgba(255,255,255,.5); cursor: pointer;
  font-size: .75rem; transition: all .15s;
}
.bf-qa-btn:hover { border-color: var(--cyan); color: var(--cyan); }

.bf-reply-box {
  margin-top: 1rem; background: rgba(0,245,255,.04);
  border: 1px solid rgba(0,245,255,.2); border-radius: 10px; padding: 1rem;
}
.bf-reply-label {
  font-family: 'Share Tech Mono',monospace; font-size: .62rem;
  letter-spacing: .15em; color: var(--cyan); margin-bottom: .5rem;
}
.bf-reply-text { font-size: .88rem; color: rgba(255,255,255,.8); line-height: 1.65; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .meme-studio, .brain-feed-layout { grid-template-columns: 1fr; }
  .ms-controls { order: 2; }
  .ms-preview { order: 1; }
}
