body {
    background-color: #1a1a2e;
    color: #eee2dc;
    font-family: "Arial", sans-serif;
    font-size: 14px;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.interface-container {
    display: grid;
    grid-template-columns: 300px 1fr 250px;
    height: 100vh;
    gap: 2px;
}

.control-panel {
    background-color: #16213e;
    padding: 15px;
    border-right: 1px solid #0f3460;
    overflow-y: auto;
}

.panel-title {
    color: #4fc3f7;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 15px;
    border-bottom: 1px solid #0f3460;
    padding-bottom: 5px;
}

.control-group {
    margin-bottom: 20px;
    padding: 10px;
    background-color: rgba(15, 52, 96, 0.3);
    border-radius: 5px;
}

.control-label {
    color: #81c784;
    font-size: 13px;
    margin-bottom: 5px;
    font-weight: bold;
}

.control-input {
    width: 100%;
    background-color: #0f3460;
    color: #eee2dc;
    border: 1px solid #1a1a2e;
    padding: 5px;
    font-size: 13px;
    border-radius: 3px;
}

.button {
    background-color: #4fc3f7;
    color: #1a1a2e;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 12px;
    border-radius: 3px;
    margin: 3px 0;
    width: 100%;
    font-weight: bold;
}

.button:hover {
    background-color: #29b6f6;
}

.button.danger {
    background-color: #f44336;
    color: white;
}

.button.danger:hover {
    background-color: #d32f2f;
}

.memory-canvas {
    background-color: #0f3460;
    position: relative;
    overflow: hidden;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(79, 195, 247, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(129, 199, 132, 0.1) 0%, transparent 50%);
}

.node {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    cursor: move;
    text-align: center;
    border: 2px solid;
    transition: all 0.3s ease;
    user-select: none;
    z-index: 10;
}

.node:hover {
    transform: scale(1.1);
    z-index: 20;
}

.node.childhood {
    background-color: rgba(129, 199, 132, 0.8);
    border-color: #81c784;
    color: #1b5e20;
}

.node.adolescence {
    background-color: rgba(79, 195, 247, 0.8);
    border-color: #4fc3f7;
    color: #01579b;
}

.node.adulthood {
    background-color: rgba(255, 183, 77, 0.8);
    border-color: #ffb74d;
    color: #e65100;
}

.node.traumatic {
    background-color: rgba(244, 67, 54, 0.8);
    border-color: #f44336;
    color: #b71c1c;
}

.node.anomalous {
    background-color: rgba(156, 39, 176, 0.8);
    border-color: #9c27b0;
    color: #4a148c;
    animation: anomaly-pulse 2s infinite;
}

@keyframes anomaly-pulse {
    0%, 100% { box-shadow: 0 0 5px rgba(156, 39, 176, 0.5); }
    50% { box-shadow: 0 0 20px rgba(156, 39, 176, 0.8); }
}

.node.corrupted {
    background-color: rgba(96, 125, 139, 0.8);
    border-color: #607d8b;
    color: #263238;
    opacity: 0.6;
    border-style: dashed;
}

.node.temporal {
    background-color: rgba(255, 152, 0, 0.8);
    border-color: #ff9800;
    color: #e65100;
    animation: temporal-flicker 1.5s infinite;
}

@keyframes temporal-flicker {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.5; }
}

.connection {
    position: absolute;
    height: 2px;
    background-color: #4fc3f7;
    transform-origin: left center;
    opacity: 0.7;
    z-index: 1;
}

.connection.weak {
    background-color: #607d8b;
    opacity: 0.4;
}

.connection.corrupted {
    background-color: #f44336;
    opacity: 0.6;
    animation: connection-flicker 1s infinite;
}

@keyframes connection-flicker {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.2; }
}

.info-panel {
    background-color: #16213e;
    padding: 15px;
    border-left: 1px solid #0f3460;
    overflow-y: auto;
}

.memory-details {
    background-color: rgba(15, 52, 96, 0.3);
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.detail-label {
    color: #4fc3f7;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 3px;
}

.detail-value {
    color: #eee2dc;
    font-size: 13px;
    margin-bottom: 8px;
}

.anomaly-warning {
    background-color: rgba(244, 67, 54, 0.2);
    border: 1px solid #f44336;
    padding: 8px;
    border-radius: 3px;
    color: #ffcdd2;
    font-size: 12px;
    margin: 10px 0;
}

.status-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #1a1a2e;
    border-top: 1px solid #0f3460;
    padding: 8px 15px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    z-index: 100;
}

.status-item {
    color: #81c784;
}

.status-warning {
    color: #ffb74d;
}

.status-error {
    color: #f44336;
}

.generation-log {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(15, 52, 96, 0.95);
    border: 1px solid #1a1a2e;
    padding: 10px;
    width: 350px;
    height: 180px;
    overflow-y: auto;
    font-family: "Courier New", monospace;
    font-size: 11px;
    border-radius: 5px;
    z-index: 50;
}

.log-entry {
    margin: 3px 0;
    color: #eee2dc;
    line-height: 1.4;
}

.log-warning {
    color: #ffb74d;
}

.log-error {
    color: #f44336;
}

.log-anomaly {
    color: #9c27b0;
}

.subject-selector {
    margin-bottom: 15px;
}

.memory-count {
    font-size: 12px;
    color: #81c784;
    margin-top: 5px;
}

.overlay-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(26, 26, 46, 0.95);
    color: #eee2dc;
    padding: 30px;
    border-radius: 5px;
    border: 1px solid #4fc3f7;
    text-align: center;
    font-size: 16px;
    z-index: 100;
}

.palace-room {
    position: absolute;
    border: 2px dashed rgba(79, 195, 247, 0.3);
    background-color: rgba(79, 195, 247, 0.05);
    border-radius: 5px;
    pointer-events: none;
    z-index: 0;
}

@keyframes palace-instability {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-2px) rotate(0.5deg); }
    50% { transform: translateY(0) rotate(0deg); }
    75% { transform: translateY(-1px) rotate(-0.5deg); }
}