OverviewFilesCommitsIssuesDocsReleasesPeers

wirecore / pear-app / public / style.css

1132 lines · css ref:
/* Fedicore Web UI - Inspired by Wiredove */

* {
  box-sizing: border-box;
}

body {
  background-color: #f2f2f2;
  color: #444;
  font-family: "Source Sans 3", sans-serif;
  max-width: 100%;
  margin: 0;
  padding-top: 60px;
  padding-bottom: 10em;
}

#scroller {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  padding: 1em;
}

/* Navbar */
#navbar {
  padding: 0.75em 1em;
  position: fixed;
  width: 100%;
  z-index: 1000;
  top: 0;
  left: 0;
  background-color: rgba(248, 248, 248, 0.9);
  border-bottom: 1px solid #eee;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
}

.navbar-left,
.navbar-right {
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.navbar-right {
  margin-left: auto;
}

.logo {
  font-weight: 600;
  font-size: 1.1em;
  margin-right: 0.5em;
}

/* Buttons */
button {
  font-size: 0.9em;
  font-family: "Source Sans 3", sans-serif;
  background: #fff;
  background-image: linear-gradient(to bottom, #ffffff, #f2f2f2);
  border: 1px solid #e4e4e4;
  padding: 0.5em 1em;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
}

button:hover {
  background: #f2f2f2;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.icon-btn {
  padding: 0.4em 0.6em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn .material-symbols-outlined {
  font-size: 20px;
}

/* Messages */
.message {
  padding: 1em;
  background: #f8f8f8;
  border: 1px solid #f5f5f5;
  margin-bottom: 0.75em;
  border-radius: 8px;
  animation: fadein 0.3s;
  transition: all 0.2s;
}

.message:hover {
  border: 1px solid #eee;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.message-clickable {
  cursor: pointer;
  transition: all 0.2s;
}

.message-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

@keyframes fadein {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.message-header {
  display: flex;
  align-items: center;
  gap: 0.75em;
  margin-bottom: 0.5em;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 1.1em;
}

.message-meta {
  flex: 1;
}

.avatar-link {
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.avatar-link:hover {
  opacity: 0.8;
}

.message-author {
  font-weight: 600;
  color: #333;
  margin-right: 0.5em;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
}

.message-author:hover {
  color: #045fd0;
  text-decoration: underline;
}

.message-pubkey {
  font-family: "Roboto Mono", monospace;
  font-size: 0.8em;
  color: #999;
}

.message-time {
  font-size: 0.85em;
  color: #999;
  display: block;
  margin-top: 0.15em;
}

.message-content {
  margin: 0.75em 0;
  line-height: 1.5;
  word-wrap: break-word;
}

.message-content p {
  margin: 0 0 0.5em 0;
}

.message-content p:last-child {
  margin-bottom: 0;
}

.message-content a {
  color: #045fd0;
  text-decoration: none;
  transition: color 0.2s;
}

.message-content a:hover {
  color: #8d82fe;
  text-decoration: underline;
}

.message-content a.hashtag {
  color: #10b981;
  font-weight: 500;
}

.message-content a.hashtag:hover {
  color: #059669;
}

.message-content img.post-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 0.75em 0;
  cursor: zoom-in;
  transition: opacity 0.2s;
}

.message-content img.post-image:hover {
  opacity: 0.9;
}

.message-image {
  margin: 0.75em 0;
}

.message-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  cursor: zoom-in;
  transition: opacity 0.2s;
}

.message-image img:hover {
  opacity: 0.9;
}

/* Inline images (from markdown) */
.message-text .inline-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 0.75em 0;
  display: block;
  cursor: zoom-in;
  transition: opacity 0.2s;
}

.message-text .inline-image:hover {
  opacity: 0.9;
}

/* Image Lightbox */
.image-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2em;
  animation: fadein 0.2s;
  cursor: zoom-out;
}

.image-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.image-lightbox-close {
  position: absolute;
  top: 1em;
  right: 1em;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: none;
  color: white;
  font-size: 2em;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.image-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.message-actions {
  display: flex;
  gap: 1em;
  margin-top: 0.75em;
  padding-top: 0.75em;
  border-top: 1px solid #f0f0f0;
}

.action-btn {
  background: none;
  border: none;
  padding: 0.25em 0.5em;
  font-size: 0.85em;
  color: #666;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  cursor: pointer;
  transition: color 0.2s;
}

.action-btn:hover {
  color: #045fd0;
}

.action-btn .material-symbols-outlined {
  font-size: 18px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1em;
  animation: fadein 0.2s;
}

.modal {
  background: #fff;
  border: 1px solid #e4e4e4;
  border-radius: 8px;
  padding: 2em;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.modal h2 {
  margin: 0 0 1.5em 0;
  font-size: 1.5em;
  color: #333;
}

.modal-content {
  background: #f8f8f8;
  border: 1px solid #f5f5f5;
  border-radius: 8px;
  padding: 1.5em;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1em;
}

.modal-title {
  font-size: 1.2em;
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
  padding: 0;
  color: #999;
}

.close-btn:hover {
  color: #666;
}

/* Profile Modal */
.profile-modal {
  max-width: 550px;
}

.profile-section {
  margin-bottom: 2em;
  padding-bottom: 1.5em;
  border-bottom: 1px solid #f0f0f0;
}

.profile-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.profile-section strong {
  display: block;
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
  margin-bottom: 0.75em;
}

.profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75em;
}

.profile-header strong {
  margin: 0;
}

.edit-btn {
  background: none;
  border: none;
  padding: 0.25em;
  color: #666;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s;
}

.edit-btn:hover {
  color: #045fd0;
  background: none;
}

.edit-btn .material-symbols-outlined {
  font-size: 20px;
}

.username-display {
  font-size: 1.3em;
  font-weight: 600;
  color: #333;
  padding: 0.5em 0;
}

.username-display em {
  font-weight: 400;
  font-size: 0.85em;
}

.username-edit-form {
  margin-top: 0.5em;
}

.username-edit-form input {
  margin-bottom: 0.75em;
  font-size: 1.1em;
}

.edit-actions {
  display: flex;
  gap: 0.5em;
  margin-bottom: 0.5em;
}

.edit-actions button {
  flex: 1;
}

.pubkey-full {
  font-family: "Roboto Mono", monospace;
  font-size: 0.8em;
  color: #666;
  background: #f8f8f8;
  padding: 0.75em;
  border-radius: 5px;
  display: block;
  word-break: break-all;
  transition: background 0.2s;
  margin-top: 0.5em;
}

.pubkey-full:hover {
  background: #f0f0f0;
}

.profile-info {
  margin-bottom: 2em;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5em;
  margin-top: 2em;
  padding-top: 1.5em;
  border-top: 1px solid #f0f0f0;
}

.modal-actions button {
  min-width: 100px;
}

button.primary {
  background: #045fd0;
  background-image: linear-gradient(to bottom, #0567e0, #045fd0);
  color: white;
  border-color: #034ba0;
  font-weight: 600;
}

button.primary:hover {
  background: #0567e0;
}

button.primary:disabled {
  background: #93c5fd;
  border-color: #93c5fd;
}

/* Forms */
textarea, input[type="text"] {
  width: 100%;
  font-size: 1em;
  font-family: "Source Sans 3", sans-serif;
  border: 1px solid #e4e4e4;
  border-radius: 5px;
  background: #fff;
  color: #444;
  padding: 0.75em;
  margin-bottom: 1em;
  transition: border 0.2s;
}

textarea:focus, input:focus {
  outline: none;
  border-color: #045fd0;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5em;
  color: #333;
}

/* Public key display */
.pubkey {
  font-family: "Roboto Mono", monospace;
  font-size: 0.85em;
  color: #999;
}

/* Toast notifications */
#toast-container {
  position: fixed;
  bottom: 2em;
  right: 2em;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.toast {
  background: #333;
  color: #fff;
  padding: 1em 1.5em;
  border-radius: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: slidein 0.3s;
  max-width: 300px;
}

@keyframes slidein {
  from { transform: translateX(400px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

.toast.success {
  background: #10b981;
}

.toast.error {
  background: #ef4444;
}

/* Loading state */
.loading {
  text-align: center;
  padding: 2em;
  color: #999;
}

.loading::after {
  content: '...';
  animation: dots 1.5s infinite;
}

@keyframes dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3em 1em;
  color: #999;
}

.empty-state h3 {
  margin-bottom: 0.5em;
  color: #666;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #181818;
    color: #ccc;
  }

  #navbar {
    background-color: rgba(34, 34, 34, 0.9);
    border-bottom: 1px solid #333;
  }

  .message {
    background-color: #222;
    border: 1px solid #1e1e1e;
  }

  .message:hover {
    border: 1px solid #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }

  .modal {
    background-color: #222;
    border: 1px solid #333;
  }

  .modal h2 {
    color: #ddd;
  }

  .modal-content {
    background-color: #222;
    border: 1px solid #1e1e1e;
  }

  .profile-section {
    border-bottom-color: #2a2a2a;
  }

  .profile-section strong {
    color: #999;
  }

  .username-display {
    color: #ddd;
  }

  .pubkey-full {
    background: #1a1a1a;
    color: #999;
  }

  .pubkey-full:hover {
    background: #252525;
  }

  .edit-btn {
    color: #999;
  }

  .edit-btn:hover {
    color: #50afe4;
  }

  .modal-actions {
    border-top-color: #2a2a2a;
  }

  textarea, input {
    background: #1a1a1a;
    color: #ccc;
    border: 1px solid #333;
  }

  button {
    color: #ccc;
    background: #333;
    border: 1px solid #444;
    background-image: none;
  }

  button:hover {
    background: #3a3a3a;
  }

  .message-author {
    color: #ddd;
  }

  .message-author:hover {
    color: #50afe4;
  }

  .action-btn {
    color: #999;
  }

  .action-btn:hover {
    color: #50afe4;
  }

  .close-btn {
    color: #777;
  }

  .close-btn:hover {
    color: #999;
  }

  .message-content a {
    color: #50afe4;
  }

  .message-content a:hover {
    color: #8d82fe;
  }

  .message-content a.hashtag {
    color: #10b981;
  }

  .message-content a.hashtag:hover {
    color: #34d399;
  }
}

/* Responsive */
@media (max-width: 640px) {
  #navbar {
    padding: 0.5em 0.75em;
    gap: 0.5em;
    flex-wrap: nowrap;
  }

  .navbar-left,
  .navbar-right {
    gap: 0.25em;
  }

  .logo {
    font-size: 0.95em;
    margin-right: 0.25em;
  }

  .pubkey {
    display: none;
  }

  #scroller {
    padding: 0.5em;
  }

  .message {
    padding: 0.75em;
  }

  .modal-content {
    padding: 1em;
  }

  #toast-container {
    right: 1em;
    bottom: 1em;
    left: 1em;
  }

  .toast {
    max-width: none;
  }
}

/* Search Modal */
.search-modal {
  max-width: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.search-modal h2 {
  margin-bottom: 1em;
}

.search-modal #search-input {
  width: 100%;
  padding: 0.75em;
  font-size: 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-bottom: 1em;
}

.search-modal #search-input:focus {
  outline: none;
  border-color: #0084ff;
}

.search-results {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 1em;
  min-height: 200px;
  max-height: 50vh;
}

.search-placeholder {
  text-align: center;
  color: #999;
  padding: 2em;
}

.search-placeholder.error {
  color: #d93025;
}

.user-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1em;
  border: 1px solid #eee;
  border-radius: 6px;
  margin-bottom: 0.5em;
  background: #fff;
  transition: background 0.2s;
}

.user-item:hover {
  background: #f9f9f9;
}

.user-info {
  flex: 1;
}

.user-name {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.25em;
  color: #333;
}

.user-pubkey {
  font-family: "Roboto Mono", monospace;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.25em;
}

.user-lastseen {
  font-size: 0.85rem;
  color: #999;
}

.view-profile-btn {
  padding: 0.5em 1em;
  background: #0084ff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.view-profile-btn:hover {
  background: #0073e6;
}

/* Profile Modal */
.profile-modal {
  max-width: 700px;
  max-height: 85vh;
  overflow-y: auto;
}

.profile-modal h2 {
  margin-bottom: 1em;
}

.profile-modal h3 {
  margin-top: 1.5em;
  margin-bottom: 0.75em;
  font-size: 1.2rem;
  color: #333;
}

.profile-details {
  background: #f9f9f9;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 1em;
  margin-bottom: 1em;
}

.profile-field {
  margin-bottom: 0.75em;
}

.profile-field:last-child {
  margin-bottom: 0;
}

.profile-field strong {
  display: inline-block;
  min-width: 100px;
  color: #666;
}

.monospace {
  font-family: "Roboto Mono", monospace;
  font-size: 0.9rem;
  word-break: break-all;
}

.recent-posts {
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 1em;
  background: #fff;
  margin-bottom: 1em;
}

.post-item {
  border-bottom: 1px solid #f0f0f0;
  padding: 1em 0;
}

.post-item:first-child {
  padding-top: 0;
}

.post-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.post-date {
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 0.5em;
}

.post-text {
  line-height: 1.6;
  color: #333;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Settings Modal */
.settings-modal {
  max-width: 700px;
  max-height: 85vh;
  overflow-y: auto;
}

.settings-section {
  margin-bottom: 2em;
  padding: 1.5em;
  background: #f9f9f9;
  border: 1px solid #eee;
  border-radius: 8px;
}

.settings-section h3 {
  margin-top: 0;
  margin-bottom: 0.5em;
  font-size: 1.2rem;
  color: #333;
}

.settings-description {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 1.5em;
}

.settings-field {
  margin-bottom: 1em;
}

.settings-field label {
  display: block;
  margin-bottom: 0.5em;
  font-weight: 500;
  color: #555;
}

.settings-field input[type="text"],
.settings-field select {
  width: 100%;
  padding: 0.6em;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.95rem;
}

.settings-field input[type="checkbox"] {
  margin-right: 0.5em;
}

.bridge-status {
  margin-bottom: 1.5em;
  padding: 1em;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.status-loading,
.status-error {
  color: #666;
  text-align: center;
  padding: 0.5em;
}

.status-error {
  color: #d32f2f;
}

.status-info {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.95rem;
}

.status-item strong {
  min-width: 80px;
  color: #666;
}

.bridge-actions {
  display: flex;
  gap: 0.5em;
  flex-wrap: wrap;
}

.bridge-actions button {
  flex: 1;
  min-width: 120px;
}

.bridge-stats {
  padding: 1em;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1em;
  margin-top: 1em;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.25em;
}

.stat-label {
  font-size: 0.85rem;
  color: #666;
  font-weight: 500;
}

.stat-value {
  font-size: 1.3rem;
  color: #333;
  font-weight: 600;
}