.statistics-trigger {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: #1890ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  transition: all 0.3s ease;
}

.statistics-trigger svg {
  width: 20px;
  height: 20px;
}
.statistics-trigger:hover {
  background: #40a9ff;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.statistics-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease;
}

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

.statistics-modal {
  background: white;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

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

.statistics-header {
  padding: 20px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.statistics-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.statistics-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.statistics-close:hover {
  color: #333;
}

.statistics-content {
  padding: 20px;
}

.statistics-total {
  margin-bottom: 20px;
  padding: 15px;
  background: #f5f5f5;
  border-radius: 6px;
  text-align: center;
}

.statistics-label {
  font-size: 16px;
  color: #666;
  margin-right: 8px;
}

.statistics-value {
  font-size: 24px;
  font-weight: bold;
  color: #1890ff;
}

.statistics-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.statistics-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: #fafafa;
  border-radius: 6px;
  transition: background 0.2s;
}

.statistics-item:hover {
  background: #f0f0f0;
}

.statistics-type {
  font-size: 14px;
  color: #666;
}

.statistics-count {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.statistics-loading,
.statistics-error {
  text-align: center;
  padding: 40px;
  color: #999;
}

.poem-copy-btn {
  margin-left: 10px;
  padding: 2px 8px;
  font-size: 12px;
  line-height: 1.6;
  color: #666;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  cursor: pointer;
  vertical-align: middle;
  transition: all 0.2s ease;
}

.poem-copy-btn:hover {
  color: #1890ff;
  border-color: #1890ff;
}

.poem-copy-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.markdown img.poem-img-thumb {
  display: block;
  max-width: 160px;
  width: 100%;
  height: auto;
  margin: 12px auto;
  cursor: zoom-in;
}

html.poem-img-preview-lock {
  overflow: hidden;
}

.poem-img-preview-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.poem-img-preview-overlay.is-open {
  display: flex;
}

.poem-img-preview-modal {
  width: min(92vw, 980px);
  max-height: 92vh;
  background: #111;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

.poem-img-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.35);
}

.poem-img-preview-open {
  font-size: 14px;
  color: #fff;
  text-decoration: none;
  opacity: 0.9;
}

.poem-img-preview-open:hover {
  opacity: 1;
  text-decoration: underline;
}

.poem-img-preview-close {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
}

.poem-img-preview-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
}

.poem-img-preview-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(92vh - 54px);
  object-fit: contain;
  background: #111;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .statistics-trigger {
    right: 10px;
    width: 45px;
    height: 45px;
    font-size: 20px;
  }

  .statistics-modal {
    width: 95%;
    height: 100%;
  }

  .poem-img-thumb {
    max-width: 280px;
  }
}
