/* ============================================
   AI STV – Social Feed · Professional Redesign
   ============================================ */

:root {
    --bg-base:      #09090b;
    --bg-surface:   #111113;
    --bg-card:      #18181b;
    --bg-hover:     #1f1f23;
    --bg-input:     #141416;
    --border:       rgba(255,255,255,0.08);
    --border-focus: rgba(0,170,255,0.5);
    --accent:       #00aaff;
    --accent-dim:   rgba(0,170,255,0.12);
    --accent-glow:  rgba(0,170,255,0.25);
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --text-muted:   #52525b;
    --danger:       #ef4444;
    --success:      #22c55e;
    --sidebar-w:    256px;
    --topbar-h:     60px;
    --radius-sm:    8px;
    --radius-md:    12px;
    --radius-lg:    16px;
    --shadow-card:  0 1px 3px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.05);
    --shadow-glow:  0 0 20px rgba(0,170,255,0.15);
    --transition:   0.2s ease;
    --font:         'Be Vietnam Pro', sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ── Base ── */
html { scroll-behavior: smooth; }
body {
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.9375rem;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SCROLLBAR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SIDEBAR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 200;
    transition: transform var(--transition);
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}
.sidebar-logo {
    width: 32px; height: 32px;
    border-radius: 8px;
    object-fit: contain;
}
.brand-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.sidebar-nav { flex: 1; padding: 12px 10px; }

.nav-section { margin-bottom: 20px; }
.nav-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 0 10px;
    margin-bottom: 6px;
}
.nav-section ul li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
}
.nav-section ul li a i { width: 17px; height: 17px; flex-shrink: 0; }
.nav-section ul li a:hover,
.nav-section ul li a.active {
    background: var(--accent-dim);
    color: var(--accent);
}

.sidebar-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 190;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TOPBAR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-w);
    right: 0;
    height: var(--topbar-h);
    background: rgba(9,9,11,0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 24px;
    z-index: 100;
}
.menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 6px;
    border-radius: 6px;
    transition: color var(--transition), background var(--transition);
}
.menu-btn:hover { color: var(--text-primary); background: var(--bg-hover); }
.menu-btn i { width: 20px; height: 20px; }

.topbar-brand {
    display: none;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.95rem;
}
.topbar-logo { width: 26px; height: 26px; border-radius: 6px; object-fit: contain; }

.topbar-right { margin-left: auto; }
.topbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1px solid var(--border-focus);
    transition: background var(--transition), box-shadow var(--transition);
}
.topbar-btn i { width: 15px; height: 15px; }
.topbar-btn:hover { background: rgba(0,170,255,0.2); box-shadow: var(--shadow-glow); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   LAYOUT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.layout {
    margin-left: var(--sidebar-w);
    margin-top: var(--topbar-h);
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 0;
    min-height: calc(100vh - var(--topbar-h));
}

.main-content {
    padding: 32px 28px;
    max-width: 700px;
    width: 100%;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RIGHT SIDEBAR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.right-sidebar {
    padding: 32px 20px 32px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
}
.widget-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 14px;
}
.widget-title i { width: 15px; height: 15px; color: var(--accent); }

.widget-links li { margin-bottom: 4px; }
.widget-links li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: background var(--transition), color var(--transition);
}
.widget-links li a i { width: 15px; height: 15px; }
.widget-links li a:hover { background: var(--accent-dim); color: var(--accent); }

.rules-list li {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    padding: 5px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}
.rules-list li:last-child { border: none; }
.rules-list li::before {
    content: '';
    display: inline-block;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PAGE HEADER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.page-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}
.page-header-icon {
    width: 44px; height: 44px;
    border-radius: var(--radius-md);
    background: var(--accent-dim);
    border: 1px solid var(--border-focus);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.page-header-icon i { width: 22px; height: 22px; color: var(--accent); }
.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.page-subtitle {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CARD
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    box-shadow: var(--shadow-card);
    transition: border-color var(--transition);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   LOGIN PROMPT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.login-prompt { padding: 50px 30px; }
.login-content { text-align: center; }
.login-icon-wrap {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--accent-dim);
    border: 1px solid var(--border-focus);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 18px;
}
.login-icon-wrap i { width: 24px; height: 24px; color: var(--accent); }
.login-content h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
.login-content p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 24px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   POST FORM
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.post-form-card { padding: 20px; }
.post-form-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.user-avatar-placeholder {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.user-avatar-placeholder i { width: 18px; height: 18px; color: var(--text-muted); }
.post-form-label { font-size: 0.875rem; color: var(--text-muted); }

#post-content {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: var(--font);
    resize: none;
    min-height: 100px;
    transition: border-color var(--transition), background var(--transition);
    outline: none;
}
#post-content:focus {
    border-color: var(--border-focus);
    background: rgba(0,170,255,0.04);
}
#post-content::placeholder { color: var(--text-muted); }

.file-preview { margin: 12px 0; }
.preview-content {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.preview-item { position: relative; border-radius: var(--radius-md); overflow: hidden; }
.preview-item img,
.preview-item video { max-width: 220px; max-height: 160px; border-radius: var(--radius-sm); object-fit: cover; display: block; }
.remove-preview {
    position: absolute; top: 6px; right: 6px;
    background: rgba(239,68,68,0.9); color: #fff; border: none;
    border-radius: 50%; width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; transition: transform var(--transition);
}
.remove-preview:hover { transform: scale(1.15); }

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    margin-top: 14px;
    gap: 12px;
}
.attach-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-hover);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}
.attach-btn i { width: 16px; height: 16px; }
.attach-btn:hover { background: var(--accent-dim); color: var(--accent); border-color: var(--border-focus); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BUTTONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 20px; border-radius: var(--radius-sm);
    font-size: 0.875rem; font-weight: 600; border: none;
    transition: all var(--transition);
}
.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover {
    background: #0095e0;
    box-shadow: 0 4px 18px var(--accent-glow);
    transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary i { width: 15px; height: 15px; }

.btn-post {
    margin-left: auto;
    padding: 9px 22px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   FEED POSTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.feed-post {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-card);
    transition: border-color var(--transition), background var(--transition);
    animation: slideUp 0.3s ease;
}
.feed-post:hover {
    border-color: rgba(0,170,255,0.2);
    background: var(--bg-hover);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.post-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 14px;
}
.author-info { display: flex; align-items: center; gap: 11px; }
.author-avatar {
    width: 40px; height: 40px;
    border-radius: 50%; object-fit: cover;
    border: 2px solid rgba(0,170,255,0.3);
    background: var(--bg-hover);
}
.author-details { display: flex; flex-direction: column; }
.author-name { font-weight: 600; font-size: 0.9rem; color: var(--text-primary); }
.post-time { font-size: 0.75rem; color: var(--text-muted); margin-top: 1px; }

.post-options { position: relative; }
.options-toggle {
    background: none; border: none;
    color: var(--text-muted); padding: 5px 8px; border-radius: 6px;
    transition: background var(--transition), color var(--transition);
    display: flex; align-items: center; justify-content: center;
}
.options-toggle i { width: 16px; height: 16px; }
.options-toggle:hover { background: var(--bg-hover); color: var(--text-primary); }

.options-menu {
    position: absolute; right: 0; top: 34px;
    background: #222226;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 6px;
    min-width: 150px; z-index: 50;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    display: none;
}
.options-menu.active { display: block; }
.option-item {
    display: block; width: 100%; background: none; border: none;
    color: var(--text-secondary); padding: 8px 12px;
    text-align: left; border-radius: 6px;
    transition: background var(--transition), color var(--transition);
    font-size: 0.85rem;
}
.option-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.option-item.delete { color: var(--danger); }
.option-item.delete:hover { background: rgba(239,68,68,0.1); }

.post-content {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
    word-break: break-word;
}
.post-content a { color: var(--accent); }
.post-content a:hover { text-decoration: underline; }

.post-media { margin: 14px 0; border-radius: var(--radius-md); overflow: hidden; }
.post-media img,
.post-media video {
    max-width: 100%; max-height: 420px;
    border-radius: var(--radius-md); object-fit: contain; display: block;
}

.file-attachment { margin: 12px 0; }
.file-attachment a {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--accent-dim); padding: 9px 14px;
    border-radius: var(--radius-sm); color: var(--accent); font-size: 0.875rem;
    border: 1px solid var(--border-focus);
    transition: background var(--transition);
}
.file-attachment a:hover { background: rgba(0,170,255,0.2); }

.post-actions {
    display: flex; gap: 4px;
    margin-top: 16px; padding-top: 14px;
    border-top: 1px solid var(--border);
}
.action-btn {
    display: flex; align-items: center; gap: 6px;
    background: none; border: none;
    color: var(--text-muted); padding: 7px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem; font-weight: 500;
    transition: background var(--transition), color var(--transition);
}
.action-btn i { width: 16px; height: 16px; }
.action-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.action-btn.liked { color: var(--danger); }
.action-btn.liked:hover { background: rgba(239,68,68,0.1); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   VERIFIED BADGE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.verified-badge { vertical-align: middle; margin-left: 3px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   LOADER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.loader {
    border: 3px solid rgba(255,255,255,0.06);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    width: 28px; height: 28px;
    animation: spin 0.8s linear infinite;
    margin: 20px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-state { text-align: center; padding: 48px 20px; }
.loading-state p { color: var(--text-muted); margin-top: 12px; font-size: 0.875rem; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   EMPTY STATE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.empty-state { text-align: center; padding: 64px 20px; }
.empty-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
}
.empty-icon i { width: 28px; height: 28px; color: var(--text-muted); }
.empty-state h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); font-size: 0.875rem; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MODALS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.modal {
    display: none;
    position: fixed; inset: 0;
    z-index: 500;
    justify-content: center; align-items: center;
}
.modal[style*="flex"] { display: flex; }

.modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(6px);
}
.modal-content {
    position: relative;
    background: #1a1a1e;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    width: 90%; max-width: 500px;
    max-height: 85vh; overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.7);
    animation: modalIn 0.2s ease;
    z-index: 1;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.96) translateY(-8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px;
}
.modal-header h2 {
    display: flex; align-items: center; gap: 9px;
    font-size: 1.1rem; font-weight: 700; color: var(--text-primary);
}
.modal-header h2 i { width: 18px; height: 18px; color: var(--accent); }
.modal-close {
    background: none; border: none;
    color: var(--text-muted); padding: 5px; border-radius: 6px;
    transition: background var(--transition), color var(--transition);
    display: flex; align-items: center;
}
.modal-close i { width: 18px; height: 18px; }
.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }

#edit-post-content {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: var(--font);
    resize: vertical; min-height: 140px;
    margin-bottom: 18px;
    transition: border-color var(--transition); outline: none;
}
#edit-post-content:focus { border-color: var(--border-focus); }

/* Comments */
#comments-list {
    max-height: 320px; overflow-y: auto;
    margin-bottom: 18px;
    display: flex; flex-direction: column; gap: 10px;
}
.comment {
    display: flex; gap: 11px;
    padding: 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
.comment-avatar { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; object-fit: cover; }
.comment-content { flex: 1; }
.comment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.comment-author { font-weight: 600; font-size: 0.85rem; color: var(--text-primary); }
.comment-time { font-size: 0.72rem; color: var(--text-muted); }
.comment-text { color: var(--text-secondary); line-height: 1.5; font-size: 0.875rem; }

.comment-input-area {
    display: flex; gap: 10px; align-items: center;
    border-top: 1px solid var(--border); padding-top: 16px;
}
#comment-text {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text-primary); font-size: 0.875rem; font-family: var(--font);
    outline: none; transition: border-color var(--transition);
}
#comment-text:focus { border-color: var(--border-focus); }
#comment-text::placeholder { color: var(--text-muted); }
#submit-comment-btn { padding: 10px 14px; }
#submit-comment-btn i { width: 16px; height: 16px; margin: 0; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TOAST
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
#toast {
    position: fixed; bottom: 24px; left: 50%;
    transform: translateX(-50%);
    background: #222226;
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 11px 20px; border-radius: var(--radius-md);
    font-size: 0.875rem; font-weight: 500;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    z-index: 9999; display: none;
    animation: toastIn 0.2s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(8px); } to { opacity:1; transform: translateX(-50%) translateY(0); } }
#toast.show { display: block; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   FADE IN (page load)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.fade-in { animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   DETECTED LINK
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.detected-link { color: var(--accent) !important; text-decoration: underline; font-weight: 500; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 1100px) {
    .right-sidebar { display: none; }
    .layout { grid-template-columns: 1fr; }
    .main-content { max-width: 100%; }
}

@media (max-width: 768px) {
    :root { --sidebar-w: 0px; }
    .sidebar {
        width: 260px;
        transform: translateX(-100%);
    }
    .sidebar.active { transform: translateX(0); }
    .sidebar-overlay.active { display: block; }
    .topbar { left: 0; padding: 0 16px; }
    .menu-btn { display: flex; }
    .topbar-brand { display: flex; }
    .layout { margin-left: 0; }
    .main-content { padding: 20px 16px; }
}

@media (max-width: 480px) {
    .page-header { gap: 10px; }
    .page-title { font-size: 1.25rem; }
    .post-actions { gap: 0; }
    .action-btn span { display: none; }
    .modal-content { padding: 20px; }
    .comment-input-area { flex-direction: column; gap: 10px; }
    #comment-text, #submit-comment-btn { width: 100%; }
}
