style.css raw

   1  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
   2  
   3  :root {
   4    --bg: #111; --bg2: #1a1a1a; --fg: #e0e0e0; --fg2: #888;
   5    --accent: #f59e0b; --border: #333; --radius: 6px;
   6    --font: system-ui, -apple-system, sans-serif;
   7    --mono: 'SF Mono', 'Fira Code', monospace;
   8  }
   9  
  10  @media (prefers-color-scheme: light) {
  11    :root {
  12      --bg: #fff; --bg2: #f5f5f5; --fg: #111; --fg2: #666;
  13      --accent: #d97706; --border: #ddd;
  14    }
  15  }
  16  
  17  body { font-family: var(--font); background: var(--bg); color: var(--fg); height: 100dvh; overflow: hidden; }
  18  
  19  /* layout */
  20  #app { display: flex; height: 100dvh; }
  21  .sidebar { width: auto; min-width: 0; background: var(--bg2); border-right: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; }
  22  .main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
  23  
  24  /* sidebar */
  25  .profile-area { padding: 12px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; cursor: pointer; }
  26  .profile-area:hover { background: var(--border); }
  27  .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--border); object-fit: cover; }
  28  .profile-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  29  .profile-npub { font-size: 11px; color: var(--fg2); font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  30  
  31  .feed-list { flex: 1; overflow-y: auto; padding: 8px; }
  32  .feed-item { padding: 8px 12px; border-radius: var(--radius); cursor: pointer; font-size: 14px; margin-bottom: 2px; }
  33  .feed-item:hover { background: var(--border); }
  34  .feed-item.active { background: var(--accent); color: #000; font-weight: 600; }
  35  
  36  .sidebar-logout { padding: 8px 12px; font-size: 13px; color: var(--fg2); cursor: pointer; border-top: 1px solid var(--border); }
  37  .sidebar-logout:hover { color: var(--fg); background: var(--border); }
  38  .relay-status { padding: 8px 12px; border-top: 1px solid var(--border); font-size: 11px; color: var(--fg2); }
  39  .relay-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 4px; }
  40  .relay-dot.on { background: #22c55e; }
  41  .relay-dot.off { background: #ef4444; }
  42  
  43  /* main content */
  44  .toolbar { padding: 12px; border-bottom: 1px solid var(--border); font-size: 16px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; }
  45  .toolbar-reload { background: none; border: none; color: var(--fg2); cursor: pointer; font-size: 18px; padding: 4px; line-height: 1; }
  46  .toolbar-reload:hover { color: var(--fg); }
  47  
  48  .feed { flex: 1; overflow-y: auto; padding: 0; }
  49  .note { padding: 12px 16px; border-bottom: 1px solid var(--border); }
  50  .note-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
  51  .note-author { font-weight: 600; font-size: 14px; }
  52  .note-time { font-size: 12px; color: var(--fg2); margin-left: auto; }
  53  .note-content { font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
  54  .note-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--border); object-fit: cover; flex-shrink: 0; }
  55  
  56  .compose { padding: 12px; border-top: 1px solid var(--border); display: flex; gap: 8px; }
  57  .compose textarea { flex: 1; background: var(--bg2); color: var(--fg); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; font-family: var(--font); font-size: 14px; resize: none; min-height: 40px; max-height: 120px; }
  58  .compose textarea:focus { outline: none; border-color: var(--accent); }
  59  .compose button { background: var(--accent); color: #000; border: none; border-radius: var(--radius); padding: 8px 16px; font-weight: 600; cursor: pointer; font-size: 14px; align-self: flex-end; }
  60  .compose button:hover { opacity: 0.9; }
  61  .compose button:disabled { opacity: 0.4; cursor: not-allowed; }
  62  
  63  /* login */
  64  .login-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100dvh; gap: 16px; }
  65  .login-screen button { background: var(--accent); color: #000; border: none; border-radius: var(--radius); padding: 12px 24px; font-size: 16px; font-weight: 600; cursor: pointer; }
  66  .login-input { width: 300px; max-width: 90vw; background: var(--bg2); color: var(--fg); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; font-size: 13px; }
  67  .login-input:focus { outline: none; border-color: var(--accent); }
  68  .login-input-mono { font-family: var(--mono); }
  69  
  70  /* smesh loader animation */
  71  .smesh-loader { width: 180px; height: 180px; }
  72  .smesh-loader-edge { stroke-linecap: round; opacity: 0; animation: smeshEdgeFade 0.4s ease forwards; }
  73  .smesh-loader-center { opacity: 0; animation: smeshNodePop 0.3s ease forwards; transform-origin: 400px 400px; }
  74  @keyframes smeshEdgeFade { to { opacity: 1; } }
  75  @keyframes smeshNodePop { 0% { opacity: 0; transform: scale(0); } 70% { transform: scale(1.2); } 100% { opacity: 1; transform: scale(1); } }
  76  
  77  /* settings */
  78  .settings { padding: 16px; overflow-y: auto; flex: 1; }
  79  .settings h2 { font-size: 16px; margin-bottom: 12px; }
  80  .settings section { margin-bottom: 24px; }
  81  .relay-input { display: flex; gap: 8px; margin-bottom: 8px; }
  82  .relay-input input { flex: 1; background: var(--bg2); color: var(--fg); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; font-size: 14px; }
  83  .relay-input button { background: var(--accent); color: #000; border: none; border-radius: var(--radius); padding: 8px 12px; font-weight: 600; cursor: pointer; }
  84  .relay-list-item { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; font-size: 14px; font-family: var(--mono); }
  85  .relay-list-item button { background: none; border: none; color: var(--fg2); cursor: pointer; font-size: 16px; }
  86  
  87  /* thread view */
  88  .thread-back { padding: 8px 12px; cursor: pointer; color: var(--accent); font-size: 14px; border-bottom: 1px solid var(--border); }
  89  .thread-back:hover { background: var(--bg2); }
  90  .thread-root { border-left: 3px solid var(--accent); }
  91  .thread-reply { border-left: 2px solid var(--border); }
  92  .note-actions { display: flex; gap: 16px; margin-top: 6px; }
  93  .note-action { font-size: 12px; color: var(--fg2); cursor: pointer; display: flex; align-items: center; gap: 4px; }
  94  .note-action:hover { color: var(--accent); }
  95  .header-action { margin-left: 0; }
  96  
  97  /* reply compose */
  98  .reply-compose { margin-top: 8px; }
  99  .reply-input { width: 100%; background: var(--bg2); color: var(--fg); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; font-family: var(--font); font-size: 14px; resize: none; min-height: 60px; max-height: 120px; }
 100  .reply-input:focus { outline: none; border-color: var(--accent); }
 101  .reply-buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
 102  .reply-cancel { background: none; border: 1px solid var(--border); color: var(--fg2); border-radius: var(--radius); padding: 4px 12px; font-size: 13px; cursor: pointer; }
 103  .reply-cancel:hover { border-color: var(--fg2); }
 104  .reply-submit { background: var(--accent); color: #000; border: none; border-radius: var(--radius); padding: 4px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
 105  .reply-submit:hover { opacity: 0.9; }
 106  .reply-submit:disabled { opacity: 0.4; cursor: not-allowed; }
 107  .orly-badge { display: inline-block; background: var(--accent); color: #000; font-size: 10px; padding: 1px 5px; border-radius: 3px; font-weight: 700; margin-left: 6px; vertical-align: middle; }
 108  
 109  /* snackbar */
 110  .snackbar { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 10px 20px; border-radius: var(--radius); font-size: 14px; z-index: 999; animation: fadein 0.3s; cursor: pointer; }
 111  @keyframes fadein { from { opacity: 0; transform: translateX(-50%) translateY(10px); } }
 112  
 113  /* new notes pill */
 114  .new-notes-pill { position: sticky; top: 8px; left: 50%; transform: translateX(-50%); width: fit-content; background: var(--accent); color: #000; padding: 6px 16px; border-radius: 20px; font-size: 13px; font-weight: 600; cursor: pointer; z-index: 5; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
 115  .new-notes-pill:hover { opacity: 0.9; }
 116  
 117  /* rich content */
 118  .rich-link { color: var(--accent); text-decoration: none; word-break: break-all; }
 119  .rich-link:hover { text-decoration: underline; }
 120  .rich-image { max-width: 100%; max-height: 400px; border-radius: var(--radius); margin: 6px 0; display: block; cursor: pointer; }
 121  .rich-video { max-width: 100%; max-height: 400px; border-radius: var(--radius); margin: 6px 0; display: block; }
 122  .rich-mention { color: var(--accent); cursor: pointer; font-weight: 600; }
 123  .rich-mention:hover { text-decoration: underline; }
 124  
 125  /* embedded notes */
 126  .embedded-note { border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 12px; margin: 6px 0; background: var(--bg2); cursor: pointer; }
 127  .embedded-note:hover { border-color: var(--accent); }
 128  .embedded-header { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
 129  .embedded-content { font-size: 13px; color: var(--fg2); line-height: 1.4; white-space: pre-wrap; word-break: break-word; }
 130  .embedded-loading, .embedded-missing { color: var(--fg2); font-size: 13px; font-style: italic; }
 131  
 132  /* repost */
 133  .repost-label { font-size: 12px; color: var(--fg2); margin-bottom: 4px; padding-left: 36px; }
 134  
 135  /* lightbox */
 136  .lightbox-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 100; display: flex; align-items: center; justify-content: center; }
 137  .lightbox-close { position: fixed; top: 12px; right: 16px; background: none; border: none; color: #fff; font-size: 28px; cursor: pointer; z-index: 101; }
 138  .lightbox-img { max-width: 95vw; max-height: 90vh; object-fit: contain; touch-action: pinch-zoom; }
 139  
 140  /* hashtag feed */
 141  .hashtag-input { width: 100%; background: var(--bg2); color: var(--fg); border: none; border-bottom: 1px solid var(--border); padding: 10px 12px; font-size: 14px; font-family: var(--font); outline: none; }
 142  .hashtag-input:focus { border-color: var(--accent); }
 143  
 144  /* DMs */
 145  .dm-list { flex: 1; overflow-y: auto; }
 146  .dm-list-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; border-bottom: 1px solid var(--border); }
 147  .dm-list-item:hover { background: var(--bg2); }
 148  .dm-preview { flex: 1; min-width: 0; }
 149  .dm-preview-name { font-size: 14px; font-weight: 600; }
 150  .dm-preview-text { font-size: 13px; color: var(--fg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
 151  .dm-preview-time { font-size: 11px; color: var(--fg2); flex-shrink: 0; }
 152  .dm-chat { display: flex; flex-direction: column; flex: 1; overflow: hidden; }
 153  .dm-messages { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
 154  .dm-bubble { max-width: 75%; padding: 8px 12px; border-radius: 12px; font-size: 14px; line-height: 1.4; word-break: break-word; white-space: pre-wrap; }
 155  .dm-bubble.mine { background: var(--accent); color: #000; align-self: flex-end; border-bottom-right-radius: 4px; }
 156  .dm-bubble.theirs { background: var(--bg2); align-self: flex-start; border-bottom-left-radius: 4px; }
 157  .dm-protocol { font-size: 10px; color: var(--fg2); margin-top: 2px; }
 158  .dm-protocol.legacy { color: #ef4444; }
 159  .dm-time { font-size: 10px; color: var(--fg2); margin-top: 1px; }
 160  .dm-compose { padding: 12px; border-top: 1px solid var(--border); display: flex; gap: 8px; }
 161  .dm-compose textarea { flex: 1; background: var(--bg2); color: var(--fg); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; font-family: var(--font); font-size: 14px; resize: none; min-height: 40px; max-height: 100px; }
 162  .dm-compose textarea:focus { outline: none; border-color: var(--accent); }
 163  .dm-compose button { background: var(--accent); color: #000; border: none; border-radius: var(--radius); padding: 8px 16px; font-weight: 600; cursor: pointer; font-size: 14px; align-self: flex-end; }
 164  .dm-compose button:disabled { opacity: 0.4; cursor: not-allowed; }
 165  .dm-new-input { padding: 10px 12px; border-bottom: 1px solid var(--border); }
 166  .dm-new-input input { width: 100%; background: var(--bg2); color: var(--fg); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; font-size: 13px; font-family: var(--mono); }
 167  .dm-new-input input:focus { outline: none; border-color: var(--accent); }
 168  
 169  /* loading */
 170  .loading { display: flex; align-items: center; justify-content: center; height: 100dvh; color: var(--fg2); }
 171  
 172  /* mobile */
 173  @media (max-width: 600px) {
 174    .sidebar { position: fixed; left: -100%; z-index: 10; height: 100dvh; transition: left 0.2s; width: auto; }
 175    .sidebar.open { left: 0; }
 176    .sidebar-toggle { display: block; padding: 8px 12px; cursor: pointer; font-size: 20px; }
 177  }
 178  @media (min-width: 601px) {
 179    .sidebar-toggle { display: none; }
 180  }
 181