/* Daksh AI - Sovereign Interface Stylesheet
   Design: Vibrant, Minimalist, Motion-focused
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&family=Playfair+Display:wght@500;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #fff;
    font-family: 'Inter', sans-serif;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    color: #000;
}

/* --- VIBRANT MOVING BACKGROUND --- */
.vibrant-bg {
    position: fixed;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    width: 80vw;
    height: 80vw;
    filter: blur(100px);
    opacity: 0.6;
    border-radius: 50%;
}

.orange {
    background: radial-gradient(circle, #FF4D00 0%, transparent 70%);
    top: -20%;
    left: -10%;
    animation: move 25s infinite alternate ease-in-out;
}

.purple {
    background: radial-gradient(circle, #9D00FF 0%, transparent 70%);
    bottom: -20%;
    right: -10%;
    animation: move 30s infinite alternate-reverse ease-in-out;
}

.blue {
    background: radial-gradient(circle, #00D1FF 0%, transparent 70%);
    top: 40%;
    left: 30%;
    animation: move 20s infinite linear;
}

@keyframes move {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(120px, 180px) scale(1.15);
    }
}

/* --- MAIN APP LAYOUT --- */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* --- SIDEBAR DRAWER --- */
.sidebar {
    width: 80px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    border-right: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px 15px;
    transition: width 0.45s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 100;
    overflow: hidden;
}

.sidebar:hover {
    width: 240px;
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.05);
}

.logo-circle {
    width: 50px;
    height: 50px;
    background: #000;
    color: #fff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.5rem;
    margin-bottom: 50px;
    flex-shrink: 0;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    height: 54px;
    padding: 0 13px;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #1a1a1a;
    white-space: nowrap;
    text-decoration: none;
}

.nav-item svg {
    width: 24px;
    min-width: 24px;
    stroke: #000;
}

.label {
    margin-left: 18px;
    font-weight: 700;
    font-size: 1rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.sidebar:hover .label {
    opacity: 1;
    transform: translateX(0);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.8);
}

.nav-item.active {
    background: #000;
    color: #fff;
}

.nav-item.active svg {
    stroke: #fff;
}

/* --- CONTENT AREA --- */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100vh;
}

.navbar-top {
    height: 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 60px;
}

.top-logo {
    font-weight: 900;
    font-size: 1.6rem;
    letter-spacing: -1.5px;
    text-transform: lowercase;
}

.pill-btn {
    background: #000;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 40px 20px;
    height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.title {
    font-family: 'Playfair Display', serif;
    font-size: 5.5rem;
    font-weight: 500;
    letter-spacing: -3px;
    margin-bottom: 15px;
    line-height: 1.1;
}

.subtitle {
    color: #333;
    font-size: 1.25rem;
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 50px;
}

/* --- CHAT SCROLLER --- */
#chat-scroller {
    width: 100%;
    max-width: 1000px;
    flex: 1;
    overflow-y: scroll;
    display: none;
    /* Initially hidden */
    flex-direction: column;
    padding: 20px;
    gap: 15px;
    scrollbar-width: none;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

#chat-scroller::-webkit-scrollbar {
    display: none;
}

/* --- MESSAGE LAYOUT & RESTORED BUBBLES --- */
.msg-container {
    display: flex;
    flex-direction: column;
    margin: 8px 0;
    max-width: 85%;
    animation: fadeIn 0.4s ease forwards;
}

.msg-container.user {
    align-self: flex-end;
    align-items: flex-end;
}

.msg-container.bot {
    align-self: flex-start;
    align-items: flex-start;
}

/* RESTORED USER BOX: Same as before */
.user .message-bubble {
    background: #000;
    color: #fff;
    padding: 16px 24px;
    border-radius: 24px;
    border-bottom-right-radius: 4px;
    font-size: 1.1rem;
    line-height: 1.5;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* BOT BUBBLE: Transparent for structured formatting */
.bot .message-bubble {
    background: transparent !important;
    color: #000;
    padding: 15px 0;
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 100%;
}

/* --- STRUCTURED TEXT (DAKSH SPECIAL) --- */
.message-bubble h3 {
    color: #000;
    margin: 20px 0 10px 0;
    font-size: 1.3rem;
    border-left: 3px solid #FF4D00;
    padding-left: 10px;
}

.message-bubble ul {
    margin: 10px 0;
    padding-left: 20px;
    list-style: none;
}

.message-bubble li::before {
    content: "•";
    color: #FF4D00;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* --- INPUT BOX --- */
.input-glow-box {
    width: 90%;
    max-width: 900px;
    background: rgba(255, 255, 255, 0.8);
    padding: 10px 15px 10px 35px;
    border-radius: 40px;
    display: flex;
    align-items: center;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px);
    margin-bottom: 20px;
}

.input-glow-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.2rem;
    background: transparent;
}

.arrow-btn svg {
    stroke: #000;
    width: 28px;
    height: 28px;
}

/* --- HISTORY SIDEBAR ELEMENTS --- */
.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin: 4px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s;
}

.history-item.active-chat {
    background: rgba(0, 0, 0, 0.05) !important;
    border-left: 3px solid #FF4D00;
}

.delete-chat-btn {
    opacity: 0;
    padding: 5px;
}

.history-item:hover .delete-chat-btn {
    opacity: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-glow-box {
    width: 90%;
    max-width: 900px;
    background: rgba(255, 255, 255, 0.08);
    /* Darker glass */
    padding: 8px 8px 8px 30px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(25px);
    margin-bottom: 25px;
    transition: border 0.3s ease;
}

.input-glow-box:focus-within {
    border: 1px solid rgba(255, 77, 0, 0.5);
    /* Subtle orange glow on focus */
}

/* SLEEK SEND BUTTON */
.arrow-btn {
    background: #000;
    /* Solid contrast */
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.arrow-btn svg {
    stroke: #fff;
    width: 22px;
    height: 22px;
    transition: transform 0.3s ease;
}

.arrow-btn:hover {
    background: #FF4D00;
    /* Pop of color on hover */
    transform: scale(1.1) rotate(-10deg);
    box-shadow: 0 0 20px rgba(255, 77, 0, 0.4);
}

.arrow-btn:hover svg {
    stroke: #fff;
    transform: translateX(2px) translateY(-2px);
}

/* --- PERMANENTLY WIDE SIDEBAR --- */
.sidebar {
    width: 200px;
    /* Increased base width */
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    border-right: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    flex-direction: column;
    padding: 30px 10px;
    z-index: 100;
    transition: width 0.3s ease;
    /* Smooth but stable */
}

/* Optional: Subtle expand on hover if you want more room */
.sidebar:hover {
    width: 220px;
}

/* --- OPTIMIZED HISTORY LIST --- */
.history-container {
    margin-top: 20px;
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 5px;
}

/* Hide scrollbar but allow scrolling */
.history-container::-webkit-scrollbar {
    width: 4px;
}

.history-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: 0.2s;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateX(3px);
}

.history-item.active-chat {
    background: #000;
    color: #fff;
}

/* --- PERMANENTLY WIDE SIDEBAR (REMOVED HOVER) --- */
.sidebar {
    width: 260px;
    /* Locked width */
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    border-right: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    flex-direction: column;
    padding: 30px 15px;
    z-index: 100;
    flex-shrink: 0;
    /* Prevents shrinking on small screens */
}

/* Removed the .sidebar:hover width change */

.logo-circle {
    width: 50px;
    height: 50px;
    background: #000;
    color: #fff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.5rem;
    margin-bottom: 40px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* --- HISTORY LIST STYLING --- */
.history-container {
    flex: 1;
    overflow-y: auto;
    margin-top: 10px;
    padding-right: 5px;
}

/* Custom thin scrollbar for history */
.history-container::-webkit-scrollbar {
    width: 4px;
}

.history-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 14px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.history-item.active-chat {
    background: #000;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.delete-chat-btn {
    font-size: 0.8rem;
    opacity: 0.5;
    transition: opacity 0.2s;
    padding: 5px;
}

.history-item:hover .delete-chat-btn {
    opacity: 1;
}

.delete-chat-btn:hover {
    color: #ff4d00;
}

/* Ensure labels are always visible since sidebar no longer expands */
.label {
    margin-left: 15px;
    font-weight: 700;
    font-size: 1rem;
    opacity: 1;
    transform: none;
}