:root {
    --bg-color: #0a0a1e;
    --text-color: #e0e0e0;
    --accent-color: #16213e;
    --highlight-color: #0f3460;
    --aurora-color: #00ff9d;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --font-size-base: 16px;
    --font-size-small: 14px;
    --font-size-smaller: 12px;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    overflow: hidden;
    font-size: var(--font-size-base);
}

.container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

.chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background-color: var(--accent-color);
    box-shadow: inset 0 0 10px var(--shadow-color);
}

.info-panel {
    width: 300px;
    background-color: var(--highlight-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: -5px 0 15px var(--shadow-color);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.info-panel-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-display {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
    background-color: var(--bg-color);
    border-radius: 10px;
    margin-bottom: 1rem;
    box-shadow: inset 0 0 10px var(--shadow-color);
}

.message {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 20px;
    max-width: 80%;
    animation: fadeIn 0.3s ease-in;
    white-space: pre-wrap;
    word-wrap: break-word;
    box-shadow: 0 3px 6px var(--shadow-color);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-message {
    background-color: var(--highlight-color);
    color: var(--text-color);
    align-self: flex-end;
    margin-left: 20%;
}

.aurora-message {
    background-color: var(--accent-color);
    color: var(--aurora-color);
    align-self: flex-start;
    margin-right: 20%;
}

.input-area {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background-color: var(--accent-color);
    border-radius: 25px;
    box-shadow: 0 4px 6px var(--shadow-color);
}

#prompt-input {
    flex-grow: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 20px;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: var(--font-size-base);
    box-shadow: inset 0 2px 4px var(--shadow-color);
}

button {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 20px;
    background-color: var(--highlight-color);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px var(--shadow-color);
}

button:hover {
    background-color: var(--aurora-color);
    color: var(--bg-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-color);
}

#logo {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 6px var(--shadow-color));
    align-self: center;
}

.info-text {
    text-align: center;
    margin-bottom: 1rem;
    font-size: var(--font-size-small);
}

.info-text h2 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.info-text p {
    margin-bottom: 0.5rem;
}

.feature-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    font-size: var(--font-size-smaller);
}

.feature-list li i {
    margin-right: 0.5rem;
    color: var(--aurora-color);
}

#status-label {
    font-weight: bold;
    color: var(--aurora-color);
    text-shadow: 0 2px 4px var(--shadow-color);
    margin-top: auto;
    text-align: center;
}

#brain-visualization {
    width: 100%;
    height: 60px;
    margin: 10px 0;
    filter: drop-shadow(0 2px 3px var(--shadow-color));
}

#brain-visualization svg {
    width: 100%;
    height: 100%;
}

#brain-visualization path {
    fill: none;
    stroke: var(--aurora-color);
    stroke-width: 1.5;
    transition: all 0.3s ease;
}

#brain-outline {
    stroke: var(--text-color);
    stroke-width: 1;
}

#theme-toggle, #info-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    background-color: var(--highlight-color);
    color: var(--text-color);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

#info-toggle {
    right: 4rem;
}

#theme-toggle:hover, #info-toggle:hover {
    background-color: var(--aurora-color);
    color: var(--bg-color);
}

#artifact-display {
    margin-top: 1rem;
    border: 1px solid var(--aurora-color);
    border-radius: 10px;
    padding: 1rem;
    background-color: rgba(0, 255, 157, 0.1);
}

.typing-indicator {
    display: inline-block;
    margin-left: 5px;
}

.typing-indicator span {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--aurora-color);
    border-radius: 50%;
    margin-right: 3px;
    animation: typing 1s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0); }
}

.code-block {
    background-color: #2a2a4a;
    border-radius: 5px;
    padding: 1rem;
    margin: 0.5rem 0;
    font-family: 'Courier New', Courier, monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .info-panel {
        width: 100%;
        height: 50%;
        transform: translateY(100%);
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
    }

    .info-panel.show {
        transform: translateY(0);
    }

    .feature-list {
        grid-template-columns: 1fr;
    }

    #brain-visualization {
        height: 40px;
    }

    #logo {
        width: 60px;
        height: 60px;
    }
}

@media (max-height: 600px) {
    .info-panel-content {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-around;
        align-items: center;
    }

    #logo, #brain-visualization {
        flex: 0 0 auto;
        margin: 0.5rem;
    }

    .info-text {
        flex: 1 1 auto;
        text-align: left;
    }

    .feature-list {
        grid-template-columns: repeat(3, 1fr);
    }

    #status-label {
        flex: 0 0 100%;
        margin-top: 0.5rem;
    }
}