:root {
  --bg: #f5f3ff;
  --bg-elevated: #ffffff;
  --bg-soft: rgba(238, 242, 255, 0.9);
  --border-subtle: rgba(148, 163, 184, 0.45);
  --accent: #6366f1;
  --accent-soft: rgba(129, 140, 248, 0.12);
  --accent-strong: rgba(129, 140, 248, 0.24);
  --accent-hover: #4f46e5;
  --text: #111827;
  --text-soft: #6b7280;
  --danger: #ef4444;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --shadow-soft: 0 22px 60px rgba(148, 163, 184, 0.45);
  --shadow-subtle: 0 0 0 1px rgba(148, 163, 184, 0.18);
  --blur: 20px;
}

.dark-theme {
  /* 保留类名占位，当前样式固定为浅色主题，无深色模式切换 */
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: radial-gradient(
    circle at top left,
    #e0f2fe 0,
    #e0e7ff 40%,
    #f5f3ff 100%
  );
}

body {
  min-height: 100vh;
}

.app {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
}

.app::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 0% 0%, rgba(129, 140, 248, 0.15) 0, transparent 55%),
    radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.18) 0, transparent 55%),
    radial-gradient(circle at 50% 110%, rgba(221, 214, 254, 0.35) 0, transparent 55%);
  opacity: 0.9;
  z-index: -2;
}

.app::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.9), #eef2ff);
  backdrop-filter: blur(18px);
  z-index: -1;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px 10px;
  border-radius: 999px;
  background: linear-gradient(
      120deg,
      rgba(255, 255, 255, 0.95),
      rgba(238, 242, 255, 0.95)
    ),
    linear-gradient(90deg, rgba(129, 140, 248, 0.6), rgba(56, 189, 248, 0.6));
  border: 1px solid rgba(129, 140, 248, 0.65);
  gap: 12px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.brand-title {
  padding: 8px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 0.05em;
  color: #111827;
}

.brand-subtitle {
  font-size: 13px;
  color: #4f46e5;
  opacity: 0.9;
}

.main-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(129, 140, 248, 0.45);
}

.nav-tab {
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--text-soft);
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.nav-tab-active {
  background: linear-gradient(135deg, #6366f1, #38bdf8);
  color: #f9fafb;
}

.app-main {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1.4fr);
  gap: 14px;
  margin-top: 16px;
  margin-bottom: 10px;
  min-height: 0;
  flex: 1;
}

.sidebar {
  border-radius: 26px;
  background: radial-gradient(circle at top left, #eef2ff, #ffffff 45%, #e0f2fe)
    padding-box;
  border: 1px solid rgba(191, 219, 254, 0.9);
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(129, 140, 248, 0.16), transparent 60%);
  opacity: 0.7;
  pointer-events: none;
}

.sidebar-section {
  position: relative;
  z-index: 1;
  padding: 10px 11px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(199, 210, 254, 0.9);
}

.sidebar-title {
  margin: 0 0 8px;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6366f1;
}

.search-box input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.search-box input::placeholder {
  color: var(--text-soft);
}

.search-box input:focus {
  border-color: rgba(129, 140, 248, 0.95);
  background: #ffffff;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-pill {
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-soft);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease;
}

.tag-pill::before {
  content: "";
  display: none;
}

.tag-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(129, 140, 248, 0.95);
  color: #111827;
  background: radial-gradient(circle at top left, #eef2ff, #e0f2fe 65%, #ffffff);
}

.tag-pill.active {
  background: radial-gradient(circle at top left, #6366f1, #38bdf8);
  color: #f9fafb;
  border-color: transparent;
}

/* 五个分类的色彩 */
.tag-learning {
  background: radial-gradient(circle at top left, #bfdbfe, #93c5fd);
  color: #1e3a8a;
}

.tag-explore {
  background: radial-gradient(circle at top left, #a5f3fc, #22d3ee);
  color: #0f172a;
}

.tag-enjoy {
  background: radial-gradient(circle at top left, #fce7f3, #f9a8d4);
  color: #9d174d;
}

.tag-create {
  background: radial-gradient(circle at top left, #ede9fe, #c4b5fd);
  color: #5b21b6;
}

.tag-accumulate {
  background: radial-gradient(circle at top left, #e0f2fe, #7dd3fc);
  color: #075985;
}

.about-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-soft);
}

.content {
  border-radius: 28px;
  background: radial-gradient(circle at top, #eff6ff, #ffffff 55%, #e0f2fe);
  border: 1px solid rgba(191, 219, 254, 0.9);
  padding: 18px 18px 16px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.content::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 0%, rgba(129, 140, 248, 0.14), transparent 55%),
    radial-gradient(circle at 90% 0%, rgba(56, 189, 248, 0.14), transparent 55%),
    radial-gradient(circle at 50% 120%, rgba(221, 214, 254, 0.35), transparent 65%);
  opacity: 0.9;
  pointer-events: none;
}

.view {
  position: relative;
  z-index: 1;
  flex: 1;
  display: none;
  min-height: 0;
}

.view-active {
  display: flex;
  flex-direction: column;
}

.view-hidden {
  display: none;
}

.list-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.list-header h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.03em;
  color: #1f2937;
}

.post-count {
  font-size: 12px;
  color: var(--text-soft);
}

.post-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding-right: 4px;
  overflow: auto;
  padding-bottom: 4px;
}

.post-card {
  border-radius: 18px;
  padding: 10px 11px 11px;
  background: radial-gradient(circle at top left, #ffffff, #eef2ff 55%, #e0f2fe);
  border: 1px solid rgba(191, 219, 254, 0.9);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  border-color: rgba(129, 140, 248, 0.95);
  background: radial-gradient(circle at top left, #eef2ff, #e0f2fe 50%, #ffffff);
}

.post-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--text-soft);
}

.post-card-meta-dot {
  width: 2px;
  height: 2px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.9);
}

.post-card-excerpt {
  margin: 0;
  font-size: 12px;
  color: var(--text-soft);
}

.post-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}

.post-tag {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(191, 219, 254, 0.9);
  color: #1f2937;
}

.back-button {
  align-self: flex-start;
  margin-bottom: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text-soft);
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease;
}

.back-button:hover {
  transform: translateY(-1px);
  border-color: rgba(129, 140, 248, 0.95);
  color: #111827;
  background: radial-gradient(circle at top left, #eef2ff, #e0f2fe 65%, #ffffff);
}

.post-header {
  margin-bottom: 10px;
}

.post-header h1 {
  margin: 0 0 6px;
  font-size: 20px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-soft);
}

.post-meta span + span::before {
  content: "•";
  margin-right: 6px;
}

.post-content {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  padding-right: 4px;
  overflow: auto;
  padding-bottom: 4px;
}

.post-content p {
  margin: 0 0 8px;
}

.post-content h2,
.post-content h3 {
  margin: 14px 0 6px;
}

.post-content ul,
.post-content ol {
  padding-left: 20px;
  margin: 0 0 8px;
}

.post-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  background: rgba(243, 244, 246, 0.98);
  padding: 2px 4px;
  border-radius: 4px;
  border: 1px solid rgba(209, 213, 219, 0.9);
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-soft);
  padding-top: 4px;
}

.footer-dot {
  opacity: 0.5;
}

.no-result {
  font-size: 13px;
  color: var(--text-soft);
  text-align: center;
  padding: 20px 0;
}

.intro-layout {
  display: flex;
  align-items: center;
  gap: 24px;
}

.intro-avatar {
  flex-shrink: 0;
}

.intro-avatar-circle {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 0%, #6366f1, #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: #f9fafb;
}

.intro-text p {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--text-soft);
}

@media (max-width: 960px) {
  body {
    padding: 0;
  }

  .app {
    padding: 14px 10px;
  }

  .app-main {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-flow: row;
  }

  .sidebar {
    order: 2;
  }
}

@media (max-width: 600px) {
  .app {
    padding: 12px 10px;
  }

  .app-header {
    padding-inline: 10px;
  }

  .brand-title {
    font-size: 16px;
  }

  .brand-subtitle {
    display: none;
  }

  .content {
    padding: 14px 12px;
  }

  .post-card {
    padding: 9px 9px 10px;
  }
}

