@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=DM+Sans:wght@300;400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }


:root{
    --cream: #EAE7DC;
    --tan: #d8c3a5;
    --grey: #8E8D8A;
    --coral: #E98074;
    --dark: #2C2B28;
    --jellyred: #E85A4F;
    --mid: #5C5A55;
    --surface: #F2EFE9;
    --sand: #D0C9BC;
    --border: #D0C9BC;
}


body{
    font-family: 'DM Sans', sans-serif;
    background: var(--cream);
    color: var(--dark);
    height: 100vh;
    overflow: hidden;
}

.app{
    display: grid;
    grid-template-columns: 280px 1fr;
    height: 100vh;
}


/* Album sidebar */

.sidebar {
    height: 100vh;
    background: var(--dark);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}


.sidebar-header{
    padding: 5px 0px 0px 5px;
    border-bottom: 1px solid var(--jellyred);
}


.logo{
    font-family: 'Playfair display', serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--cream);
    letter-spacing: 0.08em;
}


.logo span {color: var(--coral); }

.logo-sub {
    font-size: 11px;
    color: var(--grey);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-top: 4px;
}


.search-wrap{
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.search-input{
    width: 100%;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--cream);
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    outline: none;
}


.search-input::placeholder { color: var(--grey); }
.search-input:focus { border-color: rgba(233,128,116,0.5); }


.album-list{
    flex: 1;
    overflow-y: auto;
}


.album-list::-webkit-scrollbar{width: 3px;}
.album-list::-webkit-scrollbar-thumb{
    background: rgba(255,255,255,0.07);
    border-radius: 10px;
    border: 3px solid rgba(233,128,116,0.5);
}


/* albums for item select */
.album-item{
    padding: 10px 20px;
    cursor: pointer;
    border-left: 2px solid transparent;
    transition: background 0.15s;
}


.album-item:hover {
    background-color: var(--dark);
}

.album-item.active {
    background: rgba(233,128,116,0.15);
    border-left-color: var(--coral);
}

.album-title{
    font-size: 13px;
    color: var(--cream);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.album-artist{
    font-size: 11px;
    color: var(--grey);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

}





.sidebar-footer{
    border-top: 1px solid var(--jellyred);
    font-family: 'Playfair display', serif;
    color: var(--coral);
    padding: 46px 24px;
}


/* Main Page */

.main{
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.main-header{
    display: flex;
    padding: 66px 50px;
    background-color: var(--surface);
    color: var(--dark);
    border-bottom: 1px solid var(--border);
    align-items: center;
    justify-content: space-between;
}


.header-title{
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    color: var(--dark);
}



.header-title em {
    color: var(--jellyred);
    font-weight: 900;
}


.route-badge{
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
    display: none;
}

.route-badge.rag{
    display: block;
    background: rgba(233,128,116,0.15);
    color: var(--jellyred);
}


.route-badge.discogs {
    display: block;
    background: rgba(216,195,165,0.4);
    color: var(--mid);
}


/* Chat window */

.chat {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}



.chat::-webkit-scrollbar { width: 4px; }
.chat::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }


.msg { max-width: 76%; }
.msg.user { align-self: flex-end; }
.msg.assistant { align-self: flex-start; }



.msg-label {
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 5px;
    color: var(--grey);
}



    
.msg.user .msg-label { text-align: right; }



.msg-bubble {
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.65;
    white-space: pre-wrap;
}



.msg.user .msg-bubble {
    background: var(--dark);
    color: var(--cream);
    border-bottom-right-radius: 3px;
}



.msg.assistant .msg-bubble {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--dark);
    border-bottom-left-radius: 3px;
}




/* Sources */

.sources {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}



.source-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(255,255,255,0.5);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 11px;
    color: var(--mid);
    text-decoration: none;
    

}

.source-item:hover { background: rgba(255,255,255,0.8); }

.source-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--coral);
    flex-shrink: 0;
}


.source-score {
    margin-left: auto;
    color: var(--grey);
    font-variant-numeric: tabular-nums;
}



/* Typing indicator */

.typing {
    display: flex;
    gap: 5px;
    align-items: center;
    padding: 14px 18px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--grey);
    animation: bounce 1.2s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }



@keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}



/* Input */


.input-area {
    flex-shrink: 0;
    padding: 20px 32px;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.input-wrap {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}



.input-box {
    flex: 1;
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: var(--dark);
    resize: none;
    outline: none;
    line-height: 1.5;
    max-height: 120px;
    transition: border-color 0.15s;
}

.input-box:focus { border-color: var(--coral); }



.send-btn {
    background: var(--jellyred);
    border: none;
    border-radius: 10px;
    width: 42px;
    height: 42px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
}


.send-btn:hover { background: var(--coral); }
.send-btn:disabled { background: var(--grey); cursor: not-allowed; }

.input-hint {
    font-size: 11px;
    color: var(--grey);
    margin-top: 8px;
}



