/* ==========================================================================
   学校表白墙 (Campus Confession Wall) — Main Stylesheet
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--text-body-size);
  font-weight: var(--text-body-weight);
  line-height: var(--text-body-lh);
  letter-spacing: var(--text-body-ls);
  color: var(--ink-body);
  background-color: var(--bg-canvas);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* === 主题背景层 === */

/* 方案二：手账纸张点阵背景 */
[data-theme="zine"] body {
  background-color: #FFFBF2;
  background-image: radial-gradient(#DFD5C3 1.25px, transparent 1.25px);
  background-size: 20px 20px;
}

/* 方案三：极光环境背景光晕 */
[data-theme="aurora"] body {
  background:
    radial-gradient(600px circle at 15% 10%, rgba(124, 92, 255, 0.18), transparent 60%),
    radial-gradient(500px circle at 85% 25%, rgba(255, 79, 139, 0.14), transparent 55%),
    radial-gradient(480px circle at 50% 90%, rgba(56, 189, 248, 0.08), transparent 60%),
    #0B1020;
  background-attachment: fixed;
}

/* 方案一：晚霞弥散光晕圆斑 (Mesh Aura) */
.ambient-aura {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.45s ease;
}

[data-theme="sunset"] .ambient-aura {
  opacity: 1;
}

.aura-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  will-change: transform;
}

.aura-orb-1 {
  width: 560px;
  height: 560px;
  top: -140px;
  left: -120px;
  background: radial-gradient(circle, #FFD6E0 0%, transparent 70%);
  animation: auraFloat1 18s ease-in-out infinite alternate;
}

.aura-orb-2 {
  width: 520px;
  height: 520px;
  top: 10%;
  right: -140px;
  background: radial-gradient(circle, #E4D9FF 0%, transparent 70%);
  animation: auraFloat2 20s ease-in-out infinite alternate;
}

.aura-orb-3 {
  width: 480px;
  height: 480px;
  bottom: -140px;
  left: 32%;
  background: radial-gradient(circle, #FFE8D6 0%, transparent 70%);
  animation: auraFloat3 18s ease-in-out infinite alternate;
}

@keyframes auraFloat1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, 45px) scale(1.08); }
}

@keyframes auraFloat2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-55px, 50px) scale(1.06); }
}

@keyframes auraFloat3 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, -45px) scale(1.1); }
}

/* App Shell */
.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* === 通用按钮与物理按压反馈 === */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-btn);
  border: var(--border-ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
  user-select: none;
}

.btn-primary {
  background: var(--brand-gradient);
  color: var(--ink-inverse);
  box-shadow: var(--shadow-btn-primary);
}

[data-theme="sunset"] .btn-primary,
[data-theme="aurora"] .btn-primary {
  border-color: transparent;
  font-weight: 600;
}

.btn-primary:hover {
  transform: translate(var(--btn-hover-x), var(--btn-hover-y));
  filter: brightness(1.03);
}

[data-theme="zine"] .btn-primary:hover {
  background: var(--brand-primary-hover);
  box-shadow: 5px 5px 0px #1E1E24;
  filter: none;
}

.btn-primary:active {
  transform: translate(var(--btn-active-x), var(--btn-active-y));
  box-shadow: var(--shadow-press);
}

.btn-secondary {
  background: var(--surface-card);
  color: var(--ink-primary);
  box-shadow: 3px 3px 0px #1E1E24;
}

[data-theme="zine"] .btn-secondary.btn-yellow {
  background: var(--accent-yellow);
  color: #1E1E24;
}

[data-theme="sunset"] .btn-secondary {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 92, 138, 0.28);
  color: #FF5C8A;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

[data-theme="sunset"] .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.85);
}

[data-theme="aurora"] .btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #E2E8F8;
  box-shadow: none;
}

[data-theme="aurora"] .btn-secondary:hover {
  border-color: rgba(124, 92, 255, 0.55);
  background: rgba(124, 92, 255, 0.12);
}

[data-theme="zine"] .btn-secondary:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0px #1E1E24;
}

[data-theme="zine"] .btn-secondary:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px #1E1E24;
}

.btn-sm {
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius-control);
}

/* === 输入框聚焦反馈 === */
.input-field,
.textarea-field {
  width: 100%;
  background: var(--surface-card);
  color: var(--ink-primary);
  border: var(--border-ink);
  border-radius: var(--radius-control);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  padding: 10px 14px;
  outline: none;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.2s ease;
}

[data-theme="zine"] .input-field,
[data-theme="zine"] .textarea-field {
  background: #FFFFFF;
}

.input-field::placeholder,
.textarea-field::placeholder {
  color: var(--ink-muted);
}

.input-field:focus,
.textarea-field:focus {
  box-shadow: var(--shadow-focus);
}

[data-theme="sunset"] .input-field:focus,
[data-theme="sunset"] .textarea-field:focus {
  border-color: var(--brand-primary);
  background: rgba(255, 255, 255, 0.9);
}

[data-theme="aurora"] .input-field:focus,
[data-theme="aurora"] .textarea-field:focus {
  border-color: rgba(255, 79, 139, 0.55);
}

/* ==========================================================================
   顶部导航栏 (Header)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--surface-header);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: var(--border-ink);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
  padding: 10px 0;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--ink-primary);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--brand-gradient);
  border: var(--border-ink);
  box-shadow: var(--shadow-sm);
  display: grid;
  place-items: center;
  color: #FFFFFF;
  transform: rotate(-3deg);
  transition: transform 0.2s ease;
}

[data-theme="sunset"] .brand-mark,
[data-theme="aurora"] .brand-mark {
  border-color: transparent;
  transform: none;
}

.brand-group:hover .brand-mark {
  transform: rotate(3deg) scale(1.05);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
  display: flex;
  align-items: center;
  gap: 7px;
}

.brand-issue {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--accent-yellow);
  color: #1E1E24;
  border: 1.5px solid #1E1E24;
  letter-spacing: 0.03em;
}

[data-theme="sunset"] .brand-issue {
  background: rgba(255, 92, 138, 0.14);
  color: #E64574;
  border: 1px solid rgba(255, 92, 138, 0.25);
  border-radius: 9999px;
}

[data-theme="aurora"] .brand-issue {
  background: rgba(124, 92, 255, 0.20);
  color: #C4B5FD;
  border: 1px solid rgba(124, 92, 255, 0.35);
  border-radius: 9999px;
}

.brand-subtitle {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 2px;
}

/* 搜索框 */
.header-search {
  position: relative;
  flex: 1;
  max-width: 340px;
}

.header-search .search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  pointer-events: none;
  display: flex;
}

.header-search .input-field {
  height: 40px;
  padding-left: 38px;
  padding-right: 34px;
  font-size: 14px;
}

.search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  font-size: 14px;
}

.search-clear.visible {
  display: flex;
}

.search-clear:hover {
  color: var(--ink-primary);
  background: var(--surface-subtle);
}

/* 主题切换器 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.theme-switcher {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: var(--radius-control);
  background: var(--surface-subtle);
  border: var(--border-ink);
  gap: 2px;
}

[data-theme="sunset"] .theme-switcher,
[data-theme="aurora"] .theme-switcher {
  border-radius: 9999px;
}

.theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 10px;
  border-radius: calc(var(--radius-control) - 4px);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
  transition: all 0.18s ease;
}

[data-theme="sunset"] .theme-btn,
[data-theme="aurora"] .theme-btn {
  border-radius: 9999px;
  font-weight: 600;
}

.theme-btn:hover {
  color: var(--ink-primary);
}

.theme-btn.active {
  background: var(--surface-card);
  color: var(--ink-primary);
  box-shadow: var(--shadow-sm);
}

[data-theme="zine"] .theme-btn.active {
  background: #FFD166;
  color: #1E1E24;
  border: 1.5px solid #1E1E24;
  box-shadow: 1.5px 1.5px 0px #1E1E24;
}

[data-theme="sunset"] .theme-btn.active {
  background: #FFFFFF;
  color: #E64574;
}

[data-theme="aurora"] .theme-btn.active {
  background: rgba(124, 92, 255, 0.28);
  color: #F4F6FF;
  border: 1px solid rgba(124, 92, 255, 0.45);
}

.theme-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ==========================================================================
   公告栏头部 Banner (Compact Bulletin Hero)
   ========================================================================== */
.bulletin-hero {
  padding: 24px 0 14px;
}

.hero-board {
  position: relative;
  background: var(--surface-card);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border: var(--border-ink);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lg);
  padding: 22px 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  overflow: visible;
}

/* 顶部装饰和纸胶带（方案二专属） */
.hero-tape {
  display: var(--washi-display);
  position: absolute;
  top: -7px;
  left: 36px;
  width: 78px;
  height: 18px;
  background: rgba(255, 77, 109, 0.65);
  border: 1.5px solid #1E1E24;
  transform: rotate(-2deg);
  z-index: 2;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.live-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-mint);
  box-shadow: 0 0 0 3px rgba(6, 214, 160, 0.25);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.7; }
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-h1-size);
  font-weight: var(--text-h1-weight);
  line-height: var(--text-h1-lh);
  letter-spacing: var(--text-h1-ls);
  color: var(--ink-primary);
  margin-bottom: 6px;
}

.hero-title .highlight-underline {
  position: relative;
  display: inline-block;
  z-index: 1;
}

[data-theme="zine"] .hero-title .highlight-underline {
  background: linear-gradient(transparent 56%, #FFD166 56%, #FFD166 94%, transparent 94%);
  padding: 0 4px;
  border-radius: 4px;
}

[data-theme="sunset"] .hero-title .highlight-underline {
  background: linear-gradient(135deg, #FF5C8A 0%, #FF8A65 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="aurora"] .hero-title .highlight-underline {
  background: linear-gradient(135deg, #FF4F8B 0%, #7C5CFF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 14px;
  color: var(--ink-muted);
  max-width: 580px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.stat-stamp {
  min-width: 96px;
  padding: 10px 14px;
  border-radius: var(--radius-control);
  background: var(--surface-subtle);
  border: var(--border-chip);
  text-align: center;
}

[data-theme="zine"] .stat-stamp {
  box-shadow: 2px 2px 0px #1E1E24;
}

[data-theme="zine"] .stat-stamp:nth-child(2) {
  background: #FFF7D6;
  transform: rotate(1.2deg);
}

[data-theme="zine"] .stat-stamp:nth-child(1) {
  transform: rotate(-1.2deg);
}

.stat-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink-primary);
  line-height: 1.15;
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
  margin-top: 2px;
}

/* ==========================================================================
   分类贴纸筛选栏 + 排序控制 (Filter & Sort Bar)
   ========================================================================== */
.controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 0 20px;
}

.category-pills {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-chip);
  border: var(--border-chip);
  background: var(--surface-card);
  color: var(--ink-primary);
  font-size: 13px;
  font-weight: 700;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.2s ease, color 0.2s ease;
  backdrop-filter: var(--backdrop-blur);
}

[data-theme="zine"] .cat-pill {
  box-shadow: 2px 2px 0px #1E1E24;
}

[data-theme="zine"] .cat-pill:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px #1E1E24;
}

[data-theme="zine"] .cat-pill:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px #1E1E24;
}

.cat-pill .cat-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid rgba(30, 30, 36, 0.85);
  flex-shrink: 0;
}

[data-theme="sunset"] .cat-pill .cat-dot,
[data-theme="aurora"] .cat-pill .cat-dot {
  border-color: transparent;
}

.cat-pill .cat-count {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.72;
  font-variant-numeric: tabular-nums;
}

/* 激活分类态 —— 方案二严格遵循色相映射 */
.cat-pill.active[data-cat="all"] {
  background: var(--ink-primary);
  color: var(--bg-canvas);
}

[data-theme="aurora"] .cat-pill.active[data-cat="all"] {
  background: var(--brand-gradient);
  color: #FFFFFF;
  border-color: transparent;
}

[data-theme="sunset"] .cat-pill.active[data-cat="all"] {
  background: var(--brand-gradient);
  color: #FFFFFF;
  border-color: transparent;
}

.cat-pill.active[data-cat="confession"] {
  background: #FF4D6D;
  color: #FFFFFF;
}
.cat-pill.active[data-cat="seek"] {
  background: #FFD166;
  color: #1E1E24;
}
.cat-pill.active[data-cat="daily"] {
  background: #06D6A0;
  color: #1E1E24;
}

.cat-pill.active .cat-dot {
  background: currentColor !important;
  border-color: currentColor;
}

/* 排序 & 收藏切换 */
.sort-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-btn {
  height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-chip);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  border: 1.5px solid transparent;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.sort-btn:hover {
  color: var(--ink-primary);
  background: var(--surface-subtle);
}

.sort-btn.active {
  color: var(--ink-primary);
  background: var(--surface-card);
  border: var(--border-chip);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   表白墙瀑布流网格 (Bulletin Masonry Wall)
   ========================================================================== */
.wall-section {
  flex: 1;
  padding-bottom: 72px;
}

.wall-grid {
  column-count: 3;
  column-gap: 20px;
}

@media (max-width: 1024px) {
  .wall-grid {
    column-count: 2;
  }
}

@media (max-width: 680px) {
  .wall-grid {
    column-count: 1;
  }
}

/* ==========================================================================
   单张便签卡片 (Confession Note Card)
   ========================================================================== */
.note-card {
  position: relative;
  break-inside: avoid;
  margin-bottom: 22px;
  background: var(--surface-card);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border: var(--border-ink);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lg);
  overflow: visible;
  transition: transform 0.2s ease, box-shadow 0.24s ease-out, border-color 0.24s ease;
  animation: cardIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.note-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

[data-theme="zine"] .note-card:hover {
  transform: translate(-1px, -2px);
}

[data-theme="aurora"] .note-card:hover {
  border-color: rgba(124, 92, 255, 0.32);
}

/* 高亮黄底便签（视觉克制：视口占比 ≤ 20%） */
.note-card.is-highlight {
  background: var(--surface-highlight);
}

/* 顶部彩色分类色条 */
.note-topbar {
  height: var(--topbar-height);
  width: 100%;
  border-top-left-radius: calc(var(--radius-card) - 2px);
  border-top-right-radius: calc(var(--radius-card) - 2px);
}

[data-theme="zine"] .note-topbar {
  border-bottom: 2px solid #1E1E24;
}

/* 半透明和纸胶带装饰 (Washi Tape · 64px × 18px) */
.washi-tape {
  display: var(--washi-display);
  position: absolute;
  top: -10px;
  left: 50%;
  width: 64px;
  height: 18px;
  margin-left: -32px;
  background: rgba(255, 209, 102, 0.78);
  border: 1.5px solid rgba(30, 30, 36, 0.72);
  transform: rotate(-2deg);
  z-index: 3;
  pointer-events: none;
  box-shadow: 0 1px 2px rgba(30, 30, 36, 0.12);
}

.washi-tape.tape-pink {
  background: rgba(255, 77, 109, 0.55);
  transform: rotate(1.8deg);
}

.washi-tape.tape-purple {
  background: rgba(179, 136, 255, 0.65);
  transform: rotate(-1.5deg);
}

.note-inner {
  padding: var(--card-padding);
}

/* 卡片头部：编号 + 分类贴纸 + 置顶徽章 */
.note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.note-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.note-id {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

/* 分类贴纸徽章 */
.sticker-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 25px;
  padding: 0 10px;
  border-radius: var(--radius-chip);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: var(--border-chip);
  line-height: 1;
}

[data-theme="zine"] .sticker-chip {
  box-shadow: 1.5px 1.5px 0px #1E1E24;
  transform: rotate(var(--tilt, -1.5deg));
}

/* 方案二严格色相映射 */
.sticker-confession { background: #FF4D6D; color: #FFFFFF; }
.sticker-seek       { background: #FFD166; color: #1E1E24; }
.sticker-daily      { background: #06D6A0; color: #1E1E24; }

/* 方案一：柔和浅透徽章 */
[data-theme="sunset"] .sticker-chip { font-weight: 500; }
[data-theme="sunset"] .sticker-confession { background: rgba(255, 92, 138, 0.13); color: #E64574; border-color: rgba(255, 92, 138, 0.25); }
[data-theme="sunset"] .sticker-seek       { background: rgba(255, 159, 67, 0.15); color: #D97706; border-color: rgba(255, 159, 67, 0.30); }
[data-theme="sunset"] .sticker-daily      { background: rgba(46, 196, 182, 0.14); color: #0F9D8E; border-color: rgba(46, 196, 182, 0.28); }

/* 方案三：暗透荧光徽章 */
[data-theme="aurora"] .sticker-chip { font-weight: 600; }
[data-theme="aurora"] .sticker-confession { background: rgba(255, 79, 139, 0.16); color: #FF85B0; border-color: rgba(255, 79, 139, 0.35); }
[data-theme="aurora"] .sticker-seek       { background: rgba(251, 191, 36, 0.15); color: #FCD34D; border-color: rgba(251, 191, 36, 0.32); }
[data-theme="aurora"] .sticker-daily      { background: rgba(52, 211, 153, 0.15); color: #6EE7B7; border-color: rgba(52, 211, 153, 0.32); }

.pin-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface-subtle);
  color: var(--ink-primary);
  border: 1.5px solid var(--ink-primary);
}

[data-theme="sunset"] .pin-badge {
  background: rgba(255, 159, 67, 0.16);
  color: #D97706;
  border: 1px solid rgba(255, 159, 67, 0.3);
  border-radius: 9999px;
}

[data-theme="aurora"] .pin-badge {
  background: rgba(251, 191, 36, 0.16);
  color: #FBBF24;
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 9999px;
}

.note-time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
}

/* 卡片标题与正文 */
.note-title {
  font-family: var(--font-display);
  font-size: var(--text-card-title-size);
  font-weight: var(--text-card-title-weight);
  line-height: var(--text-card-title-lh);
  color: var(--ink-primary);
  margin-bottom: 8px;
  cursor: pointer;
}

.note-title:hover {
  color: var(--brand-primary);
}

.note-body {
  font-size: var(--text-body-size);
  line-height: var(--text-body-lh);
  letter-spacing: var(--text-body-ls);
  color: var(--ink-body);
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 12px;
  cursor: pointer;
}

.note-card.is-poetic .note-body {
  font-family: var(--font-quote);
  font-size: 16px;
  line-height: 1.8;
}

/* 话题标签 */
.note-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.hash-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-primary);
  padding: 2px 6px;
  border-radius: 6px;
  transition: background-color 0.15s ease;
}

.hash-tag:hover {
  background: rgba(255, 77, 109, 0.1);
}

[data-theme="aurora"] .hash-tag {
  color: #B9A6FF;
}

/* 作者署名条 */
.note-author-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.author-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.author-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  background: var(--surface-subtle);
  border: 1.5px solid var(--ink-primary);
}

[data-theme="sunset"] .author-avatar,
[data-theme="aurora"] .author-avatar {
  border-color: rgba(255, 255, 255, 0.25);
}

.anon-shield {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--accent-purple);
  font-weight: 600;
}

/* 卡片底部互动条 */
.note-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: var(--border-divider);
  gap: 6px;
}

.footer-left,
.footer-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.action-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 10px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  transition: all 0.15s ease;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.action-btn:hover {
  background: var(--surface-subtle);
  color: var(--ink-primary);
}

.action-btn.liked {
  color: var(--brand-primary);
  background: rgba(255, 77, 109, 0.12);
}

[data-theme="zine"] .action-btn.liked {
  border: 1.5px solid #1E1E24;
  background: #FFE5EA;
  color: #E0284D;
}

.action-btn.saved {
  color: #D97706;
  background: rgba(255, 209, 102, 0.22);
}

[data-theme="aurora"] .action-btn.saved {
  color: #FBBF24;
}

.action-btn.danger-btn:hover {
  color: var(--semantic-danger);
  background: rgba(239, 35, 60, 0.1);
}

/* 点赞心动径向光环动效 (320ms cubic-bezier(0.22, 1, 0.36, 1)) */
.like-btn.pulse::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 24px;
  height: 24px;
  margin-left: -12px;
  margin-top: -12px;
  border-radius: 50%;
  background: rgba(255, 92, 138, 0.38);
  pointer-events: none;
  animation: heartRipple 320ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.like-btn.pulse svg {
  animation: heartPop 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes heartRipple {
  0% { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(2.1); opacity: 0; }
}

@keyframes heartPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.38); }
  100% { transform: scale(1); }
}

/* ==========================================================================
   空状态
   ========================================================================== */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  background: var(--surface-card);
  border: var(--border-ink);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
  max-width: 480px;
  margin: 20px auto;
}

.empty-emoji {
  font-size: 42px;
  margin-bottom: 12px;
}

.empty-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 6px;
}

.empty-desc {
  font-size: 14px;
  color: var(--ink-muted);
  margin-bottom: 18px;
}

/* ==========================================================================
   模态弹窗系统 (Modals)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(18, 18, 28, 0.56);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface-modal);
  backdrop-filter: var(--backdrop-blur);
  border: var(--border-ink);
  border-radius: var(--radius-modal);
  box-shadow: var(--shadow-lg);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-backdrop.open .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: var(--border-divider);
  position: sticky;
  top: 0;
  background: var(--surface-modal);
  z-index: 5;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  color: var(--ink-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--ink-muted);
  border: 1.5px solid transparent;
  transition: all 0.15s ease;
}

.modal-close:hover {
  color: var(--ink-primary);
  background: var(--surface-subtle);
  border-color: var(--ink-primary);
}

.modal-body {
  padding: 18px 22px 22px;
}

/* 表单样式 */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 7px;
}

.form-hint {
  font-weight: 500;
  font-size: 12px;
  color: var(--ink-muted);
  font-family: var(--font-mono);
}

.cat-select-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cat-option {
  padding: 7px 13px;
  border-radius: var(--radius-chip);
  border: var(--border-chip);
  background: var(--surface-card);
  color: var(--ink-primary);
  font-size: 13px;
  font-weight: 700;
  transition: all 0.14s ease;
}

[data-theme="zine"] .cat-option {
  box-shadow: 2px 2px 0px #1E1E24;
}

.cat-option.selected[data-cat="confession"] { background: #FF4D6D; color: #FFFFFF; }
.cat-option.selected[data-cat="seek"]       { background: #FFD166; color: #1E1E24; }
.cat-option.selected[data-cat="daily"]      { background: #06D6A0; color: #1E1E24; }

.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.quick-tag-btn {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 8px;
  background: var(--surface-subtle);
  color: var(--ink-body);
  border: 1px solid transparent;
  transition: all 0.12s ease;
}

.quick-tag-btn:hover {
  border-color: var(--ink-primary);
  color: var(--ink-primary);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-control);
  background: var(--surface-subtle);
  border: var(--border-chip);
  margin-bottom: 16px;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-primary);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand-primary);
  cursor: pointer;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

/* ==========================================================================
   详情 & 评论弹窗
   ========================================================================== */
.detail-card-box {
  background: var(--surface-card);
  border: var(--border-ink);
  border-radius: var(--radius-card);
  padding: 18px;
  margin-bottom: 18px;
}

.comments-heading {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.comment-item {
  padding: 12px 14px;
  border-radius: var(--radius-control);
  background: var(--surface-card);
  border: var(--border-chip);
}

.comment-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 5px;
}

.comment-author {
  font-weight: 700;
  color: var(--ink-primary);
}

.comment-floor {
  font-family: var(--font-mono);
  color: var(--ink-muted);
}

.comment-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-body);
}

.comment-form {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.comment-form .input-field {
  flex: 1;
}

/* ==========================================================================
   分享海报弹窗 (Share Poster Modal)
   ========================================================================== */
.poster-preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.poster-canvas-frame {
  width: 100%;
  max-width: 380px;
  border-radius: 16px;
  overflow: hidden;
  border: var(--border-ink);
  box-shadow: var(--shadow-lg);
}

.poster-canvas-frame canvas {
  display: block;
  width: 100%;
  height: auto;
}

.poster-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

/* ==========================================================================
   悬浮操作按钮 & 页脚 & Toast
   ========================================================================== */
.fab-compose {
  display: none;
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 35;
  height: 52px;
  padding: 0 20px;
  border-radius: 9999px;
}

.site-footer {
  border-top: var(--border-divider);
  padding: 22px 0 32px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.toast-container {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--ink-primary);
  color: var(--bg-canvas);
  padding: 10px 18px;
  border-radius: var(--radius-control);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  border: var(--border-ink);
  animation: toastIn 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: auto;
}

[data-theme="aurora"] .toast {
  background: #1E2948;
  color: #F4F6FF;
  border-color: rgba(124, 92, 255, 0.45);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==========================================================================
   响应式适配
   ========================================================================== */
@media (max-width: 900px) {
  .header-search {
    order: 3;
    max-width: 100%;
    flex-basis: 100%;
  }
  .header-inner {
    flex-wrap: wrap;
    padding: 10px 0 12px;
  }
  .hero-board {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 14px;
  }
  .header-compose-btn {
    display: none;
  }
  .fab-compose {
    display: inline-flex;
  }
  .theme-btn .theme-label {
    display: none;
  }
  .theme-btn {
    padding: 0 9px;
  }
  .hero-board {
    padding: 18px;
  }
  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
  }
  .stat-stamp {
    min-width: 0;
    padding: 8px 6px;
  }
}
