/* 全局样式 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Microsoft YaHei', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 头部样式 */
header {
  background-color: #3498db;
  color: white;
  padding: 30px 0;
  margin-bottom: 30px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header h1 {
  margin-bottom: 10px;
}

/* 主要内容区域 */
main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 50px;
}

/* 表单区域 */
.article-form-section {
  background-color: white;
  padding: 25px;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

.form-group textarea {
  resize: vertical;
}

.form-buttons {
  display: flex;
  gap: 10px;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
}

.btn-primary {
  background-color: #3498db;
  color: white;
}

.btn-primary:hover {
  background-color: #2980b9;
}

.btn-secondary {
  background-color: #95a5a6;
  color: white;
}

.btn-secondary:hover {
  background-color: #7f8c8d;
}

.btn-danger {
  background-color: #e74c3c;
  color: white;
}

.btn-danger:hover {
  background-color: #c0392b;
}

/* 文章列表区域 */
.articles-section {
  background-color: white;
  padding: 25px;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.article-card {
  border-bottom: 1px solid #eee;
  padding: 15px 0;
}

.article-card:last-child {
  border-bottom: none;
}

.article-title {
  font-size: 20px;
  margin-bottom: 5px;
  color: #3498db;
  cursor: pointer;
}

.article-title:hover {
  text-decoration: underline;
}

.article-meta {
  font-size: 14px;
  color: #7f8c8d;
  margin-bottom: 10px;
}

.article-actions {
  display: flex;
  gap: 10px;
}

.action-btn {
  padding: 5px 10px;
  font-size: 14px;
}

/* 模态框样式 */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 30px;
  width: 70%;
  max-width: 800px;
  border-radius: 5px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  position: relative;
}

.close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
}

.close:hover {
  color: #333;
}

#modal-title {
  margin-bottom: 15px;
  color: #2c3e50;
}

#modal-content {
  margin-top: 20px;
  line-height: 1.8;
}

/* 加载动画 */
.loading {
  text-align: center;
  padding: 20px;
  color: #7f8c8d;
}

/* 页脚样式 */
footer {
  background-color: #2c3e50;
  color: white;
  padding: 20px 0;
  text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
  main {
    grid-template-columns: 1fr;
  }
  
  .modal-content {
    width: 90%;
    margin: 20% auto;
  }
}