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

:root {
    --bg: #0b0d12;
    --sidebar: #10131a;
    --panel: #151922;
    --panel-light: #1b202c;
    --border: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --muted: #9198a8;
    --accent: #5b6cff;
    --accent-hover: #7180ff;
}

body {
    width: 100%;
    height: 100vh;

    overflow: hidden;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    background: var(--bg);
    color: var(--text);
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}


/* =========================
   APP
   ========================= */

.app {
    width: 100%;
    height: 100vh;

    display: flex;
}


/* =========================
   SIDEBAR
   ========================= */

.sidebar {
    width: 270px;
    height: 100vh;

    display: flex;
    flex-direction: column;

    padding: 18px 14px;

    background: var(--sidebar);

    border-right: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;

    padding: 8px 10px 22px;

    font-size: 17px;
    font-weight: 700;
}

.logo {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: linear-gradient(
        135deg,
        #5869ff,
        #8c5cff
    );

    color: white;

    font-weight: 800;
    font-size: 17px;

    box-shadow:
        0 8px 25px rgba(91, 108, 255, 0.28);
}


/* New Chat */

.new-chat {
    width: 100%;

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 13px 15px;

    border: 1px solid var(--border);
    border-radius: 13px;

    background: var(--panel);

    color: white;

    font-weight: 600;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.new-chat span {
    font-size: 20px;
}

.new-chat:hover {
    background: var(--panel-light);
    transform: translateY(-1px);
}


/* Sidebar title */

.sidebar-title {
    margin: 24px 10px 10px;

    color: var(--muted);

    font-size: 12px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.08em;
}


/* History */

.chat-history {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-item {
    padding: 11px 12px;

    border-radius: 10px;

    color: #cbd0dc;

    font-size: 14px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    transition: background 0.2s ease;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.05);
}


/* Sidebar bottom */

.sidebar-bottom {
    margin-top: auto;
}

.sidebar-bottom button {
    width: 100%;

    padding: 12px;

    border: none;
    border-radius: 10px;

    background: transparent;

    color: var(--muted);

    text-align: left;
}

.sidebar-bottom button:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}


/* =========================
   MAIN
   ========================= */

.main {
    position: relative;

    width: calc(100% - 270px);
    height: 100vh;

    display: flex;
    flex-direction: column;

    background:
        radial-gradient(
            circle at 50% 10%,
            rgba(91, 108, 255, 0.08),
            transparent 35%
        ),
        var(--bg);
}


/* =========================
   TOPBAR
   ========================= */

.topbar {
    height: 64px;

    display: flex;
    align-items: center;

    padding: 0 22px;

    border-bottom: 1px solid var(--border);
}

.mobile-brand {
    display: none;

    align-items: center;
    gap: 10px;

    font-weight: 700;
}

.menu-button {
    display: none;
}


/* =========================
   CHAT
   ========================= */

.chat-area {
    flex: 1;

    overflow-y: auto;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 40px 24px 160px;
}


/* Welcome */

.welcome {
    width: 100%;
    max-width: 760px;

    text-align: center;
}

.welcome-logo {
    width: 62px;
    height: 62px;

    margin: 0 auto 22px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 18px;

    background: linear-gradient(
        135deg,
        #5869ff,
        #8c5cff
    );

    font-size: 28px;
    font-weight: 800;

    box-shadow:
        0 18px 55px rgba(91, 108, 255, 0.28);
}

.welcome h1 {
    margin-bottom: 10px;

    font-size: clamp(30px, 5vw, 44px);

    letter-spacing: -0.03em;
}

.welcome p {
    color: var(--muted);

    font-size: 16px;
}


/* Suggestion buttons */

.suggestions {
    margin-top: 35px;

    display: grid;
    grid-template-columns: repeat(2, 1fr);

    gap: 12px;
}

.suggestions button {
    min-height: 65px;

    padding: 15px;

    border: 1px solid var(--border);
    border-radius: 15px;

    background: rgba(255, 255, 255, 0.025);

    color: #dce0e9;

    text-align: left;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.suggestions button:hover {
    background: rgba(255, 255, 255, 0.06);

    border-color: rgba(91, 108, 255, 0.35);

    transform: translateY(-2px);
}


/* =========================
   INPUT
   ========================= */

.input-area {
    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    padding: 20px 24px 18px;

    background:
        linear-gradient(
            to top,
            var(--bg) 70%,
            transparent
        );
}

#chat-form {
    width: min(820px, 100%);

    margin: 0 auto;

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 9px;

    background: var(--panel);

    border: 1px solid var(--border);

    border-radius: 18px;

    box-shadow:
        0 15px 45px rgba(0, 0, 0, 0.35);
}

#message {
    flex: 1;

    min-width: 0;

    padding: 13px 14px;

    border: none;
    outline: none;

    background: transparent;

    color: white;

    font-size: 15px;
}

#message::placeholder {
    color: #777f91;
}

#send-button {
    width: 42px;
    height: 42px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 12px;

    background: var(--accent);

    color: white;

    font-size: 22px;
    font-weight: 700;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

#send-button:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.disclaimer {
    margin-top: 9px;

    color: #656c7c;

    font-size: 11px;

    text-align: center;
}


/* =========================
   SCROLLBAR
   ========================= */

.chat-area::-webkit-scrollbar {
    width: 7px;
}

.chat-area::-webkit-scrollbar-track {
    background: transparent;
}

.chat-area::-webkit-scrollbar-thumb {
    background: #292e3b;
    border-radius: 20px;
}


/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 800px) {

    .sidebar {
        display: none;
    }

    .main {
        width: 100%;
    }

    .topbar {
        justify-content: space-between;
    }

    .mobile-brand {
        display: flex;
    }

    .menu-button {
        display: block;

        width: 40px;
        height: 40px;

        border: 1px solid var(--border);
        border-radius: 10px;

        background: var(--panel);

        color: white;
    }

    .suggestions {
        grid-template-columns: 1fr;
    }

    .chat-area {
        padding-left: 18px;
        padding-right: 18px;
    }

    .input-area {
        padding-left: 12px;
        padding-right: 12px;
    }
}
