/* ═══════════════════════════════════════════════════
   SIGNALPULSE — wall.css  v2
   Full-bleed media · frosted glass footer
═══════════════════════════════════════════════════ */

#screen-wall { background: #03050d; z-index: 500; overflow: hidden; }

/* ── TOPBAR ── */
.wall-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; height: 44px;
  background: rgba(3,5,13,.92); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(168,85,247,.08); flex-shrink: 0; z-index: 10;
}
.wall-logo { font-family: var(--fh); font-size: .9rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; display: flex; align-items: center; gap: 7px; }
.wall-logo-hex { width: 24px; height: 28px; position: relative; display: flex; align-items: center; justify-content: center; }
.wall-logo-hex svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.wall-logo-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px var(--accent); animation: cBlink .8s ease-in-out infinite; z-index: 2; }
.wall-kwtags { display: flex; gap: 4px; overflow: hidden; max-width: 500px; }
.wall-kwtag { font-size: 9px; padding: 2px 8px; border-radius: 10px; background: rgba(168,85,247,.07); border: 1px solid rgba(45,212,255,0.15); color: var(--accent); font-family: var(--fm); white-space: nowrap; letter-spacing: .06em; }
.wall-meta { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.wall-clock { font-family: var(--fm); font-size: 12px; color: var(--sub); }
.wall-postcount { font-family: var(--fm); font-size: 10px; color: var(--sub); }
.wall-off-btn {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--fh); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3);
  color: #f87171; border-radius: var(--rs); padding: 4px 12px; cursor: pointer; transition: all .15s;
}
.wall-off-btn:hover { background: rgba(239,68,68,.2); border-color: var(--red); color: #fff; }
.wall-off-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--red); box-shadow: 0 0 6px var(--red); }

/* ── GRID ── */
.wall-grid { flex: 1; display: grid; gap: 6px; padding: 6px; overflow: hidden; }
.wall-slot { position: relative; overflow: hidden; border-radius: 10px; background: var(--bg2); border: 1px solid var(--border); }

/* ── WALL CARD — full-bleed media, frosted footer ── */
.wcard {
  position: absolute; inset: 0; border-radius: 10px; overflow: hidden;
  cursor: pointer; background: var(--bg2);
}

/* Platform-color hairline at very top */
.wcard::before {
  content: ''; position: absolute; left: 0; top: 0; right: 0; height: 2px;
  background: var(--pc, var(--accent));
  z-index: 4;
}

/* Card enter/exit animations */
.wcard.enter { animation: wcIn .55s cubic-bezier(.16,1,.3,1) forwards; }
.wcard.exit  { animation: wcOut .35s ease forwards; pointer-events: none; }
@keyframes wcIn  { from{opacity:0;transform:translateY(14px) scale(.97);} to{opacity:1;transform:none;} }
@keyframes wcOut { from{opacity:1;} to{opacity:0;transform:scale(1.02);} }

/* YouTube card */
.wcard.yt-card { cursor: default; background: #000; }
.wcard.yt-card iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }

/* ── MEDIA (full bleed) ── */
.wcard-media-full {
  position: absolute; inset: 0; z-index: 0;
}
.wcard-media-full img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.wcard-media-full::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(3,5,13,0.92) 0%, rgba(3,5,13,0.3) 50%, rgba(3,5,13,0.1) 100%);
}

/* ── FROSTED GLASS FOOTER ── */
.wcard-footer-glass {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 3;
  padding: 12px 14px 12px 16px;
  background: rgba(3,5,13,0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex; flex-direction: column; gap: 7px;
}

.wcard-header { display: flex; align-items: center; gap: 7px; }
.wcard-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--bg3); flex-shrink: 0; border: 1.5px solid rgba(255,255,255,.15); }
.wcard-uinfo { flex: 1; min-width: 0; }
.wcard-name   { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wcard-handle { font-size: 10px; color: rgba(255,255,255,.5); font-family: var(--fm); }
.wcard-badge  { font-size: 9px; font-weight: 700; padding: 2px 7px; border-radius: 4px; flex-shrink: 0; letter-spacing: .06em; text-transform: uppercase; }

/* Platform icon glow next to badge */
.wcard-badge.wb-bsky { background: rgba(0,133,255,.2); color: #60a5fa; box-shadow: 0 0 8px rgba(0,133,255,.3); }
.wcard-badge.wb-redd { background: rgba(255,69,0,.2);  color: #fb923c; box-shadow: 0 0 8px rgba(255,69,0,.3); }
.wcard-badge.wb-yt   { background: rgba(255,0,0,.2);   color: #f87171; box-shadow: 0 0 8px rgba(255,0,0,.3); }

.wcard-text { font-size: 13px; line-height: 1.5; color: rgba(238,240,255,.85); overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.wcard-text .ht { color: var(--accent); font-weight: 600; }

.wcard-stats { display: flex; align-items: center; gap: 10px; }
.wcard-stat  { font-size: 10px; color: rgba(255,255,255,.4); font-family: var(--fm); }
.wcard-time  { margin-left: auto; font-size: 9px; color: rgba(255,255,255,.25); font-family: var(--fm); }

/* No-media card (text-only, no full-bleed) */
.wcard-body-plain {
  position: absolute; inset: 0; z-index: 1;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 9px;
}

/* ── DWELL BAR — hairline at top edge ── */
.dwell-bar {
  position: absolute; top: 2px; left: 0; right: 0; height: 2px; z-index: 5; overflow: hidden;
}
.dwell-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-lo), var(--accent-hi));
  transform-origin: left; transform: scaleX(1);
}

/* ── YT ERROR OVERLAY ── */
.yt-error-overlay {
  display: none; position: absolute; inset: 0; background: var(--bg2);
  flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center; padding: 20px;
}
.yt-error-overlay.show { display: flex; }

/* ── TICKER ── */
.wall-ticker { flex-shrink: 0; background: rgba(0,0,0,.7); border-top: 1px solid var(--border); height: 32px; overflow: hidden; display: flex; align-items: center; }
.ticker-track { display: flex; gap: 80px; animation: tick 60s linear infinite; white-space: nowrap; }
.ticker-item { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--sub); flex-shrink: 0; }
.ticker-item strong { color: var(--text); font-size: 12px; }
.ticker-sep { color: var(--dim); }
@keyframes tick { from{transform:translateX(0);} to{transform:translateX(-50%);} }

/* ── LOADING ── */
.wall-loading { position: absolute; inset: 0; background: #03050d; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; z-index: 50; transition: opacity .5s; }
.wall-loading.gone { opacity: 0; pointer-events: none; }
.loader { width: 32px; height: 32px; border: 2px solid var(--dim); border-top-color: var(--accent); border-radius: 50%; animation: loaderSpin .7s linear infinite; }
@keyframes loaderSpin { to{transform:rotate(360deg);} }
.loader-txt { font-family: var(--fm); font-size: 11px; color: var(--sub); letter-spacing: .08em; }

/* ── LAYOUTS ── */
.layout-2x2       { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.layout-3x3       { grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr 1fr 1fr; }
.layout-1x3       { grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr; }
.layout-spotlight { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.layout-single    { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.layout-spotlight .wall-slot:first-child { grid-row: 1/3; }
