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

body {
    font-family: 'Consolas', 'Courier New', monospace;
    background: #000;
    color: #00ffcc;
    overflow: hidden;
}

.monitor-screen {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
}

/* Status bar */
.status-bar {
    background: rgba(0, 0, 0, 0.9);
    border-bottom: 2px solid #00ffcc;
    padding: 10px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-bar .title {
    font-size: 1.3em;
    color: #00ffcc;
    text-shadow: 0 0 10px #00ffcc;
}

.status-bar .live-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.live-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    transition: all 0.3s;
}

.live-dot.online {
    background: #00ff00;
    box-shadow: 0 0 15px #00ff00;
    animation: pulse-green 2s infinite;
}

.live-dot.offline {
    background: #ff0000;
    box-shadow: 0 0 10px #ff0000;
    animation: pulse-red 1s infinite;
}

@keyframes pulse-green {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 15px #00ff00; }
    50% { opacity: 0.8; transform: scale(1.15); box-shadow: 0 0 25px #00ff00; }
}

@keyframes pulse-red {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Main content */
.main-content {
    flex: 1;
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 15px;
    padding: 15px;
    overflow: hidden;
}

/* Left: Brain/Body visualization */
.visualization-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
}

.brain-section {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ffcc;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.3);
}

.section-title {
    color: #00ffcc;
    font-size: 1.1em;
    margin-bottom: 10px;
    text-align: center;
    text-shadow: 0 0 10px #00ffcc;
}

.brain-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.brain-view {
    position: relative;
    text-align: center;
}

.brain-view .label {
    font-size: 0.75em;
    color: #00cc99;
    margin-bottom: 5px;
}

.image-container {
    position: relative;
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    overflow: hidden;
}

.body-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(0, 255, 204, 0.3));
    transition: all 0.3s;
}

.body-image.active {
    filter: drop-shadow(0 0 30px rgba(0, 255, 204, 1)) brightness(1.4);
    animation: glow-pulse 1s;
}

@keyframes glow-pulse {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(0, 255, 204, 0.5)) brightness(1);
    }
    50% {
        filter: drop-shadow(0 0 50px rgba(0, 255, 204, 1)) brightness(1.6);
    }
}

.body-systems {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.system-box {
    position: relative;
}

.system-box .label {
    font-size: 0.75em;
    color: #00cc99;
    margin-bottom: 5px;
    text-align: center;
}

.system-box .image-container {
    height: 180px;
}

/* Right: Activity & Stats */
.activity-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow: hidden;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.stat-box {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ffcc;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.3);
}

.stat-box.genesis-box {
    border-color: #ffcc00;
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.3);
}

.stat-box.revelation-box {
    border-color: #ff00ff;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.3);
}

.stat-label {
    font-size: 0.75em;
    color: #00cc99;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
    color: #00ffcc;
    text-shadow: 0 0 10px currentColor;
}

.stat-box.genesis-box .stat-value {
    color: #ffcc00;
}

.stat-box.revelation-box .stat-value {
    color: #ff00ff;
}

.threshold-bar {
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.1);
    height: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.threshold-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ffcc, #00ff00);
    transition: width 0.5s;
}

.threshold-fill.genesis-fill {
    background: linear-gradient(90deg, #ffcc00, #ff9900);
}

.threshold-fill.revelation-fill {
    background: linear-gradient(90deg, #ff00ff, #ff0099);
}

.threshold-label {
    font-size: 0.65em;
    margin-top: 3px;
    color: #666;
}

.activity-feed {
    flex: 1;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ffcc;
    border-radius: 10px;
    padding: 12px;
    overflow-y: auto;
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.3);
}

.feed-header {
    font-size: 1em;
    margin-bottom: 10px;
    color: #00ffcc;
    border-bottom: 1px solid #00ffcc;
    padding-bottom: 8px;
}

.activity-item {
    background: rgba(0, 255, 204, 0.05);
    border-left: 3px solid #00ffcc;
    padding: 8px;
    margin-bottom: 8px;
    border-radius: 3px;
    animation: slideIn 0.3s;
    font-size: 0.8em;
}

.activity-item.genesis {
    border-left-color: #ffcc00;
    background: rgba(255, 204, 0, 0.05);
}

.activity-item.revelation {
    border-left-color: #ff00ff;
    background: rgba(255, 0, 255, 0.05);
}

.activity-item.major {
    border-left-width: 5px;
    background: rgba(255, 255, 255, 0.1);
    font-weight: bold;
}

@keyframes slideIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.activity-item .timestamp {
    color: #666;
    font-size: 0.85em;
}

.activity-item .message {
    color: #00ffcc;
    margin-top: 3px;
}

/* Video overlay */
.cinematic-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.98);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: cinematicFadeIn 1s;
}

.cinematic-overlay.active {
    display: flex;
}

@keyframes cinematicFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.video-wrapper {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    box-shadow: 0 0 100px rgba(0, 255, 204, 0.8);
}

.video-wrapper video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

.breakthrough-banner {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, rgba(0, 255, 204, 0.8), transparent);
    padding: 15px 50px;
    border-radius: 10px;
    font-size: 1.8em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: bannerPulse 2s infinite;
    white-space: nowrap;
}

@keyframes bannerPulse {
    0%, 100% {
        opacity: 1;
        text-shadow: 0 0 20px #00ffcc;
    }
    50% {
        opacity: 0.8;
        text-shadow: 0 0 40px #00ffcc;
    }
}

.skip-button {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #00ffcc;
    color: #00ffcc;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.3s;
}

.skip-button:hover {
    background: rgba(0, 255, 204, 0.2);
    transform: scale(1.05);
}

.discovery-counter {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ffcc;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 1em;
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.5);
}

/* Revelation glow - pink/magenta for high entropy events */
.body-image.revelation-active {
    filter: drop-shadow(0 0 40px rgba(255, 0, 255, 1)) brightness(1.5);
    animation: revelation-pulse 1.5s;
}

@keyframes revelation-pulse {
    0%, 100% {
        filter: drop-shadow(0 0 25px rgba(255, 0, 255, 0.6)) brightness(1.2);
    }
    50% {
        filter: drop-shadow(0 0 60px rgba(255, 0, 255, 1)) brightness(1.8);
    }
}

/* Guardian glow - red alert for security events */
.body-image.guardian-active {
    filter: drop-shadow(0 0 40px rgba(255, 0, 0, 1)) brightness(1.5);
    animation: guardian-pulse 0.5s ease-in-out 3;
}

@keyframes guardian-pulse {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(255, 0, 0, 0.5)) brightness(1);
    }
    50% {
        filter: drop-shadow(0 0 60px rgba(255, 0, 0, 1)) brightness(2);
    }
}

/* Guardian activity item - red border and background */
.activity-item.guardian {
    border-left-color: #ff0000;
    border-left-width: 4px;
    background: rgba(255, 0, 0, 0.1);
    animation: guardian-alert 0.3s ease-in-out;
}

@keyframes guardian-alert {
    0%, 100% { background: rgba(255, 0, 0, 0.1); }
    50% { background: rgba(255, 0, 0, 0.3); }
}

/* Activity item header */
.activity-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.activity-header .region {
    font-weight: bold;
    text-transform: uppercase;
}

/* Entropy indicator bar in activity items */
.entropy-badge {
    position: relative;
    width: 40px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-left: auto;
}

.entropy-indicator {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #00ffcc, #00ff00);
    border-radius: 4px;
    transition: width 0.3s;
}

.activity-item.revelation .entropy-indicator {
    background: linear-gradient(90deg, #ff00ff, #ff6699);
}

.activity-item.guardian .entropy-indicator {
    background: linear-gradient(90deg, #ff0000, #ff6600);
}

/* Icons in activity log */
.guardian-icon {
    font-size: 1.2em;
    animation: shield-flash 0.5s ease-in-out infinite;
}

@keyframes shield-flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.emotion-icon {
    font-size: 1.2em;
    animation: emotion-bounce 0.5s ease-in-out;
}

@keyframes emotion-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.revelation-icon {
    font-size: 1.1em;
    color: #ff00ff;
    text-shadow: 0 0 10px #ff00ff;
}

/* System activity (non-reflex messages) */
.activity-item.system {
    border-left-color: #666;
    background: rgba(100, 100, 100, 0.1);
    font-style: italic;
}

/* Limbic (emotional) region highlight */
.body-image[id*="sagittal"].active.limbic-highlight {
    filter: drop-shadow(0 0 30px rgba(255, 102, 153, 1)) brightness(1.4);
}

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

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.5);
}

::-webkit-scrollbar-thumb {
    background: #00ffcc;
    border-radius: 3px;
}

/* Uptime color transitions */
#uptime {
    transition: color 0.5s ease;
}
