/* ===========================================================
   pengxi.online · Claude-inspired · 书影音馆
   配色: 米白底 + Claude 暖橙 + 暗红 accent
   =========================================================== */

:root {
  --bg:        #0A0A0B;      /* 黑底 */
  --bg-2:      #131316;      /* 浅黑 */
  --ink:       #F5F4EE;      /* 主文字 (米白) */
  --ink-2:     #B5B0A5;      /* 次文字 */
  --ink-3:     #6B665C;      /* 弱化文字 */
  --line:      rgba(245,244,238,0.10);
  --line-2:    rgba(245,244,238,0.06);
  --panel:     #18181C;      /* 卡片底 */
  --panel-2:   #1F1F25;      /* 暖色卡片底 (橙调黑) */

  --orange:    #E89B7C;      /* Claude 暖橙 (暗色下提亮) */
  --orange-d:  #DA7756;
  --red:       #E07B6E;      /* 暗红 accent (提亮) */
  --gold:      #E8B86C;
  --green:     #8FB57E;
  --blue:      #8FB5DA;
  --pink:      #E5A4B0;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.20), 0 2px 8px rgba(0,0,0,0.20);
  --shadow-md: 0 2px 6px rgba(0,0,0,0.30), 0 12px 32px rgba(0,0,0,0.40);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.40), 0 24px 64px rgba(0,0,0,0.50);

  --radius:    14px;
  --radius-sm: 10px;
  --radius-lg: 22px;

  --font-sans:  'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --font-serif: 'Lora', 'Songti SC', 'STSong', 'SimSun', Georgia, serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  color-scheme: dark;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  scroll-behavior: smooth;
}

a { color: var(--orange-d); text-decoration: none; border-bottom: 1px solid transparent; }
a:hover { border-bottom-color: var(--orange-d); }

img { max-width: 100%; display: block; }

/* ---------- TOPBAR ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10,10,11,0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.brand-dot { font-size: 18px; }
.brand-name { color: var(--ink); }

.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-2);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
}
.tab:hover { color: var(--ink); background: rgba(245,244,238,0.06); }
.tab.is-active {
  background: var(--ink);
  color: var(--bg);
  box-shadow: var(--shadow-sm);
}
.tab-emoji { font-size: 16px; line-height: 1; }
.tab-count {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(245,244,238,0.08);
  color: var(--ink-2);
  min-width: 20px;
  text-align: center;
}
.tab.is-active .tab-count {
  background: rgba(255,255,255,0.12);
  color: var(--bg);
}

/* ---------- PAGE / HERO ---------- */
.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 64px 32px 96px;
}

.hero {
  text-align: center;
  padding: 32px 0 64px;
}
.kicker {
  display: inline-block;
  margin: 0 0 18px;
  padding: 6px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 500;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  color: var(--ink);
}
.hl-orange { color: var(--orange); }
.hl-red    { color: var(--red); }
.hero-sub {
  font-size: 17px;
  color: var(--ink-2);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ---------- PANEL ---------- */
.panel { display: none; }
.panel.is-active { display: block; }

.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0 0 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-2);
}
.panel-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 32px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 12px;
}
.head-emoji { font-size: 30px; line-height: 1; }
.head-meta {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-3);
  margin-left: 4px;
}
.head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.panel-hint {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
}
.add-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}
.add-btn:hover {
  background: var(--orange);
  color: white;
  border-color: var(--orange);
  transform: rotate(90deg);
}

/* Add form */
.add-card { max-width: 480px; }
.add-form { display: flex; flex-direction: column; gap: 14px; }
.add-form .form-row { display: flex; flex-direction: column; gap: 4px; }
.add-form label { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.add-form input, .add-form select, .add-form textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-2);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.18s ease;
}
.add-form input:focus, .add-form select:focus, .add-form textarea:focus {
  border-color: var(--orange);
}
.add-form textarea { min-height: 60px; resize: vertical; }
.add-form .form-actions { display: flex; gap: 8px; margin-top: 6px; }
.add-form .form-submit {
  flex: 1;
  padding: 11px;
  background: var(--orange);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s ease;
}
.add-form .form-submit:hover { background: var(--orange-d); }
.add-form .form-cancel {
  padding: 11px 16px;
  background: var(--bg-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
}
.add-form .form-tip { font-size: 12px; color: var(--ink-3); }
.add-form .form-success {
  padding: 10px 14px;
  background: rgba(107,142,90,0.12);
  border: 1px solid rgba(107,142,90,0.3);
  border-radius: 8px;
  color: var(--green);
  font-size: 13px;
  display: none;
}
.add-form .form-success.is-shown { display: block; }

/* Card actions: status switcher / hide */
.card-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 4px;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.card:hover .card-actions { opacity: 1; }
.card-action-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: rgba(10,10,11,0.85);
  backdrop-filter: blur(8px);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  transition: all 0.15s ease;
}
.card-action-btn:hover { background: var(--orange); color: white; border-color: var(--orange); }

.filters {
  display: flex;
  gap: 6px;
  background: var(--bg-2);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
}
.chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
}
.chip:hover { color: var(--ink); }
.chip.is-on {
  background: var(--orange);
  color: white;
  box-shadow: var(--shadow-sm);
}

/* ---------- GRID ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 22px;
}
.grid-music { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid-vibe  { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* ---------- BOOK / MOVIE CARD ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  display: flex;
  flex-direction: column;
  text-align: left;
  font-family: inherit;
  color: inherit;
  padding: 0;
  position: relative;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--orange);
}

.cover {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  background: var(--bg-2);
  display: block;
}
.cover-fallback {
  width: 100%;
  aspect-ratio: 2/3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--panel-2), var(--bg-2));
  color: var(--ink-3);
  font-size: 56px;
}

.card-body {
  padding: 12px 14px 14px;
}
.card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  font-size: 12px;
  color: var(--ink-3);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}
.tag-emoji {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-2);
  font-size: 11px;
  color: var(--ink-2);
  border: 1px solid var(--line-2);
  font-weight: 500;
}

/* rating chip */
.rating {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(10,10,11,0.85);
  backdrop-filter: blur(8px);
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--orange);
  border: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  gap: 2px;
}
.rating .star { color: var(--gold); }

/* status badge bottom-left */
.status-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(10,10,11,0.85);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.status-badge.is-wish   { background: rgba(232,155,124,0.92); color: #1A1A1A; }
.status-badge.is-shelf  { background: rgba(143,181,218,0.92); color: #1A1A1A; }
.status-badge.is-collect{ background: rgba(143,181,126,0.92); color: #1A1A1A; }
.status-badge.is-do     { background: rgba(232,184,108,0.92); color: #1A1A1A; }

/* ---------- MUSIC CARD ---------- */
.music-card { padding: 14px; gap: 12px; display: flex; flex-direction: row; }
.music-card .cover,
.music-card .cover-fallback {
  width: 72px;
  min-width: 72px;
  aspect-ratio: 1/1;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.music-card .cover-fallback { font-size: 28px; }
.music-card .card-body { padding: 0; flex: 1; min-width: 0; }
.music-card .card-title { font-size: 15px; -webkit-line-clamp: 1; }
.music-card .card-meta { margin-top: 2px; }
.music-card .play-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--orange);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, background 0.15s ease;
}
.music-card .play-btn:hover { background: var(--orange-d); transform: scale(1.08); }
.music-card .play-btn.is-playing { background: var(--ink); }

/* ---------- VIBECODING CARD ---------- */
.vibe-card {
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  display: flex;
  flex-direction: column;
  font-family: inherit;
  color: inherit;
  padding: 0;
  position: relative;
  text-align: left;
}
.vibe-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--orange); }
.vibe-card .vibe-hero {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--panel-2), var(--bg-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  border-bottom: 1px solid var(--line-2);
}
.vibe-card .vibe-body { padding: 18px 20px 22px; }
.vibe-card .vibe-emoji-row { font-size: 18px; letter-spacing: 2px; margin-bottom: 8px; }
.vibe-card .vibe-title { font-family: var(--font-serif); font-size: 20px; font-weight: 600; margin: 0 0 6px; color: var(--ink); }
.vibe-card .vibe-tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; background: var(--bg-2); color: var(--ink-2); border: 1px solid var(--line-2); margin-right: 4px; margin-top: 8px; }

/* ---------- DETAIL DIALOG ---------- */
.dialog {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.dialog[hidden] { display: none; }
.dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.dialog-card {
  position: relative;
  background: var(--panel);
  border-radius: var(--radius-lg);
  max-width: 720px;
  width: 100%;
  max-height: 88vh;
  overflow: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.dialog-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--ink-2);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: all 0.18s ease;
}
.dialog-close:hover { background: var(--bg-2); color: var(--ink); }

.dialog-body { padding: 36px 40px 40px; }
.dlg-cover {
  width: 160px;
  aspect-ratio: 2/3;
  border-radius: var(--radius);
  object-fit: cover;
  float: left;
  margin: 0 24px 16px 0;
  box-shadow: var(--shadow-md);
}
.dlg-cover-fb {
  width: 160px;
  aspect-ratio: 2/3;
  border-radius: var(--radius);
  float: left;
  margin: 0 24px 16px 0;
  background: linear-gradient(135deg, var(--panel-2), var(--bg-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  color: var(--ink-3);
}
.dlg-emoji {
  font-size: 48px;
  margin-bottom: 8px;
  line-height: 1;
}
.dlg-title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 6px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.dlg-alt { color: var(--ink-3); font-size: 15px; margin: 0 0 12px; }
.dlg-author { font-size: 15px; color: var(--ink-2); margin: 0 0 14px; }
.dlg-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.dlg-meta .tag-emoji { font-size: 12px; padding: 4px 10px; }
.dlg-section {
  margin: 18px 0 0;
  clear: both;
}
.dlg-section h3 {
  font-family: var(--font-serif);
  font-size: 16px;
  margin: 0 0 8px;
  color: var(--ink-2);
  font-weight: 600;
}
.dlg-section p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2);
  margin: 0 0 10px;
  white-space: pre-wrap;
}
.dlg-comments {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}
.dlg-comment {
  padding: 12px 16px;
  background: var(--bg-2);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--orange);
}
.dlg-comment .c-author { font-size: 12px; color: var(--ink-3); margin-bottom: 4px; font-weight: 500; }
.dlg-comment .c-content { font-size: 13px; line-height: 1.6; color: var(--ink-2); margin: 0; }
.dlg-actions { margin-top: 22px; display: flex; gap: 8px; }
.dlg-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--orange);
  color: white;
  text-decoration: none;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
}
.dlg-btn:hover { background: var(--orange-d); transform: translateY(-1px); }
.dlg-btn.ghost { background: var(--bg-2); color: var(--ink); border: 1px solid var(--line); }
.dlg-btn.ghost:hover { background: var(--panel-2); border-color: var(--orange); }

/* ---------- FOOT ---------- */
.foot {
  margin-top: 96px;
  padding-top: 32px;
  border-top: 1px solid var(--line-2);
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
}
.foot a { color: var(--orange-d); border-bottom: 1px dotted var(--orange); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 720px) {
  .topbar { padding: 12px 16px; flex-wrap: wrap; gap: 12px; }
  .tabs { width: 100%; justify-content: space-between; }
  .tab { padding: 7px 10px; font-size: 13px; gap: 4px; }
  .tab-label { display: none; }
  .tab-emoji { font-size: 18px; }
  .page { padding: 32px 16px 64px; }
  .hero { padding: 16px 0 32px; }
  .hero-title { font-size: 36px; }
  .hero-sub { font-size: 15px; }
  .panel-head h2 { font-size: 24px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
  .grid-music { grid-template-columns: 1fr; }
  .grid-vibe { grid-template-columns: 1fr; }
  .dialog-card { max-height: 92vh; border-radius: var(--radius) var(--radius) 0 0; align-self: flex-end; }
  .dialog { padding: 0; align-items: flex-end; }
  .dialog-body { padding: 24px 20px 32px; }
  .dlg-cover, .dlg-cover-fb { float: none; margin: 0 auto 16px; }
}
