
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #080d19;
    --panel: #101a2d;
    --panel-2: #14213a;
    --surface: #1a2944;
    --text: #edf3ff;
    --muted: #8999b5;
    --border: rgba(148, 170, 205, .15);
    --accent: #548cff;
    --accent-2: #8b72ff;
    --shadow: 0 20px 60px rgba(0, 0, 0, .22);
}

body.light {
    --bg: #f4f7fc;
    --panel: #ffffff;
    --panel-2: #f0f4fb;
    --surface: #e8eef8;
    --text: #17233a;
    --muted: #71809a;
    --border: rgba(35, 55, 90, .12);
    --accent: #326ee8;
    --accent-2: #7656df;
    --shadow: 0 20px 60px rgba(30, 50, 90, .08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    transition: background .25s, color .25s;
}

button, textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */

.sidebar {
    width: 270px;
    flex-shrink: 0;
    background: var(--panel);
    border-right: 1px solid var(--border);
    padding: 27px 19px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 3px 5px 20px;
}

.brand-logo {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    font-size: 24px;
    font-weight: 800;
    box-shadow: 0 7px 22px rgba(84, 140, 255, .25);
}

.brand h2 {
    font-size: 19px;
    letter-spacing: 1.5px;
}

.brand span {
    font-size: 8px;
    color: var(--muted);
    letter-spacing: 1.1px;
    display: block;
    margin-top: 4px;
}

.new-chat {
    border: 1px solid var(--border);
    background: linear-gradient(120deg, var(--accent), var(--accent-2));
    color: white;
    padding: 13px;
    border-radius: 11px;
    font-weight: 600;
    transition: .2s;
}

.new-chat:hover {
    opacity: .88;
    transform: translateY(-1px);
}

.sidebar-label {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: -14px;
}

.nav-menu {
    display: grid;
    gap: 7px;
}

.nav-item {
    padding: 12px;
    text-align: left;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
}

.nav-item.active,
.nav-item:hover {
    background: var(--surface);
    color: var(--text);
}

.history-list {
    flex: 1;
    overflow-y: auto;
}

.empty-history {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.7;
}

.sidebar-bottom {
    border-top: 1px solid var(--border);
    padding-top: 18px;
}

.profile {
    display: flex;
    align-items: center;
    gap: 11px;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    font-weight: 700;
}

.profile strong,
.profile span {
    display: block;
    font-size: 11px;
}

.profile span {
    color: var(--muted);
    margin-top: 4px;
    font-size: 10px;
}

/* MAIN PANEL */

.main-panel {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    height: 76px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 35px;
    background: var(--panel);
}

.breadcrumb {
    font-size: 12px;
    color: var(--muted);
}

.breadcrumb span {
    margin: 0 9px;
    color: var(--accent);
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.status {
    font-size: 11px;
    color: #35c994;
    display: flex;
    align-items: center;
    gap: 7px;
}

.status i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #35c994;
    box-shadow: 0 0 10px #35c994;
}

.icon-button {
    border: 1px solid var(--border);
    color: var(--text);
    background: var(--panel-2);
    width: 37px;
    height: 37px;
    border-radius: 10px;
}

.icon-button:hover {
    border-color: var(--accent);
}

.mobile-menu {
    display: none;
}

/* CHAT */

.chat-area {
    flex: 1;
    width: 100%;
    max-width: 1050px;
    margin: auto;
    padding: 45px 55px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    gap: 20px;
}

.welcome-screen {
    margin: auto;
    width: 100%;
    max-width: 760px;
    padding: 35px 0;
}

.welcome-badge {
    display: inline-block;
    padding: 9px 14px;
    border-radius: 30px;
    color: #8baeff;
    background: rgba(84, 140, 255, .10);
    border: 1px solid rgba(84, 140, 255, .2);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

.welcome-screen h1 {
    font-size: clamp(36px, 5vw, 55px);
    letter-spacing: -2px;
    line-height: 1.16;
    margin-top: 26px;
}

.welcome-screen h1 span {
    background: linear-gradient(100deg, #5c9aff, #a28aff);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.welcome-screen > p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.9;
    max-width: 540px;
    margin-top: 18px;
}

.suggestions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 13px;
    margin-top: 36px;
}

.suggestion {
    padding: 19px;
    text-align: left;
    border: 1px solid var(--border);
    background: var(--panel);
    border-radius: 13px;
    color: var(--text);
    transition: .2s;
}

.suggestion:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.suggestion > span {
    color: var(--accent);
    display: block;
    font-size: 21px;
    margin-bottom: 12px;
}

.suggestion strong,
.suggestion small {
    display: block;
}

.suggestion strong {
    font-size: 13px;
}

.suggestion small {
    color: var(--muted);
    font-size: 11px;
    margin-top: 7px;
}

/* MESSAGES */

.message {
    max-width: 82%;
    padding: 15px 19px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.8;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.message.bot {
    align-self: flex-start;
    background: var(--panel-2);
    border: 1px solid var(--border);
}

.message.user {
    align-self: flex-end;
    color: white;
    background: linear-gradient(120deg, #326ee8, #7559df);
}

/* INPUT */

.input-section {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    padding: 12px 35px 22px;
}

.input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    padding: 10px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.input-wrapper:focus-within {
    border-color: var(--accent);
}

.input-wrapper textarea {
    flex: 1;
    min-width: 0;
    resize: none;
    max-height: 150px;
    padding: 13px;
    border: none;
    outline: none;
    color: var(--text);
    background: transparent;
    font-size: 14px;
    line-height: 1.6;
}

.input-wrapper textarea::placeholder {
    color: var(--muted);
}

.input-wrapper button {
    width: 43px;
    height: 43px;
    flex-shrink: 0;
    border: none;
    border-radius: 11px;
    color: white;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    font-size: 23px;
    font-weight: 700;
}

.input-wrapper button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.input-note,
.footer-brand {
    text-align: center;
    color: var(--muted);
    font-size: 10px;
    margin-top: 12px;
}

.footer-brand {
    font-size: 9px;
    letter-spacing: 1.5px;
    margin-top: 9px;
    opacity: .7;
}

/* RESPONSIVE */

@media (max-width: 800px) {
    .sidebar {
        position: fixed;
        z-index: 20;
        left: -280px;
        top: 0;
        bottom: 0;
        transition: left .25s;
        box-shadow: var(--shadow);
    }

    .sidebar.open {
        left: 0;
    }

    .mobile-menu {
        display: block;
    }

    .topbar {
        padding: 0 17px;
        gap: 12px;
    }

    .chat-area {
        padding: 28px 20px;
    }

    .input-section {
        padding: 10px 15px 18px;
    }
}

@media (max-width: 520px) {
    .suggestions {
        grid-template-columns: 1fr;
    }

    .welcome-screen h1 {
        font-size: 38px;
    }

    .welcome-screen > p {
        font-size: 13px;
    }

    .message {
        max-width: 94%;
        font-size: 13px;
    }

    .breadcrumb {
        font-size: 10px;
    }

    .status {
        font-size: 9px;
    }
}
