:root {
    --bg: #0b1120;
    --panel: #111a2b;
    --panel-light: #18243a;
    --border: #26334a;
    --text: #f4f7fb;
    --muted: #98a6ba;
    --green: #b6f34a;
    --green-dark: #8ecb2d;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

button,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.app {
    display: flex;
    height: 100dvh;
    min-height: 500px;
    overflow: hidden;
}

/* SIDEBAR */

.sidebar {
    width: 260px;
    min-width: 260px;
    padding: 22px 16px;
    background: #0e1727;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

.brand-icon {
    width: 43px;
    height: 43px;
    border-radius: 14px;
    background: var(--green);
    color: #101827;
    display: grid;
    place-items: center;
    font-size: 25px;
    font-weight: 900;
}

.brand h2 {
    margin: 0 0 5px;
    font-size: 20px;
}

.brand small {
    color: var(--muted);
    font-size: 11px;
}

.new-chat {
    width: 100%;
    padding: 13px;
    border: 0;
    border-radius: 12px;
    background: var(--green);
    color: #101827;
    font-weight: 800;
}

.menu-title {
    margin: 24px 8px 10px;
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--muted);
}

.tool {
    padding: 13px 12px;
    text-align: left;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #cbd5e3;
    background: transparent;
}

.tool:hover,
.tool.active {
    background: var(--panel-light);
    border-color: var(--border);
    color: var(--green);
}

.sidebar-bottom {
    margin-top: auto;
    padding-top: 20px;
    color: var(--muted);
    font-size: 12px;
}

.free-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 20px;
}

.status-dot,
.online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    display: inline-block;
}

.sidebar-bottom p {
    margin-top: 20px;
}


/* MAIN */

.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: 68px;
    min-height: 68px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    gap: 12px;
}

.top-title {
    margin-right: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
}

.icon-button {
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 23px;
    padding: 8px;
}

.upgrade {
    padding: 10px 14px;
    border: 1px solid #4a5636;
    border-radius: 10px;
    color: var(--green);
    background: #202c22;
    font-size: 12px;
    font-weight: bold;
}


/* CHAT */

.chat-area {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 30px 20px;
}

.welcome {
    max-width: 720px;
    margin: 35px auto;
    text-align: center;
}

.hero-logo {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    margin: 0 auto 24px;
    border-radius: 24px;
    color: #101827;
    background: linear-gradient(
        135deg,
        #d3ff81,
        var(--green-dark)
    );
    box-shadow: 0 0 45px #b6f34a20;
    font-size: 42px;
    font-weight: 900;
}

.eyebrow {
    color: var(--green);
    font-size: 10px;
    letter-spacing: 3px;
    font-weight: bold;
}

.welcome h1 {
    font-size: clamp(27px, 5vw, 43px);
    margin: 15px 0;
    line-height: 1.2;
}

.welcome h1 span {
    color: var(--green);
}

.welcome-text {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.8;
    max-width: 450px;
    margin: 0 auto 35px;
}

.suggestions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    text-align: left;
}

.suggestion {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 18px;
    min-width: 0;
    background: var(--panel);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 15px;
    transition: 0.2s;
}

.suggestion:hover {
    border-color: var(--green);
    transform: translateY(-2px);
}

.suggestion span {
    font-size: 23px;
}

.suggestion strong {
    font-size: 13px;
}

.suggestion small {
    color: var(--muted);
    line-height: 1.5;
    font-size: 11px;
}


/* MESSAGES */

.messages {
    max-width: 760px;
    width: 100%;
    margin: 0 auto;
}

.message {
    margin-bottom: 22px;
    line-height: 1.8;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.message-label {
    display: block;
    margin-bottom: 7px;
    font-size: 11px;
    font-weight: bold;
    color: var(--green);
}

.message-bubble {
    padding: 14px 17px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--panel);
    white-space: pre-wrap;
}

.user-message .message-bubble {
    background: #1b2b38;
    border-color: #354a4e;
}

.assistant-message .message-bubble {
    background: #111a2b;
}


/* INPUT */

.composer-area {
    padding: 10px 20px 15px;
    background: var(--bg);
}

.composer {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 10px;
    background: var(--panel);
    border: 1px solid #35435a;
    border-radius: 16px;
}

.composer:focus-within {
    border-color: var(--green);
}

.composer textarea {
    flex: 1;
    width: 100%;
    min-width: 0;
    max-height: 130px;
    resize: none;
    padding: 10px 5px;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
}

.composer textarea::placeholder {
    color: #8290a5;
}

.send-button {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border: 0;
    border-radius: 12px;
    background: var(--green);
    color: #101827;
    font-size: 26px;
    font-weight: bold;
}

.send-button:disabled {
    opacity: 0.5;
}

.composer-info {
    max-width: 760px;
    margin: 10px auto 0;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 10px;
}

.disclaimer {
    margin: 10px 0 0;
    text-align: center;
    color: #68768b;
    font-size: 10px;
}


/* PREMIUM MODAL */

.modal {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: none;
    place-items: center;
    padding: 20px;
    background: #000a;
}

.modal.show {
    display: grid;
}

.modal-card {
    position: relative;
    width: 100%;
    max-width: 380px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--panel);
    text-align: center;
}

.modal-card h2 {
    margin-bottom: 10px;
}

.modal-card p,
.modal-card li {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
}

.modal-card ul {
    text-align: left;
    padding-left: 20px;
}

.small-logo {
    width: 54px;
    height: 54px;
    font-size: 30px;
    border-radius: 17px;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 20px;
}

.modal-card .notice {
    color: var(--green);
}


/* MOBILE */

@media (max-width: 650px) {

    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 10;
        width: 270px;
        transform: translateX(-105%);
        transition: transform 0.25s;
        box-shadow: 10px 0 40px #0004;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .topbar {
        padding: 0 12px;
    }

    .chat-area {
        padding: 15px 13px;
    }

    .welcome {
        margin: 20px auto;
    }

    .hero-logo {
        width: 62px;
        height: 62px;
        font-size: 34px;
        border-radius: 20px;
    }

    .welcome-text {
        font-size: 13px;
    }

    .suggestions {
        gap: 9px;
    }

    .suggestion {
        padding: 13px;
        gap: 8px;
    }

    .suggestion strong {
        font-size: 12px;
    }

    .suggestion small {
        font-size: 10px;
    }

    .composer-area {
        padding: 8px 10px 12px;
    }

    .composer-info {
        font-size: 9px;
    }

    .upgrade {
        padding: 9px;
    }
}

@media (max-width: 350px) {

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

    .welcome h1 {
        font-size: 27px;
    }
}