/* ============================================
   全局样式 - 审稿意见共享社区 (MVP精简版)
   ============================================ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f8f9fa;
  position: relative;
  min-height: 100vh;
}

/* 头部导航 */
header {
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.header-content h1 {
  font-size: 1.8rem;
  color: #2c3e50;
}

.subtitle {
  color: #7f8c8d;
  margin-top: 5px;
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 10px;
  display: flex;
  gap: 30px;
  border-bottom: 1px solid #ecf0f1;
}

nav a {
  text-decoration: none;
  color: #7f8c8d;
  padding: 8px 0;
  position: relative;
  font-weight: 500;
  transition: color 0.3s;
}

nav a:hover {
  color: #3498db;
}

nav a.active {
  color: #3498db;
}

nav a.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: #3498db;
}

/* 主要内容区 */
main {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
  padding-bottom: 60px; /* 为页脚留出空间 */
}



/* 翻译器卡片 */
.translator-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 30px;
  border: 1px solid #e9ecef; /* 改为普通细边框 */
}

.translator-card h3 {
  margin-bottom: 15px;
  color: #8e44ad;
}

.translator-box {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.translator-box textarea {
  flex: 1;
  min-width: 200px;
  height: 60px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
  resize: vertical;
}

.translator-box button {
  background: #9b59b6;
  color: white;
  border: none;
  padding: 0 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s;
}

.translator-box button:hover {
  background: #8e44ad;
}

.translator-result {
  margin-top: 15px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 3px solid #ddd;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.translator-result.success {
  border-left-color: #27ae60;
  background: #e8f8f5;
}

.trans-highlight {
  color: #c0392b;
  font-weight: bold;
  background: #f9e79f;
  padding: 0 2px;
  border-radius: 2px;
}

/* --------------------------------------------------
   竹子风格更新日志 (Bamboo Timeline)
   -------------------------------------------------- */
.changelog-bamboo {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 30px;
}

.changelog-bamboo h3 {
  margin-bottom: 25px;
  color: #27ae60;
  font-size: 1.2rem;
}

/* 竹竿容器：左侧有一根垂直的竹竿 */
.bamboo-stem {
  position: relative;
  margin-left: 20px;
  padding-left: 30px; /* 给节点内容留出空间 */
  border-left: 6px solid #a8e6cf; /* 竹竿本体 */
  border-radius: 4px; /* 竹竿圆角 */
}

/* 竹节节点 */
.bamboo-node {
  position: relative;
  margin-bottom: 30px; /* 节与节的间距 */
}

.bamboo-node:last-child {
  margin-bottom: 0;
}

/* 节点圆点（竹节处） */
.bamboo-node::before {
  content: '';
  position: absolute;
  left: -39px; /* 调整圆点位置，使其位于竹竿中心 (30padding + 6border/2 + 6width/2 = ~36) */
  top: 0;
  width: 12px;
  height: 12px;
  background: #27ae60;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #a8e6cf; /* 外圈装饰 */
  z-index: 2;
}

/* 横向竹枝连接线 */
.bamboo-node::after {
  content: '';
  position: absolute;
  left: -30px;
  top: 9px;
  width: 20px;
  height: 2px;
  background: #a8e6cf;
}

/* 竹叶装饰 (仅在第一个节点显示) */
.bamboo-stem::before {
  content: '🍃';
  position: absolute;
  left: -25px;
  top: -25px;
  font-size: 24px;
  transform: rotate(-15deg);
  z-index: 3;
}

.node-date {
  font-size: 0.85rem;
  color: #27ae60;
  font-weight: bold;
  margin-bottom: 5px;
  background: #e8f8f5;
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
}

.node-content h4 {
  margin: 5px 0;
  color: #2c3e50;
  font-size: 1.1rem;
}

.node-content p {
  color: #7f8c8d;
  font-size: 0.95rem;
  margin: 0;
}

/* 统计栏 */
.stats-bar {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-item {
  flex: 1;
  text-align: center;
}

.stat-label {
  display: block;
  color: #7f8c8d;
  font-size: 0.9rem;
  margin-bottom: 5px;
}

.stat-value {
  display: block;
  font-size: 2rem;
  font-weight: bold;
  color: #2c3e50;
}

/* 简单列表头 */
.simple-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.simple-list-header h2 {
  color: #2c3e50;
}

.simple-list-header .hint {
  color: #95a5a6;
  font-size: 0.9rem;
}

/* 论文卡片 */
.paper-card {
  background: white;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.paper-card:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.paper-header {
  background: #f8f9fa;
  padding: 20px;
  border-bottom: 2px solid #e9ecef;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}

.paper-header:hover {
  background: #e9ecef;
}

.paper-header h2 {
  font-size: 1.4rem;
  color: #2c3e50;
  margin: 0;
  word-break: break-word;
}

.paper-meta {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-shrink: 0;
}

.round-count {
  background: #3498db;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  white-space: nowrap;
}

.toggle-icon {
  color: #7f8c8d;
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
  transition: transform 0.3s;
}

/* 审稿轮次容器 */
.rounds-container {
  padding: 20px;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 审稿轮次卡片 */
.round-card {
  border-left: 1px solid #dee2e6; /* 改为1px细线 */
  margin-bottom: 30px;
  padding-left: 20px;
  transition: border-color 0.3s;
}

.round-card:hover {
  border-left-color: #3498db;
}

.round-card:last-child {
  margin-bottom: 0;
}

.round-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.round-badge {
  background: #3498db;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

.round-result {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

.round-result.拒稿 {
  background: #e74c3c;
  color: white;
}

.round-result.修回 {
  background: #f39c12;
  color: white;
}

.round-result.接收 {
  background: #27ae60;
  color: white;
}

.round-date {
  color: #95a5a6;
  font-size: 0.9rem;
  margin-left: auto;
}

/* 图片网格 */
.images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  margin: 15px 0;
}

.image-item {
  position: relative;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  overflow: hidden;
  background: #f8f9fa;
  cursor: zoom-in;
}

.image-item img {
  width: 100%;
  height: 200px; /* 固定高度，优化布局 */
  object-fit: cover; /* 裁剪适应 */
  display: block;
  transition: transform 0.3s;
}

.image-item:hover img {
  transform: scale(1.05);
}

.image-caption {
  padding: 8px;
  font-size: 0.8rem;
  color: #7f8c8d;
  background: #f8f9fa;
  border-top: 1px solid #dee2e6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 轮次备注 */
.round-comment {
  margin-top: 15px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  font-style: italic;
  color: #2c3e50;
}

/* 加载状态 */
.loading {
  text-align: center;
  padding: 60px;
  color: #95a5a6;
  font-size: 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.loading::after {
  content: "";
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 12px;
  color: #95a5a6;
}

.empty-state p {
  margin: 10px 0;
}

.empty-state .suggestion {
  font-size: 0.9rem;
  color: #bdc3c7;
}

.empty-state a {
  color: #3498db;
  text-decoration: none;
}

.empty-state a:hover {
  text-decoration: underline;
}

/* 投稿页面专用样式 */
.submit-page {
  max-width: 800px;
  margin: 0 auto;
}

.guidelines-card {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.warning-box {
  background: #fff3cd;
  border: 1px solid #ffeeba;
  color: #856404;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
}

/* 隐私免责声明条 */
.disclaimer-banner {
  background: #fff3cd;
  color: #856404;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #ffeeba;
  margin-bottom: 20px;
  text-align: left;
  font-size: 0.95rem;
}

.privacy-alert {
  background: #fff5f5;
  color: #c0392b;
  border-color: #fab1a0;
}

.privacy-alert h3 {
  margin-bottom: 10px;
  color: #e74c3c;
}

.privacy-alert li {
  margin-bottom: 5px;
}

.format-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.format-table th,
.format-table td {
  border: 1px solid #dee2e6;
  padding: 12px;
  text-align: left;
}

.format-table th {
  background: #f8f9fa;
}

.format-table code {
  background: #e9ecef;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9rem;
}

.highlight-red {
  background: #ffcccc;
  color: #c0392b;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.example-box {
  background: white; /* 去掉灰色背景 */
  border: 1px solid #eee; /* 改为细边框 */
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
}

.example-compare {
  display: flex;
  gap: 20px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.bad-example,
.good-example {
  flex: 1;
  min-width: 250px;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #e9ecef; /* 统一改为细边框 */
}

.bad-example {
  background: white; 
  /* 移除特定颜色边框 */
}

.good-example {
  background: white;
  /* 移除特定颜色边框 */
}

.subject {
  font-family: monospace;
  background: white;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
  margin: 5px 0;
}

.explain {
  color: #666;
  font-size: 0.9rem;
  margin-top: 10px;
}

.template {
  background: #2c3e50;
  color: #ecf0f1;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  font-family: monospace;
  white-space: pre-wrap;
  margin: 20px 0;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.checklist li {
  padding: 8px;
  margin: 5px 0;
  background: #f8f9fa;
  border-radius: 4px;
}

.note-box {
  background: #d1ecf1;
  border: 1px solid #bee5eb;
  color: #0c5460;
  padding: 20px;
  border-radius: 8px;
  margin-top: 30px;
}

/* 页脚 */
footer {
  text-align: center;
  padding: 30px;
  color: #95a5a6;
  border-top: 1px solid #ecf0f1;
  margin-top: 50px;
}

footer a {
  color: #3498db;
  text-decoration: none;
}

/* 图片预览模态框 */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(5px); /* 背景模糊 */
  overflow: auto;
  opacity: 0;
  transition: opacity 0.3s;
}

.modal.show {
  opacity: 1;
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90vh;
  position: relative;
  top: 50%;
  transform: translateY(-50%) scale(0.9);
  transition: transform 0.3s;
  border-radius: 4px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.modal.show .modal-content {
  transform: translateY(-50%) scale(1);
}

.close {
  position: absolute;
  right: 20px;
  top: 20px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  text-shadow: 0 0 5px rgba(0,0,0,0.5);
  transition: color 0.2s;
}

.close:hover {
  color: #3498db;
}

/* 回到顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #3498db;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
  z-index: 99;
  border: none;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: #2980b9;
  transform: translateY(-3px);
}

/* 移动端适配 */
@media (max-width: 768px) {
  .header-content h1 {
    font-size: 1.5rem;
  }
  
  .stats-bar {
    flex-direction: column;
    gap: 10px;
  }
  
  .simple-list-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .paper-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .paper-meta {
    width: 100%;
    justify-content: space-between;
  }
  
  .round-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .round-date {
    margin-left: 0;
  }
  
  .images-grid {
    grid-template-columns: 1fr;
  }
  
  .example-compare {
    flex-direction: column;
  }
  
  .format-table {
    font-size: 14px;
  }
  
  .format-table th,
  .format-table td {
    padding: 8px;
  }
  
  .guidelines-card {
    padding: 20px;
  }
  
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
}

/* 打印样式 */
@media print {
  header, nav, footer, .toggle-icon, .back-to-top {
    display: none;
  }
  
  .paper-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
}
