/* ─────────────────────────────────────────────────────────────────────────
   twinklingStarsWithHueChatlogStyles.css
   TNT | Twinkling Stars with Hue — S.P.A.R.K. Chat Log
   Ghost/purple theme — matches the Henry's Ghost Saga dark palette.
   Adapted from CreativeCrossTraining/creativeCrossTrainingChatlogStyles.css.
──────────────────────────────────────────────────────────────────────────── */

:root {
    --hg-dark:    #0d1120;
    --hg-navy:    #0d1033;
    --hg-purple:  #6a4fcf;
    --hg-teal:    #3a9e8a;
    --hg-ghost:   #c8d8ff;
    --hg-panel:   #f4f5ff;
    --hg-ink:     #0e0b1f;
}

body {
    background: #f0f1f8;
    color: var(--hg-ink);
    font-family: 'Inter', sans-serif;
}

#hero {
    background:
        linear-gradient(135deg, rgba(13,17,32,0.90) 0%, rgba(30,20,80,0.76) 100%),
        url('../images/twinklingStars-background.gif') center / cover no-repeat;
    background-color: var(--hg-dark);
    color: #fff;
    min-height: 230px;
    padding: 3.4rem 1rem;
}

/* ── Spark bar ─────────────────────────────────────────────────────────── */
.back-bar {
    align-items: center;
    background: var(--hg-navy);
    border-bottom: 2px solid var(--hg-purple);
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    justify-content: space-between;
    padding: 0.6rem 1.2rem;
}

.back-bar-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.back-bar a {
    color: var(--hg-ghost);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
}

.back-bar a:hover {
    color: #fff;
    text-decoration: underline;
}

.back-bar span {
    color: rgba(255,255,255,0.38);
    font-size: 0.8rem;
}

/* ── Log container ─────────────────────────────────────────────────────── */
.log-container {
    margin: 0 auto;
    max-width: 900px;
    padding: 0 1rem 4rem;
}

/* ── Hero text ─────────────────────────────────────────────────────────── */
.hero-eyebrow {
    color: rgba(255,255,255,0.58);
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 0.65rem;
    text-transform: uppercase;
}

.hero-title {
    color: var(--hg-ghost);
    font-family: 'Boogaloo', cursive;
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    line-height: 1.08;
    margin-bottom: 0.75rem;
}

.hero-subtitle {
    color: rgba(255,255,255,0.72);
    font-size: clamp(0.92rem, 2vw, 1.05rem);
    line-height: 1.65;
    margin: 0;
}

/* ── Session divider ───────────────────────────────────────────────────── */
.log-divider {
    color: #5a4fa0;
    font-size: 0.78rem;
    letter-spacing: 2px;
    margin: 2.2rem 0 0.7rem;
    text-align: center;
    text-transform: uppercase;
}

.log-divider::before,
.log-divider::after {
    background: rgba(106,79,207,0.35);
    content: '';
    display: inline-block;
    height: 1px;
    margin: 0 0.7rem;
    vertical-align: middle;
    width: 52px;
}

/* ── Info, decision, and critique boxes ────────────────────────────────── */
.aside-box,
.decision-box,
.critique-box {
    border-radius: 0 8px 8px 0;
    font-size: 0.9rem;
    line-height: 1.65;
    margin: 1rem 0;
    padding: 0.95rem 1.15rem;
}

.aside-box {
    background: #fff;
    border: 1px solid rgba(30,20,80,0.12);
    border-left: 5px solid var(--hg-purple);
}

.decision-box {
    background: var(--hg-panel);
    border-left: 5px solid var(--hg-teal);
}

.critique-box {
    background: rgba(106,79,207,0.06);
    border: 1px solid rgba(106,79,207,0.18);
    border-left: 5px solid var(--hg-purple);
}

.box-label,
.decision-label,
.critique-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
}

.box-label     { color: var(--hg-purple); }
.decision-label { color: #1a6a5a; }
.critique-label { color: var(--hg-purple); }

/* ── SPARK banners ─────────────────────────────────────────────────────── */
.spark-banner {
    align-items: flex-start;
    border-radius: 10px;
    display: flex;
    font-size: 0.9rem;
    gap: 0.9rem;
    margin: 1.6rem 0 0.7rem;
    padding: 0.9rem 1.1rem;
}

.spark-banner .spark-icon {
    flex-shrink: 0;
    font-size: 1.55rem;
    line-height: 1.2;
}

.spark-banner strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.spark-s { background: rgba(106,79,207,0.08); border-left: 5px solid var(--hg-purple); }
.spark-p { background: rgba(58,158,138,0.08); border-left: 5px solid var(--hg-teal); }
.spark-a { background: rgba(200,216,255,0.20); border-left: 5px solid var(--hg-ghost); border-color: #8fa0d0; }
.spark-r { background: rgba(58,158,138,0.06); border-left: 5px solid var(--hg-teal); }
.spark-k { background: rgba(106,79,207,0.10); border-left: 5px solid var(--hg-purple); }

/* ── Chat bubbles ──────────────────────────────────────────────────────── */
.chat-turn {
    margin: 0.5rem 0 1.2rem;
}

.chat-speaker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
}

.chat-speaker.user {
    color: #4a2090;
    text-align: right;
}

.chat-speaker.copilot {
    color: #1a6a5a;
}

.chat-bubble {
    border-radius: 12px;
    display: inline-block;
    font-size: 0.92rem;
    line-height: 1.6;
    max-width: 92%;
    padding: 0.75rem 1rem;
}

.bubble-user-wrap {
    text-align: right;
}

.bubble-user-wrap .chat-bubble {
    text-align: left;
}

.bubble-user {
    background: #eeeaff;
    border: 1px solid #c8b8f0;
    border-bottom-right-radius: 3px;
    color: #1a0f3a;
}

.bubble-copilot {
    background: #e8f7f3;
    border: 1px solid #a0d8c8;
    border-bottom-left-radius: 3px;
    color: #0e2a22;
}

.chat-bubble p:last-child,
.spark-banner p:last-child,
.aside-box p:last-child,
.decision-box p:last-child,
.critique-box p:last-child {
    margin-bottom: 0;
}

/* ── Inline code ───────────────────────────────────────────────────────── */
code {
    background: rgba(106,79,207,0.10);
    border-radius: 3px;
    color: #4a2090;
    font-size: 0.88em;
    padding: 1px 5px;
}

/* ── Code block ────────────────────────────────────────────────────────── */
.code-block {
    background: #1a1433;
    border-radius: 8px;
    color: #c9d1d9;
    font-family: 'Source Code Pro', 'Noto Sans Mono', monospace;
    font-size: 0.82rem;
    line-height: 1.6;
    margin: 0.5rem 0 0.75rem;
    overflow-x: auto;
    padding: 0.8rem 1rem;
}

.code-block .kw  { color: #ff7b72; font-weight: 600; }
.code-block .cm  { color: #8b949e; font-style: italic; }
.code-block .st  { color: #a5d6ff; }
.code-block .nm  { color: #79c0ff; }

/* ── File table ────────────────────────────────────────────────────────── */
.file-table {
    font-size: 0.85rem;
}

.file-table td:first-child {
    font-family: 'Noto Sans Mono', monospace;
    font-size: 0.8rem;
}

/* ── Footer ────────────────────────────────────────────────────────────── */
footer {
    background: var(--hg-dark);
    color: rgba(255,255,255,0.45);
    font-size: 0.82rem;
    padding: 2rem 1rem;
    text-align: center;
}

footer .footer-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    justify-content: center;
    margin-bottom: 1rem;
}

footer .footer-icons img { height: 28px; opacity: 0.55; }
footer .footer-icons img:hover { opacity: 0.9; }
footer .footer-text { margin-bottom: 0.25rem; }

@media (max-width: 575px) {
    .back-bar,
    .back-bar-links {
        justify-content: center;
        text-align: center;
    }

    .log-divider::before,
    .log-divider::after {
        width: 26px;
    }
}
