:root {
    --color-primary: #ECD196;
    --color-dark: #272443;
    --sidebar-width: 280px;
    --chat-bg: #f8f8f8;
    --white-75: rgba(255,255,255,0.75);
}

body.conversation-page {
    margin: 0;
    font-family: 'SF Pro Display', Arial, sans-serif;
    background: var(--chat-bg);
    color: var(--color-dark);
    display: flex;
    height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--color-dark);
    color: var(--color-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 0 0 0;
    box-sizing: border-box;
    min-height: 100vh;
    height: 100vh;
    position: relative;
}

.sidebar-logo {
    width: 56px;
    margin-bottom: 24px;
    display: block;
}

.logo-link {
    display: block;
    margin-bottom: 12px;
}

.new-chat-btn {
    background: var(--color-primary);
    color: var(--color-dark);
    font-family: 'SF Pro Display', Arial, sans-serif;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    margin-bottom: 24px;
    cursor: pointer;
    transition: background 0.2s;
}
.new-chat-btn:hover {
    background: #ffe7b8;
}

.chat-history {
    flex: 1;
    width: 100%;
    overflow-y: auto;
    padding: 0 16px;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--chat-bg);
    height: 100vh;
}

.chat-messages {
    flex: 1;
    padding: 32px 24px 16px 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.chat-input-row {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    background: var(--white-75);
    border-top: 1px solid #e0e0e0;
    gap: 8px;
}
.attachfile-btn img {
    width: 22px;
    height: 22px;
}
.input-mic-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}
.input-mic-wrapper input[type="text"] {
    width: 100%;
    padding: 16px 48px 16px 16px;
    border-radius: 10px;
    border: 1px solid #d0d0d0;
    font-size: 1.15rem;
    font-family: 'SF Pro Display', Arial, sans-serif;
    font-weight: 500;
    box-sizing: border-box;
    min-height: 48px;
}
.input-mic-wrapper .mic-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
}
.input-mic-wrapper .mic-btn img {
    width: 20px;
    height: 20px;
}
.send-btn, .mute-btn, .tts-toggle-btn {
    margin-left: 2px;
    background: var(--color-primary);
    color: var(--color-dark);
    border: none;
    border-radius: 8px;
    padding: 8px 10px;
    font-weight: 700;
    font-family: 'SF Pro Display', Arial, sans-serif;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    height: 36px;
    min-width: 36px;
    font-size: 0.95rem;
}
.send-btn:hover, .mute-btn:hover, .tts-toggle-btn:hover {
    background: #ffe7b8;
}
.mute-btn img {
    width: 18px;
    height: 18px;
}
#tts-btn {
    font-size: 0.92rem;
    padding: 8px 10px;
    min-width: 36px;
    height: 36px;
}
@media (max-width: 700px) {
    .chat-input-row {
        padding: 8px 6px;
        gap: 4px;
    }
    .attachfile-btn img {
        width: 18px;
        height: 18px;
    }
    .input-mic-wrapper input[type="text"] {
        font-size: 1rem;
        padding: 12px 36px 12px 8px;
        min-height: 40px;
    }
    .input-mic-wrapper .mic-btn img {
        width: 16px;
        height: 16px;
    }
    .send-btn, .mute-btn, .tts-toggle-btn {
        padding: 6px 7px;
        font-size: 0.9rem;
        height: 30px;
        min-width: 30px;
    }
    .mute-btn img {
        width: 14px;
        height: 14px;
    }
    #tts-btn {
        font-size: 0.85rem;
        padding: 6px 7px;
        min-width: 30px;
        height: 30px;
    }
    .sidebar-toggle {
        display: none !important;
    }
    .sidebar {
        width: 64px;
        min-width: 64px;
    }
    .sidebar.minimized {
        width: 64px !important;
        min-width: 64px !important;
    }
}
@media (max-width: 480px) {
    .chat-input-row {
        padding: 6px 2px;
        gap: 2px;
    }
    .attachfile-btn img {
        width: 14px;
        height: 14px;
    }
    .input-mic-wrapper input[type="text"] {
        font-size: 0.92rem;
        padding: 8px 28px 8px 6px;
        min-height: 32px;
    }
    .input-mic-wrapper .mic-btn img {
        width: 12px;
        height: 12px;
    }
    .send-btn, .mute-btn, .tts-toggle-btn {
        padding: 4px 5px;
        font-size: 0.8rem;
        height: 24px;
        min-width: 24px;
    }
    .mute-btn img {
        width: 10px;
        height: 10px;
    }
    #tts-btn {
        font-size: 0.75rem;
        padding: 4px 5px;
        min-width: 24px;
        height: 24px;
    }
}

::-webkit-scrollbar {
    width: 8px;
    background: #eee;
}
::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 4px;
}

.sidebar-bottom {
    width: 100%;
    position: absolute;
    bottom: 24px;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 1.5rem;
    cursor: pointer;
    margin-bottom: 12px;
    align-self: flex-start;
    margin-left: 12px;
    outline: none;
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
}

.sidebar.minimized {
    width: 56px !important;
    min-width: 56px !important;
    transition: width 0.2s;
}
.sidebar.minimized .sidebar-logo {
    width: 32px;
    margin-bottom: 8px;
}
.sidebar.minimized .logo-link,
.sidebar.minimized .new-chat-btn,
.sidebar.minimized .chat-history {
    display: none !important;
}
.sidebar.minimized .sidebar-bottom {
    justify-content: center;
}

@media (max-width: 700px) {
    .sidebar {
        width: 64px;
        min-width: 64px;
        padding: 12px 0 0 0;
        min-height: 100vh;
        height: 100vh;
        position: relative;
    }
    .sidebar-logo {
        width: 36px;
        margin-bottom: 12px;
    }
    .logo-link {
        margin-bottom: 6px;
    }
    .new-chat-btn {
        display: block;
        width: 90%;
        margin: 0 auto 12px auto;
        font-size: 0.95rem;
        padding: 10px 0;
    }
    .chat-history {
        display: none;
    }
    .sidebar-bottom {
        bottom: 12px;
    }
    .chat-main {
        padding-left: 0;
    }
    .chat-messages {
        padding: 16px 6px 8px 6px;
    }
    .chat-input-row {
        flex-direction: column;
        align-items: stretch;
        padding: 8px 6px;
        gap: 8px;
        min-height: 110px;
    }
    .chat-input-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
        gap: 8px;
        margin-bottom: 6px;
    }
    .chat-input-row input[type="text"] {
        font-size: 0.95rem;
        padding: 8px 8px;
        width: 100%;
        box-sizing: border-box;
    }
    .attachfile-btn img,
    .mic-btn img,
    .mute-btn img {
        width: 28px;
        height: 28px;
    }
    .send-btn {
        width: 100%;
    }
    .sidebar-toggle {
        position: static;
        margin-left: 0;
        margin-bottom: 10px;
        margin-top: 4px;
        align-self: center;
        z-index: 10;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 48px;
        min-width: 48px;
    }
    .sidebar-logo {
        width: 28px;
    }
    .chat-input-row {
        min-height: 130px;
    }
    .chat-input-grid {
        gap: 6px;
    }
}
