* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #f0f8f0 0%, #e8f5e8 100%);
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 头部样式 */
.site-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8fdf8 100%);
    box-shadow: 0 4px 20px rgba(45, 74, 45, 0.1);
    padding: 12px 0;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    width: 100%;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(45, 74, 45, 0.1);
}

.header-container {
    width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo img {
    max-height: 70px;
}

/* Logo图标容器样式 */
.logo-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

/* AI文字图标样式 */
.logo-text-icon {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    background: linear-gradient(135deg, #4a7c59 0%, #6ba06b 50%, #4a7c59 100%);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 3px 8px rgba(74, 124, 89, 0.3),
        0 1px 4px rgba(74, 124, 89, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.5px;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.logo-text-icon:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 6px 20px rgba(74, 124, 89, 0.4),
        0 4px 12px rgba(74, 124, 89, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Logo装饰元素 */
.logo-icon-decoration {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #6ba06b, #4a7c59, #6ba06b);
    border-radius: 10px;
    z-index: 1;
    opacity: 0.6;
    animation: logoGlow 3s ease-in-out infinite alternate;
}

@keyframes logoGlow {
    0% {
        opacity: 0.4;
        transform: scale(1);
    }
    100% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

/* Logo文字样式 */
.logo-text {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    letter-spacing: -0.5px;
    text-shadow: 0 1px 2px rgba(45, 74, 45, 0.1);
}

.main-nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 20px;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 20px;
}

.nav-menu a:hover {
    color: #4a7c59;
    background-color: rgba(74, 124, 89, 0.1);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #333;
    font-size: 24px;
    cursor: pointer;
}

/* 公告栏样式 */
.announcement {
    background: linear-gradient(135deg, #f0f8f0 0%, #e8f5e8 100%);
    padding: 18px 0;
    margin-bottom: 25px;
    width: 100%;
    border-bottom: 1px solid rgba(74, 124, 89, 0.1);
}

.announcement-container {
    width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.announcement-container p {
    color: #333;
    font-size: 14px;
    line-height: 1.7;
    margin: 6px 0;
    font-weight: 400;
}

/* 容器样式 */
.container {
    width: 1200px;
    margin: 0 auto 30px;
    padding: 25px;
    background: linear-gradient(135deg, #ffffff 0%, #fafdfa 100%);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(45, 74, 45, 0.08);
    flex: 1;
    border: 1px solid rgba(74, 124, 89, 0.1);
    backdrop-filter: blur(10px);
}

.editor-container {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.editor-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(74, 124, 89, 0.15);
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #fafdfa 100%);
    box-shadow: 0 4px 16px rgba(45, 74, 45, 0.05);
    transition: all 0.3s ease;
}

.editor-section:hover {
    box-shadow: 0 6px 24px rgba(45, 74, 45, 0.1);
    transform: translateY(-2px);
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 15px;
    background: linear-gradient(135deg, #f0f8f0 0%, #e8f5e8 100%);
    border-bottom: 1px solid rgba(74, 124, 89, 0.15);
}

.copy-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.copy-options {
    display: flex;
    align-items: center;
    gap: 10px;
}

.copy-option {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
}

.copy-option input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.copy-option span {
    user-select: none;
}

.editor-header h3 {
    font-size: 17px;
    font-weight: 600;
    color: #333;
    letter-spacing: -0.3px;
}

.editor {
    height: 650px;
    padding: 20px;
    overflow-y: auto;
    background: linear-gradient(135deg, #ffffff 0%, #fafdfa 100%);
    font-size: 14px;
    line-height: 1.7;
    transition: all 0.3s ease;
    color: #333;
}

.editor:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(74, 124, 89, 0.2);
}

#markdownEditor {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Consolas', monospace;
    font-size: 13px;
    letter-spacing: 0.3px;
}

/* 预览区域HTML渲染样式 */
#previewEditor {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 拖拉框样式 */
.drag-over {
    background-color: rgba(74, 124, 89, 0.1);
    border: 2px dashed #4a7c59 !important;
}

/* 通用按钮样式 */
button {
    padding: 10px 20px;
    background: linear-gradient(135deg, #4a7c59 0%, #5a8c69 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(74, 124, 89, 0.2);
    letter-spacing: 0.3px;
}

button:hover {
    background: linear-gradient(135deg, #5a8c69 0%, #6a9c79 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(74, 124, 89, 0.3);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(74, 124, 89, 0.2);
}

.button-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: 20px;
    text-align: center;
    gap: 12px;
}

.export-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    width: 100%;
    max-width: 500px;
}

.excel-export-group {
    position: relative;
    display: inline-block;
}

.excel-format-options {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 200px;
    margin-top: 5px;
}

.excel-format-options button {
    display: block;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: white;
    color: #333;
    text-align: left;
    font-size: 14px;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    transition: background-color 0.2s ease;
}

.excel-format-options button:hover {
    background: #f5f5f5;
    transform: none;
    box-shadow: none;
}

.excel-format-options button:first-child {
    border-radius: 8px 8px 0 0;
}

.excel-format-options button:last-child {
    border-radius: 0 0 8px 8px;
}

/* 导出按钮基础样式 */
.button-container button {
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 500;
    width: 100%;
    max-width: 300px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: white;
}

/* Word导出按钮 - 温和蓝色主题 */
.button-container button:first-child {
    background: linear-gradient(135deg, #6B9BD2 0%, #8BB4E8 100%);
    color: white;
}

.button-container button:first-child:before {
    content: "📄";
    font-size: 16px;
    margin-right: 6px;
}

/* PDF导出按钮 - 温和红色主题 */
.button-container button:nth-child(2) {
    background: linear-gradient(135deg, #E57373 0%, #FF8A80 100%);
    color: white;
}

.button-container button:nth-child(2):before {
    content: "📋";
    font-size: 16px;
    margin-right: 6px;
}

/* Excel导出按钮 - 温和绿色主题 */
.button-container button:nth-child(3) {
    background: linear-gradient(135deg, #81C784 0%, #A5D6A7 100%);
    color: white;
}

.button-container button:nth-child(3):before {
    content: "📊";
    font-size: 16px;
    margin-right: 6px;
}

/* 图片导出按钮 - 温和紫色主题 */
.button-container button:last-child {
    background: linear-gradient(135deg, #BA68C8 0%, #CE93D8 100%);
    color: white;
}

.button-container button:last-child:before {
    content: "🖼️";
    font-size: 16px;
    margin-right: 6px;
}

/* 移除悬停动态效果 - 完全静态 */
.button-container button:hover {
    opacity: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: none !important;
    background: inherit !important;
    color: inherit !important;
}

/* 点击效果 */
.button-container button:active {
    opacity: 0.8;
}

/* 按钮状态样式 */
.button-container button.loading {
    pointer-events: none;
    opacity: 0.7;
}

.button-container button.success {
    background: linear-gradient(135deg, #27AE60 0%, #2ECC71 100%) !important;
}

/* 表格样式 */
table {
    border-collapse: collapse;
    width: 100%;
    margin: 15px 0;
    overflow-x: auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(45, 74, 45, 0.1);
}

table, th, td {
    border: 1px solid rgba(74, 124, 89, 0.2);
}

th, td {
    padding: 12px 16px;
    text-align: left;
    word-break: break-word;
}

th {
    background: linear-gradient(135deg, #f0f8f0 0%, #e8f5e8 100%);
    font-weight: 600;
    color: #333;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    margin: 18px 0 12px 0;
    color: #333;
    font-weight: 600;
    letter-spacing: -0.5px;
}

h1 { font-size: 2.2em; }
h2 { font-size: 1.8em; }
h3 { font-size: 1.5em; }
h4 { font-size: 1.3em; }
h5 { font-size: 1.1em; }
h6 { font-size: 1em; }

/* 强调文本样式 */
strong, b {
    font-weight: bold;
}

/* 底部样式 */
.site-footer {
    background: linear-gradient(135deg, #2d4a2d 0%, #3d5a3d 100%);
    color: #f0f8f0;
    padding: 25px 0;
    margin-top: auto;
    width: 100%;
}

.footer-container {
    width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-info p {
    margin: 5px 0;
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #f0f8f0;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 6px;
}

.footer-links a:hover {
    background-color: rgba(240, 248, 240, 0.1);
    transform: translateY(-1px);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .header-container,
    .announcement-container,
    .container,
    .footer-container {
        width: 100%;
        max-width: 100%;
        padding-left: 20px;
        padding-right: 20px;
        box-sizing: border-box;
    }
    
    .container {
        margin-left: 0;
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        width: 100%;
    }
    
    .header-container {
        padding: 0 15px;
    }

    .logo img {
        max-height: 40px;
    }

    /* 移动端Logo图标样式 */
    .logo-text-icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
        border-radius: 6px;
    }

    .logo-icon-decoration {
        border-radius: 8px;
    }

    .logo-text {
        font-size: 16px;
    }

    .menu-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background-color: #fff;
        flex-direction: column;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        padding: 10px 0;
        display: none;
        width: 100%;
        z-index: 1000;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        margin: 0;
        width: 100%;
    }

    .nav-menu a {
        display: block;
        padding: 10px 20px;
    }

    .editor-container {
        flex-direction: column;
        width: 100%;
    }

    .editor-section {
        margin-bottom: 20px;
        width: 100%;
    }
    
    .editor-header {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .editor {
        width: 100%;
        overflow-x: hidden;
    }

    .button-container {
        margin: 20px auto;
        padding: 0 15px;
        box-sizing: border-box;
    }

    .export-buttons {
        flex-direction: column;
        align-items: center;
        max-width: 300px;
        width: 100%;
    }

    .button-container button {
        width: 100%;
        margin-bottom: 12px;
        max-width: 300px;
        padding: 12px 18px;
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .button-container button:before {
        font-size: 14px !important;
        margin-right: 4px !important;
    }

    .footer-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        width: 100%;
    }

    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
        width: 100%;
    }
    
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* 确保容器不会超出视口宽度 */
    .container, 
    .editor-container,
    .button-container,
    .header-container,
    .announcement-container,
    .footer-container {
        max-width: 100vw;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    /* 调整标题字体大小以适应移动设备 */
    h1 { font-size: 1.8em; }
    h2 { font-size: 1.5em; }
    h3 { font-size: 1.3em; }
    h4, h5, h6 { font-size: 1.1em; }
    
    /* 编辑器区域更好的移动体验 */
    .editor {
        -webkit-overflow-scrolling: touch;
        padding: 10px;
    }
    
    /* 表格容器响应式处理 */
    .table-container {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
        margin: 10px auto;
        width: calc(100% - 20px);
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .editor {
        height: 450px;
        font-size: 14px;
    }
    
    .editor-header h3 {
        font-size: 14px;
    }
    
    .editor-header button {
        padding: 6px 12px;
        font-size: 12px;
    }

    .announcement-container p {
        font-size: 12px;
    }
    
    body {
        padding-top: 60px;
    }
    
    .site-header {
        padding: 5px 0;
    }
    
    pre, code {
        overflow-x: auto;
        white-space: pre-wrap;
        word-wrap: break-word;
    }
    
    /* 小屏幕上的按钮容器 */
    .button-container {
        padding: 0 5px;
    }
    
    .export-buttons {
        max-width: 250px;
    }
    
    .button-container button {
        max-width: 100%;
        font-size: 13px;
        padding: 10px 14px;
        margin-bottom: 8px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .button-container button:before {
        font-size: 12px !important;
        margin-right: 3px !important;
    }
}

/* 提示信息样式 */
.notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 18px 28px;
  border-radius: 12px;
  color: #fff;
  font-weight: 600;
  z-index: 1000;
  opacity: 0;
  box-shadow: 0 8px 32px rgba(45, 74, 45, 0.3);
  transition: all 0.3s ease;
  text-align: center;
  min-width: 280px;
  max-width: 80%;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.notification:before {
  font-family: 'FontAwesome';
  margin-right: 10px;
  font-size: 18px;
}

.notification.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.notification.success {
  background: linear-gradient(135deg, #4a7c59 0%, #5a8c69 100%);
}

.notification.success:before {
  content: "\f00c"; /* 成功图标 */
}

.notification.error {
  background: linear-gradient(135deg, #d32f2f 0%, #f44336 100%);
}

.notification.error:before {
  content: "\f00d"; /* 错误图标 */
}

.notification.warning {
  background: linear-gradient(135deg, #f57c00 0%, #ff9800 100%);
}

.notification.warning:before {
  content: "\f071"; /* 警告图标 */
}

.notification.info {
  background: linear-gradient(135deg, #4a7c59 0%, #6b8e6b 100%);
}

.notification.info:before {
  content: "\f05a"; /* 信息图标 */
}

/* 数学公式相关样式 */
.math-block {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, #f8fdf8 0%, #f0f8f0 100%);
    border-radius: 8px;
    border: 1px solid rgba(74, 124, 89, 0.2);
    box-shadow: 0 2px 8px rgba(45, 74, 45, 0.05);
    overflow-x: auto;
    font-family: 'Times New Roman', 'Cambria Math', serif;
}

/* MathJax渲染样式 */
.MathJax {
    padding: 0 5px;
    font-size: 1.1em !important;
    color: #333;
}

.mjx-chtml {
    display: inline-block;
    line-height: 1.2;
    text-indent: 0;
    text-align: center;
    font-size: 1.1em !important;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #333;
}

.mjx-math {
    display: inline-block;
}

/* 行内数学公式样式 */
.mjx-chtml.MJXc-display {
    display: block;
    text-align: center;
    margin: 15px 0;
}

/* 数学公式容器样式 */
#previewEditor .math-block {
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 数学公式在移动端的优化 */
@media (max-width: 768px) {
    .math-block {
        margin: 15px 0;
        padding: 10px;
        font-size: 0.9em;
    }
    
    .MathJax {
        font-size: 1em !important;
    }
    
    .mjx-chtml {
        font-size: 1em !important;
    }
}

/* Markdown渲染样式 - 标题 */
#previewEditor h1 {
    font-size: 2em;
    font-weight: bold;
    margin: 0.67em 0;
    color: #333;
    border-bottom: 2px solid #4a7c59;
    padding-bottom: 0.3em;
}

#previewEditor h2 {
    font-size: 1.5em;
    font-weight: bold;
    margin: 0.83em 0;
    color: #333;
    border-bottom: 1px solid #4a7c59;
    padding-bottom: 0.2em;
}

#previewEditor h3 {
    font-size: 1.17em;
    font-weight: bold;
    margin: 1em 0;
    color: #333;
}

#previewEditor h4 {
    font-size: 1em;
    font-weight: bold;
    margin: 1.33em 0;
    color: #333;
}

#previewEditor h5 {
    font-size: 0.83em;
    font-weight: bold;
    margin: 1.67em 0;
    color: #333;
}

#previewEditor h6 {
    font-size: 0.67em;
    font-weight: bold;
    margin: 2.33em 0;
    color: #333;
}

/* Markdown渲染样式 - 段落 */
#previewEditor p {
    margin: 1em 0;
    line-height: 1.6;
}

/* Markdown渲染样式 - 列表 */
#previewEditor ul {
    margin: 1em 0;
    padding-left: 0;
    list-style-type: none;
}

#previewEditor ol {
    margin: 1em 0;
    padding-left: 2em;
    list-style-type: decimal;
}

#previewEditor ul li {
    margin: 0.5em 0;
    line-height: 1.6;
    list-style-type: none;
}

#previewEditor ol li {
    margin: 0.5em 0;
    line-height: 1.6;
}

/* Markdown渲染样式 - 表格 */
#previewEditor table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(45, 74, 45, 0.1);
}

#previewEditor th, #previewEditor td {
    border: 1px solid #e0e0e0;
    padding: 12px 16px;
    text-align: left;
    vertical-align: top;
}

#previewEditor th {
    background-color: #f8fdf8;
    font-weight: bold;
    color: #333;
    border-bottom: 2px solid #4a7c59;
}

#previewEditor tr:nth-child(even) {
    background-color: #f8fdf8;
}

#previewEditor tr:hover {
    background-color: #f0f8f0;
}

/* Markdown渲染样式 - 链接 */
#previewEditor a {
    color: #4a7c59;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

#previewEditor a:hover {
    color: #333;
    border-bottom-color: #4a7c59;
}

/* Markdown渲染样式 - 强调 */
#previewEditor strong, #previewEditor b {
    font-weight: bold;
    color: #333;
}

#previewEditor em, #previewEditor i {
    font-style: italic;
    color: #4a6a4a;
}

/* Markdown渲染样式 - 分割线 */
#previewEditor hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, #4a7c59, transparent);
    margin: 2em 0;
}

/* 确保所有预览内容适应容器 */
#previewEditor img,
#previewEditor iframe,
#previewEditor embed,
#previewEditor object,
#previewEditor video {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 15px auto;
}

/* 代码块和行内代码的样式增强 */
#previewEditor pre {
    background: linear-gradient(135deg, #f0f8f0 0%, #e8f5e8 100%);
    border-radius: 8px;
    padding: 18px;
    overflow: auto;
    margin: 18px 0;
    border: 1px solid rgba(74, 124, 89, 0.2);
    box-shadow: 0 2px 8px rgba(45, 74, 45, 0.05);
}

#previewEditor code {
    background-color: rgba(74, 124, 89, 0.1);
    border-radius: 4px;
    padding: 0.3em 0.5em;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Consolas', monospace;
    font-size: 0.9em;
    color: #333;
}

#previewEditor pre code {
    background-color: transparent;
    padding: 0;
    font-size: 1em;
    white-space: pre;
    display: block;
    overflow-x: auto;
    color: #333;
}

/* 引用块样式增强 */
#previewEditor blockquote {
    border-left: 4px solid #4a7c59;
    color: #4a6a4a;
    margin: 18px 0;
    padding: 0 18px;
    background: linear-gradient(135deg, #f8fdf8 0%, #f0f8f0 100%);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

/* 确保代码块不会导致水平滚动 */
#previewEditor pre,
#previewEditor code {
    max-width: 100%;
}

/* 更好的移动端滚动体验 */
html, body {
    overflow-x: hidden;
    position: relative;
    width: 100%;
}

/* 数学公式样式 */
.math-formula-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.math-description {
    font-size: 14px;
    color: #495057;
    margin-bottom: 10px;
    font-weight: 500;
    line-height: 1.5;
}

.math-formulas {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.math-formula {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px 15px;
    font-family: 'Cambria Math', 'Times New Roman', serif;
    font-size: 16px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.math-formula:hover {
    border-color: #007bff;
    box-shadow: 0 2px 6px rgba(0,123,255,0.15);
}

/* MathJax公式样式优化 */
.MathJax {
    font-size: 1.1em !important;
}

/* 行内数学公式样式 */
.math-inline {
    background: #f1f3f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Cambria Math', 'Times New Roman', serif;
    font-size: 14px;
    margin: 0 2px;
}

/* 块级数学公式样式 */
.math-display {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* 数学符号特殊样式 */
.math-symbol {
    color: #007bff;
    font-weight: bold;
}

/* 上标字符样式 */
sup, .superscript {
    font-size: 0.75em;
    vertical-align: super;
    line-height: 0;
    position: relative;
    top: -0.3em;
    color: #333;
    font-weight: normal;
}

/* 上标数字和字母的特殊样式 */
.math-formula sup,
.math-formula .superscript,
.MathJax sup,
.MathJax .superscript {
    font-size: 0.7em;
    vertical-align: super;
    line-height: 0;
    position: relative;
    top: -0.4em;
    color: #333;
    font-weight: normal;
    font-family: inherit;
}

/* 确保上标字符在数学公式中正确显示 */
.math-formula,
.MathJax,
.mjx-chtml {
    font-variant-numeric: normal;
}

/* 上标字符的悬停效果 */
.math-formula:hover sup,
.math-formula:hover .superscript {
    color: #007bff;
    transition: color 0.2s ease;
}