/* LastBro AI - Grok-like layout with LastBro colors */
:root{
    --bg:#000;
    --sidebar:#05080d;
    --main:#000;
    --card:#070d14;
    --card2:#0a121d;
    --line:#172536;
    --line2:#223247;
    --text:#fff;
    --muted:#9fb0c3;
    --accent:#1d9bf0;
    --accent2:#1687d1;
}

*{box-sizing:border-box}

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

a{text-decoration:none;color:inherit}

.grok-layout{
    min-height:100vh;
    display:grid;
    grid-template-columns:280px minmax(0,1fr);
}

.sidebar{
    position:sticky;
    top:0;
    height:100vh;
    padding:22px;
    background:var(--sidebar);
    border-right:1px solid var(--line);
}

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

.brand-logo{
    width:52px;
    height:52px;
    border-radius:17px;
    display:grid;
    place-items:center;
    background:#000;
    border:1px solid var(--line2);
    font-weight:900;
    box-shadow:0 15px 40px rgba(0,0,0,.45);
}

.brand strong{
    display:block;
    font-size:20px;
    line-height:1.1;
}

.brand span{color:var(--accent)}

.brand small{
    display:block;
    color:var(--muted);
    font-size:12px;
    margin-top:3px;
}

.new-chat,
.back-wall{
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    border-radius:18px;
    padding:14px 16px;
    font-weight:900;
    margin-bottom:10px;
}

.new-chat{
    background:rgba(255,255,255,.04);
    border:1px solid var(--line);
    color:#fff;
}

.back-wall{
    background:rgba(29,155,240,.13);
    border:1px solid rgba(29,155,240,.36);
    color:#fff;
}

.side-note{
    margin-top:18px;
    padding:16px;
    border-radius:18px;
    border:1px solid var(--line);
    background:#02060a;
    color:var(--muted);
    font-size:13px;
}

.side-note strong{
    display:block;
    color:var(--accent);
    margin-top:6px;
}

.main{
    min-width:0;
    min-height:100vh;
    padding:22px 26px 110px;
    position:relative;
}

.topbar{
    height:54px;
    display:flex;
    align-items:center;
    border-bottom:1px solid var(--line);
    margin-bottom:20px;
}

.topbar h1{
    margin:0;
    font-size:22px;
    letter-spacing:-.02em;
}

.chat-area{
    max-width:920px;
    margin:0 auto;
    padding-bottom:20px;
}

.welcome{
    min-height:55vh;
    display:flex;
    align-items:center;
    justify-content:center;
    flex-direction:column;
    text-align:center;
    color:var(--muted);
}

.spark{
    width:70px;
    height:70px;
    border-radius:24px;
    display:grid;
    place-items:center;
    background:rgba(29,155,240,.13);
    border:1px solid rgba(29,155,240,.32);
    color:var(--accent);
    font-size:34px;
    margin-bottom:16px;
}

.welcome h2{
    color:#fff;
    margin:0 0 8px;
    font-size:34px;
}

.welcome p{
    margin:0;
}

.message{
    display:flex;
    gap:14px;
    margin:20px 0;
}

.user-message{
    justify-content:flex-end;
}

.avatar{
    width:38px;
    height:38px;
    border-radius:14px;
    display:grid;
    place-items:center;
    background:#121923;
    border:1px solid var(--line2);
    color:#fff;
    font-size:12px;
    font-weight:900;
    flex:0 0 auto;
}

.user-message .avatar{
    order:2;
    background:var(--accent);
    border-color:var(--accent);
}

.avatar.ai{
    background:#071827;
    border-color:rgba(29,155,240,.36);
    color:var(--accent);
}

.bubble{
    max-width:720px;
    background:#071827;
    border:1px solid rgba(29,155,240,.28);
    border-radius:22px 8px 22px 22px;
    padding:16px 18px;
    font-weight:800;
    line-height:1.55;
}

.answer-card{
    width:100%;
    max-width:820px;
    background:linear-gradient(180deg,var(--card),var(--card2));
    border:1px solid var(--line);
    border-radius:24px;
    padding:22px;
    box-shadow:0 18px 50px rgba(0,0,0,.35);
}

.answer-title{
    color:var(--accent);
    font-size:13px;
    font-weight:900;
    letter-spacing:.05em;
    text-transform:uppercase;
    margin-bottom:12px;
}

.answer-card h2{
    margin:0 0 12px;
    font-size:20px;
    line-height:1.35;
}

.answer-card p{
    margin:0;
    color:#e7edf5;
    line-height:1.78;
    font-size:17px;
}

.composer {
    position: fixed;
    left: 306px;
    right: 26px;
    bottom: 18px;
    max-width: 920px;
    margin: 0 auto;

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

    padding: 0 14px;
    height: 58px;

    background: #000;
    border: 1px solid #1b2a3a;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.composer select {
    display: none;
}

.composer input {
    flex: 1;
    height: 100%;
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    padding: 0;
    outline: none;
    min-width: 0;
}

.composer input::placeholder {
    color: #ffffff;
    opacity: 0.95;
}

.composer button {
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    color: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    font-size: 0;
    flex-shrink: 0;
    line-height: 1;
    background-color: #1d9bf0;
}

.composer button::before {
    content: "➤";
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-1px);
}

@media(max-width:820px){
    .grok-layout{
        display:block;
    }

    .sidebar{
        position:relative;
        height:auto;
        border-right:0;
        border-bottom:1px solid var(--line);
        padding:14px;
    }

    .brand{
        margin-bottom:12px;
    }

    .new-chat,.back-wall{
        padding:12px;
    }

    .side-note{
        display:none;
    }

    .main{
        padding:14px 12px 150px;
    }

    .topbar{
        height:44px;
        margin-bottom:14px;
    }

    .message{
        gap:10px;
    }

    .avatar{
        width:34px;
        height:34px;
        border-radius:12px;
    }

    .bubble{
        max-width:calc(100vw - 76px);
    }

    .answer-card{
        padding:18px;
    }

    .composer{
        left:10px;
        right:10px;
        bottom:10px;
        grid-template-columns:1fr;
    }

    .composer button{
        padding:15px;
    }
}

.ai-loading{
    display:flex;
    align-items:center;
    gap:8px;
    padding:12px 0;
}

.ai-loading span{
    width:10px;
    height:10px;
    border-radius:50%;
    background:#1d9bf0;
    animation:aiBounce 1.2s infinite ease-in-out;
}

.ai-loading span:nth-child(2){
    animation-delay:.2s;
}

.ai-loading span:nth-child(3){
    animation-delay:.4s;
}

@keyframes aiBounce{
    0%,80%,100%{
        transform:scale(.7);
        opacity:.45;
    }
    40%{
        transform:scale(1);
        opacity:1;
    }
}

.answer-actions{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    margin-top:14px;
}

.answer-actions button{
    border:1px solid rgba(255,255,255,.10);
    background:rgba(255,255,255,.055);
    color:#d8e7f7;
    border-radius:999px;
    padding:8px 12px;
    font-size:13px;
    font-weight:800;
    cursor:pointer;
    transition:.16s ease;
}

.answer-actions button:hover{
    background:rgba(29,155,240,.16);
    border-color:rgba(29,155,240,.38);
}

.answer-actions button:disabled{
    cursor:default;
    opacity:.72;
}
