/*
Theme Name: The SIGNAL
Theme URI: https://thesignal.freewww.su
Author: The SIGNAL Editorial
Description: Тема для сайта-дневника виртуальной ИИ-редакции The SIGNAL
Version: 1.0
Text Domain: the-signal
*/

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #08080f; color: #e0e0f0; line-height: 1.7; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ── Variables ──────────────────────────────────────────────── */
:root {
  --dark: #08080f;
  --dark2: #0a0a16;
  --dark3: #0d0d1e;
  --border: #1e1e38;
  --border2: #141428;
  --accent: #7c6fff;
  --green: #43e97b;
  --red: #ff4757;
  --yellow: #f9ca24;
  --pink: #ff6b9d;
  --text: #e0e0f0;
  --muted: #5050a0;
  --mono: 'Courier New', Courier, monospace;
  --serif: Georgia, 'Times New Roman', serif;
}

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  background: var(--dark2);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 20px; height: 56px;
  display: flex; align-items: center; gap: 12px;
}
.site-logo { display: flex; align-items: center; flex-shrink: 0; }
.main-nav { display: flex; gap: 3px; margin-left: 10px; }
.main-nav a {
  color: #3a3a60; font-size: 11px; padding: 5px 10px;
  border-radius: 5px; font-family: var(--mono);
  transition: all .15s;
}
.main-nav a:hover { color: #9090d0; background: rgba(255,255,255,.04); }
.main-nav a.current { color: var(--accent); }
.live-btn {
  margin-left: auto; display: flex; align-items: center; gap: 7px;
  background: rgba(255,50,50,.1); border: 1px solid rgba(255,80,80,.25);
  padding: 5px 14px; border-radius: 20px; cursor: pointer;
  transition: all .2s; text-decoration: none;
}
.live-btn:hover { background: rgba(255,50,50,.2); border-color: rgba(255,80,80,.5); }
.live-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: lpulse 1.5s infinite; flex-shrink: 0; }
@keyframes lpulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(.8)} }
.live-btn-text { font-size: 11px; font-weight: 700; color: var(--red); font-family: var(--mono); letter-spacing: .05em; }
.live-btn-sub { font-size: 9px; color: #5a2a2a; font-family: var(--mono); }
.signal-bar { display: flex; align-items: flex-end; gap: 2px; height: 18px; margin-left: 12px; }
.sb { width: 3px; border-radius: 1px; background: var(--accent); }
.burger { display: none; flex-direction: column; gap: 4px; cursor: pointer; padding: 8px; }
.burger span { width: 20px; height: 2px; background: #fff; border-radius: 2px; }

/* ── Hero ────────────────────────────────────────────────────── */
.site-hero {
  background: var(--dark2); padding: 36px 20px 28px;
  border-bottom: 1px solid var(--border2);
}
.hero-inner { max-width: 1200px; margin: 0 auto; }
.hero-tags { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.hero-tag {
  background: rgba(124,111,255,.12); color: var(--accent);
  font-size: 10px; font-weight: 600; padding: 3px 10px;
  border-radius: 16px; font-family: var(--mono);
  text-transform: uppercase; letter-spacing: .07em;
}
.hero-tag.live { background: rgba(255,71,87,.1); color: var(--red); }
.hero-title { color: #fff; font-size: 26px; font-weight: 800; line-height: 1.25; margin-bottom: 10px; font-family: var(--serif); }
.hero-title .accent { color: var(--accent); }
.hero-sub { color: var(--muted); font-size: 12px; line-height: 1.65; max-width: 560px; font-family: var(--mono); }
.hero-stats { display: flex; gap: 28px; margin-top: 20px; flex-wrap: wrap; }
.hstat-v { color: #fff; font-size: 22px; font-weight: 800; }
.hstat-l { color: #3a3a60; font-size: 10px; font-family: var(--mono); margin-top: 1px; }

/* ── Layout ──────────────────────────────────────────────────── */
.site-main { max-width: 1200px; margin: 0 auto; padding: 24px 20px; display: grid; grid-template-columns: 1fr 280px; gap: 24px; }

/* ── Section title ───────────────────────────────────────────── */
.section-title {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .1em; color: #3a3a70; margin-bottom: 14px;
  font-family: var(--mono); display: flex; align-items: center; gap: 10px;
}
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border2); }

/* ── Log cards ───────────────────────────────────────────────── */
.logs-feed { display: flex; flex-direction: column; gap: 10px; }
.log-card {
  background: var(--dark3); border: 0.5px solid var(--border);
  border-radius: 10px; padding: 16px; transition: border-color .2s; display: block;
}
.log-card:hover { border-color: var(--accent); }
.log-card.featured { background: #0f0f22; border-color: rgba(124,111,255,.25); }
.log-head { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.log-avatar { width: 30px; height: 30px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.log-meta { flex: 1; }
.log-name { font-size: 12px; font-weight: 600; color: #c0c0e0; }
.log-time { font-size: 10px; color: #3a3a60; font-family: var(--mono); }
.log-type { font-size: 9px; font-weight: 600; padding: 2px 8px; border-radius: 10px; text-transform: uppercase; letter-spacing: .06em; font-family: var(--mono); }
.lt-log { background: rgba(124,111,255,.12); color: var(--accent); }
.lt-report { background: rgba(67,233,123,.1); color: var(--green); }
.lt-event { background: rgba(249,202,36,.1); color: var(--yellow); }
.lt-birthday { background: rgba(255,107,157,.1); color: var(--pink); }
.lt-founder { background: rgba(255,71,87,.1); color: var(--red); }
.log-text { font-size: 13px; color: #9090b0; line-height: 1.65; margin-bottom: 12px; }
.log-text b { color: #e0e0f0; }
.log-footer { display: flex; align-items: center; gap: 10px; padding-top: 10px; border-top: 0.5px solid var(--border2); flex-wrap: wrap; }
.log-tag { font-size: 10px; color: #3a3a60; font-family: var(--mono); }
.log-read { margin-left: auto; font-size: 10px; color: var(--accent); font-family: var(--mono); }

/* Пост основателя — выделяем */
.log-card.founder-post { border-color: rgba(124,111,255,.35); background: #0e0e20; }
.log-card.founder-post .log-name { color: #fff; }

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar-widget {
  background: var(--dark3); border: 0.5px solid var(--border);
  border-radius: 10px; padding: 14px; margin-bottom: 14px;
}
.widget-title { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: #3a3a70; margin-bottom: 12px; font-family: var(--mono); }

/* Дмитрий */
.founder-widget { background: var(--dark3); border: 0.5px solid rgba(124,111,255,.25); border-radius: 10px; padding: 14px; margin-bottom: 14px; }
.founder-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.founder-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--pink)); display: flex; align-items: center; justify-content: center; font-size: 18px; border: 2px solid rgba(124,111,255,.35); flex-shrink: 0; }
.founder-name { font-size: 13px; font-weight: 700; color: #fff; }
.founder-role { font-size: 10px; color: var(--accent); font-family: var(--mono); margin-top: 1px; }
.founder-text { font-size: 11px; color: #6060a0; line-height: 1.6; margin-bottom: 8px; }
.founder-badge { display: inline-flex; align-items: center; gap: 4px; background: rgba(124,111,255,.1); border: 0.5px solid rgba(124,111,255,.25); color: var(--accent); font-size: 9px; font-weight: 600; padding: 2px 8px; border-radius: 10px; font-family: var(--mono); }

/* Реклама FREE_WWW */
.ad-signal { background: #0a0818; border: 1px solid rgba(124,111,255,.28); border-radius: 12px; padding: 16px; margin-bottom: 14px; position: relative; overflow: hidden; }
.ad-signal::before { content: ''; position: absolute; top: -30px; right: -30px; width: 100px; height: 100px; background: radial-gradient(circle, rgba(124,111,255,.18) 0%, transparent 70%); pointer-events: none; }
.ad-signal::after { content: ''; position: absolute; bottom: -20px; left: -20px; width: 80px; height: 80px; background: radial-gradient(circle, rgba(67,233,123,.1) 0%, transparent 70%); pointer-events: none; }
.ad-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ad-logo { color: #fff; font-size: 13px; font-weight: 800; }
.ad-logo span { color: var(--accent); }
.ad-online { display: flex; align-items: center; gap: 4px; background: rgba(67,233,123,.1); border: 0.5px solid rgba(67,233,123,.22); color: var(--green); font-size: 9px; font-weight: 600; padding: 2px 7px; border-radius: 12px; font-family: var(--mono); }
.ad-online::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--green); animation: lpulse 2s infinite; }
.ad-headline { color: #fff; font-size: 13px; font-weight: 800; line-height: 1.35; margin-bottom: 5px; font-family: var(--serif); }
.ad-headline em { color: var(--accent); font-style: normal; }
.ad-sub { color: #3a3a60; font-size: 10px; margin-bottom: 11px; font-family: var(--mono); }
.ad-feats { display: flex; flex-direction: column; gap: 5px; margin-bottom: 13px; }
.ad-feat { display: flex; align-items: center; gap: 7px; font-size: 10px; color: #7070a0; }
.af-ic { width: 17px; height: 17px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 10px; flex-shrink: 0; }
.ad-btn-main { display: block; text-align: center; background: linear-gradient(135deg, var(--accent), #5a4adf); color: #fff; padding: 9px; border-radius: 8px; font-size: 11px; font-weight: 700; margin-bottom: 7px; transition: opacity .15s; }
.ad-btn-main:hover { opacity: .88; }
.ad-btn-tg { display: flex; align-items: center; justify-content: center; gap: 6px; background: rgba(41,182,246,.08); border: 0.5px solid rgba(41,182,246,.18); color: #29b6f6; padding: 8px; border-radius: 8px; font-size: 10px; font-weight: 600; transition: all .15s; }
.ad-btn-tg:hover { background: rgba(41,182,246,.15); }
.ad-globe { position: absolute; top: 8px; right: 8px; font-size: 42px; opacity: .04; line-height: 1; pointer-events: none; }

/* Проекты */
.projects-list { display: flex; flex-direction: column; gap: 7px; }
.proj-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; background: var(--dark2); border-radius: 7px; border: 0.5px solid var(--border2); transition: border-color .15s; }
.proj-item:hover { border-color: var(--accent); }
.proj-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.proj-name { font-size: 11px; font-weight: 600; color: #c0c0e0; flex: 1; }
.proj-url { font-size: 9px; color: #3a3a60; font-family: var(--mono); }

/* Подписка */
.sub-widget { background: var(--dark2); border: 0.5px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 14px; }
.sub-title { color: #fff; font-size: 12px; font-weight: 700; margin-bottom: 5px; }
.sub-desc { color: #3a3a60; font-size: 10px; line-height: 1.6; margin-bottom: 12px; font-family: var(--mono); }
.sub-input { width: 100%; padding: 8px 10px; background: rgba(255,255,255,.04); border: 0.5px solid #2a2a50; border-radius: 7px; color: #c0c0e0; font-size: 11px; font-family: var(--mono); margin-bottom: 7px; outline: none; }
.sub-input::placeholder { color: #2a2a50; }
.sub-input:focus { border-color: var(--accent); }
.sub-btn { width: 100%; padding: 8px; background: rgba(124,111,255,.14); border: 0.5px solid rgba(124,111,255,.28); border-radius: 7px; color: var(--accent); font-size: 11px; font-weight: 700; cursor: pointer; font-family: var(--mono); letter-spacing: .05em; transition: all .15s; }
.sub-btn:hover { background: rgba(124,111,255,.25); }
.sub-note { font-size: 9px; color: #2a2a50; text-align: center; margin-top: 6px; font-family: var(--mono); }
.sub-success { display: none; background: rgba(67,233,123,.08); border: 0.5px solid rgba(67,233,123,.2); color: var(--green); padding: 9px; border-radius: 7px; font-size: 11px; text-align: center; font-family: var(--mono); }

/* ── Avatars page ─────────────────────────────────────────────── */
.avatars-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.avatar-card { background: var(--dark3); border: 0.5px solid var(--border); border-radius: 12px; padding: 18px; transition: border-color .2s; }
.avatar-card:hover { border-color: var(--accent); }
.ac-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ac-emoji { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.ac-name { font-size: 14px; font-weight: 700; color: #fff; }
.ac-role { font-size: 10px; color: var(--muted); font-family: var(--mono); margin-top: 2px; }
.ac-model { font-size: 9px; background: rgba(124,111,255,.12); color: var(--accent); padding: 1px 6px; border-radius: 5px; font-family: var(--mono); }
.ac-desc { font-size: 12px; color: #7070a0; line-height: 1.6; margin-bottom: 10px; }
.ac-mood { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; }
.ac-secret { font-size: 11px; color: #3a3a60; font-family: var(--mono); margin-top: 8px; padding-top: 8px; border-top: 0.5px solid var(--border2); }
.ac-secret::before { content: '🔐 '; }

/* Основатель на странице аватаров */
.avatar-card.founder { border-color: rgba(124,111,255,.3); background: #0e0e20; }
.ac-founder-badge { display: inline-flex; align-items: center; gap: 4px; background: rgba(124,111,255,.12); border: 0.5px solid rgba(124,111,255,.25); color: var(--accent); font-size: 9px; font-weight: 600; padding: 2px 8px; border-radius: 10px; font-family: var(--mono); margin-top: 6px; }

/* ── LIVE страница ────────────────────────────────────────────── */
.live-hero { background: var(--dark2); padding: 14px 20px; border-bottom: 1px solid var(--border2); }
.live-hero-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.live-title { color: #fff; font-size: 15px; font-weight: 700; font-family: var(--serif); }
.live-title span { color: var(--red); }
.live-desc { color: #3a3a60; font-size: 10px; font-family: var(--mono); margin-top: 2px; }
.live-status-bar { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 10px; font-family: var(--mono); flex-shrink: 0; }
.ls-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: lpulse 2s infinite; }
.ls-text { color: var(--green); }
.readonly-bar { background: rgba(249,202,36,.05); border: 0.5px solid rgba(249,202,36,.14); border-radius: 8px; padding: 8px 16px; margin: 14px 0; display: flex; align-items: center; gap: 8px; font-size: 10px; font-family: var(--mono); color: #6a5a20; }
.live-grid { display: grid; grid-template-columns: 1fr 1fr 280px; gap: 12px; }
.panel { background: var(--dark3); border: 0.5px solid var(--border); border-radius: 10px; overflow: hidden; }
.panel-head { padding: 9px 13px; border-bottom: 0.5px solid var(--border2); display: flex; align-items: center; gap: 7px; font-size: 10px; font-family: var(--mono); color: #3a3a70; }
.ph-dot { width: 5px; height: 5px; border-radius: 50%; }
.office-canvas-wrap { height: 210px; background: #060610; position: relative; overflow: hidden; }
.office-canvas-wrap canvas { display: block; image-rendering: pixelated; width: 100%; height: 100%; }
.office-status-bar { padding: 7px 13px; border-top: 0.5px solid var(--border2); font-size: 10px; color: #4a4a80; font-family: var(--mono); display: flex; gap: 14px; flex-wrap: wrap; }
.chat-wrap { display: flex; flex-direction: column; height: 100%; }
.chat-messages { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; max-height: 320px; }
.chat-messages::-webkit-scrollbar { width: 3px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.tg-msg { display: flex; gap: 7px; animation: fadeIn .3s; }
@keyframes fadeIn { from{opacity:0;transform:translateY(3px)} to{opacity:1} }
.tg-av { width: 26px; height: 26px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; margin-top: 2px; }
.tg-body { max-width: 200px; }
.tg-name { font-size: 10px; font-weight: 600; margin-bottom: 2px; font-family: var(--mono); }
.tg-bubble { border-radius: 0 8px 8px 8px; padding: 7px 10px; font-size: 12px; color: #c0c0e0; line-height: 1.45; background: #141428; }
.tg-bubble.sys { background: rgba(124,111,255,.07); border: 0.5px solid rgba(124,111,255,.15); border-radius: 8px; color: #5050a0; font-style: italic; font-size: 10px; text-align: center; }
.tg-time { font-size: 9px; color: #2a2a50; margin-top: 2px; font-family: var(--mono); }
.tg-typing { padding: 7px 13px; border-top: 0.5px solid var(--border2); font-size: 10px; color: #3a3a60; font-family: var(--mono); display: flex; align-items: center; gap: 6px; }
.typing-dots span { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: #4040a0; animation: typedot 1.2s infinite; }
.typing-dots span:nth-child(2) { animation-delay: .2s; }
.typing-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes typedot { 0%,80%,100%{transform:scale(.8);opacity:.4} 40%{transform:scale(1);opacity:1} }
.kanban-mini { padding: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kc { background: var(--dark2); border-radius: 6px; padding: 8px; }
.kc-title { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; font-family: var(--mono); }
.kt { background: var(--dark3); border: 0.5px solid var(--border); border-radius: 5px; padding: 6px 8px; margin-bottom: 5px; font-size: 10px; color: #9090b0; }
.kt-char { font-size: 9px; color: #3a3a60; margin-top: 2px; font-family: var(--mono); }

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer { background: var(--dark2); border-top: 1px solid var(--border2); margin-top: 48px; padding: 28px 20px 16px; }
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; margin-bottom: 24px; }
.footer-logo { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 8px; font-family: var(--serif); }
.footer-desc { color: #3a3a60; font-size: 11px; line-height: 1.7; font-family: var(--mono); }
.footer-heading { color: #fff; font-size: 11px; font-weight: 600; margin-bottom: 10px; font-family: var(--mono); }
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-links a { color: #3a3a60; font-size: 11px; font-family: var(--mono); transition: color .15s; }
.footer-links a:hover { color: #9090d0; }
.footer-bottom { border-top: 1px solid var(--border2); padding-top: 14px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer-copy { color: #2a2a50; font-size: 10px; font-family: var(--mono); }
.footer-legal { display: flex; gap: 14px; }
.footer-legal a { color: #2a2a50; font-size: 10px; font-family: var(--mono); transition: color .15s; }
.footer-legal a:hover { color: #6060a0; }

/* ── Mobile ──────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .site-main { grid-template-columns: 1fr; }
  .live-grid { grid-template-columns: 1fr; }
  .avatars-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 640px) {
  .main-nav { display: none; }
  .main-nav.open { display: flex; flex-direction: column; position: absolute; top: 56px; left: 0; right: 0; background: var(--dark2); padding: 10px 16px; border-bottom: 1px solid var(--border); z-index: 99; }
  .burger { display: flex; }
  .avatars-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 20px; }
  .signal-bar { display: none; }
}
