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

body {
    font-family: 'Arial', sans-serif;
    background-color: #f7f9fb;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 70px;
}

/* 头部样式 */
.site-header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    width: 100%;
}

.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 {
    font-size: 24px;
    color: #4a6fa5;
    margin-right: 8px;
}

/* Logo文字样式 */
.logo-text {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
}

.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: color 0.3s;
}

.nav-menu a:hover {
    color: #4a6fa5;
}

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

/* 公告栏样式13635262735 */
.announcement {
    background-color: #f0f4f8;
    padding: 15px 0;
    margin-bottom: 20px;
    width: 100%;
}

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

.announcement-container p {
    color: #2c3e50;
    font-size: 14px;
    line-height: 1.6;
    margin: 5px 0;
}

/* 容器样式 */
.container {
    width: 1200px;
    margin: 0 auto 30px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    flex: 1;
}

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

.editor-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #f0f4f8;
    border-bottom: 1px solid #e0e0e0;
}

.editor-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.editor {
    height: 500px;
    padding: 15px;
    overflow-y: auto;
    background-color: #fff;
    font-size: 14px;
    line-height: 1.6;
    transition: border 0.3s ease, background-color 0.3s ease;
}

#markdownEditor {
    font-family: 'Consolas', monospace;
}

/* 预览区域样式 */
#previewEditor ul, #previewEditor ol {
    list-style-type: none;
    padding-left: 0;
    margin: 15px 0;
}

/* 列表项通用样式vxbd3000 */
#previewEditor li {
    position: relative;
    margin-bottom: 5px;
    display: block;
}

/* 有序列表项 */
#previewEditor li[data-list-type="ordered"] {
    padding-left: 2em;
}

/* 无序列表项 - 无任何缩进或标记 */
#previewEditor li[data-list-type="unordered"] {
    padding-left: 0;
}

/* 列表序号样式 */
.list-marker {
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 600;
}

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

/* 通用按钮样式 */
button {
    padding: 8px 16px;
    background-color: #4a6fa5;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #385a8a;
}

.button-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 20px;
    text-align: center;
}

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

.button-container button {
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    background-color: #34a853;
    min-width: 120px;
    flex: 1;
}

.button-container button:first-child {
    background-color: #4285f4;
}

.button-container button:hover {
    opacity: 0.9;
}

/* 表格样式 */
table {
    border-collapse: collapse;
    width: 100%;
    margin: 15px 0;
    overflow-x: auto;
}

table, th, td {
    border: 1px solid #ddd;
}

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

th {
    background-color: #f2f2f2;
    font-weight: bold;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    margin: 15px 0;
    color: #2c3e50;
}

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

/* 底部样式 */
.site-footer {
    background-color: #2c3e50;
    color: #fff;
    padding: 20px 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: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 0.8;
}

/* 响应式设计 */
@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;
    }

    .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: 10px;
        max-width: 300px;
    }

    .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: 350px;
        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: 14px;
        padding: 8px 15px;
    }
}

/* 提示信息样式www.qfju.com */
.notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 15px 25px;
  border-radius: 5px;
  color: #fff;
  font-weight: bold;
  z-index: 1000;
  opacity: 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  transition: opacity 0.3s, transform 0.3s;
  text-align: center;
  min-width: 250px;
  max-width: 80%;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

.notification.success {
  background-color: #4CAF50;
}

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

.notification.error {
  background-color: #f44336;
}

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

.notification.warning {
  background-color: #ff9800;
}

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

.notification.info {
  background-color: #2196F3;
}

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

/* 添加数学公式相关样式 */
.math-block {
    text-align: center;
    margin: 15px 0;
    font-family: Cambria Math, serif;
    font-size: 1.1em;
    overflow-x: auto;
    padding: 8px 0;
}

.MathJax {
    padding: 0 3px;
    font-size: 1.1em !important;
}

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

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

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

/* 代码块和行内代码的样式增强 */
#previewEditor pre {
    background-color: #f6f8fa;
    border-radius: 6px;
    padding: 16px;
    overflow: auto;
    margin: 16px 0;
    border: 1px solid #ddd;
}

#previewEditor code {
    background-color: rgba(175, 184, 193, 0.2);
    border-radius: 3px;
    padding: 0.2em 0.4em;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 0.9em;
}

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

/* 引用块样式增强 */
#previewEditor blockquote {
    border-left: 4px solid #dfe2e5;
    color: #6a737d;
    margin: 16px 0;
    padding: 0 16px;
    background-color: #f8f9fa;
}

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

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

/* 增强型媒体查询 */
@media (max-width: 768px) {
    /* 确保容器不会超出视口宽度 */
    .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;
    }
}