/* 基础样式 */
:root {
  --primary-color: #2563eb;
  --secondary-color: #64748b;
  --success-color: #22c55e;
  --background: #f8fafc;
  --card-bg: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --border-radius: 12px;
  --shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans SC', system-ui;
  line-height: 1.6;
  background: var(--background);
  color: var(--text-primary);
}

.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* 卡片式设计 */
.card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
}

/* 图文展示区 */
.article-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  overflow: hidden;
}

.article-media {
  position: relative;
  min-height: 400px;
}

.article-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.image-caption {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9em;
}

.article-content {
  padding: 2rem;
}

.article-content h1 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.article-meta {
  color: var(--secondary-color);
  margin-bottom: 1.5rem;
}

/* 评论表单 */
.comment-form {
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

input, textarea {
  width: 100%;
  padding: 0.875rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}

.word-count {
  color: var(--secondary-color);
  font-size: 0.875rem;
}

/* 按钮设计 */
.primary-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.primary-btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.primary-btn .icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* 评论列表 */
.comment-list {
  padding: 1rem 2rem;
}

.comment-item {
  padding: 1.5rem;
  margin: 1rem 0;
  background: #f8fafc;
  border-radius: 8px;
  animation: fadeIn 0.3s ease;
}

.comment-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.comment-header .username {
  font-weight: 600;
  color: var(--primary-color);
  margin-right: 0.75rem;
}

.comment-header .time {
  color: var(--secondary-color);
  font-size: 0.875rem;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .article-card {
      grid-template-columns: 1fr;
  }
  
  .article-media img {
      border-radius: var(--border-radius) var(--border-radius) 0 0;
  }
  
  .container {
      padding: 0 1rem;
  }
  
  .primary-btn {
      padding: 0.75rem 1rem;
  }
}