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

body{
    font-family:Arial, Helvetica, sans-serif;
    background:#111827;
    color:#f5f5f5;
    min-height:100vh;
}

header{
    background:#1f2937;
    padding:20px 40px;
    border-bottom:1px solid #2f3b4d;
}

header h1{
    font-size:2rem;
    margin-top:10px;
}

header p{
    color:#b7bcc5;
    margin-top:5px;
}

.mode-badge{
    display:inline-block;
    margin-top:12px;
    padding:6px 10px;
    background:#123d38;
    border:1px solid #2c7a70;
    border-radius:999px;
    color:#9dd8cc;
    font-size:.82rem;
    font-weight:bold;
}

.logo a{
    color:#60a5fa;
    text-decoration:none;
    font-weight:bold;
}

.logo a:hover{
    text-decoration:underline;
}

.chat-layout{
    display:grid;
    grid-template-columns:320px 1fr;
    height:calc(100vh - 110px);
}

.sidebar{
    background:#1f2937;
    padding:30px;
    border-right:1px solid #2f3b4d;
    overflow-y:auto;
}

.sidebar h2{
    margin-bottom:20px;
}

.sidebar h3{
    margin-top:30px;
    margin-bottom:10px;
}

.sidebar p{
    color:#c8c8c8;
    line-height:1.6;
}

.sidebar ul{
    margin-left:20px;
    margin-top:10px;
}

.sidebar li{
    margin-bottom:10px;
}

.prompt-list{
    display:grid;
    gap:9px;
}

.prompt-list button{
    padding:10px 12px;
    border:1px solid #3d4a5d;
    border-radius:8px;
    background:#111827;
    color:#dbeafe;
    cursor:pointer;
    font:inherit;
    text-align:left;
}

.prompt-list button:hover,
.prompt-list button:focus-visible{
    border-color:#60a5fa;
    background:#17233a;
}

.chat-window{
    display:flex;
    flex-direction:column;
    background:#111827;
}

.chat-messages{
    flex:1;
    overflow-y:auto;
    padding:35px;
    display:flex;
    flex-direction:column;
    gap:20px;
}

.assistant-message{
    max-width:750px;
    background:#1f2937;
    padding:22px;
    border-radius:12px;
    line-height:1.7;
    align-self:flex-start;
    word-wrap:break-word;
    white-space:pre-wrap;
}

.user-message{
    max-width:750px;
    background:#2563eb;
    color:white;
    padding:22px;
    border-radius:12px;
    line-height:1.7;
    align-self:flex-end;
    word-wrap:break-word;
    white-space:pre-wrap;
}

#typing-indicator{
    opacity:.75;
    font-style:italic;
}

.chat-input{
    display:flex;
    gap:15px;
    padding:25px;
    border-top:1px solid #2f3b4d;
    background:#1f2937;
}

.chat-input input{
    flex:1;
    padding:16px;
    border:none;
    border-radius:8px;
    font-size:16px;
    outline:none;
    background:white;
}

.chat-input input:focus{
    box-shadow:0 0 0 2px #2563eb;
}

.chat-input button{
    padding:16px 30px;
    border:none;
    border-radius:8px;
    background:#2563eb;
    color:white;
    cursor:pointer;
    font-size:16px;
    font-weight:bold;
    transition:background .2s ease;
}

.chat-input button:hover{
    background:#1d4ed8;
}

.chat-input button:active{
    transform:scale(.98);
}

.chat-input button:disabled{
    cursor:wait;
    opacity:.65;
}

@media (max-width: 760px){
    header{
        padding:18px 22px;
    }

    .chat-layout{
        grid-template-columns:1fr;
        height:auto;
    }

    .sidebar{
        border-right:none;
        border-bottom:1px solid #2f3b4d;
    }

    .chat-window{
        min-height:70vh;
    }

    .chat-messages{
        min-height:420px;
        padding:22px;
    }

    .chat-input{
        padding:18px;
    }
}

@media (max-width: 520px){
    .chat-input{
        flex-direction:column;
    }

    .chat-input button{
        width:100%;
    }
}
