Something went wrong. Try again.
A Bsky-like frontend using the atprotocol natively.
Something went wrong. Try again.
13 kB · 771 lines
CSS
at main
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772.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; }}