/* CoachJeffSays — inherits the PandaChess look: deep slate, blue glow,
   soft panels. Dark-only on purpose (matches the family). */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #1a1d24; --panel: #13151a; --border: #2a2e38; --border2: #343945;
  --text: #e2e8f0; --dim: #94a3b8; --blue: #3b82f6; --indigo: #818cf8;
  --green: #34d399; --red: #f87171;
}
body {
  background: radial-gradient(1200px 600px at 50% -200px, #232838 0%, var(--bg) 60%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}
.wrap { max-width: 860px; margin: 0 auto; padding: 24px 16px 80px; }

header.app { text-align: center; margin-bottom: 18px; }
header.app h1 {
  font-size: 2rem; font-weight: 800; letter-spacing: -0.02em;
  text-shadow: 0 0 24px rgba(59, 130, 246, 0.35);
}
/* Slow shimmer sweep across the title — subtle, not a disco. */
header.app h1 .say {
  background: linear-gradient(100deg, var(--blue) 20%, #93c5fd 40%, var(--blue) 60%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 5s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
#cjs-marquee-btn { margin-top: 10px; }
header.app h1 .say { color: var(--blue); }
header.app p.tag { color: var(--dim); font-size: 0.9rem; margin-top: 4px; }
#cjs-cloudbar { margin-top: 10px; font-size: 0.8rem; color: var(--dim); }

.linkish { background: none; border: none; color: var(--blue); cursor: pointer; font-size: inherit; text-decoration: underline; }
.dim { color: var(--dim); } .ok-text { color: var(--green); font-weight: 600; } .err-text { color: var(--red); font-weight: 600; }
.mono { font-family: ui-monospace, Menlo, monospace; }

nav.tabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 18px; }
nav.tabs button {
  background: var(--panel); border: 1px solid var(--border); color: var(--dim);
  padding: 8px 16px; border-radius: 10px; font-weight: 700; font-size: 0.9rem; cursor: pointer;
  transition: all .15s;
}
nav.tabs button.active { color: #fff; border-color: var(--blue); box-shadow: 0 0 14px rgba(59,130,246,.35); }
.hidden { display: none; }

.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin-bottom: 16px; }
.panel h3 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); margin: 14px 0 8px; }
.panel h3:first-child { margin-top: 0; }

textarea, input[type="text"] {
  width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); padding: 10px 12px; font-size: 0.95rem; font-family: inherit; outline: none;
}
textarea:focus, input[type="text"]:focus { border-color: var(--blue); }
textarea { min-height: 72px; resize: vertical; }
.formrow { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.formrow input { flex: 1; min-width: 140px; }

button.primary {
  background: var(--blue); color: #fff; border: none; border-radius: 10px;
  padding: 10px 18px; font-weight: 700; font-size: 0.9rem; cursor: pointer;
}
button.primary:hover { filter: brightness(1.1); }
button.ghost {
  background: var(--bg); color: var(--text); border: 1px solid var(--border2); border-radius: 10px;
  padding: 9px 14px; font-weight: 600; font-size: 0.85rem; cursor: pointer;
}
button.ghost:hover { border-color: var(--blue); }

.quote { border-left: 3px solid var(--border2); padding: 10px 12px; margin-bottom: 10px; border-radius: 0 10px 10px 0; background: rgba(255,255,255,0.02); position: relative; }
.quote.pinned { border-left-color: var(--indigo); background: rgba(129,140,248,0.06); }
.qtext { font-size: 1rem; line-height: 1.45; }
.qmeta { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 0.78rem; color: var(--dim); flex-wrap: wrap; }
.qmeta .who { font-style: italic; }
.chips { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 0.7rem; padding: 2px 8px; border-radius: 999px; background: rgba(59,130,246,0.15); color: #93c5fd; }
.chip.src { background: rgba(148,163,184,0.15); color: var(--dim); }
.qacts { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; opacity: 0.35; transition: opacity .15s; }
.quote:hover .qacts { opacity: 1; }
.qacts button { background: none; border: none; color: var(--dim); cursor: pointer; font-size: 0.95rem; padding: 2px 4px; }
.qacts button:hover { color: #fff; }

.empty { text-align: center; padding: 28px 0; font-style: italic; }

.cloudbox { display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: center; align-items: center; text-align: center; padding: 10px 0 16px; border-bottom: 1px solid var(--border); margin-bottom: 14px; min-height: 5rem; }
.cw { cursor: pointer; padding: 0 4px; border-radius: 6px; line-height: 1.2; }
.cw:hover { background: rgba(255,255,255,0.08); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
.stat { background: var(--bg); border-radius: 10px; padding: 10px 0; text-align: center; }
.stat .v { font-size: 1.4rem; font-weight: 800; }
.stat .l { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--dim); margin-top: 2px; }
.sent { display: flex; align-items: baseline; gap: 10px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.sent .cnt { flex-shrink: 0; font-weight: 800; color: var(--indigo); font-size: 0.85rem; min-width: 2.2em; text-align: right; }
.sent .stext { flex: 1; font-size: 0.92rem; }
.sent button { background: none; border: 1px solid var(--border2); color: var(--dim); border-radius: 8px; cursor: pointer; padding: 1px 8px; font-size: 0.9rem; }
.sent button:hover { color: #fff; border-color: var(--blue); }

.iorow { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.hint { font-size: 0.78rem; color: var(--dim); line-height: 1.5; margin-top: 4px; }

#cjs-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: #0f172a; border: 1px solid var(--blue); color: var(--text);
  padding: 10px 20px; border-radius: 12px; font-size: 0.9rem; font-weight: 600;
  transition: transform .25s; z-index: 50; box-shadow: 0 8px 30px rgba(0,0,0,.5); max-width: 90vw;
}
#cjs-toast.show { transform: translateX(-50%) translateY(0); }
#cjs-toast.err { border-color: var(--red); }

/* ---- Quote of the Day banner ---- */
#cjs-qotd {
  border: 1px solid rgba(129, 140, 248, 0.4); border-radius: 14px;
  padding: 16px 20px; margin-bottom: 16px; text-align: center;
  background: linear-gradient(135deg, rgba(59,130,246,0.10), rgba(139,92,246,0.10));
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.15) inset, 0 0 18px rgba(59,130,246,0.12);
  animation: rise .4s ease-out;
}
.qotd-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--indigo); font-weight: 800; margin-bottom: 6px; }
.qotd-text { font-size: 1.1rem; line-height: 1.5; font-weight: 600; }
.qotd-who { font-size: 0.8rem; color: var(--dim); font-style: italic; margin-top: 6px; }

/* ---- Card entrance + hover lift ---- */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.quote { animation: rise .3s ease-out both; transition: transform .15s, box-shadow .15s, border-color .15s; }
.quote:hover { transform: translateX(3px); border-left-color: var(--blue); box-shadow: 0 4px 18px rgba(0,0,0,0.35); }
.quote:nth-child(2) { animation-delay: .04s; } .quote:nth-child(3) { animation-delay: .08s; }
.quote:nth-child(4) { animation-delay: .12s; } .quote:nth-child(5) { animation-delay: .16s; }

/* ---- 📺 Marquee mode ---- */
#cjs-marquee {
  position: fixed; inset: 0; z-index: 100; cursor: pointer;
  background: radial-gradient(1400px 800px at 50% 30%, #1c2233 0%, #0b0d12 70%);
  display: flex; align-items: center; justify-content: center;
}
#cjs-marquee.hidden { display: none; }
body.marquee-on { overflow: hidden; }
#cjs-marquee-stage { width: 100%; max-width: 1100px; padding: 5vh 6vw; }
.mq-card { text-align: center; animation: mqIn .6s ease-out both; position: relative; }
@keyframes mqIn { from { opacity: 0; transform: scale(0.96) translateY(12px); } to { opacity: 1; transform: none; } }
.mq-mark {
  font-size: 7rem; line-height: 0.6; color: var(--indigo); opacity: 0.35;
  font-family: Georgia, 'Times New Roman', serif; margin-bottom: 1rem;
}
.mq-text {
  font-family: Georgia, 'Times New Roman', serif; font-weight: 600;
  line-height: 1.35; letter-spacing: -0.01em;
  text-shadow: 0 0 40px rgba(59, 130, 246, 0.25);
}
.mq-who { margin-top: 2rem; font-size: 1.3rem; color: var(--blue); font-style: italic; font-weight: 600; }
.mq-when { color: var(--dim); font-size: 1rem; }
.mq-count { position: absolute; bottom: -3.2rem; left: 50%; transform: translateX(-50%); font-size: 0.85rem; color: var(--dim); opacity: 0.6; }
.mq-close {
  position: absolute; top: 18px; right: 22px; z-index: 101;
  background: none; border: 1px solid var(--border2); color: var(--dim);
  border-radius: 10px; font-size: 1.1rem; padding: 6px 12px; cursor: pointer;
}
.mq-close:hover { color: #fff; border-color: var(--blue); }
.mq-hint {
  position: absolute; bottom: 16px; left: 0; right: 0; text-align: center;
  font-size: 0.78rem; color: var(--dim); opacity: 0.5;
}

@media (max-width: 560px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  header.app h1 { font-size: 1.5rem; }
}
