:root {
    --bg-main: #050507;
    --bg-surface: #0d0d12;
    --bg-elevated: #14141b;
    --bg-hover: #1a1a24;
    --border-light: #25252e;
    --border-medium: #33333f;
    --text-primary: #ffffff;
    --text-secondary: #a0a0ab;
    --text-muted: #6b6b78;
    --accent-primary: #00d4ff;
    --accent-secondary: #a855f7;
    --accent-danger: #ff3b5c;
    --glow-cyan: 0 0 20px rgba(0, 212, 255, 0.3);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 999px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-theme {
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-elevated: #f1f5f9;
    --bg-hover: #e2e8f0;
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --accent-primary: #0ea5e9;
    --accent-secondary: #8b5cf6;
    --accent-danger: #e11d48;
    --glow-cyan: 0 0 20px rgba(14, 165, 233, 0.3);
}

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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden; /* Prevents horizontal scrolling */
}

.font-mono { font-family: 'JetBrains Mono', monospace; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-medium); border-radius: 4px; }
a:focus, button:focus, input:focus, textarea:focus, select:focus { outline: none; box-shadow: none; }
a { -webkit-tap-highlight-color: transparent; }

.app-container { max-width: 1100px; margin: 0 auto; min-height: 100vh; }
.main-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr) 300px; gap: 0; min-height: 100vh; }

@media (max-width: 1100px) { .main-layout { grid-template-columns: 80px minmax(0, 1fr); } .right-sidebar { display: none; } }
@media (max-width: 640px) { .main-layout { grid-template-columns: 1fr; } .left-sidebar { display: none; } }

.left-sidebar { position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--border-light); padding: 1.5rem 0.75rem; display: flex; flex-direction: column; backdrop-filter: blur(12px); background: rgba(13, 13, 18, 0.7); }
body.light-theme .left-sidebar { background: rgba(255, 255, 255, 0.8); }
.logo { font-size: 1.8rem; font-weight: 900; background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 2rem; padding-left: 0.5rem; display: flex; align-items: center; gap: 0.5rem; }
.nav-item { display: flex; align-items: center; gap: 1.25rem; padding: 0.85rem 1rem; border-radius: var(--radius-full); color: var(--text-secondary); font-size: 1.05rem; font-weight: 600; cursor: pointer; transition: var(--transition); margin-bottom: 0.5rem; text-decoration: none; }
.nav-item:hover { background: var(--bg-hover); color: var(--accent-primary); }
.nav-item.active { color: var(--accent-primary); background: rgba(0, 212, 255, 0.1); }
.nav-item svg { width: 24px; height: 24px; }
.user-card { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem; border-radius: var(--radius-full); transition: var(--transition); cursor: pointer; }
.user-card:hover { background: var(--bg-hover); }
.logout-btn:hover { color: var(--accent-danger) !important; background: rgba(255, 59, 92, 0.1) !important; }
.theme-toggle { margin-top: auto; margin-bottom: 1rem; }

/* FIX: minmax(0, 1fr) prevents grid blowout (horizontal scrolling) */
.center-feed { border-right: 1px solid var(--border-light); border-left: 1px solid var(--border-light); min-height: 100vh; background: var(--bg-main); min-width: 0; overflow-x: hidden; }
.page-header { position: sticky; top: 0; background: rgba(5, 5, 7, 0.85); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border-light); padding: 1.25rem 1.5rem; z-index: 100; display: flex; align-items: center; gap: 2rem; }
body.light-theme .page-header { background: rgba(248, 250, 252, 0.85); }
.page-title { font-size: 1.25rem; font-weight: 800; }
.header-back { color: var(--text-primary); cursor: pointer; display: flex; align-items: center; }
.header-subtitle { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }

.feed-tabs { display: flex; border-bottom: 1px solid var(--border-light); }
.feed-tab { flex: 1; text-align: center; padding: 1rem; font-size: 1rem; font-weight: 600; color: var(--text-muted); cursor: pointer; transition: var(--transition); border-bottom: 2px solid transparent; }
.feed-tab:hover { background: var(--bg-hover); color: var(--text-primary); }
.feed-tab.active { color: var(--accent-primary); border-bottom-color: var(--accent-primary); }

.composer { padding: 1.5rem; border-bottom: 1px solid var(--border-light); display: flex; gap: 1rem; }
.composer textarea { width: 100%; background: transparent; border: none; outline: none; color: var(--text-primary); font-size: 1.25rem; font-family: 'Inter', sans-serif; resize: none; margin-top: 0.5rem; }
.composer input[type="text"] { width: 100%; background: var(--bg-surface); border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: 0.75rem 1rem; color: var(--text-primary); font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; outline: none; margin-top: 0.75rem; transition: var(--transition); }
.composer input[type="text"]:focus { border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1); }
.composer-types { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }
.type-btn { padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; border: 1px solid var(--border-medium); background: transparent; color: var(--text-muted); cursor: pointer; transition: var(--transition); }
.type-btn.active { background: var(--accent-primary); color: #000; border-color: var(--accent-primary); }
.upload-btn-wrapper { display: flex; align-items: center; gap: 1rem; margin-top: 0.5rem; }
.upload-btn { cursor: pointer; color: var(--accent-primary); padding: 0.5rem; border-radius: var(--radius-full); transition: var(--transition); display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; font-weight: 600; }
.upload-btn:hover { background: rgba(0, 212, 255, 0.1); }
.image-preview { max-height: 80px; border-radius: var(--radius-sm); border: 1px solid var(--border-light); }

.post-card { padding: 1.5rem; border-bottom: 1px solid var(--border-light); transition: var(--transition); cursor: pointer; position: relative; }
.post-card:hover { background: rgba(255, 255, 255, 0.01); }
body.light-theme .post-card:hover { background: rgba(0, 0, 0, 0.01); }
.post-avatar { width: 48px; height: 48px; border-radius: var(--radius-full); object-fit: cover; background: var(--bg-elevated); cursor: pointer; transition: var(--transition); }
.post-avatar:hover { box-shadow: var(--glow-cyan); }
.post-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.post-name { font-weight: 700; font-size: 1rem; cursor: pointer; }
.post-username { color: var(--text-muted); font-size: 0.9rem; font-family: 'JetBrains Mono', monospace; }
.post-content { font-size: 1.05rem; line-height: 1.6; color: var(--text-secondary); margin-bottom: 1rem; word-wrap: break-word; }

.post-tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: 700; margin-bottom: 0.5rem; text-transform: uppercase; }
.tag-review { background: rgba(168, 85, 247, 0.2); color: var(--accent-secondary); }
.tag-challenge { background: rgba(255, 159, 64, 0.2); color: #ff9f40; }

.post-image { width: 100%; border-radius: var(--radius-md); margin-top: 1rem; border: 1px solid var(--border-light); display: block; }
.hashtag { color: var(--accent-primary); cursor: pointer; font-weight: 600; }
.hashtag:hover { text-decoration: underline; }

.code-block-wrapper { position: relative; margin: 1rem 0; max-width: 100%; }
.code-block { background: #0d1117; border: 1px solid #30363d; border-radius: var(--radius-md); padding: 1rem; font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; color: #c9d1d9; overflow-x: auto; white-space: pre-wrap; }
.code-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; opacity: 0; transition: opacity 0.2s; }
.code-block-wrapper:hover .code-actions { opacity: 1; }
.code-btn { background: rgba(255,255,255,0.1); color: #fff; border: none; padding: 4px 8px; border-radius: 4px; cursor: pointer; font-size: 0.75rem; }
.code-btn:hover { background: rgba(255,255,255,0.2); }
.code-output { background: #1a1a24; border: 1px solid #333; border-top: none; padding: 0.75rem; font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; color: #0f0; border-radius: 0 0 var(--radius-md) var(--radius-md); display: none; white-space: pre-wrap; }

.poll-container { margin-top: 1rem; border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: 1rem; background: var(--bg-surface); }
.poll-option { margin-bottom: 0.5rem; cursor: pointer; transition: var(--transition); }
.poll-btn { width: 100%; text-align: left; background: var(--bg-elevated); border: 1px solid var(--border-medium); color: var(--text-primary); padding: 0.5rem 0.75rem; border-radius: var(--radius-sm); font-size: 0.9rem; cursor: pointer; }
.poll-results-bar { width: 100%; height: 8px; background: var(--bg-elevated); border-radius: 4px; overflow: hidden; margin-top: 0.25rem; }
.poll-results-fill { height: 100%; background: var(--accent-primary); border-radius: 4px; }

.post-actions { display: flex; gap: 1.5rem; margin-top: 0.5rem; align-items: center; }
.action-btn { display: flex; align-items: center; gap: 0.5rem; background: none; border: none; color: var(--text-muted); font-size: 0.85rem; cursor: pointer; transition: var(--transition); padding: 0.5rem; border-radius: var(--radius-full); }
.action-btn:hover { color: var(--accent-primary); background: rgba(0, 212, 255, 0.1); }
.action-btn.liked { color: var(--accent-danger); }
.action-btn.liked:hover { background: rgba(255, 59, 92, 0.1); }
.action-btn svg { width: 18px; height: 18px; }

.delete-post-btn { position: absolute; top: 16px; right: 16px; color: var(--text-muted); cursor: pointer; opacity: 0; transition: opacity 0.2s; background: none; border: none; z-index: 10; }
.post-card:hover .delete-post-btn { opacity: 1; }
.delete-post-btn:hover { color: var(--accent-danger); }

.comment-section { margin-top: 1rem; border-radius: var(--radius-md); background: var(--bg-surface); border: 1px solid var(--border-light); overflow: hidden; }
.comment-item { display: flex; gap: 0.75rem; padding: 1rem; border-bottom: 1px solid var(--border-light); }
.comment-input-area { display: flex; gap: 0.75rem; padding: 1rem; border-top: 1px solid var(--border-light); }
.comment-input-area input { flex: 1; background: var(--bg-main); border: 1px solid var(--border-medium); border-radius: var(--radius-full); padding: 0.5rem 1rem; color: var(--text-primary); outline: none; }
.reply-btn { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.5rem; cursor: pointer; background: none; border: none; font-weight: 600; }
.reply-btn:hover { color: var(--accent-primary); }

.right-sidebar { position: sticky; top: 0; height: 100vh; padding: 1.5rem; overflow-y: auto; border-left: 1px solid var(--border-light); min-width: 0; }
.search-box { background: var(--bg-surface); border: 1px solid var(--border-light); border-radius: var(--radius-full); padding: 0.75rem 1.25rem; margin-bottom: 1.5rem; color: var(--text-primary); width: 100%; outline: none; font-size: 0.9rem; }
.widget { background: var(--bg-surface); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 1.25rem; margin-bottom: 1.5rem; }
.widget-title { font-size: 1.25rem; font-weight: 800; margin-bottom: 1rem; }
.trend-item { padding: 0.75rem 0; border-bottom: 1px solid var(--border-light); cursor: pointer; }
.trend-item:hover { color: var(--accent-primary); }

.search-results { position: absolute; top: 50px; left: 0; right: 0; background: var(--bg-surface); border: 1px solid var(--border-medium); border-radius: var(--radius-md); max-height: 300px; overflow-y: auto; z-index: 50; display: none; }
.search-item { padding: 1rem; border-bottom: 1px solid var(--border-light); cursor: pointer; display: flex; gap: 0.75rem; align-items: center; }
.search-item:hover { background: var(--bg-hover); }
.search-category { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; padding: 0.5rem 1rem; font-weight: 700; }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; z-index: 1000; animation: fadeIn 0.2s ease; }
.modal-content { background: var(--bg-surface); border: 1px solid var(--border-medium); border-radius: var(--radius-lg); padding: 2rem; width: 90%; max-width: 500px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.modal-title { font-size: 1.25rem; font-weight: 800; }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.5rem; }
.modal-input { width: 100%; background: var(--bg-main); border: 1px solid var(--border-medium); border-radius: var(--radius-sm); padding: 0.75rem; margin-bottom: 1rem; color: var(--text-primary); outline: none; }
.modal-input:focus { border-color: var(--accent-primary); }
.modal-textarea { resize: none; min-height: 80px; }
.modal-label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.5rem; font-weight: 600; }
.modal-input-group { margin-bottom: 1.25rem; }

.btn { padding: 0.75rem 1.5rem; border-radius: var(--radius-full); font-weight: 700; cursor: pointer; transition: var(--transition); border: none; font-size: 0.95rem; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; }
.btn-primary { background: linear-gradient(135deg, var(--accent-primary), #00a8cc); color: #000; }
.btn-primary:hover { box-shadow: var(--glow-cyan); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text-primary); border: 1px solid var(--border-medium); }
.btn-ghost:hover { background: var(--bg-hover); border-color: var(--accent-primary); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }

.profile-header { border-bottom: 1px solid var(--border-light); }
.profile-banner { height: 150px; background-size: cover; background-position: center; background-image: linear-gradient(45deg, #1a1a24, #050507, #14141b); }
.profile-avatar-wrapper { padding: 0 1.5rem; margin-top: -50px; display: flex; justify-content: space-between; align-items: flex-end; }
.profile-avatar-main { width: 100px; height: 100px; border-radius: 50%; border: 4px solid var(--bg-main); background: var(--bg-elevated); object-fit: cover; }
.profile-info { padding: 1.5rem; }
.profile-bio { margin-top: 0.5rem; }
.profile-section { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border-light); }
.profile-section:last-child { border-bottom: none; }
.section-label { font-size: 0.7rem; text-transform: uppercase; color: var(--text-muted); font-weight: 700; margin-bottom: 1rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 1rem; }
.stat-box { background: var(--bg-elevated); padding: 1rem; border-radius: var(--radius-md); text-align: center; border: 1px solid var(--border-light); }
.stat-value { font-size: 1.25rem; font-weight: 800; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }
.profile-tabs { display: flex; border-bottom: 1px solid var(--border-light); margin-bottom: 1rem; }
.profile-tab { padding: 1rem 1.5rem; font-weight: 600; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; }
.profile-tab:hover { color: var(--text-primary); }
.profile-tab.active { color: var(--accent-primary); border-bottom-color: var(--accent-primary); }
.profile-meta-row { display: flex; flex-wrap: wrap; gap: 1.5rem; color: var(--text-secondary); font-size: 0.9rem; }
.profile-meta-item { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; color: var(--text-secondary); }
.profile-meta-item:hover { color: var(--accent-primary); }

.premium-badge { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; background: #ffd700; color: #000; border-radius: 50%; margin-left: 0.25rem; vertical-align: middle; box-shadow: 0 0 5px rgba(255, 215, 0, 0.5); }
.premium-badge svg { width: 12px; height: 12px; }
.dev-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 12px; font-size: 0.7rem; font-weight: 700; background: rgba(0, 212, 255, 0.2); color: var(--accent-primary); border: 1px solid rgba(0, 212, 255, 0.3); vertical-align: middle; margin-left: 0.5rem; }
.badge-junior { background: rgba(34, 197, 94, 0.2); color: #22c55e; border-color: rgba(34, 197, 94, 0.3); }
.badge-mid { background: rgba(0, 212, 255, 0.2); color: var(--accent-primary); border-color: rgba(0, 212, 255, 0.3); }
.badge-senior { background: rgba(168, 85, 247, 0.2); color: var(--accent-secondary); border-color: rgba(168, 85, 247, 0.3); }
.verified-badge { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; background: var(--accent-primary); color: #000; border-radius: 50%; margin-left: 0.25rem; vertical-align: middle; }
.verified-badge svg { width: 12px; height: 12px; }

.achievements-row { display: flex; flex-wrap: wrap; gap: 1rem; }
.achievement-badge { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; width: 60px; text-align: center; }
.achievement-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--bg-elevated); display: flex; align-items: center; justify-content: center; color: var(--accent-primary); border: 1px solid var(--border-light); transition: var(--transition); }
.achievement-icon:hover { border-color: var(--accent-primary); transform: translateY(-2px); }
.achievement-icon svg { width: 20px; height: 20px; }
.achievement-name { font-size: 0.7rem; color: var(--text-muted); font-weight: 600; }

.profile-domain { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--accent-primary); text-decoration: none; font-weight: 600; font-size: 0.9rem; background: var(--bg-elevated); padding: 0.5rem 1rem; border-radius: var(--radius-full); border: 1px solid var(--border-light); transition: var(--transition); }
.profile-domain:hover { border-color: var(--accent-primary); }

.settings-layout { display: grid; grid-template-columns: 200px 1fr; gap: 2rem; padding: 2rem; max-width: 800px; margin: 0 auto; }
.settings-nav { display: flex; flex-direction: column; gap: 0.5rem; border-right: 1px solid var(--border-light); padding-right: 1rem; }
.settings-tab { padding: 0.75rem 1rem; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; color: var(--text-secondary); transition: var(--transition); }
.settings-tab:hover { background: var(--bg-hover); color: var(--text-primary); }
.settings-tab.active { background: var(--bg-elevated); color: var(--accent-primary); }
.settings-form { display: flex; flex-direction: column; gap: 1rem; }

.link-preview { border: 1px solid var(--border-light); border-radius: var(--radius-md); margin-top: 1rem; overflow: hidden; display: flex; text-decoration: none; transition: var(--transition); background: var(--bg-surface); }
.link-preview:hover { border-color: var(--accent-primary); }
.link-preview img { width: 120px; height: 120px; object-fit: cover; flex-shrink: 0; }
.link-preview-content { padding: 1rem; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }

.community-card, .event-item { padding: 1.25rem; border-bottom: 1px solid var(--border-light); text-decoration: none; display: block; transition: var(--transition); cursor: pointer; }
.community-card:hover, .event-item:hover { background: var(--bg-hover); }
.community-name, .event-title { font-weight: 700; color: var(--accent-primary); font-size: 1.1rem; margin-bottom: 0.25rem; }

.job-item { padding: 1.25rem; border-bottom: 1px solid var(--border-light); text-decoration: none; display: block; transition: var(--transition); }
.job-item:hover { background: var(--bg-hover); }
.job-title { font-weight: 700; color: var(--text-primary); font-size: 1.1rem; margin-bottom: 0.25rem; }
.job-meta { font-size: 0.85rem; color: var(--text-muted); display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; margin-top: 0.5rem; }
.job-tag { background: var(--bg-elevated); padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; }

.news-item { display: flex; flex-direction: column; padding: 0; border-bottom: 1px solid var(--border-light); transition: var(--transition); text-decoration: none; }
.news-item:hover { background: var(--bg-hover); }
.news-image { width: 100%; height: 220px; object-fit: cover; background: var(--bg-elevated); border-bottom: 1px solid var(--border-light); }
.news-content { padding: 1.25rem; }
.news-title { font-weight: 800; color: var(--text-primary); font-size: 1.1rem; margin-bottom: 0.5rem; line-height: 1.4; }
.news-meta { font-size: 0.8rem; color: var(--text-muted); display: flex; gap: 1rem; align-items: center; }
.news-tag { background: var(--bg-elevated); color: var(--accent-primary); padding: 2px 8px; border-radius: var(--radius-sm); font-size: 0.7rem; font-weight: 700; font-family: 'JetBrains Mono', monospace; }

.repo-embed { border: 1px solid var(--border-light); border-radius: var(--radius-md); margin-top: 1rem; background: var(--bg-surface); display: block; text-decoration: none; transition: var(--transition); }
.repo-embed:hover { border-color: var(--accent-primary); background: var(--bg-elevated); }
.repo-embed-content { padding: 1.25rem; }
.repo-embed-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; color: var(--accent-primary); font-family: 'JetBrains Mono', monospace; font-weight: 600; }
.repo-embed-desc { font-size: 0.85rem; color: var(--text-muted); }
.repo-stats { display: flex; gap: 1rem; margin-top: 0.5rem; font-size: 0.8rem; color: var(--text-muted); }
.repo-stat { display: flex; align-items: center; gap: 0.25rem; }

.chat-layout { display: flex; height: calc(100vh - 65px); }
.conversation-list { width: 300px; border-right: 1px solid var(--border-light); overflow-y: auto; flex-shrink: 0; }
.conversation-item { padding: 1rem; border-bottom: 1px solid var(--border-light); cursor: pointer; transition: var(--transition); display: flex; gap: 0.75rem; align-items: center; }
.conversation-item:hover { background: var(--bg-hover); }
.conversation-item.active { background: var(--bg-elevated); border-left: 3px solid var(--accent-primary); }
.chat-window { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-header { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border-light); font-weight: 700; display: flex; align-items: center; gap: 0.75rem; }
.chat-messages { flex: 1; overflow-y: auto; padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.message-bubble { max-width: 70%; padding: 0.75rem 1.25rem; border-radius: var(--radius-lg); font-size: 0.95rem; line-height: 1.4; }
.message-sent { background: var(--accent-primary); color: #000; align-self: flex-end; border-bottom-right-radius: 4px; }
.message-received { background: var(--bg-elevated); color: var(--text-primary); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-input-area { padding: 1rem 1.5rem; border-top: 1px solid var(--border-light); display: flex; gap: 0.75rem; }
.chat-input { flex: 1; background: var(--bg-surface); border: 1px solid var(--border-medium); border-radius: var(--radius-full); padding: 0.75rem 1.25rem; color: var(--text-primary); outline: none; }
.chat-input:focus { border-color: var(--accent-primary); }

.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--text-muted); text-align: center; padding: 2rem; }
.loader-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; gap: 1rem; color: var(--text-muted); }
.loader-spinner { width: 40px; height: 40px; border: 4px solid var(--border-light); border-top: 4px solid var(--accent-primary); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.fade-in { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.post-content strong { font-weight: 700; color: var(--text-primary); }
.post-content em { font-style: italic; }
.post-content blockquote { border-left: 3px solid var(--accent-primary); padding-left: 1rem; margin: 0.5rem 0; color: var(--text-muted); }
.post-content code { background: #0d1117; padding: 2px 6px; border-radius: 4px; font-family: 'JetBrains Mono', monospace; font-size: 0.85em; border: 1px solid #30363d; }

.readme-content { padding: 2rem; color: var(--text-secondary); line-height: 1.6; max-width: 100%; overflow-x: auto; }
.readme-content h1, .readme-content h2, .readme-content h3, .readme-content h4 { color: var(--text-primary); border-bottom: 1px solid var(--border-light); padding-bottom: 0.5rem; margin-top: 1.5rem; margin-bottom: 1rem; }
.readme-content h1 { font-size: 1.8rem; }
.readme-content h2 { font-size: 1.4rem; }
.readme-content h3 { font-size: 1.2rem; }
.readme-content a { color: var(--accent-primary); text-decoration: none; }
.readme-content a:hover { text-decoration: underline; }
.readme-content img { max-width: 100%; height: auto; border-radius: var(--radius-sm); display: inline-block; vertical-align: middle; }
.readme-content code { background: var(--bg-elevated); padding: 0.2rem 0.4rem; border-radius: 4px; font-family: 'JetBrains Mono', monospace; font-size: 0.9em; color: #c9d1d9; }
.readme-content pre { background: var(--bg-elevated); padding: 1rem; border-radius: var(--radius-sm); overflow-x: auto; margin: 1rem 0; border: 1px solid var(--border-light); }
.readme-content pre code { background: none; padding: 0; border: none; }
.readme-content ul, .readme-content ol { padding-left: 2rem; margin-bottom: 1rem; }
.readme-content li { margin-bottom: 0.5rem; }
.readme-content blockquote { border-left: 4px solid var(--accent-primary); padding-left: 1rem; margin: 1rem 0; color: var(--text-muted); }
.readme-content hr { border: none; border-top: 1px solid var(--border-light); margin: 2rem 0; }
.readme-content table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.readme-content th, .readme-content td { border: 1px solid var(--border-light); padding: 0.5rem; }
.readme-content details { margin: 1rem 0; background: var(--bg-surface); padding: 1rem; border-radius: var(--radius-sm); border: 1px solid var(--border-light); }
.readme-content summary { cursor: pointer; font-weight: 600; color: var(--text-primary); }
.readme-content p { margin-bottom: 1rem; }
