.layout { display: flex; justify-content: center; min-height: 100vh; } .layout-sidebar { width: 240px; border-right: 1px solid var(--border); padding: 20px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; flex-shrink: 0; } .layout-brand { font-size: 22px; font-weight: 700; color: var(--text-h); padding: 8px 12px; margin-bottom: 12px; } .layout-nav a, .layout-nav button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; text-decoration: none; font-size: 15px; color: var(--text-h); background: none; border: none; cursor: pointer; width: 100%; text-align: left; transition: background 0.15s; } .layout-nav a svg, .layout-nav button svg { width: 20px; height: 20px; font-size: 20px; } .layout-brand-icon { width: 20px; height: 20px; flex-shrink: 0; } .layout-nav a:hover, .layout-nav button:hover { background: var(--hover-bg); } .layout-nav a.active { font-weight: 600; background: var(--hover-bg); } .layout-nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; line-height: 1; } .layout-spacer { flex: 1; } .layout-compose-btn { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; padding: 12px 20px; border-radius: 999px; border: none; background: var(--accent); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; width: 100%; transition: opacity 0.15s; } .layout-compose-btn:hover { opacity: 0.85; } .layout-compose-btn svg { font-size: 16px; width: 16px; height: 16px; } .layout-main { width: 100%; max-width: 600px; min-width: 0; border-left: 1px solid var(--border); border-right: 1px solid var(--border); min-height: 100vh; } .layout-right { width: 350px; flex-shrink: 0; padding: 20px; } .layout-search { position: sticky; top: 20px; z-index: 20; } .layout-search-input-wrapper { position: relative; } .layout-search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text); font-size: 14px; pointer-events: none; } .layout-search-input { width: 100%; padding: 10px 36px 10px 40px; border-radius: 999px; border: 1px solid var(--border); background: var(--hover-bg); color: var(--text-h); font-size: 15px; outline: none; transition: border-color 0.15s, background 0.15s; } .layout-search-input:focus { border-color: var(--accent); background: var(--bg); } .layout-search-input::placeholder { color: var(--text); } .layout-search-clear { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--text); font-size: 14px; padding: 4px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: background 0.1s; } .layout-search-clear:hover { background: var(--hover-bg); } .layout-search-dropdown { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; z-index: 30; animation: layout-search-slide 0.12s ease-out; } @keyframes layout-search-slide { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } } .layout-search-dropdown-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: none; border: none; cursor: pointer; width: 100%; text-align: left; color: inherit; transition: background 0.08s; } .layout-search-dropdown-item:hover, .layout-search-dropdown-item.selected { background: var(--hover-bg); } .layout-search-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; } .layout-search-avatar-placeholder { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; } .layout-search-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; } .layout-search-name { font-weight: 600; font-size: 14px; color: var(--text-h); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .layout-search-handle { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .layout-search-posts-btn { border-top: 1px solid var(--border); gap: 8px; padding: 10px 14px; color: var(--accent); font-size: 14px; } .layout-search-posts-icon { font-size: 13px; flex-shrink: 0; } .layout-profile-section { position: relative; margin-top: 8px; border-top: 1px solid var(--border); padding-top: 8px; } .layout-profile-trigger { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: none; border: none; cursor: pointer; width: 100%; color: inherit; transition: background 0.15s; } .layout-profile-trigger:hover { background: var(--hover-bg); } .layout-profile-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; } .layout-profile-avatar-placeholder { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; flex-shrink: 0; } .layout-profile-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; text-align: left; } .layout-profile-name { font-weight: 600; font-size: 14px; color: var(--text-h); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .layout-profile-handle { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .layout-profile-chevron { margin-left: auto; font-size: 12px; color: var(--text); opacity: 0.5; transition: transform 0.2s, opacity 0.15s; } .layout-profile-chevron.open { transform: rotate(180deg); } .account-switcher { position: absolute; bottom: 100%; left: 0; right: 0; background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); margin-bottom: 4px; overflow: hidden; z-index: 100; animation: switcher-slide-up 0.15s ease-out; } @keyframes switcher-slide-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } } .account-switcher-section { padding: 8px 0; } .account-switcher-label { padding: 4px 14px 8px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text); opacity: 0.6; } .account-switcher-item { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: none; border: none; cursor: pointer; width: 100%; text-align: left; color: inherit; transition: background 0.1s; } .account-switcher-item:hover { background: var(--hover-bg); } .account-switcher-item:disabled { opacity: 0.6; cursor: wait; } .account-switcher-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; } .account-switcher-avatar-placeholder { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; } .account-switcher-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; } .account-switcher-name { font-weight: 600; font-size: 13px; color: var(--text-h); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .account-switcher-handle { font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .account-switcher-spin { font-size: 14px; color: var(--accent); flex-shrink: 0; } .account-switcher-remove { padding: 4px 6px; background: none; border: none; cursor: pointer; color: var(--text); opacity: 0; font-size: 12px; transition: opacity 0.15s, color 0.15s; flex-shrink: 0; } .account-switcher-item:hover .account-switcher-remove { opacity: 0.4; } .account-switcher-remove:hover { opacity: 1 !important; color: #e53e3e; } .account-switcher-actions { border-top: 1px solid var(--border); padding: 4px 0; } .account-switcher-action { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: none; border: none; cursor: pointer; width: 100%; text-align: left; color: var(--text); font-size: 13px; transition: background 0.1s; } .account-switcher-action:hover { background: var(--hover-bg); } .account-switcher-action.logout { color: #e53e3e; } .account-switcher-action svg { width: 16px; height: 16px; font-size: 16px; } .layout-burger-btn { display: none; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; border: none; background: none; color: var(--text-h); cursor: pointer; font-size: 18px; transition: background 0.15s; } .layout-burger-btn:hover { background: var(--hover-bg); } .layout-burger-btn svg { width: 20px; height: 20px; } /* ── Drawer overlay ── */ .layout-drawer-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4); z-index: 200; /* Opacity controlled by JS for swipe progress */ } /* ── Drawer panel ── */ .layout-drawer { position: fixed; top: 0; left: 0; bottom: 0; width: 280px; max-width: 85vw; background: var(--bg); border-right: 1px solid var(--border); z-index: 201; display: flex; flex-direction: column; gap: 4px; padding: 12px; overflow-y: auto; /* Drawer starts off-screen; JS controls transform for swipe animation */ transform: translateX(-100%); } .layout-drawer-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; } .layout-drawer-header .layout-brand { margin-bottom: 0; } .layout-drawer-close { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; border: none; background: none; color: var(--text-h); cursor: pointer; transition: background 0.15s; } .layout-drawer-close:hover { background: var(--hover-bg); } .layout-drawer-close svg { width: 16px; height: 16px; font-size: 16px; } .layout-drawer .layout-nav { display: flex; flex-direction: column; gap: 0; } .layout-drawer .layout-compose-btn { margin-top: 8px; } .layout-drawer-profile { margin-top: 8px; border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; } .layout-drawer-actions { display: flex; flex-direction: column; } .layout-drawer-accounts { padding-top: 8px; border-top: 1px solid var(--border); } .layout-drawer-accounts .account-switcher-label { padding: 4px 10px 8px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text); opacity: 0.6; } .layout-drawer-accounts .account-switcher-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: none; border: none; cursor: pointer; width: 100%; text-align: left; color: inherit; border-radius: 8px; transition: background 0.1s; } .layout-drawer-accounts .account-switcher-item:hover { background: var(--hover-bg); } .layout-drawer-accounts .account-switcher-item:disabled { opacity: 0.6; cursor: wait; } @media (max-width: 1100px) { .layout-right { display: none; } } @media (max-width: 768px) { .layout { flex-direction: column; } .layout-sidebar { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; padding: 8px 12px; gap: 0; border-right: none; border-bottom: 1px solid var(--border); } .layout-brand { margin-bottom: 0; margin-right: auto; } .layout-burger-btn { display: inline-flex; } .layout-nav--desktop, .layout-compose-btn--desktop, .layout-profile-section--desktop, .layout-spacer { display: none; } .layout-main { max-width: none; border-left: none; border-right: none; } }