body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #0f172a;
    height: 100vh;
    overflow: hidden;
}


.chat-container {
    width: 60%;
    background: #020617;
    display: flex;
    flex-direction: column;
}


.chat-box {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}



.chat-header {
    padding: 14px;
    background: #020617;
    color: #e5e7eb;
    font-weight: bold;
    border-bottom: 1px solid #1e293b;
}

.status {
    float: right;
    color: #22c55e;
    font-size: 12px;
}



.bot-msg, .user-msg {
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    max-width: 85%;
    line-height: 1.4;
}

.bot-msg {
    background: #1e293b;
    color: #e5e7eb;
}

.user-msg {
    background: #2563eb;
    color: #fff;
    margin-left: auto;
}

.chat-input {
    position: sticky;
    bottom: 0;
    background: #020617;
    padding: 10px;
}


.chat-input input {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: none;
    outline: none;
}

.chat-input button {
    margin-left: 8px;
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    background: #22c55e;
    color: #000;
    font-weight: bold;
    cursor: pointer;
}
.character-panel {
    text-align: center;
    padding: 10px;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #22c55e;
    object-fit: cover;
}

.speech-indicator {
    display: none;
    font-size: 20px;
    margin-top: 5px;
}
.role-select {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 10px;
    z-index: 10;
    position: relative;
}

.role-select button {
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    border: none;
    background: #334155;
    color: #fff;
    font-size: 13px;
}

.role-select button:hover {
    background: #22c55e;
    color: #000;
}
.role-btn.active {
    background: #22c55e !important;
    color: #000 !important;
    font-weight: bold;
}

.system-msg {
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    margin: 8px 0;
}
.avatar.happy {
    border-color: #22c55e;
    transform: scale(1.05);
}

.avatar.sad {
    border-color: #38bdf8;
    filter: grayscale(30%);
}

.avatar.stressed {
    border-color: #f97316;
}

.avatar.bored {
    border-color: #a855f7;
}

.avatar.speaking {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}
.main-layout {
    display: flex;
    height: 100vh;
}


.robot-panel {
    width: 40%;
    background: #020617;
    display: flex;
    justify-content: center;
    align-items: center;
    border-left: 1px solid #1e293b;
}


#robotAvatar {
    width: 300px;
    height: 300px;
}
.mini-avatar {
    display: inline-block;
    margin-right: 10px;
    vertical-align: middle;
}

.mini-avatar img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #22c55e;
    object-fit: cover;
}

#robotAvatar svg.robot-speaking-svg {
    animation: speakBounce 0.18s infinite alternate;
    transform-origin: center bottom;
}

@keyframes speakBounce {
    from {
        transform: scale(1) translateY(0);
    }
    to {
        transform: scale(1.1) translateY(-6px);
    }
}

