/* ─────────────────────────────────────────────────────────────────────────
   henrysGhost1Styles.css
   TNT | Henry's Ghost Saga — p5.js Showcase (henrysGhost1p5js.html)
   Dark purple / ghost / spooky theme throughout.
──────────────────────────────────────────────────────────────────────────── */

:root {
    --hg-purple:  #7c3aed;   /* primary ghost purple */
    --hg-violet:  #a855f7;   /* bright violet accent */
    --hg-ghost:   #c4b5fd;   /* pale ghost lavender */
    --hg-teal:    #4dd9e8;   /* ghostly teal highlight */
    --hg-dark:    #0d0a14;   /* near-black cool background */
    --hg-navy:    #08060f;   /* spark bar / deep sections */
    --hg-mid:     #130e1e;   /* card backgrounds */
    --hg-border:  rgba(124,58,237,0.28);

    /* ── Greenbar paper — dark purple / ghost theme ────────────────── */
    --gb-row-a:   #0e0a1a;   /* odd rows */
    --gb-row-b:   #140f22;   /* even rows */
    --gb-num:     #5b3a8a;   /* line-number gutter */
    --gb-text:    #d4c8f0;   /* default code text */

    /* JS syntax — ghost palette */
    --hg-keyword: #c084fc;
    --hg-comment: #6b5c8a;
    --hg-string:  #a5f3fc;
    --hg-number:  #f0abfc;
}

body {
    background: var(--hg-dark);
    color: rgba(255, 255, 255, 0.85);
}

/* ── Spark bar ─────────────────────────────────────────────────────────── */
.spark-bar {
    background: var(--hg-navy);
    padding: 0.52rem 1.2rem;
    display: flex; align-items: center; flex-wrap: wrap; gap: 1.2rem;
    border-bottom: 2px solid var(--hg-purple);
    font-size: 0.88rem;
}
.spark-links { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.spark-links a { color: var(--hg-ghost); font-weight: 700; text-decoration: none; }
.spark-links a:hover { color: #fff; text-decoration: underline; }
.spark-bar > span { color: rgba(255,255,255,0.35); font-size: 0.80rem; margin-left: auto; }

/* ── Hero ──────────────────────────────────────────────────────────────── */
#hero {
    min-height: 38vh;
    background:
        linear-gradient(to bottom, rgba(13,10,20,0.52) 0%, rgba(30,15,50,0.32) 100%),
        url('../images/multipleGhosts-background.gif') center / cover no-repeat,
        var(--hg-dark);
    padding: 4.5rem 1rem 3.5rem;
    color: #fff;
    text-align: center;
}
.hero-content { max-width: 780px; margin: 0 auto; }
.hero-eyebrow {
    font-size: 0.72rem; letter-spacing: 3px; text-transform: uppercase;
    color: rgba(255,255,255,0.45); display: block; margin-bottom: 0.65rem;
}
.hero-title {
    font-family: 'Boogaloo', cursive;
    font-size: clamp(2rem, 5.5vw, 3.4rem);
    line-height: 1.12; margin-bottom: 0.75rem;
    color: var(--hg-ghost);
    text-shadow: 0 0 32px rgba(168,85,247,0.55);
}
.hero-subtitle {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: rgba(255,255,255,0.68);
    line-height: 1.68; max-width: 640px; margin: 0 auto;
}

/* ── Main section ──────────────────────────────────────────────────────── */
#mainSection {
    background: linear-gradient(180deg, #0d0a14 0%, #080610 100%);
    padding: 3rem 0 5rem;
}

/* ── Intro card ────────────────────────────────────────────────────────── */
.intro-card {
    background: var(--hg-mid);
    border: 1px solid var(--hg-border);
    border-top: 4px solid var(--hg-purple);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
}
.intro-card h2 {
    font-family: 'Boogaloo', cursive;
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    color: var(--hg-ghost); margin-bottom: 0.4rem;
}
.intro-card p {
    font-size: 0.92rem; color: rgba(255,255,255,0.72);
    line-height: 1.75; margin-bottom: 0.5rem;
}

.novice-badge {
    display: inline-block;
    background: rgba(124,58,237,0.18);
    border: 1px solid rgba(124,58,237,0.45);
    color: var(--hg-violet);
    font-size: 0.70rem; font-weight: 700; letter-spacing: 1.5px;
    text-transform: uppercase; border-radius: 4px;
    padding: 2px 8px; margin-bottom: 0.6rem;
}

.tech-note {
    background: rgba(124,58,237,0.07);
    border-left: 3px solid var(--hg-purple);
    border-radius: 0 8px 8px 0;
    padding: 0.65rem 1rem; margin-top: 0.75rem;
    font-size: 0.87rem; color: rgba(255,255,255,0.68); line-height: 1.65;
}
.tech-note strong { color: var(--hg-ghost); }

/* ── Showcase card ─────────────────────────────────────────────────────── */
.showcase-card {
    background: #0e0a1a;
    border: 1px solid var(--hg-border);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

/* ── Code terminal header ──────────────────────────────────────────────── */
.code-terminal-header {
    display: flex; align-items: center; gap: 0.6rem;
    background: #180e2a; padding: 0.55rem 1rem;
    border-bottom: 1px solid rgba(124,58,237,0.22);
}
.terminal-dots { display: flex; gap: 6px; }
.td { width: 12px; height: 12px; border-radius: 50%; }
.td-red    { background: #ff5f57; }
.td-yellow { background: #febc2e; }
.td-green  { background: #28c840; }
.terminal-filename {
    font-family: 'Source Code Pro', monospace; font-size: 0.78rem;
    color: rgba(255,255,255,0.55); flex: 1;
}
.terminal-tag {
    font-size: 0.70rem; color: rgba(168,85,247,0.85);
    background: rgba(168,85,247,0.14); padding: 2px 8px; border-radius: 4px;
}
.copy-btn {
    margin-left: auto;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15); border-radius: 5px;
    color: #ccc; font-size: 0.76rem; padding: 3px 10px; cursor: pointer;
    transition: all 0.2s; display: flex; align-items: center; gap: 5px;
}
.copy-btn:hover {
    background: rgba(124,58,237,0.22);
    color: var(--hg-ghost);
    border-color: rgba(124,58,237,0.55);
}

/* ── Greenbar code paper — dark purple / ghost theme ───────────────────── */
.code-paper {
    background: var(--gb-row-a);
    overflow-y: auto;
    max-height: 560px;
    font-family: 'Source Code Pro', monospace;
    font-size: 0.78rem;
    line-height: 1.65;
    counter-reset: lineno;
}
.code-paper ol { list-style: none; margin: 0; padding: 0; }
.code-paper li {
    display: flex; counter-increment: lineno;
    padding: 0 1rem;
}
.code-paper li:nth-child(even) { background: var(--gb-row-b); }
.code-paper li::before {
    content: counter(lineno);
    min-width: 2.8rem; color: var(--gb-num); text-align: right;
    padding-right: 1rem; user-select: none; flex-shrink: 0;
}
.code-paper code { color: var(--gb-text); white-space: pre; }

/* Syntax highlighting — ghost palette */
.hg-keyword { color: var(--hg-keyword); font-weight: 700; }
.hg-comment  { color: var(--hg-comment); font-style: italic; }
.hg-string   { color: var(--hg-string); }
.hg-number   { color: var(--hg-number); }

/* ── Canvas panel ──────────────────────────────────────────────────────── */
.canvas-panel {
    background: #0a0810;
    padding: 1rem;
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; height: 100%; min-height: 420px;
    border-left: 1px solid var(--hg-border);
}
.canvas-label {
    font-size: 0.72rem; font-weight: 700; letter-spacing: 2px;
    text-transform: uppercase; color: var(--hg-violet);
    margin-bottom: 0.6rem; align-self: flex-start;
}
#ghostCanvas {
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(124,58,237,0.35);
    box-shadow: 0 0 28px rgba(124,58,237,0.22);
    width: 100%;
}
#ghostCanvas canvas {
    width: 100% !important;
    height: auto !important;
    display: block;
}
.canvas-caption {
    font-size: 0.76rem; color: rgba(255,255,255,0.38);
    text-align: center; margin-top: 0.65rem; line-height: 1.5;
}
.canvas-mobile-warning {
    display: none; text-align: center;
    color: var(--hg-ghost); font-weight: 700; padding: 1rem 0; margin: 0;
}
@media (max-width: 575px) {
    .canvas-mobile-warning { display: block; }
    .canvas-panel { min-height: 0; }
}

/* ── Cross-training card ───────────────────────────────────────────────── */
.crosstraining-card {
    background: rgba(124,58,237,0.07);
    border: 1.5px solid rgba(124,58,237,0.28);
    border-radius: 12px;
    padding: 1.4rem 1.75rem;
    margin-top: 1.5rem;
    color: rgba(255,255,255,0.80);
}
.crosstraining-card h3 {
    font-family: 'Boogaloo', cursive; font-size: 1.15rem;
    color: var(--hg-ghost); margin-bottom: 0.6rem;
}
.crosstraining-card p { font-size: 0.9rem; line-height: 1.68; margin-bottom: 0.5rem; }
.crosstraining-card ul li { font-size: 0.875rem; margin-bottom: 0.35rem; }
.crosstraining-card code {
    background: rgba(124,58,237,0.16); padding: 1px 5px; border-radius: 3px;
    font-family: 'Source Code Pro', monospace; font-size: 0.85em;
    color: var(--hg-ghost);
}
.crosstraining-card a { color: var(--hg-teal); font-weight: 700; }
.crosstraining-card a:hover { color: var(--hg-ghost); }

/* ── Navigation footer ─────────────────────────────────────────────────── */
#pageNav {
    background: #0c0918;
    padding: 2rem 0;
    border-top: 1px solid rgba(124,58,237,0.20);
}
.nav-links {
    display: flex; align-items: center;
    justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.nav-btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.55rem 1.4rem; border-radius: 50px;
    font-size: 0.875rem; font-weight: 600; text-decoration: none;
    transition: background 0.2s, transform 0.15s;
}
.nav-btn:hover { transform: translateY(-1px); text-decoration: none; }
.nav-btn-back { border: 1.5px solid rgba(255,255,255,0.22); color: rgba(255,255,255,0.70); }
.nav-btn-back:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-btn-ct   { background: var(--hg-purple); color: #fff; border: none; }
.nav-btn-ct:hover { background: var(--hg-violet); color: #fff; }

/* ── Footer ────────────────────────────────────────────────────────────── */
footer {
    background: var(--hg-navy);
    border-top: 1px solid rgba(124,58,237,0.18);
    padding: 2rem 0 1.5rem;
    text-align: center;
}
.footer-icons {
    display: flex; justify-content: center;
    flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem;
}
.footer-icons a img { height: 28px; opacity: 0.55; transition: opacity 0.2s; }
.footer-icons a:hover img { opacity: 0.9; }
.footer-text {
    font-size: 0.78rem; color: rgba(255,255,255,0.35); margin-bottom: 0.25rem;
}
