/*
    lightWriteStyles.css — LightWrite
    Stranger Things Upside Down Communication App
    2026-06-15 | klp + GitHub Copilot
    TNT | TechNoviceTools
*/

/* ── Theme tokens ─────────────────────────────── */
:root {
    --lw-flame:      #cc2200;
    --lw-flame-dark: #880000;
    --lw-dim:        #070003;
    --lw-mid:        #120008;
    --lw-card:       #1c000a;
    --lw-text:       rgba(255, 210, 200, 0.88);
    --lw-text-dim:   rgba(255, 180, 160, 0.50);
    --lw-border:     rgba(180, 20, 20, 0.30);
}

/* ── Global body ──────────────────────────────── */
body { background: var(--lw-dim); color: var(--lw-text); }

/* ── App hero banner ──────────────────────────── */
#lwHero {
    background:
        linear-gradient(135deg, rgba(60,0,0,0.45) 0%, rgba(10,0,3,0.55) 100%),
        url('images/mindFlayerBG.jpg')
        center 60% / cover no-repeat;
    padding: 3rem 1rem 2rem;
}

/* ── Cover page ───────────────────────────────── */
#lwCover {
    min-height: 100vh;
    background:
        linear-gradient(to bottom, rgba(50,0,0,0.55) 0%, rgba(10,0,3,0.96) 100%),
        url('images/mindFlayerBG.jpg')
        center center / cover no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 5rem 1.5rem 4rem;
}

.lw-cover-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--lw-flame);
    margin-bottom: 1rem;
}

.lw-cover-title {
    font-family: var(--boogaloo);
    font-size: clamp(3.5rem, 10vw, 7rem);
    line-height: 1;
    color: #fff;
    text-shadow: 0 0 25px rgba(255,60,30,0.85), 0 0 60px rgba(180,0,0,0.5);
    margin-bottom: 0.5rem;
    letter-spacing: 4px;
}

.lw-cover-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.35rem);
    color: rgba(255, 200, 200, 0.72);
    font-style: italic;
    margin-bottom: 2.5rem;
}

.lw-cover-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.lw-about-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--lw-border);
    border-radius: 14px;
    padding: 2rem 2.5rem;
    max-width: 700px;
    margin: 0 auto;
    color: rgba(255,255,255,0.78);
}

.lw-about-card h2 {
    font-family: var(--boogaloo);
    color: var(--lw-flame);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.lw-about-card p { line-height: 1.7; margin-bottom: 0.85rem; font-size: 0.95rem; }
.lw-about-card p:last-child { margin-bottom: 0; }

/* ── Cover buttons ────────────────────────────── */
.btn-lw-primary {
    background: var(--lw-flame);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.75rem 2rem;
    font-family: var(--boogaloo);
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: filter 0.2s, transform 0.1s;
    display: inline-block;
}

.btn-lw-primary:hover {
    filter: brightness(1.2);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.btn-lw-ghost {
    background: transparent;
    color: rgba(255,200,200,0.55);
    border: 1px solid rgba(200,100,100,0.25);
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    font-size: 0.82rem;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-block;
}

.btn-lw-ghost:hover {
    color: white;
    border-color: rgba(200,100,100,0.65);
    text-decoration: none;
}

/* ── Canvas wrapper ───────────────────────────── */
#canvasWrap {
    max-width: 700px;
    margin: 1.5rem auto 0;
    background: #000;
    border: 2px solid rgba(160,20,20,0.45);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(200,20,20,0.18), 0 0 70px rgba(120,0,0,0.12);
}

/* Force canvas to fill its container width while maintaining p5 height */
#canvasWrap canvas { display: block; }

/* ── Mode bar ─────────────────────────────────── */
.lw-mode-bar {
    max-width: 700px;
    margin: 0.9rem auto 0;
    display: flex;
    gap: 0.4rem;
    justify-content: center;
    flex-wrap: wrap;
}

.lw-mode-btn {
    background: transparent;
    border: 1.5px solid rgba(200,50,50,0.3);
    color: rgba(255,200,200,0.55);
    border-radius: 20px;
    padding: 0.3rem 1.1rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
}

.lw-mode-btn:hover,
.lw-mode-btn.active {
    background: rgba(180,20,20,0.25);
    border-color: var(--lw-flame);
    color: #fff;
}

/* ── Received text display ────────────────────── */
.lw-received-wrap {
    max-width: 700px;
    margin: 1.25rem auto 0;
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(180,20,20,0.22);
    border-radius: 8px;
    padding: 0.85rem 1.25rem;
    min-height: 4.5rem;
}

.lw-received-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: rgba(200,50,50,0.65);
    margin-bottom: 0.35rem;
}

#receivedText {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    letter-spacing: 5px;
    color: rgba(255,180,140,0.92);
    text-shadow: 0 0 14px rgba(255,80,40,0.55);
    min-height: 2.2rem;
    word-break: break-all;
}

/* blinking cursor when Claude is typing */
#receivedText::after {
    content: '▌';
    animation: blink 0.9s step-start infinite;
    color: rgba(255,80,40,0.7);
    display: none;
}
#receivedText.claude-active::after { display: inline; }

@keyframes blink { 50% { opacity: 0; } }

/* ── Controls row ─────────────────────────────── */
.lw-controls {
    max-width: 700px;
    margin: 0.9rem auto 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    justify-content: center;
}

.btn-lw-danger {
    background: var(--lw-flame);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    font-family: var(--boogaloo);
    font-size: 1rem;
    cursor: pointer;
    transition: filter 0.2s;
    letter-spacing: 0.5px;
}
.btn-lw-danger:hover { filter: brightness(1.2); }

.btn-lw-outline {
    background: transparent;
    color: rgba(255,180,160,0.65);
    border: 1.5px solid rgba(200,50,50,0.3);
    border-radius: 8px;
    padding: 0.45rem 1.1rem;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}
.btn-lw-outline:hover {
    border-color: var(--lw-flame);
    color: #fff;
    text-decoration: none;
}

/* ── Keyboard hint ────────────────────────────── */
.lw-keyboard-hint {
    max-width: 700px;
    margin: 0.6rem auto 0;
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255,180,160,0.35);
    font-style: italic;
}

/* ── Settings page ────────────────────────────── */
#settingsContent {
    background: linear-gradient(180deg, #150008 0%, #070003 100%);
    padding: 3rem 1.5rem 5rem;
}

.settings-card {
    max-width: 640px;
    margin: 0 auto;
    background: var(--lw-card);
    border: 1px solid var(--lw-border);
    border-radius: 14px;
    padding: 2rem 2.5rem;
}

.settings-card h2 {
    font-family: var(--boogaloo);
    color: var(--lw-flame);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.settings-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,160,140,0.50);
    display: block;
    margin-bottom: 0.4rem;
}

.settings-group { margin-bottom: 1.5rem; }

.settings-radio-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.settings-radio-btn {
    background: transparent;
    border: 1.5px solid rgba(180,20,20,0.35);
    color: rgba(255,180,160,0.6);
    border-radius: 20px;
    padding: 0.3rem 1rem;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
}

.settings-radio-btn.selected,
.settings-radio-btn:hover {
    background: rgba(180,20,20,0.25);
    border-color: var(--lw-flame);
    color: #fff;
}

.settings-speed-track {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: rgba(180,20,20,0.25);
    outline: none;
    cursor: pointer;
    margin: 0.4rem 0;
}

.settings-speed-track::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--lw-flame);
    cursor: pointer;
}

.settings-speed-track::-moz-range-thumb {
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--lw-flame);
    border: none;
    cursor: pointer;
}

.settings-input {
    width: 100%;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(180,20,20,0.3);
    border-radius: 6px;
    color: rgba(255,180,160,0.88);
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
    outline: none;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.settings-input:focus {
    border-color: var(--lw-flame);
    box-shadow: 0 0 8px rgba(200,30,0,0.3);
}

.settings-phrase-list {
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(180,20,20,0.2);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-size: 0.80rem;
    color: rgba(255,160,140,0.55);
    max-height: 160px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    line-height: 1.9;
    letter-spacing: 1px;
}

/* ── Upside Down about section ────────────────── */
#lwAbout {
    background: linear-gradient(180deg, rgba(10,0,3,0.97) 0%, rgba(20,0,8,1) 100%);
    padding: 4rem 1.5rem 5rem;
}
