/* ═══════════════════════════════════════════════════════
   KIM PING — CRT Takeover System
   OS-level screen hijack overlay for Kim contact events
   All classes prefixed kp- (Kim Ping)
   ═══════════════════════════════════════════════════════ */

/* ── UTILITY ── */
.kp-hidden {
    display: none !important;
}

/* ── FROZEN STATE (applied to .computer-os-container) ── */
.kp-frozen {
    opacity: 0.85;
    transition: opacity 0.1s;
}

/* ── DEATH LINE (injected into .computer-screen) ── */
#kp-death-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.85);
    transform: translateY(-50%);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5),
                0 0 20px rgba(255, 255, 255, 0.2);
    z-index: 10;
    pointer-events: none;
}

/* ── OVERLAY (full screen takeover) ── */
.kp-overlay {
    position: absolute;
    inset: 0;
    z-index: 500;
    background: #000000;
    overflow: hidden;
}

/* ── VOID ── */
.kp-void {
    width: 100%;
    height: 100%;
    background: #000000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

/* ── SLIT (amber horizontal line during open/close) ── */
.kp-slit {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 1px;
    width: 0%;
    background: rgba(196, 168, 122, 0.25);
    box-shadow: 0 0 6px rgba(196, 168, 122, 0.1);
    z-index: 2;
    pointer-events: none;
    transition: none;
}

/* ── KIM CONTENT AREA ── */
/* Centered on the screen so on wide monitors the message
   sits in the middle instead of hugging the left edge. */
.kp-content {
    padding: 40px 48px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    position: relative;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.3s ease;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    align-items: center;
}
.kp-content.kp-visible {
    opacity: 1;
}

/* ── DAY KIM LINES ── */
.kp-day-lines {
    display: flex;
    flex-direction: column;
    gap: 22px;
    width: 100%;
    align-items: center;
}
.kp-day-line {
    /* scales with the screen: a five-line paragraph at 30px ran past
       the CRT on a short window (the author, 2026-10-03) */
    font-size: min(30px, 3.4vh);
    color: #e8e8e8;
    letter-spacing: 1.4px;
    line-height: 1.45;
    opacity: 0.92;
    font-family: 'Courier New', Courier, monospace;
    text-shadow: 0 0 22px rgba(196, 168, 122, 0.28);
    text-align: center;
}

/* ── TYPING LINE (current Day Kim text being typed) ── */
.kp-typing {
    font-size: min(30px, 3.4vh);
    color: #e8e8e8;
    letter-spacing: 1.4px;
    font-family: 'Courier New', Courier, monospace;
    text-shadow: 0 0 22px rgba(196, 168, 122, 0.28);
    text-align: center;
    width: 100%;
}
.kp-cursor {
    opacity: 0.6;
    animation: kp-cursorBlink 1.06s step-end infinite;
}
@keyframes kp-cursorBlink {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0; }
}

/* ── DADDY KIM ── */
.kp-daddy {
    margin-top: 20px;
    transition: opacity 0.4s;
}
.kp-daddy-text {
    font-size: 26px;
    color: #d4a0a0;
    letter-spacing: 1px;
    font-style: italic;
    text-shadow: 0 0 14px rgba(212, 160, 160, 0.28);
    font-family: 'Courier New', Courier, monospace;
}
.kp-daddy-cursor {
    opacity: 0.4;
    animation: kp-cursorBlink 1.06s step-end infinite;
}

/* ── RECIPE CARD (aged paper, handwritten) ── */
.kp-recipe {
    margin-top: 16px;
    background: #f4e4c0;
    border-radius: 4px;
    padding: 16px 18px;
    transform: rotate(-0.3deg);
    max-width: 400px;
    box-shadow: 2px 3px 12px rgba(0, 0, 0, 0.5);
    animation: kp-recipeIn 0.6s ease;
}
.kp-recipe-inner {
    font-family: 'Courier New', Courier, monospace;
    font-style: italic;
    font-size: 14px;
    color: #2a2a1a;
    line-height: 1.8;
}
.kp-recipe-note {
    font-size: 11px;
    color: #5a5a3a;
    margin-left: 12px;
    margin-bottom: 4px;
}
.kp-recipe-footer {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid #c4b490;
    font-size: 11px;
    color: #5a5a3a;
    font-style: italic;
}
@keyframes kp-recipeIn {
    from { opacity: 0; transform: rotate(-0.3deg) scale(0.97); }
    to   { opacity: 1; transform: rotate(-0.3deg) scale(1); }
}

/* ── THOUGHT OVERLAY ── */
.kp-thought {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    background: linear-gradient(0deg,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.75) 65%,
        transparent 100%
    );
    padding: 30px 32px 16px;
    pointer-events: none;
    animation: kp-thoughtIn 0.35s ease;
}
.kp-thought p {
    font-size: 18px;
    color: #8a8a7a;
    line-height: 1.6;
    margin: 0 auto;
    font-style: italic;
    max-width: 720px;
    font-family: 'Courier New', Courier, monospace;
    text-align: center;
}
@keyframes kp-thoughtIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── CLICK PROMPT ── */
.kp-click-prompt {
    position: absolute;
    bottom: 6px;
    right: 14px;
    z-index: 22;
    font-size: 11px;
    color: #4a4a4a;
    pointer-events: none;
    font-family: 'Courier New', Courier, monospace;
    animation: kp-promptPulse 1.06s step-end infinite;
}
@keyframes kp-promptPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.05; }
}

/* ── CRT ANIMATIONS ── */
@keyframes kp-lineFlicker {
    0%   { opacity: 0.8; }
    30%  { opacity: 0.2; }
    60%  { opacity: 0.6; }
    100% { opacity: 0.3; }
}

@keyframes kp-crtExpand {
    0%   { transform: scaleY(0.005); filter: brightness(3); }
    40%  { transform: scaleY(0.3); filter: brightness(1.5); }
    100% { transform: scaleY(1); filter: brightness(1); }
}

/* ── REBOOT LINE ── */
#kp-reboot-line {
    position: absolute;
    top: 50%;
    left: 20%;
    right: 20%;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%);
    z-index: 15;
    animation: kp-lineFlicker 0.5s ease;
    pointer-events: none;
}

/* ── CRT EXPAND CLASS (applied to .computer-os-container during reboot) ── */
.kp-crt-expand {
    animation: kp-crtExpand 0.6s ease-out !important;
    transform-origin: center center;
}

/* ── The witness's own line in the channel (Day-6 typed question,
   scene-kim-typeback.js) — the file's gold, left-set like a prompt. ── */
.kp-day-line.kp-you {
    color: #c4a87a;
    text-shadow: 0 0 8px rgba(196, 168, 122, 0.35);
    text-align: left;
    max-width: 620px;
    margin: 0 auto;
    font-size: 24px;
}
