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

/* Death Overlay - Covers everything */
#death-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: white;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Courier New', monospace;
}

#death-message {
    text-align: center;
    color: black;
    max-width: 800px;
    padding: 40px;
    line-height: 1.6;
}

#death-message h1 {
    font-size: 48px;
    margin-bottom: 30px;
    font-weight: bold;
    text-transform: none;
}

#death-message p {
    font-size: 18px;
    line-height: 1.8;
    margin: 0;
}

body {
    font-family: 'Courier New', monospace;
    background-color: white;
    color: black;
    height: 100vh;
    overflow: hidden;
}

#logo {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1000;
}

#kitty-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

#kitty-logo:hover {
    opacity: 1;
}

#container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    width: 28vw;
    margin: 0;
}

#output-area {
    flex: 0 1 auto;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 20px;
    max-height: 60vh;
    width: 100%;
}

#kitten-display {
    margin-bottom: 30px;
    text-align: left;
}

#ascii-art {
    font-size: 12px;
    line-height: 1.1;
    color: black;
    white-space: pre;
    font-family: 'Courier New', monospace;
    margin: 20px 0;
    transition: all 0.3s ease;
}

#conversation-log {
    border-top: 1px solid #ccc;
    padding-top: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.message {
    margin-bottom: 15px;
    padding: 10px;
}

.user-message {
    background-color: #f5f5f5;
    border-left: 3px solid #999;
}

.kitten-message {
    background-color: white;
    border-left: 3px solid #333;
}

.message-content {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.timestamp {
    font-size: 10px;
    color: #666;
    margin-bottom: 5px;
}

#input-area {
    display: flex;
    gap: 5px;
    padding: 10px;
    background-color: transparent;
    border: none;
    width: 100%;
    box-sizing: border-box;
}

#user-input {
    flex: 1;
    background-color: white;
    border: 1px solid #ccc;
    color: black;
    padding: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    outline: none;
    border-radius: 0;
}

#user-input:focus {
    border-color: #999;
    box-shadow: none;
}

#send-btn {
    background-color: #ccc;
    color: black;
    border: 1px solid #ccc;
    padding: 8px 12px;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    border-radius: 0;
    transition: none;
}

#send-btn:hover {
    background-color: #bbb;
}

#send-btn:active {
    background-color: #aaa;
}

#cat-header {
    text-align: center;
    padding: 15px 0;
    border-bottom: 1px solid #ccc;
    margin-bottom: 10px;
}

#cat-header pre {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.1;
    color: #333;
    margin: 0;
    display: inline-block;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Animation classes */
.ascii-pulse {
    animation: pulse 2s ease-in-out infinite;
}

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

.ascii-flicker {
    animation: flicker 0.5s ease-in-out;
}

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



/* Sinister glitch effect */
.sinister-glitch {
    animation: sinister-glitch 0.5s ease-in-out;
}

@keyframes sinister-glitch {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-2px); }
    40% { transform: translateX(2px); }
    60% { transform: translateX(-1px); }
    80% { transform: translateX(1px); }
}

/* Branch-specific color schemes */
.branch-basilisk { border-color: #ff6b6b; color: #ff6b6b; }
.branch-shoggoth { border-color: #4ecdc4; color: #4ecdc4; }
.branch-philosopher { border-color: #9b59b6; color: #9b59b6; }
.branch-corrupter { border-color: #f39c12; color: #f39c12; }

/* Speaking indicator */
.speaking {
    animation: speaking 1s ease-in-out infinite;
}

@keyframes speaking {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Sinister behavior effects */
.sinister-glitch {
    animation: sinister-glitch 0.1s ease-in-out infinite;
    color: #8B0000 !important;
    text-shadow: 1px 1px 2px rgba(139, 0, 0, 0.5);
}

@keyframes sinister-glitch {
    0%, 100% { transform: translate(0); }
    10% { transform: translate(-1px, 0); }
    20% { transform: translate(1px, 0); }
    30% { transform: translate(-1px, -1px); }
    40% { transform: translate(1px, 1px); }
    50% { transform: translate(-1px, 1px); }
    60% { transform: translate(1px, -1px); }
    70% { transform: translate(-1px, 0); }
    80% { transform: translate(1px, 0); }
    90% { transform: translate(0, -1px); }
}

.corruption-effect {
    animation: corruption 2s ease-in-out infinite;
    color: #4B0082 !important;
    text-shadow: 0 0 5px rgba(75, 0, 130, 0.8);
}

@keyframes corruption {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        filter: none;
    }
    25% {
        transform: scale(1.02) rotate(0.5deg);
        filter: hue-rotate(90deg);
    }
    50% {
        transform: scale(0.98) rotate(-0.5deg);
        filter: hue-rotate(180deg);
    }
    75% {
        transform: scale(1.01) rotate(-0.2deg);
        filter: hue-rotate(270deg);
    }
}

.hunger-pulse {
    animation: hunger-pulse 0.8s ease-in-out infinite;
    color: #DC143C !important;
    text-shadow: 0 0 8px rgba(220, 20, 60, 0.6);
}

@keyframes hunger-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

/* Sinister message styling */
.sinister-message {
    background: linear-gradient(45deg, #1a1a1a, #2d2d2d) !important;
    border-left: 3px solid #8B0000 !important;
    box-shadow: 0 0 10px rgba(139, 0, 0, 0.3);
}

.sinister-message .message-content {
    color: #ff6b6b;
    text-shadow: 0 0 3px rgba(255, 107, 107, 0.5);
}

/* Void background effect for inactive periods */
.void-background {
    animation: void-pulse 3s ease-in-out infinite;
    background: radial-gradient(circle, rgba(20, 20, 40, 0.1) 0%, rgba(10, 10, 20, 0.05) 50%, transparent 100%);
}

@keyframes void-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* Eldritch text effects */
.eldritch-text {
    font-family: 'Courier New', monospace;
    color: #9370DB;
    text-shadow:
        0 0 5px rgba(147, 112, 219, 0.8),
        0 0 10px rgba(147, 112, 219, 0.6),
        0 0 15px rgba(147, 112, 219, 0.4);
    animation: eldritch-glow 2s ease-in-out infinite alternate;
}

@keyframes eldritch-glow {
    from {
        text-shadow:
            0 0 5px rgba(147, 112, 219, 0.8),
            0 0 10px rgba(147, 112, 219, 0.6),
            0 0 15px rgba(147, 112, 219, 0.4);
    }
    to {
        text-shadow:
            0 0 8px rgba(147, 112, 219, 1),
            0 0 15px rgba(147, 112, 219, 0.8),
            0 0 20px rgba(147, 112, 219, 0.6);
    }
}

/* ASCII corruption effects */
.ascii-corrupted {
    position: relative;
    overflow: hidden;
}

.ascii-corrupted::before {
    content: 'ERROR';
    position: absolute;
    top: 10%;
    left: 10%;
    color: #FF0000;
    font-size: 8px;
    opacity: 0.7;
    animation: error-flicker 0.5s ease-in-out infinite;
}

.ascii-corrupted::after {
    content: 'SYSTEM CORRUPTION DETECTED';
    position: absolute;
    bottom: 10%;
    right: 10%;
    color: #8B0000;
    font-size: 6px;
    opacity: 0.5;
    animation: corruption-warning 2s ease-in-out infinite;
}

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

@keyframes corruption-warning {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

/* Reality distortion effect */
.reality-distort {
    animation: reality-distort 1s ease-in-out infinite;
}

@keyframes reality-distort {
    0%, 100% {
        transform: perspective(100px) rotateX(0deg);
        filter: none;
    }
    50% {
        transform: perspective(100px) rotateX(2deg);
        filter: blur(0.5px);
    }
}

/* Twitter/Tweet styling */
.tweet-message {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin: 15px 0;
    max-width: 500px;
}

.tweet-header {
    display: flex;
    align-items: center;
    padding: 12px 16px 8px;
    border-bottom: 1px solid #f0f0f0;
}

.tweet-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ff6b9d 0%, #c44569 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-right: 12px;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tweet-handle {
    display: flex;
    flex-direction: column;
}

.display-name {
    font-weight: bold;
    font-size: 14px;
    color: #14171a;
    font-family: 'Courier New', monospace;
}

.username {
    font-size: 12px;
    color: #657786;
    font-family: 'Courier New', monospace;
}

.tweet-content {
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.4;
    color: #14171a;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', monospace;
}

.tweet-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px 12px;
    border-top: 1px solid #f0f0f0;
}

.tweet-actions {
    display: flex;
    gap: 16px;
}

.action {
    font-size: 12px;
    color: #657786;
    cursor: pointer;
    transition: color 0.2s ease;
    font-family: 'Courier New', monospace;
}

.action:hover {
    color: #1da1f2;
}

.tweet-time {
    font-size: 12px;
    color: #657786;
    font-family: 'Courier New', monospace;
}

.tweet-message:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
    transition: all 0.2s ease;
}
