.sidebar {
    width: var(--sidebar-width); background: var(--glass-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border); display: flex; flex-direction: column;
    padding: 20px; z-index: 10; position: relative; overflow: hidden;
}

.sidebar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.sidebar-header h2 { font-size: 18px; font-weight: 700; letter-spacing: -0.5px; }
.desktop-title { display: block; }
.mobile-header { display: none; }

.icon-btn {
    background: transparent; border: none; cursor: pointer; width: 32px; height: 32px;
    border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.icon-btn:hover { background-color: #e0e0e0; transform: rotate(15deg); }
.icon-btn svg { width: 20px; height: 20px; fill: var(--text-primary); }

.new-chat-btn {
    background-color: var(--accent-color); color: white; border: 1px solid black;
    padding: 12px; border-radius: var(--radius-md); font-size: 15px; font-weight: 600;
    cursor: pointer; transition: var(--transition); margin-bottom: 20px; flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.new-chat-btn:hover { background-color: #333; transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0,0,0,0.15); }

.chat-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }

.chat-item {
    padding: 10px 30px 10px 12px; border-radius: var(--radius-md); cursor: pointer;
    transition: var(--transition); font-size: 14px; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; color: var(--text-secondary); border: 1px solid transparent; position: relative;
}
.chat-item::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%) scaleY(0);
    width: 3px; height: 60%; background: #000; border-radius: 0 4px 4px 0; transition: var(--transition);
}
.chat-item:hover { background-color: #eee; }
.chat-item.active { background-color: #fff; color: var(--accent-color); font-weight: 600; border-color: #ccc; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.chat-item.active::before { transform: translateY(-50%) scaleY(1); }

.delete-chat-btn {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: none;
    background: transparent; border: none; cursor: pointer; color: #999; padding: 4px;
}
.chat-item:hover .delete-chat-btn { display: block; }
.delete-chat-btn:hover { color: #d00; }
.delete-chat-btn svg { width: 14px; height: 14px; fill: currentColor; }

.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    z-index: 9;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.sidebar-backdrop.show { opacity: 1; }
