/* SPOREFACE — Studio Console in 2005 MySpace / iCarly Splashface mode.
   Loaded only when body.theme-myspace. Layered on top of console.css —
   higher selector specificity beats the base styles cleanly without !important
   hammering most rules.
   "i make movies on my computer." */

body.theme-myspace {
    font-family: 'Comic Sans MS', 'Trebuchet MS', cursive, sans-serif;
    background: #ff99ee;
    background-image:
        repeating-linear-gradient(45deg,
            rgba(255, 255, 255, 0.18) 0,
            rgba(255, 255, 255, 0.18) 2px,
            transparent 2px,
            transparent 14px),
        radial-gradient(ellipse at top, #ffccff 0%, #99ccff 60%, #66ccff 100%);
    background-attachment: fixed;
    color: #1a0033;
    font-size: 13px;
}

/* ─── TOPBAR ───────────────────────────────────────────────── */
body.theme-myspace .topbar {
    background: linear-gradient(90deg, #ff33aa 0%, #aa33ff 50%, #3399ff 100%);
    border-bottom: 6px ridge #ffff00;
    color: #ffff00;
    box-shadow: 0 4px 0 #000;
}

body.theme-myspace .topbar h1 {
    color: #ffff00;
    font-family: 'Impact', 'Arial Black', sans-serif;
    text-shadow:
        2px 2px 0 #000,
        -1px -1px 0 #ff66ff,
        0 0 8px #ff66ff;
    letter-spacing: 0.15em;
}
body.theme-myspace .topbar h1::before { content: "✦ "; }
body.theme-myspace .topbar h1::after { content: " ✦"; }

body.theme-myspace .pill {
    background: #ffff66;
    border: 2px outset #ff66cc;
    color: #aa00aa;
    border-radius: 0;
    font-weight: bold;
    text-transform: lowercase;
    font-family: 'Comic Sans MS', cursive;
}
body.theme-myspace .pill-clean { background: #66ff66; color: #003300; }
body.theme-myspace .pill-dirty { background: #ff6666; color: #330000; }

/* ─── HERO PROFILE PANEL ──────────────────────────────────── */
body.theme-myspace .myspace-hero {
    display: grid;
    grid-template-columns: 200px 1fr 280px;
    gap: 18px;
    margin: 14px 28px 0 28px;
    padding: 16px;
    background: #ffffee;
    border: 4px ridge #aa33ff;
    box-shadow: 6px 6px 0 #ff66cc;
    max-width: 1800px;
    margin-left: auto;
    margin-right: auto;
}

body.theme-myspace .myspace-pfp {
    border: 4px solid #000;
    box-shadow: 4px 4px 0 #ff33aa, 8px 8px 0 #ffff00;
    background: #fff;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
body.theme-myspace .myspace-pfp img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
}
body.theme-myspace .myspace-pfp-label {
    font-family: 'Impact', sans-serif;
    color: #aa00aa;
    text-align: center;
    font-size: 14px;
    margin-top: 6px;
    letter-spacing: 0.1em;
}

body.theme-myspace .myspace-bio h2 {
    font-family: 'Impact', 'Arial Black', sans-serif;
    color: #aa00aa;
    font-size: 22px;
    text-shadow: 2px 2px 0 #ffff66;
    margin-bottom: 4px;
    letter-spacing: 0.05em;
}
body.theme-myspace .myspace-bio .tagline {
    color: #6633ff;
    font-style: italic;
    margin-bottom: 10px;
}
body.theme-myspace .myspace-bio .about {
    background: #ffffcc;
    border: 2px dashed #ff66cc;
    padding: 8px 12px;
    margin: 8px 0;
    color: #1a0033;
    font-size: 13px;
}
body.theme-myspace .myspace-bio .crew-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

body.theme-myspace .myspace-stats {
    display: grid;
    gap: 6px;
    align-content: start;
}
body.theme-myspace .myspace-stat {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 6px;
    background: #ffeeff;
    border: 2px solid #ff66cc;
    padding: 4px 8px;
    font-size: 12px;
}
body.theme-myspace .myspace-stat-label {
    color: #aa00aa;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.05em;
    align-self: center;
}
body.theme-myspace .myspace-stat-value {
    color: #1a0033;
    font-weight: bold;
}

/* Hit counter — black box, green pixel font */
body.theme-myspace .hit-counter {
    background: #000;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    border: 3px inset #444;
    padding: 4px 10px;
    letter-spacing: 0.25em;
    display: inline-block;
}

/* Online status — blinking green dot */
body.theme-myspace .status-online {
    background: #66ff66;
    color: #003300;
    border: 2px outset #009900;
    padding: 2px 8px;
    font-weight: bold;
    display: inline-block;
}
body.theme-myspace .status-online::before {
    content: "●  ";
    color: #00ff00;
    animation: spore-blink 1.2s steps(2, end) infinite;
}

@keyframes spore-blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0.2; }
}

/* Marquee strip below the topbar */
body.theme-myspace .myspace-marquee {
    background: #000;
    color: #00ff66;
    border-top: 2px ridge #00ff66;
    border-bottom: 2px ridge #00ff66;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    padding: 4px 0;
}
body.theme-myspace .myspace-marquee marquee {
    color: #00ff66;
}
body.theme-myspace .myspace-marquee .sha {
    color: #ffff00;
    margin-right: 8px;
}
body.theme-myspace .myspace-marquee .sep {
    color: #ff66cc;
    margin: 0 12px;
}

/* ─── GRID + CARDS ────────────────────────────────────────── */
body.theme-myspace .grid-main {
    background: rgba(255, 255, 255, 0.85);
    border: 4px ridge #aa33ff;
    margin-top: 18px;
    padding: 16px;
}

body.theme-myspace .card {
    background: #ffffee;
    border: 3px ridge #aa33ff;
    border-radius: 0;
    box-shadow: 4px 4px 0 #ff66cc;
}

body.theme-myspace .card h2 {
    background: linear-gradient(90deg, #ff33cc, #6633ff);
    color: #ffff00 !important;
    border-bottom: 3px solid #000;
    padding: 6px 10px;
    margin: -16px -18px 12px -18px;
    font-family: 'Impact', 'Arial Black', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 1px 1px 0 #000;
}

body.theme-myspace .card .hint {
    color: #6633ff;
    font-style: italic;
    background: #ffeefa;
    padding: 4px 8px;
    border-left: 3px solid #ff66cc;
}

/* ─── BUTTONS + LINKS ─────────────────────────────────────── */
body.theme-myspace .btn {
    background: linear-gradient(180deg, #ffff66, #ffaa33);
    border: 2px outset #ff66cc;
    color: #1a0033;
    border-radius: 0;
    font-family: 'Comic Sans MS', cursive;
    font-weight: bold;
    text-shadow: 1px 1px 0 #fff;
}
body.theme-myspace .btn:hover {
    border-style: inset;
    background: linear-gradient(180deg, #ffaa33, #ffff66);
    color: #aa00aa;
}
body.theme-myspace .btn-primary {
    background: linear-gradient(180deg, #66ff66, #009933);
    color: #1a0033;
    border-color: #006600;
}
body.theme-myspace .btn-link {
    background: transparent;
    border: 1px dashed #6633ff;
}

body.theme-myspace a {
    color: #6633ff;
    text-decoration: underline;
}
body.theme-myspace a:visited { color: #aa3399; }
body.theme-myspace a:hover {
    color: #ff33aa;
    background: #ffff66;
}

/* ─── MATRIX ─────────────────────────────────────────────── */
body.theme-myspace .matrix th { color: #aa00aa; }
body.theme-myspace .matrix .cell { border-color: #aa00aa; }
body.theme-myspace .cell-green { background: #66ff66; }
body.theme-myspace .cell-mvp   { background: #ffff33; }
body.theme-myspace .cell-planned { background: #ddccff; }

body.theme-myspace .dot { box-shadow: 0 0 4px currentColor; }

/* ─── PROJECTS ───────────────────────────────────────────── */
body.theme-myspace .project-row {
    border-bottom: 2px dotted #ff66cc;
}
body.theme-myspace .project-title { color: #aa00aa; }
body.theme-myspace .project-preset { color: #ff33aa; }

/* ─── STYLES ─────────────────────────────────────────────── */
body.theme-myspace .style-card {
    background: #fff0fa;
    border: 2px ridge #ff66cc;
    box-shadow: 2px 2px 0 #aa33ff;
}
body.theme-myspace .style-name { color: #aa00aa; }

/* ─── CAST = TOP 8 ───────────────────────────────────────── */
body.theme-myspace .cast-card h2::after {
    content: " ★ in my crew";
    font-size: 11px;
    color: #ffff66;
}
body.theme-myspace .cast-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    max-height: 360px;
}
body.theme-myspace .cast-cell {
    background: #fff;
    border: 3px ridge #ff66cc;
    border-radius: 0;
    box-shadow: 2px 2px 0 #aa33ff;
}
body.theme-myspace .cast-cell:hover {
    border-color: #ffff66;
    box-shadow: 2px 2px 0 #00ff66;
}
body.theme-myspace .cast-name {
    color: #6633ff;
    text-decoration: underline;
    cursor: pointer;
    font-weight: bold;
}
body.theme-myspace .cast-tier {
    background: #ffeeff;
    border-top: 1px solid #ff66cc;
    margin-top: 2px;
    padding-top: 1px;
}

/* ─── DOCS / TOOLS / SOURCES / PIPELINE / COMMITS ────────── */
body.theme-myspace .doc-link {
    background: #fff0fa;
    border: 2px ridge #ff66cc;
    box-shadow: 2px 2px 0 #aa33ff;
}
body.theme-myspace .doc-link:hover {
    background: #ffff99;
    border-color: #ffff00;
}
body.theme-myspace .doc-label {
    color: #aa00aa;
    border-bottom-color: #ff33aa;
}

body.theme-myspace .tool-row {
    background: #fff0fa;
    border: 2px ridge #ff66cc;
}
body.theme-myspace .tool-kind { color: #aa00aa; font-weight: bold; }
body.theme-myspace .tool-kind-web .tool-kind { color: #009933; }
body.theme-myspace .tool-kind-cli .tool-kind { color: #cc3300; }
body.theme-myspace .tool-cmd {
    background: #1a0033;
    color: #66ff66;
    border: 1px solid #66ff66;
}

body.theme-myspace .source-cell {
    background: #fff0fa;
    border: 2px ridge #ff66cc;
    box-shadow: 2px 2px 0 #aa33ff;
}
body.theme-myspace .source-name { color: #aa00aa; }

body.theme-myspace .pipeline-stats dt {
    color: #aa00aa;
    background: #ffeeff;
    padding: 2px 6px;
}
body.theme-myspace .pipeline-stats dd code {
    background: #1a0033;
    color: #66ff66;
    border: 1px dotted #66ff66;
}

body.theme-myspace .commits-feed {
    border: 2px ridge #ff66cc;
    background: #fff0fa;
}
body.theme-myspace .commit-row {
    border-bottom-color: #ff99dd;
}
body.theme-myspace .commit-row:hover {
    background: #ffff99;
}
body.theme-myspace .commit-sha {
    background: #1a0033;
    color: #ffff66;
    border: 1px solid #ffff66;
}
body.theme-myspace .commit-subject { color: #aa00aa; }

/* ─── OUTPUTS GALLERY ────────────────────────────────────── */
body.theme-myspace .outputs-card h2::after {
    content: " ★ view my pics ★";
    font-size: 11px;
    color: #ffff66;
}
body.theme-myspace .output-cell {
    background: #fff;
    border: 3px ridge #ff66cc;
    box-shadow: 3px 3px 0 #aa33ff;
}
body.theme-myspace .output-name { color: #6633ff; }

/* ─── GAPS ───────────────────────────────────────────────── */
body.theme-myspace .gaps-card h2::after {
    content: " ★ what's on my mind ★";
    font-size: 11px;
    color: #ffff66;
}
body.theme-myspace .gap-item {
    background: #fff0fa;
    border-left-width: 6px;
}
body.theme-myspace .gap-item.gap-blocked { border-left-color: #cc00cc; }
body.theme-myspace .gap-item.gap-planned { border-left-color: #6633ff; }
body.theme-myspace .gap-item.gap-mvp { border-left-color: #ffaa00; }

/* ─── FOOTER ─────────────────────────────────────────────── */
body.theme-myspace footer {
    background: #aa33ff;
    color: #ffff66;
    border-top: 4px ridge #ff66cc;
    font-family: 'Impact', sans-serif;
    letter-spacing: 0.1em;
    padding: 14px;
    margin-top: 24px;
}
body.theme-myspace footer::before { content: "✦ "; }
body.theme-myspace footer::after { content: " ✦"; }

/* ─── DEFAULT vs MYSPACE TOGGLE VISIBILITY ───────────────── */
.myspace-only { display: none; }
body.theme-myspace .myspace-only { display: block; }
body.theme-myspace .myspace-only-grid { display: grid; }
body.theme-myspace .myspace-only-flex { display: flex; }
body.theme-myspace .default-only { display: none; }

/* ─── FLOATING SPARKLE GUTTER (right side) ──────────────── */
body.theme-myspace::after {
    content: "✨\A ✦\A ★\A ✨\A ✦\A ★\A ✨";
    white-space: pre;
    position: fixed;
    top: 100px;
    right: 6px;
    color: #ff66cc;
    font-size: 18px;
    line-height: 1.6;
    pointer-events: none;
    text-shadow: 0 0 6px #fff;
    animation: spore-blink 2s steps(2, end) infinite;
    z-index: 9999;
}

/* Top responsive: kill the hero panel's 3-col when narrow */
@media (max-width: 1100px) {
    body.theme-myspace .myspace-hero {
        grid-template-columns: 140px 1fr;
    }
    body.theme-myspace .myspace-stats {
        grid-column: 1 / -1;
    }
}
