/*
 * copilotComedianStyles.css
 * TNT | Copilot Comedian — Page-specific styles
 * Date: 07/17/2026
 */


/* ── Body ── */
body {
    background: #100808;
    min-height: 100vh;
}


/* ── SPARK bar ── */
.spark-bar {
    background: #0a0614;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.spark-bar a {
    color: #E69F4D;
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
}
.spark-bar a:hover { text-decoration: underline; }
.spark-bar span { color: rgba(255,255,255,0.5); font-size: 0.8rem; }


/* ── Stage wrapper: black letterbox fill ── */
#stage-wrapper {
    width: 100%;
    background: #000;
    display: flex;
    justify-content: center;
}


/* ── Stage: background image, constrained by viewport height ── */
#stage {
    position: relative;
    /*
     * width = min(100%, 88vh × image-aspect-ratio)
     * This keeps the full stage visible without scrolling on any viewport.
     * Image is approximately 4:3 (1.333) based on robotComedian4.jpeg dimensions.
     */
    width: min(100%, calc(88vh * 1.333));
    aspect-ratio: 4 / 3;
    background: url('../images/robotComedian4.jpeg') center / cover no-repeat;
    overflow: hidden;
}


/* ── Joke text zone: right portion of stage over the brick wall ── */
/*
 * The robot occupies roughly the left 36% of the image.
 * The joke zone starts at 37% from the left, leaving a 2% right margin,
 * and spans from 5% top to 76% vertically (above the concrete floor area).
 */
#jokeZone {
    position: absolute;
    left: 37%;
    right: 2%;
    top: 5%;
    bottom: 24%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
}


/* ── Joke text: Bangers font for bold comedy impact ── */
#jokeText {
    font-family: 'Bangers', cursive;
    font-size: clamp(1.6rem, 5vw, 4rem);
    color: #fff9e6;
    text-shadow:
        3px  3px  6px rgba(0, 0, 0, 0.95),
       -1px -1px  4px rgba(0, 0, 0, 0.85),
        0    0   22px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
    line-height: 1.25;
    padding: 0 0.3rem;
    /* Initial state: invisible, collapsed */
    opacity: 0;
    transform: scale(0.05);
    transform-origin: center center;
    will-change: transform, opacity;
}


/* ── Prompt state: before first joke is requested ── */
#jokeText.prompt-state {
    font-size: clamp(1.1rem, 3vw, 2.2rem);
    color: rgba(255, 249, 230, 0.45);
    opacity: 1;
    transform: scale(1);
    animation: none;
    letter-spacing: 4px;
}


/* ── Copilot-authored joke: metallic blue-silver instead of warm cream ── */
/*
 * Human jokes: #fff9e6 (warm cream) — the default.
 * Copilot jokes: #b0cce0 (cool metallic blue-silver).
 * The color shift is the primary visual signal; the counter note explains it.
 * The blue-tinted glow in text-shadow reinforces the "cool/AI" temperature.
 */
#jokeText.joke-ai {
    color: #b0cce0;
    text-shadow:
        3px  3px  6px rgba(0, 0, 0, 0.95),
       -1px -1px  4px rgba(0, 0, 0, 0.85),
        0    0   22px rgba(100, 160, 210, 0.35);
}


/* ── Zoom-in animation: zooms out from the wall with a bounce ── */
@keyframes jokeZoomIn {
    0%   { transform: scale(0.05); opacity: 0; }
    55%  { transform: scale(1.07); opacity: 1; }
    75%  { transform: scale(0.97); }
    100% { transform: scale(1);    opacity: 1; }
}

#jokeText.joke-animate {
    animation: jokeZoomIn 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}


/* ── Control bar: floats over the concrete floor on the right side of the stage ── */
/*
 * Matches the joke zone's horizontal bounds (left: 37%, right: 2%) so the
 * button sits over the clear brick-wall / floor area, not over the robot.
 * bottom: 4% places it comfortably within the concrete floor zone (bottom ~24%).
 */
#controlBar {
    position: absolute;
    bottom: 4%;
    left: 37%;
    right: 2%;
    text-align: center;
    z-index: 10;
}


/* ── "Hit Me" button: Bangers font, TNT red, pill shape ── */
#nextJokeBtn {
    font-family: 'Bangers', cursive;
    font-size: 1.9rem;
    letter-spacing: 3px;
    color: #fff;
    background: linear-gradient(135deg, #D81827 0%, #9e0e18 100%);
    border: none;
    border-radius: 50px;
    padding: 0.55rem 2.6rem 0.45rem;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s;
    box-shadow: 0 4px 22px rgba(216, 24, 39, 0.55);
    line-height: 1;
}

#nextJokeBtn:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 10px 32px rgba(216, 24, 39, 0.7);
    background: linear-gradient(135deg, #e82030 0%, #b51220 100%);
}

#nextJokeBtn:active {
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 4px 14px rgba(216, 24, 39, 0.5);
}


/* ── Joke counter ── */
/*
 * Slightly brighter than the original flow version and given a text-shadow
 * so it reads clearly against the concrete floor texture in the image.
 */
#jokeCounter {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 0.5rem;
    margin-bottom: 0;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.9);
}

/* Pulse amber when the last joke of the deck plays */
#jokeCounter.all-heard {
    color: #E69F4D;
    animation: counterPulse 1s ease-out;
}

@keyframes counterPulse {
    0%   { transform: scale(1); }
    35%  { transform: scale(1.18); color: #E69F4D; }
    100% { transform: scale(1); }
}


/* ── Button label visibility defaults ── */
/* Full label visible by default; compact label hidden until narrow viewport. */
.btn-text-short { display: none; }


/* ── One-time quiz challenge modal ── */
.quiz-challenge-modal {
    background: #0a0614;
    border: 2px solid rgba(26,191,191,0.3);
    border-radius: 12px;
    color: rgba(255,255,255,0.85);
}
.quiz-challenge-modal .modal-title {
    font-family: var(--boogaloo);
    font-size: 1.25rem;
    color: #1ABFBF;
}
.modal-dare {
    font-family: 'Bangers', cursive;
    font-size: clamp(1.3rem, 4vw, 1.75rem);
    letter-spacing: 2px;
    color: #1ABFBF;
    text-align: center;
    line-height: 1.3;
    margin-bottom: 0.4rem;
}
.modal-subtext {
    text-align: center;
    font-size: 0.78rem;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.38);
    text-transform: uppercase;
    margin-bottom: 0;
}
.btn-modal-quiz {
    font-family: 'Bangers', cursive;
    font-size: 1.55rem;
    letter-spacing: 3px;
    background: linear-gradient(135deg, #1ABFBF 0%, #0e8080 100%);
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 0.5rem 0 0.38rem;
    text-decoration: none;
    display: block;
    text-align: center;
    transition: opacity 0.2s;
}
.btn-modal-quiz:hover { color: #fff; opacity: 0.88; }
.btn-modal-skip {
    font-size: 0.78rem;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.35);
    background: transparent;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 15px;
    padding: 0.3rem 0.9rem;
    transition: color 0.18s, border-color 0.18s;
}
.btn-modal-skip:hover { color: rgba(255,255,255,0.65); border-color: rgba(255,255,255,0.25); }


/* ── Responsive: small screens — tighten stage and swap button label ── */
/*
 * At ≤550px the full label "Hit Me With a Joke!" is too wide for the overlay
 * zone and competes with the joke text. Swap to "Next Joke!" which is two words,
 * equally clear, and leaves the joke as the dominant element on the wall.
 */
@media (max-width: 550px) {
    #jokeText {
        font-size: clamp(1.2rem, 7vw, 2.4rem);
        letter-spacing: 1px;
    }

    #nextJokeBtn {
        font-size: 1.4rem;
        padding: 0.45rem 1.4rem 0.35rem;
    }

    .btn-text-full  { display: none; }
    .btn-text-short { display: inline; }
}
