:root {
    --bg-color: #ffffff;
    --text-primary: #000000;
    --text-muted: #888888;
    --accent: #5555ff;
    --border: #eeeeee;
    --font-main: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
}

.lab-header {
    border-bottom: 1px solid var(--border);
    padding: 2rem 5%;
    margin-bottom: 2rem;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
}

.lab-id {
    font-weight: 700;
}

.back-link {
    text-decoration: none;
    color: var(--text-muted);
}

.status-online { color: #10b981; }

.roles-explanation {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
}

.role-card {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.role-icon { font-size: 1rem; }

.role-info strong {
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
}

.role-info p {
    font-size: 0.6rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.lab-container {
    max-width: 700px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

#messages-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.message {
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.msg-meta {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

.char-name {
    color: var(--text-primary);
    font-weight: 700;
}

.msg-text {
    font-size: 1rem;
    font-weight: 400;
    max-width: 60ch;
}

.loading-state {
    text-align: center;
    padding: 5rem 0;
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.8rem;
}

.pulse {
    width: 6px;
    height: 6px;
    background: var(--text-primary);
    margin: 0 auto 1rem;
    border-radius: 50%;
    animation: pulser 2s infinite ease-in-out;
}

@keyframes pulser {
    0% { transform: scale(0.8); opacity: 0.2; }
    50% { transform: scale(1.5); opacity: 1; }
    100% { transform: scale(0.8); opacity: 0.2; }
}

.lab-footer {
    margin-top: 6rem;
    padding: 4rem 1rem;
    border-top: 1px solid var(--border);
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 0.2em;
}

@media (max-width: 600px) {
    .roles-explanation { grid-template-columns: 1fr 1fr; }
}
