
/* ==========================================================================
   Aura Blog · 简约圆角图形化风格样式表
   ========================================================================== */

:root {
  /* Light Theme Palette */
  --bg-page: #f8f9fa;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-subtle: #f1f3f5;
  --bg-card-hover: #ffffff;
  
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-faint: #94a3b8;

  --primary: #4338ca;
  --primary-light: #e0e7ff;
  --primary-dark: #3730a3;
  --primary-glow: rgba(99, 102, 241, 0.15);

  --accent-green: #10b981;
  --accent-green-light: #d1fae5;
  --accent-pink: #ec4899;
  --accent-pink-light: #fce7f3;

  --border: #e2e8f0;
  --border-focus: #818cf8;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 20px 40px -10px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 16px 36px -4px rgba(67, 56, 202, 0.1);

  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 9999px;

  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Theme Palette */
[data-theme="dark"] {
  --bg-page: #0f1117;
  --bg-surface: #181b23;
  --bg-surface-elevated: #1e222d;
  --bg-subtle: #242936;
  --bg-card-hover: #222633;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-faint: #64748b;

  --primary: #6366f1;
  --primary-light: #312e81;
  --primary-dark: #818cf8;
  --primary-glow: rgba(99, 102, 241, 0.25);

  --border: #2e3547;
  --border-focus: #6366f1;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.45);
  --shadow-hover: 0 16px 36px -4px rgba(99, 102, 241, 0.2);
}

/* Global Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Reading Progress Bar */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent-pink));
  z-index: 9999;
  transition: width 0.1s ease-out;
}

/* Layout Container */
.app-layout {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Floating Rounded Navbar */
.floating-navbar {
  position: sticky;
  top: 16px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px;
  background: var(--bg-surface);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
  transition: var(--transition);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-main);
}

.logo-emoji {
  font-size: 1.4rem;
  line-height: 1;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.nav-center {
  flex: 1;
  max-width: 440px;
}

.search-pill {
  display: flex;
  align-items: center;
  background: var(--bg-subtle);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  border: 1px solid transparent;
  transition: var(--transition);
}

.search-pill:focus-within {
  border-color: var(--border-focus);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-icon {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-right: 8px;
}

.search-pill input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  color: var(--text-main);
  font-size: 0.9rem;
}

.clear-search-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 2px 4px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Pill Buttons */
.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.pill-btn:active {
  transform: scale(0.96);
}

.pill-btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.pill-btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 18px var(--primary-glow);
  transform: translateY(-1px);
}

.pill-btn-secondary {
  background: var(--bg-subtle);
  color: var(--text-main);
  border-color: var(--border);
}

.pill-btn-secondary:hover {
  background: var(--border);
}

.pill-btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text-main);
}

.pill-btn-outline:hover {
  border-color: var(--text-muted);
}

.pill-btn-ghost {
  background: transparent;
  color: var(--text-main);
  padding: 8px;
  border-radius: var(--radius-pill);
}

.pill-btn-ghost:hover {
  background: var(--bg-subtle);
}

.pill-btn-ghost-sm {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 6px 14px;
}

.pill-btn-ghost-sm:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
}

.pill-btn-danger {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

.pill-btn-danger:hover {
  background: #fecaca;
}

/* Hero Section */
.hero-card {
  position: relative;
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-subtle) 100%);
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.hero-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--accent-green-light);
  color: var(--accent-green);
  margin-bottom: 12px;
}

.hero-title {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.25;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--text-main) 30%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.hero-graphic {
  position: absolute;
  right: -20px;
  bottom: -30px;
  width: 220px;
  height: 180px;
  pointer-events: none;
}

.bubble-art {
  position: absolute;
  border-radius: 50%;
  filter: blur(24px);
  opacity: 0.6;
}

.bubble-1 {
  width: 140px;
  height: 140px;
  background: var(--primary);
  top: 10px;
  right: 20px;
}

.bubble-2 {
  width: 110px;
  height: 110px;
  background: var(--accent-pink);
  bottom: 10px;
  right: 80px;
}

.bubble-3 {
  width: 90px;
  height: 90px;
  background: var(--accent-green);
  top: 40px;
  right: 120px;
}

/* Tag Filter Bar */
.tags-scroller {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.tags-scroller::-webkit-scrollbar {
  display: none;
}

.tag-pill {
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.tag-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.tag-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* Posts Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* Rounded Post Card */
.post-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-hover);
  background: var(--bg-card-hover);
}

.post-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.card-emoji-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.card-date {
  font-size: 0.8rem;
  color: var(--text-faint);
  font-weight: 500;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
  color: var(--text-main);
  transition: color 0.2s ease;
}

.post-card:hover .card-title {
  color: var(--primary);
}

.card-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.mini-tag {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-weight: 500;
}

.card-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* Empty State Card */
.empty-rounded-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border);
  padding: 60px 24px;
  text-align: center;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.empty-rounded-card h3 {
  font-size: 1.2rem;
  color: var(--text-main);
  margin-bottom: 6px;
}

/* Reader View */
.reader-view {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 820px;
  margin: 0 auto;
  width: 100%;
}

.reader-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.reader-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reader-paper-card {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 48px 56px;
}

@media (max-width: 640px) {
  .reader-paper-card {
    padding: 28px 20px;
  }
}

.reader-header {
  margin-bottom: 36px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 28px;
}

.reader-emoji-badge {
  font-size: 2.8rem;
  margin-bottom: 16px;
}

.reader-meta-chips {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.reader-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 16px;
  letter-spacing: -0.6px;
}

.reader-byline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.byline-dot {
  color: var(--text-faint);
}

.byline-pill {
  background: var(--bg-subtle);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-weight: 500;
}

/* Markdown Render Typography */
.markdown-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-main);
}

.markdown-body h1 {
  font-size: 1.7rem;
  font-weight: 800;
  margin: 32px 0 16px;
}

.markdown-body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 28px 0 14px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.markdown-body h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 24px 0 12px;
}

.markdown-body p {
  margin-bottom: 18px;
}

.markdown-body hr.post-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}

.markdown-body blockquote.post-quote {
  border-left: 4px solid var(--primary);
  background: var(--bg-subtle);
  padding: 14px 20px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 20px 0;
  font-style: italic;
  color: var(--text-muted);
}

.markdown-body ul.post-list, .markdown-body ol.post-olist {
  margin: 16px 0 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.markdown-body code.inline-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: var(--bg-subtle);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-size: 0.9em;
}

.markdown-body pre.code-block {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: #1e1e24;
  color: #e2e8f0;
  padding: 18px 22px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 22px 0;
  font-size: 0.9rem;
  line-height: 1.5;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.3);
}

.markdown-body a.post-link {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Modal Window */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 740px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from { transform: translateY(20px) scale(0.98); }
  to { transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
}

.icon-close-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.editor-form {
  padding: 24px 28px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.flex-1 {
  flex: 1;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.rounded-input {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.95rem;
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
}

.rounded-input:focus {
  border-color: var(--border-focus);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.emoji-input {
  width: 72px;
  text-align: center;
  font-size: 1.2rem;
}

.editor-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.tab-btn {
  padding: 5px 14px;
  font-size: 0.8rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 600;
}

.tab-btn.active {
  background: var(--bg-subtle);
  color: var(--primary);
  border-color: var(--border);
}

.rounded-textarea {
  width: 100%;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 0.92rem;
  color: var(--text-main);
  line-height: 1.6;
  font-family: inherit;
  outline: none;
  resize: vertical;
}

.rounded-textarea:focus {
  border-color: var(--border-focus);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.editor-preview-box {
  min-height: 260px;
  max-height: 400px;
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 12px;
}

/* Footer */
.rounded-footer {
  margin-top: 36px;
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.footer-right {
  display: flex;
  gap: 10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-card {
    padding: 28px 24px;
  }
  .hero-title {
    font-size: 1.6rem;
  }
  .posts-grid {
    grid-template-columns: 1fr;
  }
  .rounded-footer {
    flex-direction: column;
    text-align: center;
  }
}
