
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
    --bg: #101411;
    --panel: #171d19;
    --panel-light: #202922;
    --green: #a7c8ad;
    --green-dark: #344c3b;
    --text: #e5ebe5;
    --muted: #89958b;
    --border: #29332c;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: "DM Sans", sans-serif;
}

button, input {
    font: inherit;
}

.app {
    display: flex;
    width: min(1200px, 100%);
    height: 100vh;
    min-height: 500px;
    margin: auto;
    background: var(--bg);
}

.sidebar {
    width: 285px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 28px 22px;
    background: var(--panel);
    border-right: 1px solid var(--border);
}

.brand {
    font-size: 27px;
    font-weight: 700;
    letter-spacing: -2px;
    margin-bottom: 42px;
}

.brand span {
    color: var(--green);
}

.profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 42px;
}

.avatar, .mobile-avatar, .message-avatar {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 50%;
    color: #e4f0e5;
    background: linear-gradient(145deg, #526f58, #26392b);
    border: 1px solid #66846b;
}

.avatar {
    width: 48px;
    height: 48px;
    font-size: 23px;
}

.profile h2 {
    font-size: 14px;
    margin: 0 0 6px;
}

.profile p {
    margin: 0;
    font-size: 11px;
    color: var(--muted);
}

.dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 4px;
    border-radius: 50%;
    background: #8cc89a;
}

.side-label {
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 2px;
    margin-bottom: 14px;
}

.new-chat {
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    text-align: left;
    color: var(--text);
    background: var(--panel-light);
    cursor: pointer;
    transition: background .2s;
}

.new-chat:hover {
    background: #2a382d;
}

.sidebar-note {
    margin-top: 30px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #141a16;
}

.sidebar-note span {
    color: var(--green);
    font-size: 20px;
}

.sidebar-note p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.8;
}

.sidebar-bottom {
    margin-top: auto;
    padding-top: 25px;
    color: #657168;
    font-size: 11px;
}

.chat {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
}

.chat-header {
    height: 83px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 30px;
    border-bottom: 1px solid var(--border);
}

.chat-header h3 {
    font-size: 15px;
    margin: 0 0 5px;
}

.chat-header p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.header-icon {
    margin-left: auto;
    font-size: 22px;
    color: var(--green);
}

.mobile-avatar {
    display: none;
    width: 38px;
    height: 38px;
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 28px clamp(16px, 5vw, 65px);
}

.date-label {
    text-align: center;
    margin-bottom: 35px;
    color: #6f7d71;
    font-size: 10px;
    letter-spacing: 2px;
}

.message-row {
    display: flex;
    gap: 11px;
    margin-bottom: 25px;
    align-items: flex-start;
}

.message-avatar {
    width: 33px;
    height: 33px;
    font-size: 16px;
}

.message-content {
    max-width: min(500px, 85%);
    min-width: 0;
}

.sender {
    color: var(--green);
    font-size: 11px;
    margin: 2px 0 8px;
}

.sender span {
    margin-left: 7px;
    color: #667168;
}

.bubble {
    padding: 14px 17px;
    border-radius: 4px 15px 15px 15px;
    font-size: 13px;
    line-height: 1.85;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.luka-bubble {
    background: var(--panel-light);
    border: 1px solid var(--border);
}

.user-row {
    justify-content: flex-end;
}

.user-row .message-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.user-row .sender {
    color: #a8b5aa;
}

.user-bubble {
    color: #eef5ee;
    background: var(--green-dark);
    border: 1px solid #435e49;
    border-radius: 15px 4px 15px 15px;
}

.typing {
    display: none;
    padding: 0 30px 12px;
    font-size: 11px;
    color: var(--muted);
}

.typing span {
    animation: blink 1s infinite;
}

@keyframes blink {
    50% { opacity: .2; }
}

.composer {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 0 30px;
    padding: 10px 12px 10px 18px;
    border: 1px solid #344137;
    border-radius: 14px;
    background: var(--panel);
}

.composer:focus-within {
    border-color: #68856d;
}

.composer input {
    flex: 1;
    min-width: 0;
    padding: 9px 0;
    outline: none;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 13px;
}

.composer input::placeholder {
    color: #69766c;
}

.composer button {
    width: 37px;
    height: 37px;
    border: none;
    border-radius: 10px;
    background: var(--green);
    color: #152119;
    font-size: 23px;
    cursor: pointer;
    transition: transform .2s, background .2s;
}

.composer button:hover {
    transform: translateY(-2px);
    background: #c1dfc6;
}

.footer-note {
    text-align: center;
    color: #566359;
    font-size: 10px;
    padding: 12px 0 15px;
}

@media (max-width: 650px) {
    .sidebar {
        display: none;
    }

    .mobile-avatar {
        display: grid;
    }

    .chat-header {
        padding: 0 16px;
    }

    .messages {
        padding: 24px 14px;
    }

    .composer {
        margin: 0 12px;
    }

    .typing {
        padding-left: 16px;
    }
}
