* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #111;
    color: #FFD43B;
    height: 100vh;
    overflow: hidden;
}

.topbar {
    width: 100vw;
    height: 56px;
    background: #181A20;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1001;
    box-shadow: 0 2px 8px 0 rgba(0,0,0,0.12);
}
.sidebar-toggle {
    background: none;
    border: none;
    margin-left: 16px;
    margin-right: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.2s;
}
.sidebar-toggle:hover {
    background: #181A20;
}
.topbar-title {
    font-size: 1.3rem;
    color: #FFD43B;
    font-weight: 700;
    letter-spacing: 1px;
}

.container {
    display: flex;
    min-height: 100vh;
    padding-top: 56px;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 270px;
    background: #181A20;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    border-right: 1px solid #383220;
    transition: transform 0.3s cubic-bezier(.4,2,.6,1);
}
.sidebar.closed {
    transform: translateX(-100%);
}
.sidebar-header {
    padding: 24px 18px 12px 18px;
    border-bottom: 1px solid #36311f;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.new-chat-btn {
    background: #FFD43B;
    color: #181A20;
    border: none;
    border-radius: 6px;
    padding: 10px 18px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 10px;
}
.new-chat-btn:hover {
    background: #FFC300;
    
}
.chat-history {
    list-style: none;
    padding: 0 0 24px 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
}
.chat-history li {
    padding: 16px 24px;
    border-bottom: 1px solid #181A20;
    cursor: pointer;
    transition: background 0.2s;
    color: #FFD43B;
}
.chat-history li:hover, .chat-history li.active {
    background: #222;
    color: #fff;
}

.main-area {
    margin-left: 270px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #111;
    transition: margin-left 0.3s cubic-bezier(.4,2,.6,1);
}
.main-area.full {
    margin-left: 0;
}
.chat-header {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: #181A20;
    border-bottom: 1px solid #FFD43B;
    font-size: 1.3rem;
    color: #FFD43B;
    font-weight: 700;
    letter-spacing: 1px;
    position: relative;
}
.menu-btn {
    background: none;
    border: none;
    margin-right: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.2s;
}
.menu-btn:hover {
    background: #FFD43B22;
}
.profile-img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #FFD43B;
    margin-left: 16px;
    box-shadow: 0 2px 8px 0 rgba(255,212,59,0.10);
}

.chat-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px 0 90px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    bottom: 130px;
    position: fixed;
    left: 270px;
    right: 0;
    top: 55px;
    background: #111;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.chat-content::-webkit-scrollbar {
    display: none;
}
.message-row {
    width: 100%;
    display: flex;
    justify-content: flex-start;
}
.message-row.user {
    justify-content: flex-end;
}
.bubble {
    max-width: 600px;
    padding: 16px 22px;
    border-radius: 18px;
    font-size: 0.85rem;
    margin: 2px 18px;
    box-shadow: 0 2px 8px 0 rgba(255,212,59,0.05);
    word-break: break-word;
    line-height: 1.6;
}
.bubble.ai {
    background: #FFD43B;
    color: #181A20;
    border-radius: 18px 18px 18px 4px;
    align-self: flex-start;
}
.bubble.user {
    background: #FFD43B;
    color: #181A20;
    border-radius: 18px 18px 4px 18px;
    align-self: flex-end;
}
.input-bar {
    position: fixed;
    left: 270px;
    right: 0;
    bottom: 0;
    background: #181A20;
    border-radius: 28px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 18px 24px 14px 24px;
    gap: 0;
    z-index: 1002;
    border-top: 1px solid #FFD43B;
    box-shadow: 0 2px 16px 0 rgba(255,212,59,0.10);
    margin: 0 auto 18px auto;
    max-width: 900px;
}
.input-row-1 {
    width: 100%;
    display: flex;
}
.input-row-1 input {
    flex: 1;
    padding: 16px 20px;
    border-radius: 18px;
    border: none;
    background: #222;
    color: #FFD43B;
    font-size: 1.08rem;
    outline: none;
    box-shadow: none;
    height: 48px;
    transition: background 0.2s;
}
.input-row-1 input:focus {
    background: #181A20;
}
.input-row-2 {
    width: 100%;
    display: flex;
    align-items: center;
    margin-top: 8px;
    justify-content: space-between;
}
.input-left {
    display: flex;
    align-items: center;
    gap: 6px;
}
.input-right {
    display: flex;
    align-items: center;
    gap: 6px;
}
.circle-btn {
    background: #FFD43B;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.18s, box-shadow 0.18s;
    box-shadow: 0 1px 4px 0 rgba(255,212,59,0.10);
    padding: 0;
    color: #181A20;
}
.circle-btn:hover {
    background: #FFC300;
    box-shadow: 0 2px 8px 0 rgba(255,212,59,0.10);
}
.tools-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #FFD43B;
    font-size: 1.08rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0 8px;
    border-radius: 8px;
    transition: background 0.18s;
    height: 38px;
}
.tools-btn:hover {
    background: #FFD43B22;
}
.tools-btn svg {
    margin-right: 2px;
}
@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-area {
        margin-left: 0;
    }
    .input-bar {
        left: 0;
        max-width: 100vw;
        border-radius: 0;
        margin: 0;
    }
    .chat-content {
        left: 0;
    }
}
@media (max-width: 600px) {
    .chat-content {
        padding: 16px 0 80px 0;
    }
    .bubble {
        max-width: 98vw;
        font-size: 0.75rem;
        padding: 12px 12px;
    }
    .input-bar {
        padding: 10px 4px 8px 4px;
    }
    .input-row-1 input {
        height: 38px;
        font-size: 1rem;
        padding: 10px 12px;
    }
    .circle-btn, .tools-btn {
        height: 32px;
        width: 32px;
        font-size: 0.98rem;
    }
    .tools-btn {
        padding: 0 4px;
    }
}

