/* SIDEBAR: Obsidian & Gold Theme */
.sidebar {
    /* Solid darker background to block particles */
    background: rgba(5, 5, 8, 0.95);
    border-right: 1px solid rgba(255,255,255,0.08);
    display: flex; flex-direction: column;
    z-index: 20; height: 100%;
    position: relative;
    backdrop-filter: blur(25px);
    box-shadow: 5px 0 25px rgba(0,0,0,0.5);
}

.resize-handle {
    position: absolute; right: -3px; top: 0; bottom: 0; width: 6px;
    cursor: col-resize; z-index: 100; opacity: 0;
    transition: opacity 0.2s;
}
.resize-handle:hover, .resize-handle.active { opacity: 1; background: var(--neon-cyan); }

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.5);
    display: flex; justify-content: space-between; align-items: center;
}

.brand-title {
    font-size: 1.1rem; font-weight: 800; text-transform: uppercase; letter-spacing: 2px;
    color: #fff; text-shadow: 0 0 10px rgba(255,183,0,0.3);
}

.user-badge { 
    display: inline-flex; align-items: center; gap: 6px; 
    font-size: 0.7rem; color: var(--neon-cyan); font-family: var(--font-mono);
    border: 1px solid var(--neon-cyan-dim); padding: 2px 6px; border-radius: 4px;
}
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--neon-cyan); box-shadow: 0 0 8px var(--neon-cyan); }

/* COMPOSE */
.fab-compose {
    margin: 20px; padding: 14px;
    background: var(--neon-gold); color: #000;
    border: none; border-radius: 12px;
    font-weight: 800; cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase; letter-spacing: 1px; font-size: 0.8rem;
    box-shadow: 0 0 15px var(--neon-gold-dim);
}
.fab-compose:hover { transform: translateY(-2px); box-shadow: 0 0 25px rgba(255,183,0,0.4); }

.tabs-container {
    display: flex; margin: 0 20px 10px 20px; background: rgba(0,0,0,0.6);
    padding: 4px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.1);
}
.nav-tab {
    flex: 1; background: transparent; border: none; color: var(--text-secondary);
    padding: 10px; font-weight: 600; border-radius: 8px; cursor: pointer;
    transition: 0.2s; font-size: 0.85rem;
}
.nav-tab:hover { color: #fff; }
.nav-tab.active { background: rgba(255,255,255,0.15); color: var(--neon-gold); }

/* THREAD LIST */
.thread-list { flex: 1; overflow-y: auto; padding: 0 10px 20px 10px; }

.thread-item {
    display: grid; grid-template-columns: auto 1fr; gap: 12px;
    padding: 12px; border-radius: 12px; cursor: pointer;
    margin-bottom: 4px; border: 1px solid transparent;
    transition: all 0.2s;
    background: rgba(255,255,255,0.02);
}
.thread-item:hover { background: rgba(255,255,255,0.08); }

.thread-item.active {
    background: linear-gradient(90deg, rgba(255, 183, 0, 0.15) 0%, transparent 100%);
    border-left: 3px solid var(--neon-gold);
}

.avatar-circle {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: #fff; font-size: 0.9rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.thread-name { font-weight: 600; color: #f4f4f5; font-size: 0.9rem; }
.thread-time { font-size: 0.7rem; color: var(--text-secondary); font-family: var(--font-mono); }
.thread-snippet { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-item.active .thread-snippet { color: var(--text-secondary); }

/* MOBILE */
@media (max-width: 850px) {
    .sidebar { position: absolute; top:0; left:0; width:100%; z-index: 50; transition: transform 0.3s; }
    .app-container.view-chat .sidebar { transform: translateX(-100%); }
}