/* ==========================================================================
   书架页 (Shelf View) & 我的页 (Me View)
   ========================================================================== */

.shelf-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 2px 2px 12px;
}
.shelf-header h2 {
  font-size: 17px;
  font-weight: 800;
}
.shelf-header span {
  font-size: 11.5px;
  color: var(--text-muted);
}

.shelf-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shelf-row {
  display: flex;
  gap: 13px;
  padding: 12px;
  border-radius: 14px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease;
}
.shelf-row:active { transform: scale(0.985); }

.shelf-cover {
  position: relative;
  width: 58px;
  height: 78px;
  flex-shrink: 0;
  border-radius: 4px 9px 9px 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #854d0e 0%, #452405 100%);
  box-shadow: -3px 4px 10px rgba(0, 0, 0, 0.25), inset 3px 0 4px rgba(255,255,255,0.18);
}
.shelf-cover::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 7px;
  background: linear-gradient(to right, rgba(0,0,0,0.4) 0%, rgba(255,255,255,0.2) 40%, rgba(0,0,0,0.2) 100%);
}
.shelf-cover > span {
  font-family: "Songti SC", "SimSun", "Noto Serif SC", serif;
  font-size: 26px;
  font-weight: 800;
  color: rgba(255, 245, 225, 0.95);
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.shelf-cover em {
  position: absolute;
  right: 4px;
  bottom: 4px;
  font-style: normal;
  font-size: 8.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 5px;
  color: #ffe9b8;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(230, 184, 115, 0.35);
}

.shelf-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
}
.shelf-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shelf-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
}
.shelf-chap {
  color: var(--accent-gold);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.shelf-time {
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.shelf-progress-track {
  height: 4px;
  border-radius: 999px;
  background-color: var(--bg-surface-elevated);
  overflow: hidden;
}
.shelf-progress-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-gold-hover));
  transition: width 0.3s ease;
}
.shelf-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}
.shelf-resume-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: 700;
  font-size: 11.5px;
  color: var(--accent-gold);
}

.shelf-empty {
  text-align: center;
  padding: 80px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.shelf-empty svg {
  width: 44px;
  height: 44px;
  color: var(--text-muted);
  opacity: 0.6;
}
.shelf-empty h3 {
  font-size: 15px;
  font-weight: 800;
  font-family: "Songti SC", "SimSun", "Noto Serif SC", serif;
  color: var(--text-primary);
}
.shelf-empty p {
  font-size: 12px;
  color: var(--text-secondary);
  max-width: 260px;
}

/* ---- 我的页 ---- */
.me-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-surface-elevated) 100%);
  border: 1px solid var(--border-subtle);
}
.me-avatar {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b 0%, #e11d48 100%);
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.35);
}
.me-name {
  font-size: 15.5px;
  font-weight: 800;
  font-family: "Songti SC", "SimSun", "Noto Serif SC", serif;
  color: var(--text-primary);
}
.me-sub {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--text-secondary);
}

.me-stats-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.me-stat-card {
  padding: 14px 14px 12px;
  border-radius: 14px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.me-stat-card b {
  font-size: 17px;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--accent-gold);
}
.me-stat-card b small {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
}
.me-stat-card span {
  font-size: 11px;
  color: var(--text-muted);
}

.me-section {
  margin-top: 14px;
  padding: 14px 16px 16px;
  border-radius: 16px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}
.me-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.me-section-head h3 {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-primary);
}
.me-section-head span {
  font-size: 10.5px;
  color: var(--text-muted);
}

.me-chart {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.me-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.me-bar-val {
  font-size: 9px;
  color: var(--text-muted);
  height: 12px;
  line-height: 12px;
  white-space: nowrap;
}
.me-bar-track {
  width: 100%;
  max-width: 30px;
  height: 74px;
  border-radius: 8px;
  background-color: var(--bg-surface-elevated);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}
.me-bar {
  display: block;
  width: 62%;
  min-height: 4px;
  border-radius: 6px 6px 2px 2px;
  background-color: var(--border-medium);
  opacity: 0.75;
  transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease;
}
.me-bar.active {
  background: linear-gradient(to top, var(--accent-gold), var(--accent-gold-hover));
  opacity: 1;
}
.me-bar-label {
  font-size: 10px;
  color: var(--text-muted);
}

.me-lib-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.me-lib-item {
  text-align: center;
  padding: 12px 4px;
  border-radius: 12px;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
}
.me-lib-item b {
  display: block;
  font-size: 16px;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text-primary);
}
.me-lib-item span {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--text-muted);
}

.me-footnote {
  margin-top: 16px;
  text-align: center;
  font-size: 10.5px;
  color: var(--text-muted);
  opacity: 0.8;
}
