/* Wechatsync Relay 中转站 — 简洁实用风 */

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Microsoft YaHei', sans-serif;
  color: #1f2937;
  background: #f3f4f6;
  line-height: 1.6;
}
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }
hr { border: 0; border-top: 1px solid #e5e7eb; margin: 24px 0; }

/* ===== Login ===== */
.login-body {
  display: flex; justify-content: center; align-items: center;
  min-height: 100vh; padding: 24px;
}
.login-card {
  width: 100%; max-width: 420px;
  background: #fff; padding: 32px; border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
.login-card h1 { font-size: 24px; margin-bottom: 4px; }
.login-card .subtitle { color: #6b7280; font-size: 14px; margin-bottom: 24px; }
.login-card label {
  display: block; font-size: 13px; color: #374151;
  margin-bottom: 6px; font-weight: 500;
}
.login-card input {
  width: 100%; padding: 10px 12px; font-size: 14px;
  border: 1px solid #d1d5db; border-radius: 6px;
  margin-bottom: 16px;
}
.login-card input:focus { outline: none; border-color: #2563eb; }
.login-card button {
  width: 100%; padding: 10px; font-size: 14px; font-weight: 500;
  background: #2563eb; color: white; border: none; border-radius: 6px;
  cursor: pointer;
}
.login-card button:hover { background: #1d4ed8; }
.login-card button:disabled { opacity: 0.5; cursor: not-allowed; }
.login-card .error {
  margin-top: 16px; padding: 10px; background: #fee2e2;
  color: #991b1b; border-radius: 6px; font-size: 13px;
}
.login-card .hint {
  margin-top: 24px; font-size: 12px; color: #9ca3af;
  text-align: center; line-height: 1.5;
}

/* ===== Topbar ===== */
.topbar {
  background: white; border-bottom: 1px solid #e5e7eb;
  position: sticky; top: 0; z-index: 10;
}
.topbar-inner {
  max-width: 1000px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 24px;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar h1 { font-size: 18px; font-weight: 600; }
.stats { color: #6b7280; font-size: 13px; }
.btn-link {
  background: none; border: none; color: #4b5563;
  cursor: pointer; padding: 6px 10px; font-size: 13px;
  border-radius: 6px;
}
.btn-link:hover { background: #f3f4f6; color: #1f2937; }
.btn-danger { color: #dc2626; }
.btn-danger:hover { background: #fee2e2; }

/* ===== Container ===== */
.container { max-width: 1000px; margin: 0 auto; padding: 24px; }
.loading, .empty {
  text-align: center; padding: 48px 24px; color: #6b7280;
}
.empty .hint { margin-top: 8px; font-size: 13px; }

/* ===== Article List ===== */
.article-list { list-style: none; display: grid; gap: 12px; }
.article-item {}
.article-link {
  display: flex; gap: 16px; padding: 16px;
  background: white; border-radius: 8px;
  border: 1px solid transparent;
  text-decoration: none; color: inherit;
  transition: border-color 0.15s;
}
.article-link:hover {
  border-color: #d1d5db; text-decoration: none;
}
.article-cover {
  flex-shrink: 0; width: 80px; height: 80px;
  background: #f3f4f6; border-radius: 6px;
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; color: #9ca3af;
}
.article-cover-placeholder { background: #f9fafb; }
.article-body { flex: 1; min-width: 0; }
.article-title {
  font-size: 16px; font-weight: 600; margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.article-summary {
  color: #6b7280; font-size: 13px; margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-meta {
  display: flex; flex-wrap: wrap; gap: 8px;
  font-size: 12px; color: #6b7280;
}
.meta-item {}
.format-badge {
  display: inline-block; padding: 2px 6px;
  border-radius: 3px; font-size: 11px;
  font-weight: 500; text-transform: uppercase;
}
.format-markdown { background: #dbeafe; color: #1e40af; }
.format-html { background: #fef3c7; color: #92400e; }
.article-tags { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.tag {
  font-size: 11px; padding: 2px 8px;
  background: #f3f4f6; color: #4b5563; border-radius: 12px;
}

/* ===== Article Detail ===== */
.article-container {
  background: white; padding: 32px;
  border-radius: 8px; max-width: 800px;
}
.article-meta-bar {
  display: flex; gap: 16px; flex-wrap: wrap;
  margin: 8px 0 12px;
  font-size: 13px; color: #6b7280;
}
.markdown-body {
  font-size: 16px; line-height: 1.7;
}
.markdown-body img { max-width: 100%; height: auto; border-radius: 4px; }
.markdown-body pre {
  background: #f6f8fa; padding: 12px; border-radius: 6px;
  overflow-x: auto;
}
.markdown-body code {
  background: #f6f8fa; padding: 2px 4px; border-radius: 3px;
  font-size: 0.9em;
}
.markdown-body pre code { background: none; padding: 0; }
.markdown-body blockquote {
  border-left: 3px solid #d1d5db; padding-left: 12px;
  color: #6b7280; margin: 12px 0;
}

/* ===== Image Gallery ===== */
.image-gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.image-gallery h3 {
  grid-column: 1/-1; font-size: 16px; margin-bottom: 4px;
}
.image-item {
  display: flex; flex-direction: column; gap: 4px;
  padding: 8px; background: #f9fafb; border-radius: 6px;
}
.image-item img {
  width: 100%; height: 150px; object-fit: cover;
  border-radius: 4px; cursor: pointer;
}
.image-item figcaption {
  font-size: 11px; color: #6b7280; text-align: center;
}
