
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #080811;
    --sidebar: #0c0c18;
    --panel: #11111f;
    --purple: #925cff;
    --blue: #438cff;
    --text: #f4f1ff;
    --muted: #9291a8;
    --border: rgba(255,255,255,0.08);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow: hidden;
}

button {
    font-family: inherit;
    cursor: pointer;
    color: inherit;
}

.app {
    display: flex;
    height: 100vh;
}

/* SIDEBAR */

.sidebar {
    width: 265px;
    min-width: 265px;
    background: var(--sidebar);
    border-right: 1px solid var(--border);
    padding: 25px 17px;
    display: flex;
    flex-direction: column;
}

.logo {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 35px;
}

.logo span:last-child {
    color: var(--purple);
}

.logo-icon {
    color: #b18cff;
    font-size: 30px;
    text-shadow: 0 0 20px var(--purple);
}

.new-chat {
    background: linear-gradient(110deg, #8950ff, #426fff);
    border: none;
    padding: 14px;
    border-radius: 11px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 5px 25px #7545ff30;
    transition: .3s;
}

.new-chat:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px #7545ff60;
}

.menu-label {
    color: #77758d;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.8px;
    margin: 33px 0 13px 10px;
}

.menu-item {
    background: transparent;
    border: 1px solid transparent;
    padding: 13px;
    text-align: left;
    border-radius: 9px;
    margin-bottom: 5px;
    color: #aaa8bd;
    font-size: 13px;
    transition: .25s;
}

.menu-item:hover,
.menu-item.active {
    color: white;
    background: linear-gradient(100deg, #8950ff22, #438cff12);
    border-color: #925cff35;
}

.menu-item.active {
    box-shadow: inset 3px 0 #925cff;
}

.history {
    overflow-y: auto;
    flex: 1;
}

.history-item {
    display: block;
    width: 100%;
    padding: 11px;
    text-align: left;
    color: var(--muted);
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-item:hover {
    background: #ffffff0a;
    color: white;
}

.profile {
    border-top: 1px solid var(--border);
    padding-top: 19px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #9a56ff, #397eff);
    font-weight: 800;
}

.profile strong {
    font-size: 12px;
    display: block;
}

.profile small {
    color: var(--muted);
    font-size: 10px;
}

/* MAIN AREA */

.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    background:
        radial-gradient(ellipse at 50% 20%, #45247720, transparent 45%),
        radial-gradient(ellipse at 85% 80%, #164d8520, transparent 40%),
        var(--bg);
}

.topbar {
    height: 68px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 35px;
    font-size: 12px;
    color: var(--muted);
}

.online-dot {
    width: 7px;
    height: 7px;
    display: inline-block;
    border-radius: 50%;
    background: #40e7a1;
    box-shadow: 0 0 12px #40e7a1;
    margin-right: 8px;
}

.upgrade {
    padding: 10px 17px;
    border-radius: 9px;
    border: 1px solid #925cff55;
    background: #925cff13;
    color: #c5a7ff;
    font-size: 12px;
    font-weight: 700;
}

/* WELCOME SCREEN */

.welcome {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px;
    text-align: center;
}

.orb {
    width: 75px;
    height: 75px;
    display: grid;
    place-items: center;
    font-size: 36px;
    border-radius: 23px;
    background: linear-gradient(135deg, #8c4cff, #347fff);
    box-shadow: 0 0 45px #8250ff55, inset 0 0 15px #ffffff55;
    margin-bottom: 30px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.eyebrow {
    font-size: 10px;
    letter-spacing: 4px;
    color: #b58bff;
    font-weight: 800;
    margin-bottom: 17px;
}

.welcome h1 {
    font-size: clamp(28px, 4vw, 48px);
    letter-spacing: -2px;
    margin-bottom: 14px;
}

.welcome h1 span {
    background: linear-gradient(100deg, #b28aff, #579aff);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.welcome p {
    color: var(--muted);
    font-size: 14px;
}

.suggestions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 35px;
    max-width: 650px;
}

.suggestion {
    background: #ffffff07;
    border: 1px solid var(--border);
    padding: 13px 17px;
    border-radius: 11px;
    color: #c5c1d9;
    font-size: 12px;
    transition: .25s;
}

.suggestion:hover {
    background: #925cff20;
    border-color: #925cff80;
    transform: translateY(-3px);
}

/* CHAT MESSAGES */

.messages {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding: 35px max(25px, calc((100% - 760px) / 2));
    gap: 20px;
    flex-direction: column;
}

.message {
    max-width: 85%;
    padding: 16px 19px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.message.user {
    align-self: flex-end;
    background: linear-gradient(120deg, #7143d8, #416ed5);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.ai {
    align-self: flex-start;
    background: #171626;
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
    color: #e5e1f3;
}

/* INPUT AREA */

.composer-area {
    padding: 15px 25px 25px;
    width: 100%;
    max-width: 850px;
    margin: 0 auto;
}

.composer {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #151422;
    border: 1px solid #ffffff18;
    border-radius: 17px;
    padding: 12px 13px 12px 20px;
    box-shadow: 0 0 35px #6542bb12;
    transition: .3s;
}

.composer:focus-within {
    border-color: #925cff90;
    box-shadow: 0 0 25px #925cff25;
}

.composer textarea {
    flex: 1;
    resize: none;
    border: none;
    outline: none;
    background: transparent;
    color: white;
    font-family: inherit;
    font-size: 14px;
    padding: 8px 0;
    max-height: 130px;
}

.composer textarea::placeholder {
    color: #77758c;
}

.send {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #9857ff, #397eff);
    font-size: 23px;
    transition: .25s;
}

.send:hover {
    transform: scale(1.08);
    box-shadow: 0 0 20px #925cff70;
}

.send:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.composer-area > p {
    text-align: center;
    font-size: 10px;
    color: #68667d;
    margin-top: 12px;
}

/* MOBILE */

@media (max-width: 700px) {
    .sidebar {
        width: 70px;
        min-width: 70px;
        padding: 20px 8px;
    }

    .logo {
        justify-content: center;
        font-size: 0;
        margin-bottom: 30px;
    }

    .logo span:last-child,
    .menu-label,
    .menu-item:not(.active),
    .profile > div:last-child,
    .new-chat {
        font-size: 0;
    }

    .new-chat {
        padding: 12px 5px;
    }

    .menu-item {
        text-align: center;
        padding: 13px 3px;
        font-size: 16px;
    }

    .profile {
        justify-content: center;
    }

    .topbar {
        padding: 0 15px;
    }

    .welcome h1 {
        letter-spacing: -1px;
    }

    .composer-area {
        padding: 12px;
    }

    .messages {
        padding: 20px 12px;
    }
}
