/**
 * 编辑器增强样式
 * 用于富文本编辑器内容美化
 */

/* ==================== 基础排版 ==================== */
.editor-content {
  font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: #333;
  max-width: 100%;
  margin: 0 auto;
}

.editor-content p {
  margin-bottom: 20px;
  text-align: justify;
  color: #444;
}

/* ==================== 标题组样式 ==================== */
.editor-content h1 {
  font-size: 36px;
  font-weight: 700;
  color: #2c3e50;
  margin: 50px 0 30px;
  padding-bottom: 20px;
  border-bottom: 3px solid #3498db;
  position: relative;
  letter-spacing: -0.5px;
}

.editor-content h1::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 120px;
  height: 3px;
  background: #2980b9;
  border-radius: 2px;
}

.editor-content h2 {
  font-size: 28px;
  font-weight: 600;
  color: #2c3e50;
  margin: 40px 0 25px;
  padding-left: 20px;
  border-left: 4px solid #3498db;
  letter-spacing: -0.3px;
}

.editor-content h3 {
  font-size: 22px;
  font-weight: 600;
  color: #34495e;
  margin: 35px 0 20px;
  padding-left: 15px;
  border-left: 3px solid #5dade2;
}

.editor-content h4 {
  font-size: 18px;
  font-weight: 600;
  color: #34495e;
  margin: 30px 0 15px;
  padding-left: 12px;
  border-left: 3px solid #85c1e9;
}

.editor-content h5 {
  font-size: 16px;
  font-weight: 600;
  color: #555;
  margin: 25px 0 12px;
}

.editor-content h6 {
  font-size: 14px;
  font-weight: 600;
  color: #666;
  margin: 20px 0 10px;
}

/* ==================== 按钮样式 ==================== */
.editor-content .btn {
  display: inline-block;
  padding: 12px 30px;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
  margin: 10px 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.editor-content .btn-primary {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: #fff;
}

.editor-content .btn-primary:hover {
  background: linear-gradient(135deg, #2980b9, #1f618d);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(52, 152, 219, 0.4);
}

.editor-content .btn-success {
  background: linear-gradient(135deg, #27ae60, #229954);
  color: #fff;
}

.editor-content .btn-success:hover {
  background: linear-gradient(135deg, #229954, #1e8449);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(39, 174, 96, 0.4);
}

.editor-content .btn-warning {
  background: linear-gradient(135deg, #f39c12, #d68910);
  color: #fff;
}

.editor-content .btn-warning:hover {
  background: linear-gradient(135deg, #d68910, #b7720e);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(243, 156, 18, 0.4);
}

.editor-content .btn-danger {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff;
}

.editor-content .btn-danger:hover {
  background: linear-gradient(135deg, #c0392b, #a93226);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(231, 76, 60, 0.4);
}

.editor-content .btn-outline {
  background: transparent;
  color: #3498db;
  border: 2px solid #3498db;
  box-shadow: none;
}

.editor-content .btn-outline:hover {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: #fff;
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.editor-content .btn-large {
  padding: 15px 40px;
  font-size: 18px;
}

.editor-content .btn-small {
  padding: 8px 20px;
  font-size: 14px;
}

/* ==================== 引言样式 ==================== */
.editor-content blockquote {
  margin: 40px 0;
  padding: 30px 40px;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-left: 5px solid #3498db;
  font-style: italic;
  color: #555;
  position: relative;
  border-radius: 0 8px 8px 0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.editor-content blockquote::before {
  content: '"';
  font-size: 72px;
  color: #3498db;
  opacity: 0.2;
  position: absolute;
  top: 10px;
  left: 20px;
  font-family: Georgia, serif;
  line-height: 1;
}

.editor-content blockquote p {
  margin: 0;
  padding-left: 50px;
  font-size: 18px;
  line-height: 1.8;
  color: #444;
}

.editor-content blockquote cite {
  display: block;
  margin-top: 20px;
  padding-left: 50px;
  font-size: 14px;
  color: #777;
  font-style: normal;
  font-weight: 500;
}

.editor-content blockquote cite::before {
  content: '—— ';
}

/* ==================== 提醒框样式 ==================== */
.editor-content .alert {
  padding: 25px 30px;
  margin: 30px 0;
  border-radius: 10px;
  position: relative;
  padding-left: 70px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.editor-content .alert:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.editor-content .alert::before {
  content: '';
  position: absolute;
  left: 25px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.editor-content .alert-info {
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  border-color: #90caf9;
  color: #1565c0;
}

.editor-content .alert-info::before {
  background: #3498db;
}

.editor-content .alert-success {
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  border-color: #a5d6a7;
  color: #2e7d32;
}

.editor-content .alert-success::before {
  background: #27ae60;
}

.editor-content .alert-warning {
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  border-color: #ffcc80;
  color: #ef6c00;
}

.editor-content .alert-warning::before {
  background: #f39c12;
}

.editor-content .alert-danger {
  background: linear-gradient(135deg, #ffebee, #ffcdd2);
  border-color: #ef9a9a;
  color: #c62828;
}

.editor-content .alert-danger::before {
  background: #e74c3c;
}

.editor-content .alert-title {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 10px;
  color: inherit;
}

.editor-content .alert p {
  margin: 0;
  font-size: 14px;
  color: inherit;
  opacity: 0.9;
}

/* ==================== 列表样式 ==================== */
.editor-content ul,
.editor-content ol {
  margin: 25px 0;
  padding-left: 30px;
}

.editor-content ul li,
.editor-content ol li {
  margin-bottom: 12px;
  line-height: 1.8;
  color: #444;
  position: relative;
}

.editor-content ul {
  list-style-type: disc;
}

.editor-content ol {
  list-style-type: decimal;
}

.editor-content ul ul,
.editor-content ol ol,
.editor-content ul ol,
.editor-content ol ul {
  margin: 15px 0;
}

/* 自定义列表样式 */
.editor-content .list-check {
  list-style: none;
  padding-left: 0;
}

.editor-content .list-check li {
  padding-left: 35px;
  position: relative;
  transition: all 0.3s ease;
}

.editor-content .list-check li:hover {
  padding-left: 40px;
}

.editor-content .list-check li::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 10px;
  width: 8px;
  height: 8px;
  background: #3498db;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.editor-content .list-check li:hover::before {
  transform: scale(1.2);
  background: #2980b9;
}

.editor-content .list-arrow {
  list-style: none;
  padding-left: 0;
}

.editor-content .list-arrow li {
  padding-left: 30px;
  position: relative;
  transition: all 0.3s ease;
}

.editor-content .list-arrow li:hover {
  padding-left: 35px;
}

.editor-content .list-arrow li::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 10px;
  width: 8px;
  height: 8px;
  background: #3498db;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.editor-content .list-arrow li:hover::before {
  transform: scale(1.2);
  background: #2980b9;
}

/* ==================== 表格样式 ==================== */
.editor-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 30px 0;
  background: #fff;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  border-radius: 8px;
  overflow: hidden;
}

.editor-content th,
.editor-content td {
  padding: 18px 20px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.editor-content th {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.editor-content tr:nth-child(even) {
  background: #f8f9fa;
}

.editor-content tr:hover {
  background: #e3f2fd;
  transform: scale(1.01);
  transition: all 0.3s ease;
}

.editor-content tr:last-child td {
  border-bottom: none;
}

/* ==================== 分割线样式 ==================== */
.editor-content hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, #3498db, transparent);
  margin: 50px 0;
  position: relative;
}

.editor-content hr::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  background: #fff;
  border: 1px solid #3498db;
  border-radius: 50%;
}

.editor-content hr.dashed {
  background: none;
  border-top: 2px dashed #3498db;
  height: 0;
}

.editor-content hr.dashed::after {
  background: #3498db;
  border: none;
  width: 10px;
  height: 10px;
}

.editor-content hr.dotted {
  background: none;
  border-top: 3px dotted #3498db;
  height: 0;
}

.editor-content hr.dotted::after {
  background: #3498db;
  border: none;
  width: 8px;
  height: 8px;
}

/* ==================== 图片样式 ==================== */
.editor-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.editor-content img:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.editor-content .img-center {
  display: block;
  margin: 30px auto;
}

.editor-content .img-left {
  float: left;
  margin: 0 30px 20px 0;
}

.editor-content .img-right {
  float: right;
  margin: 0 0 20px 30px;
}

.editor-content .img-caption {
  text-align: center;
  font-size: 14px;
  color: #666;
  margin-top: 15px;
  font-style: italic;
  padding: 10px 20px;
  background: #f8f9fa;
  border-radius: 8px;
  display: inline-block;
  margin-left: auto;
  margin-right: auto;
}

/* ==================== 代码样式 ==================== */
.editor-content code {
  background: #f4f4f4;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 14px;
  color: #e74c3c;
  border: 1px solid #e0e0e0;
}

.editor-content pre {
  background: #2c3e50;
  color: #ecf0f1;
  padding: 25px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 30px 0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  position: relative;
}

.editor-content pre::before {
  content: 'CODE';
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 12px;
  color: rgba(236, 240, 241, 0.5);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.editor-content pre code {
  background: none;
  color: inherit;
  padding: 0;
  border: none;
  font-size: 14px;
  line-height: 1.5;
}

/* ==================== 卡片样式 ==================== */
.editor-content .card {
  background: #fff;
  border-radius: 12px;
  padding: 35px;
  margin: 30px 0;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  border-top: 5px solid #3498db;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.editor-content .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #3498db, #2980b9);
}

.editor-content .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.editor-content .card-title {
  font-size: 22px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 20px;
  letter-spacing: -0.2px;
}

.editor-content .card-body {
  color: #555;
  line-height: 1.8;
}

/* ==================== 标签样式 ==================== */
.editor-content .tag {
  display: inline-block;
  padding: 6px 20px;
  background: #ecf0f1;
  color: #555;
  border-radius: 25px;
  font-size: 14px;
  margin: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.editor-content .tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.editor-content .tag-primary {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: #fff;
}

.editor-content .tag-success {
  background: linear-gradient(135deg, #27ae60, #229954);
  color: #fff;
}

.editor-content .tag-warning {
  background: linear-gradient(135deg, #f39c12, #d68910);
  color: #fff;
}

.editor-content .tag-danger {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff;
}

/* ==================== 高亮文本 ==================== */
.editor-content mark {
  background: linear-gradient(120deg, #fff3cd, #ffeaa7);
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 500;
  color: #856404;
  border: 1px solid #ffeeba;
}

.editor-content .highlight {
  background: linear-gradient(120deg, #ffeaa7 0%, #ffeaa7 100%);
  background-repeat: no-repeat;
  background-size: 100% 50%;
  background-position: 0 80%;
  padding: 0 6px;
  font-weight: 500;
  color: #856404;
  border-radius: 3px;
}

/* ==================== 响应式调整 ==================== */
@media (max-width: 768px) {
  .editor-content {
    font-size: 15px;
  }
  
  .editor-content h1 {
    font-size: 28px;
    margin: 40px 0 25px;
  }
  
  .editor-content h2 {
    font-size: 22px;
    margin: 35px 0 20px;
  }
  
  .editor-content h3 {
    font-size: 18px;
    margin: 30px 0 15px;
  }
  
  .editor-content h4 {
    font-size: 16px;
    margin: 25px 0 12px;
  }
  
  .editor-content .btn {
    padding: 10px 20px;
    font-size: 14px;
    margin: 8px 4px;
  }
  
  .editor-content blockquote {
    padding: 25px 30px;
  }
  
  .editor-content blockquote p {
    padding-left: 40px;
    font-size: 16px;
  }
  
  .editor-content .alert {
    padding: 20px 20px 20px 60px;
  }
  
  .editor-content .alert::before {
    left: 20px;
    font-size: 24px;
  }
  
  .editor-content table {
    font-size: 14px;
  }
  
  .editor-content th,
  .editor-content td {
    padding: 12px 15px;
  }
  
  .editor-content .card {
    padding: 25px;
  }
  
  .editor-content ul,
  .editor-content ol {
    padding-left: 25px;
  }
  
  .editor-content .list-check li {
    padding-left: 30px;
  }
  
  .editor-content .list-arrow li {
    padding-left: 25px;
  }
}
