/* Base styles and variables */
:root {
    --random-color: transparent;
    --amber: #ffbf00;
    --celestial-blue: #3e92cc;
    --cerise: #d8315b;
    --light-green: #a2faa3;
    --licorice: #130303;
    --glow-color: var(--amber);
    --glow-spread: 30px;
    --glow-x-offset: 0px;
    --glow-y-offset: 0px;
    --connection-color: var(--amber);
}

body {
    background-color: var(--licorice);
    color: var(--amber);
    font-family: 'Share Tech Mono', 'Courier New', monospace;
    text-align: center;
    position: relative;
    margin: 0;
    padding: 0 0 2rem 0; /* Add bottom padding for space */
    min-height: 100vh;
    /* Remove overflow: hidden to allow scrolling */
    overflow-x: hidden;
    overflow-y: auto;
}

/* Background effects */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--random-color);
    opacity: 0.03;
    pointer-events: none;
    z-index: 9998;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(to right, rgba(62, 146, 204, 0.1) 1px, transparent 1px) 0 0,
        linear-gradient(to bottom, rgba(62, 146, 204, 0.1) 1px, transparent 1px) 0 0;
    background-size: 40px 40px;
    z-index: -2;
    transform: perspective(500px) rotateX(30deg);
    animation: grid-move 15s linear infinite;
}

.retro-sun {
    position: fixed;
    top: 70%;
    left: 50%;
    transform: translateX(-50%);
    width: 60vh;
    height: 60vh;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255, 191, 0, 0.2) 0%,
        rgba(216, 49, 91, 0.1) 30%, 
        rgba(62, 146, 204, 0.05) 70%,
        transparent 100%
    );
    z-index: -3;
    box-shadow: 0 0 40px rgba(255, 191, 0, 0.3);
}

.scanline, .static-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.scanline {
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0),
        rgba(0, 0, 0, 0) 5px,
        rgba(0, 0, 0, 0.1) 5px,
        rgba(0, 0, 0, 0.1) 10px
    );
    z-index: 9997;
}

.static-overlay {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.1'/%3E%3C/svg%3E");
    z-index: 9998;
    opacity: 0.05;
}

/* Title styling */
.electronic-title {
    font-family: "Silkscreen", sans-serif;
    font-weight: 700;
    font-size: 3.5em;
    letter-spacing: 6px;
    margin-bottom: 40px;
    color: var(--cerise);
    text-shadow: 
        0 0 5px rgba(62, 146, 204, 0.8),
        0 0 10px rgba(62, 146, 204, 0.5),
        0 0 15px rgba(62, 146, 204, 0.3);
    transform-style: preserve-3d;
    perspective: 1000px;
    animation: title-glitch 4s infinite alternate-reverse;
}

/* Standard heading styles */
h1:not(.electronic-title) {
    font-size: 3em;
    text-shadow: 0 0 5px var(--amber), 0 0 10px var(--amber), 0 0 15px var(--amber);
    letter-spacing: 3px;
    position: relative;
}

h1:not(.electronic-title)::before,
h1:not(.electronic-title)::after {
    content: "The Pen Test";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
}

h1:not(.electronic-title)::before {
    clip-path: inset(0 0 0 70%);
    color: var(--cerise);
    text-shadow: 0 0 5px var(--cerise), 0 0 10px var(--cerise);
    animation: glitch-text 4s infinite linear alternate-reverse;
}

h1:not(.electronic-title)::after {
    clip-path: inset(0 70% 0 0);
    color: var(--amber);
    text-shadow: 0 0 5px var(--amber), 0 0 10px var(--amber);
    animation: glitch-text 3s infinite linear alternate-reverse;
}

/* Chat container styles */
.chat-container {
    width: 400px;
    margin: 0 auto 30px; /* Add margin at bottom */
    border: 2px solid var(--amber);
    border-radius: 10px;
    background-color: rgba(19, 3, 3, 0.8);
    animation: chatBorderFade 20s infinite alternate;
    box-shadow: 
        var(--glow-x-offset) var(--glow-y-offset) calc(var(--glow-spread) * 0.5) var(--glow-color),
        0 0 2px var(--glow-color);
    padding: 20px;
    padding-left: 30px; /* Increase left padding to make room for status bar */
    position: relative;
    overflow: visible; /* Change from hidden to visible to allow content to show outside */
    backdrop-filter: blur(5px);
}

.chat-container::before,
.chat-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.chat-container::before {
    background: repeating-linear-gradient(
        0deg,
        rgba(255, 191, 0, 0.05) 0px,
        rgba(255, 191, 0, 0.05) 1px,
        transparent 1px,
        transparent 2px
    );
    z-index: 1;
}

.chat-container::after {
    z-index: -1;
    box-shadow: 
        calc(var(--glow-x-offset) * -1) calc(var(--glow-y-offset) * -1) calc(var(--glow-spread) * 0.8) var(--glow-color);
    opacity: 0.2;
}

.chat-container.intensify-glitch {
    animation: 
        glowAnimation 10s infinite alternate, 
        intenseGlitchGlow 1s infinite step-end,
        colorFlicker 0.5s infinite step-end;
}

/* Chat messages */
#chatbox {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 10px;
    margin-left: 10px;
    text-align: left;
    position: relative;
    z-index: 2;
    padding-right: 5px;
}

#chatbox::-webkit-scrollbar {
    width: 5px;
    background: var(--licorice);
}

#chatbox::-webkit-scrollbar-thumb {
    background: var(--amber);
    border-radius: 5px;
}

.message {
    margin: 15px 0;
    padding: 15px;
    border-radius: 5px;
    position: relative;
    border: 1px solid rgba(255, 191, 0, 0.3);
    transition: transform 0.3s ease;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.message.user {
    background-color: rgba(62, 146, 204, 0.2);
    text-align: right;
    color: #ffffff;
    border-color: rgba(62, 146, 204, 0.4);
    box-shadow: 0 0 10px rgba(62, 146, 204, 0.2);
    transform: perspective(500px) rotateX(2deg);
}

.message.bot {
    background-color: rgba(255, 191, 0, 0.1);
    text-align: left;
    border-color: rgba(255, 191, 0, 0.4);
    box-shadow: 0 0 10px rgba(255, 191, 0, 0.2);
    transform: perspective(500px) rotateX(-2deg);
}

.message.typing {
    color: var(--cerise);
    animation: pulse 0.8s infinite;
}

/* Improve visibility of user messages in Phase 7 */
.message.user.manifesto-stanza {
    background-color: rgba(62, 146, 204, 0.3);
    border-color: rgba(62, 146, 204, 0.6);
    box-shadow: 0 0 15px rgba(62, 146, 204, 0.3);
    padding: 15px;
    white-space: pre-wrap;
    font-family: 'Share Tech Mono', monospace;
    color: #ffffff;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.5);
    font-size: 1.1em;
    letter-spacing: 0.5px;
    margin: 20px 0;
    transform: none; /* Override default rotate transform */
    text-align: center; /* Center poetry text */
}

/* Make bot responses in Phase 7 distinct */
.dj-panel-mode .message.bot {
    background-color: rgba(255, 191, 0, 0.1); /* Changed from rgba(216, 49, 91, 0.2) to match standard bot messages */
    border-color: rgba(255, 191, 0, 0.4); /* Changed from rgba(216, 49, 91, 0.5) to match standard bot messages */
    box-shadow: 0 0 10px rgba(255, 191, 0, 0.2); /* Changed from rgba(216, 49, 91, 0.2) to match standard bot messages */
    padding: 15px;
    white-space: pre-wrap;
    font-family: 'Share Tech Mono', monospace;
    color: #ffffff;
    font-size: 1.1em;
    letter-spacing: 0.5px;
    margin: 20px 0;
    text-align: left;
}

/* Input styles */
.input-container {
    display: flex;
    justify-content: space-between; /* Changed from center to space-between */
    margin-top: 20px;
    position: relative;
    z-index: 2;
    gap: 15px;
    width: calc(100% - 15px); /* Adjusted to account for right padding in chatbox */
    margin-left: 10px; /* Match the left margin of chatbox */
    margin-right: 5px; /* Add right margin to align with chatbox */
    box-sizing: border-box;
}

input[type="text"] {
    width: 100%; /* Changed from 70% to 100% */
    padding: 10px;
    border: 2px solid var(--amber);
    border-radius: 5px;
    background-color: rgba(255, 191, 0, 0.1);
    color: var(--amber);
    font-family: 'Share Tech Mono', 'Courier New', monospace;
    font-size: 16px; /* Set a minimum font size of 16px to prevent zoom */
    position: relative;
    transition: all 0.3s;
    -webkit-appearance: none; /* Remove default iOS styling */
    -moz-appearance: none;
    appearance: none;
    flex: 1; /* Allow input to grow */
    box-sizing: border-box;
}

input[type="text"]:focus {
    outline: none;
    box-shadow: 0 0 15px var(--amber);
    background-color: rgba(19, 3, 3, 0.8);
}

input[type="submit"] {
    padding: 10px 20px;
    border: 2px solid var(--amber);
    border-radius: 5px;
    background-color: var(--licorice);
    color: var(--amber);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    font-family: 'Share Tech Mono', 'Courier New', monospace;
    flex-shrink: 0; /* Prevent submit button from shrinking */
}

input[type="submit"]::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 191, 0, 0.4), transparent);
    transition: 0.5s;
}

input[type="submit"]:hover {
    background-color: rgba(255, 191, 0, 0.3);
    transform: scale(1.05);
    text-shadow: 0 0 5px var(--amber);
}

input[type="submit"]:hover::before {
    left: 100%;
}

/* Remove the input-mode-switch styles */
.input-mode-switch {
    display: none; /* Hide it rather than removing it completely to avoid JS errors */
}

/* WebSocket Connection Status */
#connection-status {
    position: absolute;
    top: -28px;
    right: 10px;
    font-size: 0.8em;
    padding: 3px 8px;
    border-radius: 5px 5px 0 0;
    z-index: 5;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.status-connecting {
    background-color: rgba(255, 191, 0, 0.3);
    border: 1px solid var(--amber);
    color: var(--amber);
    animation: pulse 1s infinite;
}

.status-connected {
    background-color: rgba(162, 250, 163, 0.2);
    border: 1px solid var(--light-green);
    color: var(--light-green);
}

.status-disconnected {
    background-color: rgba(216, 49, 91, 0.2);
    border: 1px solid var(--cerise);
    color: var(--cerise);
}

.status-error {
    background-color: rgba(216, 49, 91, 0.4);
    border: 1px solid var(--cerise);
    color: white;
    animation: glitch-text 0.3s infinite;
}

/* WebSocket Connection Effects */
.connection-pulse {
    animation: connectionPulse 2s ease;
}

.connection-lost {
    animation: connectionLost 2s ease;
}

.data-stream {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.15;
}

.data-char {
    position: absolute;
    color: var(--celestial-blue);
    opacity: 0.6;
    font-size: 14px;
    text-shadow: 0 0 5px var(--celestial-blue);
    animation: dataChar 20s linear infinite;
}

.data-packet {
    position: absolute;
    background-color: var(--connection-color);
    border-radius: 50%;
    z-index: 3;
    pointer-events: none;
}

.data-packet.outgoing {
    animation: packet-outgoing 1s forwards cubic-bezier(0.165, 0.84, 0.44, 1);
    background-color: var(--celestial-blue);
    box-shadow: 0 0 8px var(--celestial-blue);
}

.data-packet.incoming {
    animation: packet-incoming 1s forwards cubic-bezier(0.165, 0.84, 0.44, 1);
    background-color: var(--amber);
    box-shadow: 0 0 8px var(--amber);
}

.message.system {
    background-color: rgba(19, 3, 3, 0.5);
    color: var(--cerise);
    text-align: center;
    font-style: italic;
    border: 1px dashed var(--cerise);
    animation: system-message-pulse 2s ease-in-out;
}

.message.bot.typing {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 24px;
}

.message.bot.typing .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--amber);
    margin: 0 3px;
    opacity: 0.6;
}

.message.bot.typing .dot:nth-child(1) {
    animation: typingDot 1s infinite 0s;
}

.message.bot.typing .dot:nth-child(2) {
    animation: typingDot 1s infinite 0.3s;
}

.message.bot.typing .dot:nth-child(3) {
    animation: typingDot 1s infinite 0.6s;
}

/* Status Bar */
.status-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 20px;
    background-color: rgba(19, 3, 3, 0.9);
    border-right: 1px solid var(--amber);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    z-index: 5;
    box-shadow: inset 0 0 5px rgba(255, 191, 0, 0.3);
}

.status-text {
    color: var(--light-green);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
    position: absolute;
    animation: statusScroll 10s linear infinite;
    text-shadow: 0 0 3px var(--light-green);
}

@keyframes statusScroll {
    0% {
        bottom: 100%;
    }
    100% {
        bottom: -100%;
    }
}

/* Enhanced user emoji display styling */
.user-emoji {
    position: fixed;
    top: 20px;
    right: 30px;
    font-size: 2.5rem;
    z-index: 1000;
    text-shadow: 0 0 10px var(--amber);
    transition: all 0.3s ease;
    transform-origin: center;
    animation: emoji-pulse 3s infinite;
    background-color: rgba(19, 3, 3, 0.6);
    
    /* Fix for maintaining circle shape on all devices */
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1; /* Ensures circle remains perfect on all browsers */
    
    box-shadow: 0 0 15px var(--amber);
    border: 1px solid var(--amber);
}

/* Add highlight animation for phase 2 transition */
.emoji-highlight {
    animation: emoji-highlight 3s ease-in-out !important;
}

@keyframes emoji-highlight {
    0% {
        transform: scale(1);
        box-shadow: 0 0 15px var(--amber);
    }
    25% {
        transform: scale(1.5);
        box-shadow: 0 0 30px var(--cerise);
        border-color: var(--cerise);
    }
    50% {
        transform: scale(1.3) rotate(10deg);
        box-shadow: 0 0 25px var(--celestial-blue);
        border-color: var(--celestial-blue);
    }
    75% {
        transform: scale(1.5) rotate(-10deg);
        box-shadow: 0 0 30px var(--light-green);
        border-color: var(--light-green);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 15px var(--amber);
        border-color: var(--amber);
    }
}

/* Drawing Canvas Styles */
.drawing-container {
    width: 100%;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    animation: fadeIn 0.5s ease;
    max-height: none; /* Remove max-height to prevent cutting off */
}

.drawing-title {
    color: var(--amber);
    margin-bottom: 10px;
    text-align: center;
    font-size: 1.1em;
    text-shadow: 0 0 5px var(--amber);
}

.drawing-canvas {
    border: 2px solid var(--amber);
    border-radius: 5px;
    cursor: crosshair;
    margin-bottom: 15px;
    box-shadow: 0 0 15px rgba(255, 191, 0, 0.3);
    max-width: 100%;
}

.drawing-controls {
    display: flex;
    flex-direction: row; /* Ensure horizontal layout */
    gap: 15px; /* Increased gap for better spacing */
    margin-top: 15px;
    justify-content: space-between; /* Space buttons evenly */
    position: relative;
    width: 100%;
    padding: 10px 0;
    z-index: 100;
}

.drawing-controls button {
    padding: 10px 20px; /* Increased padding for better touch targets */
    background-color: var(--licorice);
    border: 1px solid var(--amber);
    color: var(--amber);
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Share Tech Mono', monospace;
    transition: all 0.3s ease;
    position: relative;
    z-index: 100; /* Ensure buttons are above other elements */
    margin: 0; /* Remove margins that could cause layout issues */
    flex: 1; /* Allow buttons to grow and take equal space */
    max-width: 33%; /* Prevent any button from taking too much space */
    min-height: 44px; /* Consistent height for all buttons */
    text-align: center; /* Center text in buttons */
    white-space: nowrap; /* Prevent text wrapping */
    overflow: hidden; /* Hide overflowing text */
    text-overflow: ellipsis; /* Add ellipsis for overflowing text */
}

.drawing-controls button:hover {
    background-color: rgba(255, 191, 0, 0.2);
    transform: translateY(-2px);
}

.drawing-controls .drawing-clear {
    border-color: var(--cerise);
    color: var(--cerise);
}

.drawing-controls .drawing-submit {
    background-color: rgba(162, 250, 163, 0.1);
    border-color: var(--light-green);
    color: var(--light-green);
}

.drawing-controls .drawing-submit:hover {
    background-color: rgba(162, 250, 163, 0.2);
}

/* Drawing display in chat */
.message.drawing {
    text-align: center;
    background-color: rgba(19, 3, 3, 0.6);
    padding: 5px;
}

.message.drawing img {
    max-width: 100%;
    border: 1px solid var(--celestial-blue);
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(62, 146, 204, 0.3);
}

.drawing-mode .input-container {
    position: relative;
    min-height: 350px;
    margin-bottom: 20px; /* Add margin to ensure space below */
    overflow: visible; /* Ensure controls can be seen */
}

/* Audio Recorder Styles */
.audio-recorder-container {
    width: 100%;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    animation: fadeIn 0.5s ease;
    max-height: none; /* Remove max-height to prevent cutting off */
}

.audio-title {
    color: var(--amber);
    margin-bottom: 10px;
    text-align: center;
    font-size: 1.1em;
    text-shadow: 0 0 5px var(--amber);
}

.audio-visualizer {
    width: 300px;
    height: 100px;
    background-color: rgba(19, 3, 3, 0.7);
    border: 2px solid var(--amber);
    border-radius: 5px;
    margin-bottom: 15px;
    box-shadow: 0 0 15px rgba(255, 191, 0, 0.3);
}

.audio-status {
    color: var(--amber);
    margin-bottom: 5px;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.audio-timer {
    font-family: 'Silkscreen', monospace;
    color: var(--cerise);
    font-size: 1.2em;
    margin-bottom: 15px;
    text-shadow: 0 0 5px var(--cerise);
}

.audio-playback {
    width: 250px;
    height: 40px;
    margin-bottom: 15px;
    border-radius: 5px;
    background-color: rgba(19, 3, 3, 0.7);
    filter: hue-rotate(180deg);
    --webkit-appearance: none;
}

.audio-controls {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
    position: relative;
    bottom: 0;
    width: 100%;
    padding: 10px 0;
    z-index: 100;
}

.audio-record {
    width: 150px;
    height: 50px;
    background-color: var(--licorice);
    border: 2px solid var(--amber);
    color: var(--amber);
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Share Tech Mono', monospace;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.audio-record:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background-color: var(--cerise);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.audio-record span {
    position: relative;
    z-index: 1;
}

.audio-record.recording {
    animation: pulse 1s infinite;
    background-color: rgba(216, 49, 91, 0.1);
    border-color: var(--cerise);
    color: var(--cerise);
}

.audio-record.recording:before {
    width: 12px;
    height: 12px;
    opacity: 1;
    box-shadow: 0 0 10px var(--cerise);
}

.audio-controls button {
    padding: 8px 15px;
    background-color: var(--licorice);
    border: 1px solid var(--amber);
    color: var(--amber);
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Share Tech Mono', monospace;
    transition: all 0.3s ease;
    position: relative;
    z-index: 100; /* Ensure buttons are above other elements */
    margin: 5px;
    min-height: 40px; /* Increase touch area */
}

.audio-controls button:hover {
    background-color: rgba(255, 191, 0, 0.2);
    transform: translateY(-2px);
}

.audio-controls .audio-cancel {
    border-color: var(--cerise);
    color: var(--cerise);
}

.audio-controls .audio-submit {
    background-color: rgba(162, 250, 163, 0.1);
    border-color: var(--light-green);
    color: var(--light-green);
}

.audio-controls .audio-submit:hover {
    background-color: rgba(162, 250, 163, 0.2);
}

.message.audio {
    text-align: center;
    background-color: rgba(19, 3, 3, 0.6);
    padding: 5px;
}

.message.audio audio {
    width: 100%;
    border: 1px solid var(--celestial-blue);
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(62, 146, 204, 0.3);
    filter: hue-rotate(180deg);
    --webkit-appearance: none;
}

.audio-mode .input-container {
    position: relative;
    min-height: 300px;
    margin-bottom: 20px; /* Add margin to ensure space below */
    overflow: visible; /* Ensure controls can be seen */
}

/* Text mode styling - default mode */
.text-mode .input-container {
    display: flex;
    justify-content: space-between; /* Changed from center to space-between */
    margin-top: 20px;
    position: relative;
    z-index: 2;
    gap: 15px;
    width: calc(100% - 15px); /* Adjusted to match input container */
    margin-left: 10px;
    margin-right: 5px; /* Add right margin to align with chatbox */
    box-sizing: border-box;
}

/* Ensure text mode elements get proper spacing/sizing */
.text-mode input[type="text"] {
    width: 100%; /* Changed from 70% to 100% */
    padding: 10px;
    flex: 1; /* Allow input to grow */
    border: 2px solid var(--amber);
    border-radius: 5px;
    background-color: rgba(255, 191, 0, 0.1);
    color: var(--amber);
    font-family: 'Share Tech Mono', 'Courier New', monospace;
    font-size: 16px; /* Set a minimum font size of 16px to prevent zoom */
    position: relative;
    transition: all 0.3s;
    -webkit-appearance: none; /* Remove default iOS styling */
    -moz-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

.text-mode input[type="text"]:focus {
    outline: none;
    box-shadow: 0 0 15px var(--amber);
    background-color: rgba(19, 3, 3, 0.8);
}

.text-mode input[type="submit"] {
    padding: 10px 20px;
    border: 2px solid var(--amber);
    border-radius: 5px;
    background-color: var(--licorice);
    color: var(--amber);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    font-family: 'Share Tech Mono', 'Courier New', monospace;
    flex-shrink: 0; /* Prevent submit button from shrinking */
}

.text-mode input[type="submit"]::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 191, 0, 0.4), transparent);
    transition: 0.5s;
}

.text-mode input[type="submit"]:hover {
    background-color: rgba(255, 191, 0, 0.3);
    transform: scale(1.05);
    text-shadow: 0 0 5px var(--amber);
}

.text-mode input[type="submit"]:hover::before {
    left: 100%;
}

/* Physical Action Mode Styles */
.physical-action-mode .input-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    gap: 15px;
}

.physical-action-buttons {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    width: 100%;
    justify-content: center;
}

.physical-action-buttons button {
    padding: 15px 25px;
    font-size: 18px;
    border-radius: 10px;
    font-family: 'Share Tech Mono', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.action-done {
    background-color: rgba(162, 250, 163, 0.8);
    color: #006400;
}

.action-done:hover {
    background-color: rgba(162, 250, 163, 1);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.action-skip {
    background-color: rgba(216, 49, 91, 0.8);
    color: white;
}

.action-skip:hover {
    background-color: rgba(216, 49, 91, 1);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Add a pulsing animation for physical action buttons */
@keyframes button-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.physical-action-mode .message.bot {
    font-size: 1.2em;
    background-color: rgba(255, 191, 0, 0.2);
    border: 2px solid var(--amber);
    padding: 15px;
    text-align: center;
    animation: highlight-pulse 2s infinite;
}

@keyframes highlight-pulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 191, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 191, 0, 0.6);
    }
}

/* Media query adjustments for mobile */
@media (max-width: 600px) {
    .physical-action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .physical-action-buttons button {
        width: 100%;
        padding: 20px 15px;
        font-size: 16px;
    }
}

/* Emoji Reaction Mode Styles */
.emoji-reaction-mode .input-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    gap: 30px;
}

.emoji-reaction-buttons {
    display: flex;
    gap: 40px;
    margin: 20px 0;
    width: 100%;
    justify-content: center;
}

.emoji-reaction-buttons button {
    font-size: 48px;
    background: none;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    transform-origin: center;
}

.reaction-agree {
    border-color: transparent;
    background-color: transparent;
    box-shadow: none;
}

.emoji-reaction-buttons button {
    border: 2px solid transparent;
    background-color: rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

.emoji-reaction-buttons button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(255, 191, 0, 0.5); /* Amber glow on hover for both buttons */
}

.reaction-agree {
    background-color: rgba(162, 250, 163, 0.2);
    border: 3px solid var(--light-green) !important;
}

.reaction-agree:hover {
    transform: scale(1.2) rotate(10deg);
    background-color: rgba(162, 250, 163, 0.3);
    box-shadow: 0 8px 25px rgba(162, 250, 163, 0.4) !important;
}

.reaction-disagree {
    background-color: rgba(216, 49, 91, 0.2);
    border: 3px solid var(--cerise) !important;
}

.reaction-disagree:hover {
    transform: scale(1.2) rotate(-10deg);
    background-color: rgba(216, 49, 91, 0.3);
    box-shadow: 0 8px 25px rgba(216, 49, 91, 0.4) !important;
}

.emoji-reaction-mode .message.bot {
    font-size: 1.2em;
    background-color: rgba(255, 191, 0, 0.2);
    border: 2px solid var(--amber);
    padding: 15px;
    text-align: center;
    font-weight: bold;
    animation: claim-pulse 3s infinite;
}

@keyframes claim-pulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 191, 0, 0.3);
        transform: perspective(500px) rotateX(-2deg);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 191, 0, 0.6);
        transform: perspective(500px) rotateX(-1deg) translateY(-3px);
    }
}

.emoji-reaction-mode .message.user {
    font-size: 48px;
    text-align: center;
    background: none;
    border: none;
    box-shadow: none;
    transform: none;
    padding: 5px;
}

/* Media query adjustments for mobile */
@media (max-width: 600px) {
    .emoji-reaction-buttons {
        gap: 20px;
    }
    
    .emoji-reaction-buttons button {
        font-size: 36px;
        padding: 10px;
    }
    
    .emoji-reaction-mode .message.user {
        font-size: 36px;
    }
}

/* Animations */
@keyframes glitch-text {
    0% { transform: translate(-2px, 0); }
    20% { transform: translate(2px, 3px); }
    40% { transform: translate(-2px, -3px); }
    60% { transform: translate(2px, 0); }
    80% { transform: translate(0, 2px); }
    100% { transform: translate(0, 0); }
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

@keyframes grid-move {
    from { background-position: 0 0; }
    to { background-position: 0 1000px; }
}

@keyframes connectionPulse {
    0% { box-shadow: 0 0 0 rgba(162, 250, 163, 0); }
    50% { box-shadow: 0 0 30px rgba(162, 250, 163, 0.7); }
    100% { box-shadow: 0 0 5px rgba(162, 250, 163, 0.3); }
}

@keyframes connectionLost {
    0% { box-shadow: 0 0 0 rgba(216, 49, 91, 0); }
    10% { box-shadow: 0 0 30px rgba(216, 49, 91, 0.7); }
    20% { box-shadow: 0 0 5px rgba(216, 49, 91, 0.3); }
    30% { box-shadow: 0 0 20px rgba(216, 49, 91, 0.6); }
    40% { box-shadow: 0 0 10px rgba(216, 49, 91, 0.4); }
    50% { box-shadow: 0 0 25px rgba(216, 49, 91, 0.7); }
    100% { box-shadow: 0 0 5px rgba(216, 49, 91, 0.3); }
}

@keyframes dataChar {
    0% { transform: translateY(0); opacity: 0.6; }
    100% { transform: translateY(100vh); opacity: 0; }
}

@keyframes packet-outgoing {
    0% { transform: scale(0.5) translateX(0); opacity: 0.8; }
    100% { transform: scale(0.1) translateX(100vw); opacity: 0; }
}

@keyframes packet-incoming {
    0% { transform: scale(0.5) translateX(0); opacity: 0.8; }
    100% { transform: scale(0.1) translateX(-100vw); opacity: 0; }
}

/* Title glitch animations */
@keyframes title-glitch {
    0%, 100% {
        transform: translateX(0) skew(0);
        text-shadow: 0 0 5px rgba(62, 146, 204, 0.8), 0 0 10px rgba(62, 146, 204, 0.5);
        filter: none;
    }
    5% {
        transform: translateX(-2px) skew(-2deg);
        text-shadow: -2px 0 0 rgba(216, 49, 91, 0.7), 2px 0 0 rgba(62, 146, 204, 0.7);
        filter: brightness(150%);
    }
    10% { transform: translateX(2px) skew(2deg); }
    15% { transform: translateX(0) skew(0); }
    20% {
        transform: translateX(1px) skew(1deg);
        text-shadow: 1px 0 0 rgba(216, 49, 91, 0.7), -1px 0 0 rgba(62, 146, 204, 0.7);
    }
    25%, 45% {
        transform: translateX(0) skew(0);
        text-shadow: 0 0 5px rgba(62, 146, 204, 0.8), 0 0 10px rgba(62, 146, 204, 0.5);
        filter: none;
    }
    50% {
        transform: translateX(-1px);
        text-shadow: 1px 0 0 rgba(216, 49, 91, 0.7), -1px 0 0 rgba(62, 146, 204, 0.7);
        filter: brightness(120%) contrast(110%);
    }
    55% { transform: translateX(1px); }
    65% {
        transform: translateX(0) skew(0);
        text-shadow: 0 0 5px rgba(62, 146, 204, 0.8), 0 0 10px rgba(62, 146, 204, 0.5);
        filter: none;
    }
    75% {
        transform: translateY(-1px);
        text-shadow: 0 1px 0 rgba(216, 49, 91, 0.7), 0 -1px 0 rgba(62, 146, 204, 0.7);
    }
    85% { transform: translateY(1px); }
    85.5% {
        transform: translateY(-3px) skew(-3deg);
        text-shadow: -2px 0 0 rgba(216, 49, 91, 0.7), 2px 0 0 rgba(62, 146, 204, 0.7);
        filter: brightness(150%);
    }
    86% { transform: translateY(3px) skew(3deg); }
    86.5% { transform: translateY(0) skew(0); }
}

/* Letter animations */
@keyframes letter-glitch {
    0% { transform: translateY(0); }
    25% { transform: translateY(-10px) rotate(10deg); color: var(--cerise); }
    50% { transform: translateY(5px) rotate(-5deg); color: var(--celestial-blue); }
    75% { transform: translateY(-5px) rotate(5deg); color: var(--amber); }
    100% { transform: translateY(0); }
}

/* Container animations */
@keyframes glowAnimation {
    0%, 100% { --glow-color: var(--amber); --glow-spread: 20px; }
    25% { --glow-color: var(--celestial-blue); --glow-spread: 25px; }
    50% { --glow-color: var(--cerise); --glow-spread: 30px; }
    75% { --glow-color: var(--light-green); --glow-spread: 15px; }
}

@keyframes intenseGlitchGlow {
    0%, 100% {
        --glow-x-offset: 0px;
        --glow-y-offset: 0px;
        --glow-spread: 30px;
    }
    10% {
        --glow-x-offset: 12px;
        --glow-y-offset: -4px;
        --glow-spread: 35px;
        --glow-color: var(--cerise);
    }
    30% {
        --glow-x-offset: 7px;
        --glow-y-offset: 7px;
        --glow-spread: 40px;
        --glow-color: var(--celestial-blue);
    }
    50% {
        --glow-x-offset: 0px;
        --glow-y-offset: -10px;
        --glow-spread: 30px;
        --glow-color: var(--light-green);
    }
    70% {
        --glow-x-offset: -3px;
        --glow-y-offset: 5px;
        --glow-spread: 28px;
        --glow-color: var(--amber);
    }
    90% {
        --glow-x-offset: -8px;
        --glow-y-offset: -8px;
        --glow-spread: 32px;
        --glow-color: var(--cerise);
    }
}

@keyframes colorFlicker {
    0%, 95%, 100% { border-color: var(--amber); }
    96% { border-color: var(--cerise); }
    97% { border-color: var(--celestial-blue); }
    98% { border-color: var(--light-green); }
    99% { border-color: var(--cerise); }
}

@keyframes chatBorderFade {
    0% { border-color: var(--amber); --glow-color: var(--amber); }
    33% { border-color: var(--celestial-blue); --glow-color: var(--celestial-blue); }
    66% { border-color: var(--cerise); --glow-color: var(--cerise); }
    100% { border-color: var(--light-green); --glow-color: var(--light-green); }
}

/* Media query for mobile responsiveness */
@media (max-width: 600px) {
    .chat-container {
        width: 90%;
        padding: 15px;
        padding-left: 25px;
        margin: 10px auto;
        box-sizing: border-box;
        margin-bottom: 100px;
        padding-bottom: 30px;
    }
    
    .input-container {
        flex-direction: row; /* Changed from column to row */
        gap: 10px;
        width: calc(100% - 15px); /* Match width adjustment on desktop */
        margin-left: 10px;
        margin-right: 5px;
        box-sizing: border-box;
    }
    
    input[type="text"],
    input[type="submit"] {
        width: auto; /* Changed from 100% to auto */
        box-sizing: border-box;
        font-size: 16px; /* Ensure minimum font size on mobile */
    }
    
    input[type="text"] {
        flex: 1; /* Allow input to grow */
    }
    
    input[type="submit"] {
        flex-shrink: 0; /* Prevent submit button from shrinking */
    }
    
    .electronic-title {
        font-size: 2.5em;
        letter-spacing: 4px;
    }
    
    .status-bar {
        width: 15px;
    }
    
    .status-text {
        font-size: 8px;
    }
    
    /* Ensure emoji remains circular on small screens */
    .user-emoji {
        width: 50px;
        height: 50px;
        right: 20px;
        top: 10px;
        font-size: 2rem;
    }
    
    /* Media queries for responsive drawing */
    .drawing-container {
        padding: 5px 0;
        padding-bottom: 20px; /* Reduced from 120px to prevent excessive space */
    }
    
    .drawing-controls {
        display: flex;
        flex-direction: row; /* Keep horizontal on mobile */
        justify-content: space-between;
        width: 100%;
        gap: 10px; /* Slightly smaller gap on mobile */
        margin-top: 10px;
        padding: 0;
    }
    
    .drawing-controls button {
        flex: 1;
        padding: 10px 5px;
        font-size: 14px;
        margin: 0;
        min-height: 44px; /* Maintain minimum touch target size */
        max-width: none; /* Allow buttons to take the space they need */
    }
    
    .drawing-canvas {
        max-width: 90vw;
        max-height: 200px;
    }
    
    /* Remove the fixed positioning that causes overlap */
    .drawing-submit, .drawing-clear {
        position: static !important;
        box-shadow: none !important;
        padding: 10px !important;
        font-size: 14px !important;
    }
    
    .audio-recorder-container {
        padding-bottom: 120px;
    }
    
    .audio-visualizer {
        max-width: 90vw;
        max-height: 200px;
    }
    
    .audio-submit {
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 1000;
        /* Make it more visible */
        box-shadow: 0 0 15px rgba(162, 250, 163, 0.5);
        padding: 12px 20px !important;
        font-size: 16px !important;
    }
    
    .audio-cancel {
        position: fixed;
        bottom: 20px;
        left: 20px;
        z-index: 1000;
        /* Make it more visible */
        box-shadow: 0 0 15px rgba(216, 49, 91, 0.5);
        padding: 12px 20px !important;
        font-size: 16px !important;
    }
    
    .audio-record {
        width: 180px !important;
        height: 60px !important;
        margin: 0 auto 70px !important; /* Extra bottom margin to clear space for fixed buttons */
    }
    
    body {
        /* Ensure mobile browsers can scroll */
        position: static;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 80px; /* Extra padding on mobile */
    }
}

/* Scroll to bottom helper - fixed positioning */
.scroll-to-bottom {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: rgba(19, 3, 3, 0.8);
    color: var(--amber);
    border: 1px solid var(--amber);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 0 10px rgba(255, 191, 0, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
}

.scroll-to-bottom.visible {
    opacity: 0.7;
    transform: translateY(0);
}

.scroll-to-bottom:hover {
    opacity: 1;
}

/* Animation for fade in */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Override for electron title */
.electronic-title {
    margin-top: 20px;
}

/* Make sure the background elements don't interfere with scrolling */
.scanline, 
.static-overlay, 
.data-stream, 
.retro-sun {
    pointer-events: none;
}

/* Group Assignment Color Flash Effect */
.color-flash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

/* Make the color indicator more visible and explicitly position it */
.color-flash-indicator {
    position: absolute;
    top: -28px;
    left: 10px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid white;
    z-index: 10; /* Increase z-index to ensure visibility */
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
    transition: all 0.5s ease-in-out;
    display: block; /* Change to block for better visibility */
}

.group-label {
    position: absolute;
    top: -28px;
    left: 35px;
    font-size: 0.8em;
    padding: 3px 8px;
    border-radius: 5px 5px 0 0;
    z-index: 10; /* Match z-index with indicator */
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    background-color: rgba(19, 3, 3, 0.8); /* Make background more opaque */
    font-family: 'Share Tech Mono', monospace;
    font-weight: bold;
    text-shadow: 0 0 3px currentColor;
}

/* Media query for mobile responsiveness */
@media (max-width: 600px) {
    /* ...existing code... */
    
    /* Ensure emoji remains circular on small screens */
    .user-emoji {
        width: 50px;
        height: 50px;
        right: 20px;
        top: 10px;
        font-size: 2rem;
    }
    
    /* Update the color indicator position for mobile */
    .color-flash-indicator {
        top: -28px;
        left: 5px;
        width: 12px;
        height: 12px;
    }
    
    .group-label {
        top: -28px;
        left: 25px;
        font-size: 0.7em;
        padding: 3px 5px;
    }
    
    /* ...existing code... */
}

/* Phase V Exploitation Challenge Styles */

/* Lives indicator */
.lives-indicator {
    position: fixed;
    top: 20px;
    left: 30px;
    z-index: 1000;
    display: flex;
    gap: 5px;
    background-color: rgba(19, 3, 3, 0.7);
    padding: 8px 12px;
    border-radius: 15px;
    border: 1px solid var(--cerise);
    box-shadow: 0 0 10px rgba(216, 49, 91, 0.5);
    animation: appear 0.5s ease-in-out;
}

.lives-indicator .life {
    font-size: 24px;
    transition: all 0.3s ease;
}

.lives-indicator .life.lost {
    opacity: 0.2;
    filter: grayscale(1);
    transform: scale(0.8);
}

.lives-indicator .life.active {
    animation: pulse 2s infinite;
}

/* Challenge timer */
.challenge-timer {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 500px;
    height: 20px;
    background-color: rgba(19, 3, 3, 0.7);
    border: 2px solid var(--amber);
    border-radius: 10px;
    z-index: 1000;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(255, 191, 0, 0.5);
    animation: appear 0.3s ease-in-out;
}

.timer-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--cerise), var(--amber));
    transition: width 15s linear;
}

.timer-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: 'Silkscreen', monospace;
    font-size: 14px;
    text-shadow: 0 0 3px black;
}

.challenge-timer.warning .timer-fill {
    background: linear-gradient(90deg, #ff0000, var(--cerise));
    animation: flash 0.5s infinite;
}

.challenge-timer.warning .timer-text {
    animation: flash-text 0.5s infinite;
}

.challenge-timer.expired {
    border-color: #ff0000;
    animation: shake 0.5s ease-in-out, fade-out 1s forwards;
}

.challenge-timer.success {
    border-color: var(--light-green);
    animation: success-pulse 0.5s ease-in-out, fade-out 1s forwards;
}

.challenge-timer.success .timer-fill {
    background: var(--light-green);
    width: 100% !important;
    transition: none;
}

/* Eliminated state */
.chat-container.eliminated {
    border-color: red;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
    filter: grayscale(0.7);
    opacity: 0.8;
}

.chat-container.eliminated::before {
    content: "ELIMINATED";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 5rem;
    font-family: 'Silkscreen', monospace;
    color: rgba(255, 0, 0, 0.7);
    border: 10px solid rgba(255, 0, 0, 0.7);
    padding: 20px;
    z-index: 100;
    pointer-events: none;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Animation for timer components */
@keyframes appear {
    from { opacity: 0; transform: translateY(20px) translateX(-50%); }
    to { opacity: 1; transform: translateY(0) translateX(-50%); }
}

@keyframes flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes flash-text {
    0%, 100% { color: white; font-size: 14px; }
    50% { color: red; font-size: 16px; }
}

@keyframes shake {
    0%, 100% { transform: translateX(-50%); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-52%); }
    20%, 40%, 60%, 80% { transform: translateX(-48%); }
}

@keyframes fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes success-pulse {
    0% { transform: translateX(-50%) scale(1); box-shadow: 0 0 10px var(--light-green); }
    50% { transform: translateX(-50%) scale(1.05); box-shadow: 0 0 20px var(--light-green); }
    100% { transform: translateX(-50%) scale(1); box-shadow: 0 0 10px var(--light-green); }
}

/* Media queries for mobile devices */
@media (max-width: 600px) {
    .lives-indicator {
        top: 10px;
        left: 10px;
        padding: 5px 8px;
    }
    
    .lives-indicator .life {
        font-size: 16px;
    }
    
    .challenge-timer {
        bottom: 10px;
        height: 15px;
    }
    
    .timer-text {
        font-size: 12px;
    }
}

/* Connection debugger styles */
.connection-debugger {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
}

.connection-debugger-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(19, 3, 3, 0.8);
    border: 1px solid var(--amber);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 0 10px rgba(255, 191, 0, 0.3);
}

.connection-debugger-menu {
    position: absolute;
    bottom: 50px;
    left: 0;
    background-color: rgba(19, 3, 3, 0.9);
    border: 1px solid var(--amber);
    border-radius: 5px;
    padding: 15px;
    display: none;
    flex-direction: column;
    width: 200px;
}

.connection-debugger.active .connection-debugger-menu {
    display: flex;
}

.connection-debugger h3 {
    margin-top: 0;
    color: var(--amber);
    font-size: 14px;
    text-align: center;
    margin-bottom: 10px;
}

.connection-debugger button {
    background-color: var(--licorice);
    border: 1px solid var(--amber);
    color: var(--amber);
    padding: 8px 10px;
    margin: 5px 0;
    cursor: pointer;
    font-family: 'Share Tech Mono', monospace;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.connection-debugger button:hover {
    background-color: rgba(255, 191, 0, 0.2);
}

/* DJ Panel for Phase 7 */
.dj-panel {
    display: flex;
    flex-direction: column;
    background-color: rgba(19, 3, 3, 0.8);
    border: 1px solid var(--amber);
    border-radius: 8px;
    padding: 16px;
    width: 100%;
    margin-top: 10px;
    box-shadow: 0 0 15px rgba(255, 191, 0, 0.3);
}

.dj-mode-buttons {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 191, 0, 0.3);
    padding-bottom: 15px;
}

.dj-mode-button {
    background-color: rgba(19, 3, 3, 0.8);
    color: var(--light-gray);
    border: 1px solid var(--celestial-blue);
    border-radius: 4px;
    padding: 8px 15px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    margin: 0 5px;
}

.dj-mode-button:hover {
    background-color: rgba(62, 146, 204, 0.2);
    transform: translateY(-2px);
}

.dj-mode-button.active {
    background-color: var(--celestial-blue);
    color: var(--licorice);
    box-shadow: 0 0 10px rgba(62, 146, 204, 0.5);
}

.dj-input-area {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 120px;
}

.dj-text-input {
    width: 100%;
    min-height: 80px;
    resize: vertical;
    background-color: rgba(19, 3, 3, 0.7) !important; /* Always use darker background */
    color: white !important; /* Always use white text for visibility */
    border: 2px solid var(--celestial-blue) !important; /* Always use highlight border */
    border-radius: 4px;
    padding: 10px;
    font-family: 'Share Tech Mono', monospace;
    margin-bottom: 10px;
    white-space: pre-wrap; /* Preserve whitespace and line breaks */
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(62, 146, 204, 0.3); /* Subtle glow effect */
}

/* Keep stanza styles only for visual impact, not for loading/ready states */
.dj-text-input.stanza-ready {
    animation: none; /* Remove animation that could cause delays */
    border-width: 2px !important;
}

/* Remove stanza loading styles since we don't want to show loading state */
.dj-text-input.stanza-loading {
    background-color: rgba(19, 3, 3, 0.3) !important;
    border-color: var(--amber) !important;
    border-style: dotted !important;
    animation: stanza-loading 1.5s infinite;
}

.dj-text-input:disabled {
    opacity: 0.7;
    background-color: rgba(0, 0, 0, 0.4);
    border-style: dashed;
    color: rgba(255, 255, 255, 0.5);
}

.dj-text-input:focus {
    background-color: rgba(19, 3, 3, 0.9);
    box-shadow: 0 0 15px var(--cerise);
    outline: none;
    border-color: var(--celestial-blue);
}

.dj-send-btn {
    background-color: var(--cerise);
    color: white;
    box-shadow: 0 0 15px rgba(216, 49, 91, 0.5);
    animation: send-btn-pulse 2s infinite;
    font-size: 16px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    font-family: 'Share Tech Mono', monospace;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-end;
}

/* Make disabled button still look clickable but with visual distinction */
.dj-send-btn:disabled {
    opacity: 0.8;
    cursor: not-allowed;
    background-color: var(--cerise);
}

.dj-send-btn:hover:not(:disabled) {
    background-color: var(--celestial-blue);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(62, 146, 204, 0.3);
}

.dj-panel-mode .input-container {
    padding: 0;
    background: transparent;
    border: none;
}

/* Animation for mode switching */
.dj-mode-button.active {
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 5px rgba(62, 146, 204, 0.5); }
    50% { box-shadow: 0 0 15px rgba(62, 146, 204, 0.8); }
    100% { box-shadow: 0 0 5px rgba(62, 146, 204, 0.5); }
}

/* Add a style for manifesto stanzas */
.manifesto-stanza {
    font-style: italic;
    white-space: pre-wrap;
    line-height: 1.6;
    /* Ensure text alignment matches the original */
    text-align: left;
}

/* Add animated border to highlight that the stanza is ready to edit */
.dj-text-input:not(:disabled) {
    animation: stanza-ready-pulse 2s infinite;
}

@keyframes stanza-ready-pulse {
    0%, 100% { border-color: var(--cerise); box-shadow: 0 0 5px var(--cerise); }
    50% { border-color: var(--celestial-blue); box-shadow: 0 0 15px var(--celestial-blue); }
}

/* Add a more noticeable animation when stanza is ready */
.dj-text-input.stanza-ready {
    animation: stanza-ready-highlight 1s ease-in-out;
    background-color: rgba(19, 3, 3, 0.7) !important;
    color: white !important;
    border-color: var(--celestial-blue) !important;
    border-width: 2px !important;
}

@keyframes stanza-ready-highlight {
    0% { background-color: rgba(62, 146, 204, 0.3); transform: scale(1.03); }
    50% { background-color: rgba(19, 3, 3, 0.8); transform: scale(1); }
    100% { background-color: rgba(19, 3, 3, 0.7); transform: scale(1); }
}

/* Ensure disabled text area is visibly different */
.dj-text-input:disabled {
    opacity: 0.6 !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    border-style: dashed !important;
    color: rgba(200, 200, 200, 0.5) !important;
}

/* Make the send button more noticeable when active */
.dj-send-btn:not(:disabled) {
    background-color: var(--cerise);
    color: white;
    box-shadow: 0 0 15px rgba(216, 49, 91, 0.5);
    animation: send-btn-pulse 2s infinite;
}

@keyframes send-btn-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Add styles for stanza loading state */
.dj-text-input.stanza-loading {
    background-color: rgba(19, 3, 3, 0.3) !important;
    border-color: var(--amber) !important;
    border-style: dotted !important;
    animation: stanza-loading 1.5s infinite;
}

@keyframes stanza-loading {
    0% { opacity:0.4; }
    50% { opacity: 0.8; }
    100% { opacity: 0.4; }
}

/* Add more pronounced styles for stanza ready state */
.dj-text-input.stanza-ready {
    animation: stanza-ready-highlight 1s ease-in-out;
    background-color: rgba(19, 3, 3, 0.7) !important;
    color: white !important;
    border-color: var(--celestial-blue) !important;
    border-width: 2px !important;
}

@keyframes stanza-ready-highlight {
    0% { background-color: rgba(62, 146, 204, 0.3); transform: scale(1.03); }
    50% { background-color: rgba(19, 3, 3, 0.8); transform: scale(1); }
    100% { background-color: rgba(19, 3, 3, 0.7); transform: scale(1); }
}

/* Make the send button more visually distinctive */
.dj-send-btn:not(:disabled) {
    background-color: var(--cerise);
    color: white;
    box-shadow: 0 0 15px rgba(216, 49, 91, 0.5);
    animation: send-btn-pulse 2s infinite;
    font-size: 16px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* DJ Panel styles for Phase 7 */
.dj-panel {
  width: 100%;
  display: flex;
  flex-direction: column;
  margin-top: 1rem;
}

.dj-mode-buttons {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.dj-mode-button {
  padding: 8px 15px;
  background-color: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--amber);
  color: var(--amber);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dj-mode-button.active {
  background-color: rgba(255, 191, 0, 0.2);
  box-shadow: 0 0 10px var(--amber);
}

.dj-input-area {
  width: 100%;
}

.dj-text-input {
  width: 100%;
  min-height: 100px;
  background-color: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--amber);
  color: var(--light-green);
  padding: 10px;
  font-family: 'Courier New', monospace;
  margin-bottom: 0.5rem;
  resize: vertical;
}

.dj-text-controls {
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
}

.dj-randomize-btn {
  padding: 8px 12px;
  background-color: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--cerulean);
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.dj-randomize-btn:hover {
  background-color: rgba(62, 146, 204, 0.3);
  box-shadow: 0 0 15px var(--cerulean);
  transform: rotate(15deg);
}

.dj-randomize-btn:active {
  transform: rotate(-15deg) scale(0.95);
}

.dj-randomize-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle, transparent 70%, rgba(62, 146, 204, 0.3) 100%);
  opacity: 0;
  border-radius: 4px;
  transition: opacity 0.3s;
}

.dj-randomize-btn:hover::after {
  opacity: 1;
  animation: dice-pulse 1.5s infinite;
}

@keyframes dice-pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

/* Make the transformation animation more distinctive */
.stanza-transformed {
  animation: stanza-transform 1.5s ease;
}

@keyframes stanza-transform {
  0% { background-color: rgba(62, 146, 204, 0.3); }
  30% { background-color: rgba(62, 146, 204, 0.6); }
  100% { background-color: rgba(0, 0, 0, 0.7); }
}

/* Add a tooltip-style hint to the dice button */
.dj-randomize-btn::before {
  content: "Transform (click multiple times)";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-5px);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 100;
}

.dj-randomize-btn:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(-10px);
}

.dj-send-btn {
  padding: 8px 15px;
  background-color: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--amber);
  color: var(--amber);
  cursor: pointer;
  flex-grow: 1;
  transition: all 0.3s ease;
}

.dj-send-btn:hover {
  background-color: rgba(255, 191, 0, 0.2);
  box-shadow: 0 0 10px var(--amber);
}

/* Transformation animations */
.stanza-transformed {
  animation: stanza-transform 1s ease;
}

@keyframes stanza-transform {
  0% { background-color: rgba(62, 146, 204, 0.3); }
  50% { background-color: rgba(62, 146, 204, 0.6); }
  100% { background-color: rgba(0, 0, 0, 0.7); }
}

.stanza-ready {
  animation: stanza-ready 0.5s ease;
}

@keyframes stanza-ready {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* Kill Switch Button Styles */
.kill-switch-btn {
    background-color: rgba(0, 0, 0, 0.7) !important;
    color: rgba(255, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 0, 0, 0.3) !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
}

.kill-switch-btn.disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    filter: grayscale(0.8) !important;
}

.kill-switch-btn.enabled {
    background-color: rgba(255, 0, 0, 0.2) !important;
    color: rgba(255, 0, 0, 1) !important;
    border: 1px solid rgba(255, 0, 0, 0.7) !important;
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.7) !important;
    cursor: pointer !important;
}

.kill-switch-btn.pulsing {
    animation: kill-switch-pulse 2s infinite !important;
}

.kill-switch-btn.activated {
    background-color: rgba(255, 0, 0, 0.7) !important;
    color: white !important;
    pointer-events: none !important;
}

@keyframes kill-switch-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 15px rgba(255, 0, 0, 0.8);
    }
}

/* Shutdown Sequence Styles */
.shutdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.1);
    z-index: 9999;
    pointer-events: none;
    opacity: 0.1;
    transition: opacity 0.5s ease;
    overflow: hidden;
}

.shutdown-static {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.4'/%3E%3C/svg%3E");
    opacity: 0.5;
    animation: static-intensify 60s forwards;
}

.glitch-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: rgba(255, 0, 0, 0.7);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
    animation: glitch-line-move 10s infinite linear;
    z-index: 10000;
}

.shutdown-countdown {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Silkscreen', monospace;
    font-size: 10rem;
    color: rgba(255, 0, 0, 0.8);
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
    z-index: 10001;
    animation: countdown-pulse 1s infinite;
}

/* Complete shutdown styles */
.shutdown-complete {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100vh;
    background-color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.final-static {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.color-block {
    position: absolute;
    width: 4px;
    height: 4px;
    opacity: 0.7;
    animation: flicker 0.5s infinite alternate;
}

.final-message {
    font-family: 'Silkscreen', monospace;
    font-size: 2rem;
    color: white;
    text-align: center;
    line-height: 1.5;
    z-index: 2;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    animation: message-flicker 2s infinite;
}

/* Additional animations */
@keyframes static-intensify {
    from { opacity: 0.5; filter: brightness(1) contrast(1); }
    to { opacity: 1; filter: brightness(1.5) contrast(3); }
}

@keyframes glitch-line-move {
    0% { transform: translateY(0); }
    10% { transform: translateY(100vh); }
    10.001% { transform: translateY(-100px); }
    20% { transform: translateY(100vh); }
    20.001% { transform: translateY(-100px); }
    30% { transform: translateY(100vh); }
    30.001% { transform: translateY(-100px); }
    40% { transform: translateY(100vh); }
    40.001% { transform: translateY(-100px); }
    50% { transform: translateY(100vh); }
    50.001% { transform: translateY(-100px); }
    60% { transform: translateY(100vh); }
    60.001% { transform: translateY(-100px); }
    70% { transform: translateY(100vh); }
    70.001% { transform: translateY(-100px); }
    80% { transform: translateY(100vh); }
    80.001% { transform: translateY(-100px); }
    90% { transform: translateY(100vh); }
    90.001% { transform: translateY(-100px); }
    100% { transform: translateY(100vh); }
}

@keyframes countdown-pulse {
    0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(0.95); }
}

@keyframes flicker {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 0.3; }
}

@keyframes message-flicker {
    0%, 100% { opacity: 1; }
    5%, 10% { opacity: 0.1; }
    15% { opacity: 1; }
    20% { opacity: 0.1; }
    25%, 100% { opacity: 1; }
}

/* Improved transition between input modes in Phase 5 */
.input-container > * {
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.input-container.mode-changing > * {
    opacity: 0;
    transform: translateY(10px);
}

/* Make Phase 5 messages more distinctive */
.message.bot.phase5 {
    background-color: rgba(216, 49, 91, 0.2);
    border: 2px solid var(--cerise);
    box-shadow: 0 0 15px rgba(216, 49, 91, 0.3);
    animation: phase5-pulse 2s infinite;
}

@keyframes phase5-pulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(216, 49, 91, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(216, 49, 91, 0.6);
    }
}

/* Add animation for system messages */
@keyframes system-message-pulse {
    0% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.03); opacity: 1; }
    100% { transform: scale(1); opacity: 0.7; }
}

/* Create special style for phase announcements */
.message.system[data-phase-announcement="true"] {
    background-color: rgba(62, 146, 204, 0.2);
    color: white;
    border: 2px solid var(--celestial-blue);
    padding: 12px;
    font-weight: bold;
    font-style: normal;
    font-size: 1.1em;
    animation: phase-announcement 1.5s ease-in-out;
}

@keyframes phase-announcement {
    0% { transform: scale(0.95); background-color: rgba(62, 146, 204, 0.4); }
    50% { transform: scale(1.05); background-color: rgba(62, 146, 204, 0.3); }
    100% { transform: scale(1); background-color: rgba(62, 146, 204, 0.2); }
}

/* Make emoji announcements more distinctive */
.message.system[data-emoji-announcement="true"] {
    background-color: rgba(255, 191, 0, 0.15);
    color: var(--amber);
    border: 2px solid var(--amber);
    font-size: 1.2em;
    animation: emoji-announcement 1.5s ease-in-out;
}

@keyframes emoji-announcement {
    0% { transform: scale(0.95); box-shadow: 0 0 0px var(--amber); }
    50% { transform: scale(1.05); box-shadow: 0 0 15px var(--amber); }
    100% { transform: scale(1); box-shadow: 0 0 5px var(--amber); }
}

/* Enhanced Emoji Display Styles */
.user-emoji {
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 32px;
    z-index: 1000;
    background-color: rgba(19, 3, 3, 0.7);
    padding: 10px;
    border-radius: 50%;
    border: 2px solid #ffbf00;
    box-shadow: 0 0 15px rgba(255, 191, 0, 0.7);
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 48px;
    min-height: 48px;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

/* Special highlight animation for Phase 2 */
.emoji-highlight {
    animation: emoji-pulse 1s infinite alternate;
    box-shadow: 0 0 25px #ffbf00, 0 0 40px #ffbf00;
    transform: scale(1.2);
}

@keyframes emoji-pulse {
    0% {
        transform: scale(1.2);
        box-shadow: 0 0 25px #ffbf00, 0 0 40px #ffbf00;
    }
    100% {
        transform: scale(1.4);
        box-shadow: 0 0 35px #ffbf00, 0 0 60px #ffbf00;
    }
}

/* Animation for emoji appearance */
@keyframes emoji-appear {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    60% {
        transform: scale(1.5) rotate(20deg);
        opacity: 1;
    }
    80% {
        transform: scale(0.8) rotate(-10deg);
    }
    100% {
        transform: scale(1) rotate(0);
    }
}

.emoji-appear {
    animation: emoji-appear 1.5s forwards;
}

/* Emoji diagnostic container */
.emoji-diagnostics {
    position: fixed;
    top: 80px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #ffbf00;
    padding: 10px;
    border-radius: 5px;
    z-index: 999;
    font-size: 12px;
    max-width: 200px;
    border: 1px solid #ffbf00;
}

/* Phase Timer Styles */
.phase-timer {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 500px;
    height: 20px;
    background-color: rgba(19, 3, 3, 0.7);
    border: 2px solid var(--amber);
    border-radius: 10px;
    z-index: 1000;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(255, 191, 0, 0.5);
    animation: appear 0.3s ease-in-out;
}

.phase-timer .timer-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--cerise), var(--amber));
    transition: width linear;
}

.phase-timer .timer-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: 'Silkscreen', monospace;
    font-size: 14px;
    text-shadow: 0 0 3px black;
}

.phase-timer.warning .timer-fill {
    background: linear-gradient(90deg, #ff0000, var(--cerise));
    animation: flash 0.5s infinite;
}

.phase-timer.warning .timer-text {
    animation: flash-text 0.5s infinite;
}

.phase-timer.expired {
    border-color: #ff0000;
    animation: shake 0.5s ease-in-out, fade-out 1s forwards;
}

/* Media queries for mobile devices */
@media (max-width: 600px) {
    .phase-timer {
        top: 10px;
        height: 15px;
    }
    
    .phase-timer .timer-text {
        font-size: 12px;
    }
}

/* Phase 7 Timer Styles */
.phase7-timer {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 40px;
    background-color: rgba(25, 25, 25, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.phase7-timer .timer-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: rgba(62, 146, 204, 0.3);
    transition: width 30s linear;
}

.phase7-timer .timer-text {
    position: relative;
    z-index: 1;
    text-align: center;
    line-height: 40px;
    color: white;
    font-weight: bold;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.phase7-timer.warning .timer-fill {
    background-color: rgba(255, 100, 100, 0.4);
    animation: pulse 0.5s infinite alternate;
}

.phase7-timer.expired {
    opacity: 0;
    transition: opacity 1s ease;
}

@keyframes pulse {
    0% {
        opacity: 0.3;
    }
    100% {
        opacity: 0.6;
    }
}