:root {
    --text-phosphor: #32CD32;
    --font-terminal: 'Space Mono', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
}

body {
    background: url('assets/bacc.png') center center / cover no-repeat fixed;
    background-color: #0b0b0b;
    font-family: var(--font-terminal);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    cursor: url('assets/hand.png'), auto;
}

#console-terminal {
    /* Perfectly wraps the image to prevent letterboxing float issues */
    position: relative;
    display: inline-block;
    flex-shrink: 0;
    width: 1200px;
    height: 896px;
    transform-origin: center center;
    /* Adds physical three-dimensional weight pushing it physically above the background */
    box-shadow: 0 0 80px rgba(0,0,0,0.9), 0 30px 60px rgba(0,0,0,0.8);
}

#bg-plate {
    display: block;
    width: 1200px;
    height: 896px;
    max-width: none;
    max-height: none;
}

/* --- THE INVISIBLE HITBOXES --- */
/* Now scaling accurately over the direct image dimensions */
.hitbox,
#crt-screen-overlay {
    position: absolute;
    cursor: url('assets/hand.png'), pointer;
    background: transparent;
    border: none;
    z-index: 10;
}

.art-wrapper {
    position: absolute;
    pointer-events: none;
    z-index: 5;
}

/* Custom Button Image Logic (Depression engine for uploaded graphics) */
.btn-image {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none; /* Let parent button catch the click */
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1), filter 0.1s;
    filter: drop-shadow(0px 10px 8px rgba(0,0,0,0.4)) drop-shadow(0px 4px 4px rgba(0,0,0,0.3));
}

/* Momentary physical push (Hold mouse down) */
.hitbox:active + .art-wrapper .btn-image,
.tactile-btn.active + .art-wrapper .btn-image {
    transform: scale(0.95) translateY(4px);
    filter: brightness(0.85) drop-shadow(0px 2px 2px rgba(0,0,0,0.5));
}

/* Simulate the button glinting slightly on hover so user knows it's clickable */
.hitbox:hover {
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
}

/* Active Toggle State Swap Engine */
#btn-primo.active .btn-image {
    /* Instantly hot-swaps to primoon without touching JS DOM paths */
    content: url('assets/pri12.png');
}

#btn-elevate.active .btn-image {
    content: url('assets/el12.png');
}

#btn-create.active .btn-image {
    content: url('assets/cr12.png');
}

#btn-innovate.active .btn-image {
    content: url('assets/in12.png');
}

/* Explicit colorful glows on hover */
#btn-innovate:hover {
    box-shadow: 0 0 30px 10px rgba(50, 255, 50, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.4);
    background: rgba(50, 255, 50, 0.1);
}

#btn-create:hover {
    box-shadow: 0 0 30px 10px rgba(255, 150, 50, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.4);
    background: rgba(255, 150, 50, 0.1);
}

#btn-elevate:hover {
    box-shadow: 0 0 30px 10px rgba(50, 150, 255, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.4);
    background: rgba(50, 150, 255, 0.1);
}

#btn-primo:hover {
    box-shadow: 0 0 30px 10px rgba(255, 50, 50, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.4);
    background: rgba(255, 50, 50, 0.1);
}

/* CRT Screen Bounds (Exact fit over glass bounding box) */
#crt-screen-overlay {
    top: 16.35%;
    left: 24.96%;
    width: 49.86%;
    height: 46.29%;
    border-radius: 60px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Permanent underlying pitch-black state payload */
    background-image: url('assets/blk.png');
    background-size: cover;
    background-position: center;
}

/* Main Bottom Deck Push Buttons (Enlarged hitboxes to generously completely cover the art) */
/* MAP IMAGE TRANSFORMS AT THE BOTTOM OF THE FILE */
#btn-home {
    top: 68.6%;
    left: 8.5%;
    width: 14.33%; 
    height: 15.22%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

/* DELETED ART INNOVATE */
#btn-innovate {
    top: 69.55%;
    left: 24.46%;
    width: 13.72%;
    height: 14.1%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

/* DELETED ART CREATE */
#btn-create {
    top: 69.36%;
    left: 41.33%;
    width: 13.72%;
    height: 14.49%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

/* MAP IMAGE TRANSFORMS AT THE BOTTOM OF THE FILE */
#btn-elevate {
    top: 69.39%;
    left: 58.39%;
    width: 13.89%;
    height: 14.73%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

/* MAP IMAGE TRANSFORMS AT THE BOTTOM OF THE FILE */
#btn-primo {
    top: 69.41%;
    left: 78.13%;
    width: 12.64%;
    height: 13.43%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}


/* Right Panel Dials */

/* Top Large Dial (Volume) */
/* DELETED ART VOLUME */
/* Top Large Dial (Volume) */
#knob-volume {
    top: 42.41%;
    left: 79.69%;
    /* Hit target structurally contracted another 20% down to 7.68% core map */
    width: 9.27%;
    height: 11.86%;
    border-radius: 50%;
    /* Flexbox keeps the overflowing image perfectly centered */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Actually spinning physical image */
#knob-image {
    /* 172% overflow forces the physical rendering of the asset to increase 10% visually on your monitor, while escaping its newly shrunken container */
    width: 172%;
    height: 172%;
    object-fit: contain;
    border-radius: 50%;
    pointer-events: none;
    user-select: none;
}

/* Bottom Small Dial (Power Switch) */
/* DELETED ART POWER */
/* Bottom Small Dial (Power Switch) */
#btn-power {
    top: 54.6%;
    left: 81.66%;
    /* 10% larger than 6% base width */
    width: 5.15%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
}

/* --- INDEPENDENT IMAGE SIZING AND NUDGING ---
   Modify these scale or translate variables to move/resize the graphic independently of its red circle! */
#home-image { transform: scale(1) translate(0px, 0px); }
#img-innovate { transform: scale(1) translate(0px, 0px); }
#img-create { transform: scale(1) translate(0px, 0px); }
#img-elevate { transform: scale(1) translate(0px, 0px); }
#img-primo { transform: scale(1) translate(0px, 0px); }
#power-image { transform: scale(1.3) translate(0px, 0px); }
#mobile-crt-close { display: none; }
.mobile-close-btn { display: none !important; }


/* --- LOGIC INTERIORS AND STATES --- */
#intro-video, #home-video {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1; /* Full opacity to watch the video */
    filter: sepia(0.1) contrast(1.1); /* Slight vintage color grade */
    /* CRT Scanline Overlay applied via mask/filter equivalent */
    transition: opacity 0.5s;
    pointer-events: auto; /* Allow pausing on click */
    cursor: url('assets/hand.png'), pointer;
}

#crt-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 85%;
    z-index: 20;
    display: none;
    flex-direction: column;
    pointer-events: none; /* Let clicks pass through to video */
}

#crt-content.active {
    display: flex;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    box-sizing: border-box;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

#crt-content.active-primo {
    display: flex;
    pointer-events: auto;
    justify-content: center;
    align-items: center;
    background: transparent;
    backdrop-filter: none;
}

.home-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 5, 20, 0.75);
    border: 2px solid #0077ff;
    color: #00ccff;
    font-family: 'Inter', sans-serif, var(--font-terminal);
    font-size: 1.5rem;
    font-weight: 800;
    padding: 15px 35px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 119, 255, 0.5), inset 0 0 10px rgba(0, 119, 255, 0.3);
    text-shadow: 0 0 8px #0077ff;
    cursor: url('assets/hand.png'), pointer;
    z-index: 50;
    letter-spacing: 2px;
    transition: all 0.2s ease;
}

.home-play-btn:hover {
    background: #0077ff;
    color: #fff;
    box-shadow: 0 0 30px #00ccff;
}

.home-play-btn.hidden {
    display: none !important;
}

#crt-content * {
    color: #ffffff !important;
    font-family: 'Space Mono', 'Courier New', Courier, monospace !important;
}

/* Submenu logic */
.state-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 5px;
    border-bottom: 1px dashed var(--text-phosphor);
    padding-bottom: 5px;
}

.state-gif {
    width: 40px;
    height: 40px;
    border: 1px solid var(--text-phosphor);
    margin-right: 15px;
    position: relative;
}

.state-title {
    font-size: 1.2rem;
    text-shadow: 0 0 5px var(--text-phosphor);
}

.state-body {
    display: flex;
    flex: 1;
    gap: 10px;
}

.text-list {
    flex: 1;
    list-style: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.text-list li {
    font-size: 0.75rem;
    line-height: 1.2;
    position: relative;
    padding-left: 10px;
    background: rgba(0, 0, 0, 0.6);
}

.mascot-display {
    width: 45%;
    height: 100%;
    background-size: cover;
    background-position: center;
    border: 2px solid var(--text-phosphor);
    border-radius: 5px;
    position: relative;
}

.mascot-label {
    position: absolute;
    bottom: 0px;
    left: 5px;
    background: #000;
    padding: 0 5px;
    font-size: 0.6rem;
    border: 1px solid;
    color: #fff;
}

.cta-screen-btn {
    align-self: center;
    background: #000;
    pointer-events: auto; /* Reinstate clicking specifically for buttons */
    border: 2px solid;
    color: inherit;
    padding: 10px 30px;
    font-size: 1rem;
    cursor: url('assets/hand.png'), pointer;
    text-transform: uppercase;
    transition: all 0.2s;
    letter-spacing: 2px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.cta-screen-btn:hover {
    background: #ffffff !important;
    color: #000000 !important;
    text-shadow: none !important;
    border-color: #ffffff !important;
    box-shadow: 0 0 15px #ffffff !important;
}

.chat-window {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px;
    overflow-y: auto;
    font-size: 0.8rem;
}

.chat-message {
    margin-bottom: 5px;
    display: flex;
    align-items: flex-start;
}

.chat-avatar {
    width: 25px;
    height: 25px;
    background: url('assets/avatar.png') center/cover;
    margin-right: 10px;
    border-radius: 50%;
}

.chat-text {
    flex: 1;
}

#contact-form-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

#contact-form-overlay.hidden,
#form-success.hidden {
    display: none !important;
}

/* --- FORM OVERLAYS --- */
.form-overlay-base {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.form-overlay-base.hidden {
    display: none !important;
}

/* TERMINAL FORM (INNOVATE / ELEVATE / PRIMO) */
.terminal-intake-form {
    border: 2px solid var(--btn-green);
    background: rgba(0, 15, 0, 0.95);
    box-shadow: 0 0 20px rgba(50, 205, 50, 0.3), inset 0 0 20px rgba(50, 205, 50, 0.1);
    width: 90%;
    max-width: 650px;
    height: auto;
    border-radius: 8px;
    padding: 30px;
    color: var(--text-phosphor);
    display: flex;
    flex-direction: column;
    font-size: 1rem;
    position: relative;
    font-family: inherit;
}

/* GLASS FORM (CREATE STUDIO) */
.glass-intake-form {
    border: 2px solid rgba(255, 140, 0, 0.8);
    background: rgba(30, 20, 10, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 0 30px rgba(0,0,0,0.5), inset 0 0 20px rgba(255, 140, 0, 0.2);
    width: 90%;
    max-width: 550px;
    height: auto;
    border-radius: 24px;
    padding: 35px 45px;
    color: #ffd2a6;
    display: flex;
    flex-direction: column;
    font-size: 1rem;
    position: relative;
    font-family: 'Inter', sans-serif, Arial;
}

.form-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: 1px solid currentColor;
    color: inherit;
    padding: 5px 10px;
    cursor: url('assets/hand.png'), pointer;
    font-family: inherit;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.terminal-intake-form .form-close-btn:hover {
    background: var(--btn-green);
    color: #000;
}
.glass-intake-form .form-close-btn:hover {
    background: var(--btn-orange);
    color: #000;
}

/* TERMINAL TYPOGRAPHY */
.form-title {
    color: var(--btn-green);
    text-shadow: 0 0 8px var(--btn-green);
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 1.5rem;
    text-align: left;
}

/* GLASS TYPOGRAPHY */
.glass-title {
    color: #ffaa00;
    text-shadow: 0 0 15px rgba(255, 140, 0, 0.6);
    margin-top: 5px;
    margin-bottom: 25px;
    font-size: 2.2rem;
    font-weight: 800;
    text-align: center;
    letter-spacing: 1px;
}

/* TERMINAL FIELDS */
.form-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.form-fields input,
.form-fields textarea {
    background: rgba(0, 50, 0, 0.3);
    border: 1px solid var(--btn-green);
    color: var(--text-phosphor);
    padding: 12px;
    outline: none;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
}

.form-fields input::placeholder,
.form-fields textarea::placeholder {
    color: rgba(50, 205, 50, 0.5);
}

/* GLASS FIELDS */
.glass-fields {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
}

.glass-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.glass-group label {
    font-size: 1rem;
    font-weight: 700;
    text-shadow: 0 0 6px rgba(255, 140, 0, 0.6);
    letter-spacing: 0.5px;
}

.glass-fields input,
.glass-fields textarea {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 140, 0, 0.8);
    border-radius: 12px;
    color: #ffd2a6;
    padding: 15px;
    outline: none;
    font-family: 'Inter', sans-serif, Arial;
    font-size: 1rem;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
}

.glass-fields input:focus,
.glass-fields textarea:focus {
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 15px rgba(255, 140, 0, 0.3);
}

.glass-fields input::placeholder,
.glass-fields textarea::placeholder {
    color: rgba(255, 140, 0, 0.5);
    opacity: 0.8;
}

.btn-submit-form {
    background: transparent;
    color: var(--btn-green);
    border: 2px solid var(--btn-green);
    padding: 15px;
    font-weight: bold;
    cursor: url('assets/hand.png'), pointer;
    font-family: inherit;
    font-size: 1rem;
    margin-top: 10px;
    transition: all 0.2s;
    box-shadow: inset 0 0 10px rgba(50, 205, 50, 0.2);
}

.btn-submit-form:hover {
    background: var(--btn-green);
    color: #000;
    box-shadow: 0 0 15px var(--btn-green);
}

.btn-submit-glass {
    background: rgba(0,0,0,0.6);
    color: var(--btn-orange);
    border: 2px solid rgba(255, 140, 0, 0.8);
    border-radius: 12px;
    padding: 15px;
    font-weight: 800;
    cursor: url('assets/hand.png'), pointer;
    font-family: inherit;
    font-size: 1.2rem;
    margin-top: 15px;
    transition: all 0.2s;
    box-shadow: inset 0 0 15px rgba(255, 140, 0, 0.2);
}

.btn-submit-glass:hover {
    background: var(--btn-orange);
    color: #000;
    box-shadow: 0 0 25px rgba(255, 140, 0, 0.8);
}

/* ELEVATE FORM (SECURE / CORPORATE) */
.elevate-intake-form {
    border: 2px solid #0055ff;
    background: rgba(0, 10, 30, 0.95);
    box-shadow: 0 0 25px rgba(0, 85, 255, 0.4), inset 0 0 15px rgba(0, 85, 255, 0.2);
    width: 90%;
    max-width: 600px;
    height: auto;
    border-radius: 4px;
    padding: 35px;
    color: #00eeff;
    display: flex;
    flex-direction: column;
    font-size: 1rem;
    position: relative;
    font-family: 'Courier New', Courier, monospace;
}

.elevate-intake-form .form-close-btn:hover {
    background: #0055ff;
    color: #fff;
}

.elevate-title {
    color: #00ccff;
    text-shadow: 0 0 10px #0055ff;
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.8rem;
    font-weight: bold;
    text-align: left;
    border-bottom: 1px dashed #0055ff;
    padding-bottom: 10px;
}

.elevate-fields {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
}

.elevate-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.elevate-group label {
    font-size: 0.9rem;
    font-weight: bold;
    color: #0055ff;
    letter-spacing: 1px;
}

.elevate-fields input,
.elevate-fields textarea {
    background: rgba(0, 20, 50, 0.6);
    border: 1px solid #0055ff;
    border-radius: 2px;
    color: #00eeff;
    padding: 12px;
    outline: none;
    font-family: inherit;
    font-size: 1rem;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.8);
    transition: all 0.3s ease;
}

.elevate-fields input:focus,
.elevate-fields textarea:focus {
    background: rgba(0, 30, 80, 0.8);
    box-shadow: 0 0 15px rgba(0, 85, 255, 0.5);
    border-color: #00ccff;
}

.elevate-fields input::placeholder,
.elevate-fields textarea::placeholder {
    color: rgba(0, 150, 255, 0.4);
}

.btn-submit-elevate {
    background: rgba(0, 20, 50, 0.8);
    color: #00ccff;
    border: 2px solid #0055ff;
    border-radius: 2px;
    padding: 15px;
    font-weight: bold;
    cursor: url('assets/hand.png'), pointer;
    font-family: inherit;
    font-size: 1.1rem;
    margin-top: 15px;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.btn-submit-elevate:hover {
    background: #0055ff;
    color: #fff;
    box-shadow: 0 0 20px #00ccff;
}

#form-success {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ========================================= */
/* PRIMO AI AGENT OVERLAY (GEMINI INTERFACE) */
/* ========================================= */

.primo-agent-panel {
    border: 3px solid #ff0033;
    background: rgba(20, 0, 0, 0.95);
    box-shadow: 0 0 30px rgba(255, 0, 51, 0.6), inset 0 0 15px rgba(255, 0, 51, 0.3);
    width: 95%;
    max-width: 850px;
    height: 85vh;
    border-radius: 12px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    position: relative;
    font-family: 'Courier New', Courier, monospace; /* Switched to a more 'terminal' targeting font */
}

.primo-agent-panel .form-close-btn {
    border-color: #ff0033;
    color: #ff0033;
}

.primo-agent-panel .form-close-btn:hover {
    background: #ff0033;
    color: #000;
    box-shadow: 0 0 10px #ff0033;
}

.primo-agent-header {
    display: flex;
    flex-direction: row;
    gap: 25px;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #ff0033;
    padding-bottom: 20px;
}

.primo-avatar-container {
    width: 140px;
    height: 140px;
    border: 3px solid #ff0033;
    background: rgba(50, 0, 0, 0.6);
    border-radius: 8px;
    box-shadow: 0 0 20px #ff0033, inset 0 0 20px #ff0033;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.primo-avatar-graphic {
    width: 100%;
    height: 100%;
    background: url('assets/go.gif') center center / cover no-repeat;
    /* filter: sepia(1) hue-rotate(-50deg) saturate(5) brightness(0.8); */
}

.primo-title-block {
    display: flex;
    flex-direction: column;
}

.primo-title-block h2 {
    color: #ff3333;
    font-size: 3.5rem;
    margin: 0;
    text-shadow: 0 0 15px rgba(255, 51, 51, 0.8);
    letter-spacing: 2px;
}

.primo-title-block p {
    color: #ff7777;
    font-size: 1.2rem;
    margin: 5px 0 0 0;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.primo-chat-interface {
    flex: 1;
    border: 3px solid #ff0033;
    border-radius: 8px;
    background: rgba(10, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(255,0,0,0.3);
}

.primo-chat-history {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.primo-message {
    font-size: 1.2rem;
    color: #ff9999;
    line-height: 1.5;
    font-family: inherit;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255,0,0,0.5);
}

.msg-author {
    font-weight: 900;
    color: #ff3333;
    margin-right: 5px;
    text-shadow: 0 0 8px #ff0000;
}

.primo-chat-input-box {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 15px 20px;
    background: rgba(255, 0, 0, 0.1);
    border-top: 2px solid #ff0033;
    box-shadow: 0 -5px 15px rgba(255,0,0,0.2);
}

.input-prompt {
    font-weight: 900;
    font-size: 1.2rem;
    color: #ff3333;
    margin-right: 15px;
    text-shadow: 0 0 8px #ff0000;
}

.primo-terminal-input {
    flex: 1;
    background: rgba(20, 0, 0, 0.8);
    border: 2px solid #ff0033;
    border-radius: 20px;
    padding: 10px 20px;
    font-size: 1.2rem;
    color: #ff9999;
    outline: none;
    font-family: inherit;
    font-weight: bold;
    box-shadow: inset 0 0 10px rgba(255,0,0,0.5);
}

.primo-terminal-input:focus {
    background: rgba(50, 0, 0, 0.9);
    border-color: #ff3333;
    box-shadow: 0 0 15px rgba(255, 51, 51, 0.8), inset 0 0 10px rgba(255,0,0,0.8);
}

/* Volume Readout fixed to edge of TV */
.floating-readouts {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 20px;
    font-size: 1.5rem;
    color: #0ff;
    text-shadow: 0 0 5px #0ff;
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 100;
}

.floating-readouts.show {
    opacity: 1;
}

/* Selected Native Image Handlers */
.tactile-btn.active .btn-unselected,
.tactile-btn:active .btn-unselected { display: none !important; }

.tactile-btn.active .btn-selected,
.tactile-btn:active .btn-selected { display: block !important; }

/* Dev Calibration Vis Layers */
.dev-calibration .hitbox,
.dev-calibration #crt-screen-overlay {
    background: rgba(255, 0, 0, 0.4) !important;
    box-shadow: inset 0 0 0 2px red !important;
}
.dev-calibration .art-wrapper {
    outline: 2px dashed rgba(0, 255, 0, 0.8) !important;
    background: rgba(0, 255, 0, 0.2) !important;
}

/* ========================================= */
/* MOBILE RESPONSIVE TWEAKS FOR P.R.I.M.O AI */
/* ========================================= */
@media (max-width: 768px) {
    .primo-agent-panel {
        width: 95%;
        height: 95vh;
        padding: 15px;
    }
    
    .primo-agent-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
    
    .primo-title-block h2 {
        font-size: 1.5rem;
    }
    
    .primo-title-block p {
        font-size: 0.8rem;
    }
    
    .primo-chat-input-box {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .primo-file-label {
        font-size: 1.2rem;
        align-self: center;
        margin-right: 0 !important;
        margin-bottom: 5px;
    }
    
    .input-prompt {
        display: none; /* Hide (USER) prefix on mobile to save chatbox space */
    }
    
    .primo-terminal-input {
        width: 100%;
        padding: 12px;
        font-size: 1rem;
        box-sizing: border-box;
    }
    
    .mobile-full-breakout {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        z-index: 999999 !important;
        background: rgba(0, 10, 0, 0.98);
        padding: 5vh 5vw 10vh 5vw !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        overflow-y: auto !important;
        transform: none !important;
        border-radius: 0 !important;
        margin: 0 !important;
        pointer-events: auto !important;
    }
    .form-overlay-base {
        z-index: 9999999 !important;
    }
    .mobile-full-breakout .state-header {
        margin-bottom: 15px !important;
        padding-bottom: 15px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        flex-shrink: 0;
    }
    .mobile-full-breakout .state-title {
        font-size: 1.8rem !important; 
        text-align: left !important;
    }
    .mobile-full-breakout .state-body {
        flex-direction: column-reverse !important;
        align-items: stretch !important;
        gap: 25px !important;
    }
    .mobile-full-breakout .state-body > div {
        width: 100% !important;
        flex: none !important;
    }
    .mobile-full-breakout .state-gif {
        width: 50px !important;
        height: 50px !important;
        margin-right: 15px !important;
    }
    .mobile-full-breakout .text-list h3 {
        font-size: 1.25rem !important;
        margin-top: 15px !important;
        margin-bottom: 8px !important;
    }
    .mobile-full-breakout .text-list p {
        font-size: 1.05rem !important;
        line-height: 1.5 !important;
        margin-bottom: 15px !important;
    }
    .mobile-full-breakout video {
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        object-fit: contain !important;
        border-width: 3px !important;
        margin-bottom: 10px !important;
        flex-shrink: 0;
    }
    .mobile-full-breakout .cta-screen-btn {
        font-size: 1.3rem !important;
        padding: 18px 0 !important;
        margin-top: 10px !important;
        flex-shrink: 0;
    }
    .mobile-close-btn, .form-close-btn {
        display: block !important;
        position: relative !important;
        top: auto !important;
        right: auto !important;
        width: 100% !important;
        margin-bottom: 25px !important;
        z-index: 1000000;
        background: rgba(0,0,0,0.9);
        color: #ff3333;
        border: 2px solid #ff3333;
        padding: 15px !important;
        font-family: 'Space Mono', monospace;
        font-size: 1.2rem !important;
        cursor: pointer;
        border-radius: 6px;
        box-shadow: 0 0 15px rgba(255,0,0,0.6);
        pointer-events: auto !important;
        order: -1 !important;
    }
}
#crt-content video {
    pointer-events: none; /* Prevents smartphones from natively intercepting touches to pause ambient videos */
}

