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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f3f4f6;
    background-image: 
        radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(59, 130, 246, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.1) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(59, 130, 246, 0.1) 0px, transparent 50%);
    color: #1f2937;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding-top: 70px;
    overflow: hidden;
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        overflow-y: auto;
        height: auto;
        min-height: 100vh;
    }
}

/* 头部样式 */
.site-header {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
    padding: 12px 0;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    width: 100%;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.header-container {
    width: 1400px;
    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, #10b981 0%, #059669 100%);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 4px 6px -1px rgba(16, 185, 129, 0.3),
        0 2px 4px -1px rgba(16, 185, 129, 0.1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.5px;
    position: relative;
    z-index: 2;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-text-icon:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 10px 15px -3px rgba(16, 185, 129, 0.4),
        0 4px 6px -2px rgba(16, 185, 129, 0.2);
}

/* Logo装饰元素 */
.logo-icon-decoration {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #34d399, #059669);
    border-radius: 12px;
    z-index: 1;
    opacity: 0.6;
    filter: blur(4px);
    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: 20px;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: -0.5px;
}

.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: #4b5563;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s ease;
    padding: 8px 16px;
    border-radius: 8px;
}

.nav-menu a:hover {
    color: #10b981;
    background-color: rgba(16, 185, 129, 0.08);
}

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

/* 公告栏样式 */
.announcement {
    background: rgba(255, 255, 255, 0.5);
    padding: 12px 0;
    margin-bottom: 30px;
    width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(5px);
}

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

.announcement-container p {
    color: #4b5563;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 容器样式 */
    .container {
        width: 1400px;
        margin: 0 auto;
        padding: 20px 30px;
        background: #ffffff;
        border-radius: 24px;
        box-shadow: 
            0 10px 15px -3px rgba(0, 0, 0, 0.05),
            0 4px 6px -2px rgba(0, 0, 0, 0.025);
        flex: 1;
        border: 1px solid rgba(255, 255, 255, 0.5);
        backdrop-filter: none;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        max-height: calc(100vh - 90px);
    }
    
    @media (max-width: 768px) {
        .container {
            max-height: none;
            height: auto;
            min-height: auto;
            overflow: visible;
            padding: 15px;
            border-radius: 16px;
        }
    }

    .editor-container {
        display: flex;
        gap: 24px;
        margin-bottom: 15px;
        flex: 1;
        min-height: 0;
    }
    
    @media (max-width: 768px) {
        .editor-container {
            gap: 20px;
            margin-bottom: 15px;
            flex: 0 1 auto;
            min-height: 600px;
        }
    }

.editor-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 0;
}

.editor-section:hover {
    box-shadow: 
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
    border-color: #d1d5db;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.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: 16px;
    font-weight: 600;
    color: #374151;
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.editor {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: #ffffff;
    font-size: 15px;
    line-height: 1.75;
    transition: all 0.3s ease;
    color: #374151;
    min-height: 0;
}

.editor:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(16, 185, 129, 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: #2d4a2d;
    word-wrap: normal;
    overflow-wrap: normal;
    white-space: normal;
}

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

/* 通用按钮样式 */
button {
    padding: 8px 16px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    letter-spacing: 0.3px;
}

button:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

button:active {
    transform: translateY(0);
    background: #047857;
}

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

.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导出按钮 - 温和蓝色主题 */
#exportWordBtn {
    background: #3b82f6;
    color: white;
}

#exportWordBtn:hover {
    background: #2563eb;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* PDF导出按钮 - 温和红色主题 */
#exportPdfBtn {
    background: #ef4444;
    color: white;
}

#exportPdfBtn:hover {
    background: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Excel导出按钮 - 温和绿色主题 */
#exportExcelBtn {
    background: #10b981;
    color: white;
}

#exportExcelBtn:hover {
    background: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* 图片导出按钮 - 温和紫色主题 */
#exportImageBtn {
    background: #8b5cf6;
    color: white;
}

#exportImageBtn:hover {
    background: #7c3aed;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* 按钮图标样式 */
.button-container button i {
    font-size: 16px;
    margin-right: 4px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .button-container button i {
        font-size: 15px;
        margin-right: 6px;
    }
}

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

@media print {
    /* 隐藏不需要打印的元素 */
    .site-header, 
    .announcement, 
    .editor-section:first-child, /* 隐藏左侧编辑器 */
    .button-container, 
    .site-footer,
    .copy-controls,
    .notification,
    .modal,
    .editor-header button {
        display: none !important;
    }

    /* 重置容器样式 */
    body {
        padding-top: 0;
        background: white;
        height: auto;
        overflow: visible;
    }

    .container {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        box-shadow: none;
        border: none;
        background: white;
    }

    .editor-container {
        display: block;
        margin: 0;
        gap: 0;
    }

    .editor-section {
        border: none;
        box-shadow: none;
        overflow: visible;
        height: auto;
    }

    .editor-header {
        display: none; /* 也不需要显示预览区标题 */
    }

    .editor {
        height: auto;
        overflow: visible;
        padding: 0;
        border: none;
    }

    /* 优化打印排版 */
    #previewEditor {
        font-size: 12pt;
        line-height: 1.5;
        color: black;
    }

    /* 强制背景打印 */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    /* 保持样式一致性 */
    #previewEditor h1 { font-size: 24pt; margin-top: 0; color: #111827; border-bottom: 2pt solid #10b981; }
    #previewEditor h2 { font-size: 18pt; color: #1f2937; border-bottom: 1pt solid #e5e7eb; }
    #previewEditor table { width: 100%; border-collapse: collapse; margin: 1em 0; page-break-inside: avoid; }
    #previewEditor th { background-color: #f9fafb !important; color: #374151; font-weight: bold; border: 1pt solid #e5e7eb; }
    #previewEditor td { border: 1pt solid #e5e7eb; }
    #previewEditor blockquote { border-left: 4pt solid #10b981; background-color: #f9fafb !important; }
    #previewEditor code { background-color: #f3f4f6 !important; border: 1pt solid #e5e7eb; }
    #previewEditor pre { background-color: #1f2937 !important; color: #e5e7eb; page-break-inside: avoid; }
    
    /* 分页控制 */
    h1, h2, h3 { page-break-after: avoid; }
    img, table, pre { page-break-inside: avoid; }
}

/* 按钮状态样式 */
.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: normal;
}

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

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    margin: 18px 0 12px 0;
    color: #2d4a2d;
    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: #1f2937;
    color: #9ca3af;
    padding: 12px 0;
    margin-top: auto;
    width: 100%;
    border-top: 1px solid #374151;
}

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

.footer-container p {
    margin: 0;
    font-size: 13px;
}

.footer-container a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-container a:hover {
    color: #ffffff;
}

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

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

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

.footer-links a:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

/* 响应式设计 */
@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%;
        gap: 20px;
    }

    .editor-section {
        margin-bottom: 0;
        width: 100%;
        min-height: 300px;
        flex: 1;
    }
    
    .editor-header {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 16px;
    }
    
    .editor-header h3 {
        font-size: 15px;
    }
    
    .editor-header button {
        padding: 10px 18px;
        font-size: 14px;
        min-height: 40px;
    }
    
    .editor {
        width: 100%;
        overflow-x: hidden;
        padding: 16px;
        min-height: 250px;
        font-size: 16px;
    }

    .button-container {
        margin: 20px auto;
        padding: 0 15px;
        box-sizing: border-box;
        width: 100%;
        overflow: visible;
        flex-shrink: 0;
    }

    .export-buttons {
        flex-direction: column;
        align-items: stretch;
        max-width: 100%;
        width: 100%;
        gap: 12px;
        overflow: visible;
        flex-shrink: 0;
    }

    .button-container button {
        width: 100%;
        margin-bottom: 0;
        max-width: 100%;
        padding: 12px 16px;
        font-size: 14px;
        white-space: normal;
        word-wrap: break-word;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.4;
        flex-shrink: 0;
    }
    
    .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,
    .header-container,
    .announcement-container,
    .footer-container {
        max-width: 100vw;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    /* 按钮容器特殊处理，确保完整显示 */
    .button-container {
        max-width: 100vw;
        width: 100%;
        box-sizing: border-box;
        overflow-x: visible;
        overflow-y: visible;
    }
    
    /* 调整标题字体大小以适应移动设备 */
    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: 16px;
        min-height: 280px;
        font-size: 16px;
    }
    
    /* 移动端编辑器区域增加触摸友好性 */
    .editor-section {
        min-height: 320px;
    }
    
    /* 表格容器响应式处理 */
    .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;
        overflow-y: visible;
        max-height: none;
        height: auto;
    }

    .editor-section {
        min-height: 350px;
    }

    .editor {
        min-height: 300px;
        height: auto;
        font-size: 16px;
        padding: 16px;
        -webkit-tap-highlight-color: transparent;
    }
    
    .editor-header {
        padding: 12px 14px;
    }
    
    .editor-header h3 {
        font-size: 14px;
    }
    
    .editor-header button {
        padding: 10px 16px;
        font-size: 13px;
        min-height: 44px;
        min-width: 100px;
    }

    .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: normal;
    }
    
    /* 小屏幕上的按钮容器 */
    .button-container {
        padding: 0 10px;
        width: 100%;
        overflow: visible;
        flex-shrink: 0;
        margin-bottom: 20px;
    }
    
    .export-buttons {
        max-width: 100%;
        width: 100%;
        gap: 10px;
        overflow: visible;
        flex-shrink: 0;
    }
    
    .button-container button {
        max-width: 100%;
        width: 100%;
        font-size: 13px;
        padding: 12px 14px;
        margin-bottom: 0;
        white-space: normal;
        word-wrap: break-word;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.4;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        flex-shrink: 0;
    }
    
    .button-container button i {
        font-size: 14px;
        margin-right: 6px;
        flex-shrink: 0;
    }
    
    .button-container button:before {
        font-size: 13px !important;
        margin-right: 4px !important;
    }
}

/* 提示信息样式 */
.notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 16px 24px;
  border-radius: 12px;
  color: #fff;
  font-weight: 500;
  z-index: 1000;
  opacity: 0;
  box-shadow: 
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  min-width: 280px;
  max-width: 80%;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
}

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

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

.notification.success {
  background: rgba(16, 185, 129, 0.95);
}

.notification.success:before {
  content: "\f00c";
}

.notification.error {
  background: rgba(239, 68, 68, 0.95);
}

.notification.error:before {
  content: "\f00d";
}

.notification.warning {
  background: rgba(245, 158, 11, 0.95);
}

.notification.warning:before {
  content: "\f071";
}

.notification.info {
  background: rgba(59, 130, 246, 0.95);
}

.notification.info:before {
  content: "\f05a";
}

/* 数学公式相关样式 */
.math-block {
    text-align: center;
    margin: 24px 0;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
    font-family: 'Times New Roman', 'Cambria Math', serif;
}

/* 块级数学公式显示样式 */
.math-block-display {
    display: block;
    text-align: center;
    margin: 24px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8fdf8 0%, #f0f8f0 100%);
    border-radius: 12px;
    border: 1px solid rgba(74, 124, 89, 0.2);
    box-shadow: 0 2px 8px rgba(45, 74, 45, 0.08);
    overflow-x: auto;
}

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

.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: #2d4a2d;
}

.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: 700;
    margin: 0.67em 0;
    color: #111827;
}

#previewEditor h2 {
    font-size: 1.5em;
    font-weight: 700;
    margin: 0.83em 0;
    color: #1f2937;
}

#previewEditor h3 {
    font-size: 1.25em;
    font-weight: 600;
    margin: 1em 0;
    color: #374151;
}

#previewEditor h4 {
    font-size: 1.1em;
    font-weight: 600;
    margin: 1.33em 0;
    color: #374151;
}

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

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

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

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

/* 嵌套在有序列表项内的无序列表，统一缩进 */
#previewEditor ol li > ul,
#previewEditor ol > li ul {
    margin: 0.4em 0;
    padding-left: 2em !important;
    margin-left: 0;
}

/* 有序列表样式 - 使用默认decimal配合start属性 */
#previewEditor ol {
    margin: 0.8em 0;
    padding-left: 2.5em;
    list-style-type: decimal;
    font-size: 1em;
    margin-left: 0;
}

/* 确保所有嵌套层级的ol都有一致的左边距 */
#previewEditor li > ol,
#previewEditor ul ol,
#previewEditor p + ol {
    margin: 0.5em 0;
    padding-left: 2.5em;
    margin-left: 0;
}

#previewEditor ol > li {
    margin: 0.4em 0;
    line-height: 1.6;
    font-size: 1em;
}

#previewEditor ul li,
#previewEditor ul ul li,
#previewEditor ul ul ul li {
    margin: 0.4em 0;
    padding-left: 0;
    line-height: 1.6;
    list-style: none !important;
    list-style-type: none !important;
    font-size: 1em;
    position: relative;
}

/* 确保无序列表没有任何符号 */
#previewEditor ul li::before,
#previewEditor ul li::marker {
    content: none !important;
    display: none !important;
}

/* Markdown渲染样式 - 表格（美化版） */
#previewEditor table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.5em 0;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    font-size: 0.95em;
    border: 1px solid #d1d5db;
}

#previewEditor th, #previewEditor td {
    padding: 14px 18px;
    text-align: left;
    vertical-align: middle;
    font-size: 1em;
    border: 1px solid #d1d5db;
}

#previewEditor th {
    background: linear-gradient(135deg, #4a7c59 0%, #3d6b4a 100%);
    font-weight: 600;
    color: #ffffff;
    text-transform: none;
    letter-spacing: 0.3px;
    position: relative;
    border: 1px solid #3d6b4a;
}

#previewEditor th:first-child {
    border-top-left-radius: 12px;
}

#previewEditor th:last-child {
    border-top-right-radius: 12px;
}

#previewEditor td {
    color: #374151;
    background-color: #ffffff;
    transition: background-color 0.2s ease;
}

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

#previewEditor tr:hover td {
    background-color: #ecfdf5;
}

#previewEditor tr:last-child td {
    border-bottom: 1px solid #d1d5db;
}

#previewEditor tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

#previewEditor tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

/* 表格内的强调文字 */
#previewEditor td strong,
#previewEditor td b {
    color: #2d5a3d;
    font-weight: 600;
}

/* 表格容器 - 支持横向滚动 */
#previewEditor .table-container {
    width: 100%;
    overflow-x: auto;
    margin: 1.5em 0;
    border-radius: 12px;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

#previewEditor .table-container table {
    margin: 0;
    box-shadow: none;
    border-radius: 0;
}

/* Markdown渲染样式 - 链接 */
#previewEditor a {
    color: #10b981;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
    font-size: 1em;
}

#previewEditor a:hover {
    color: #059669;
    border-bottom-color: #10b981;
}

/* Markdown渲染样式 - 强调 */
#previewEditor strong, #previewEditor b {
    font-weight: bold;
    color: #2d4a2d;
    font-size: 1em;
}

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

/* Markdown渲染样式 - 分割线（隐藏） */
#previewEditor hr {
    display: none;
    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: #1f2937;
    border-radius: 8px;
    padding: 20px;
    overflow: auto;
    margin: 20px 0;
    border: 1px solid #374151;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

#previewEditor code {
    background-color: #f3f4f6;
    border-radius: 4px;
    padding: 0.2em 0.4em;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Consolas', monospace;
    font-size: 0.9em;
    color: #ef4444;
}

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

/* 引用块样式增强 */
#previewEditor blockquote {
    border-left: 4px solid #10b981;
    color: #4b5563;
    margin: 20px 0;
    padding: 8px 20px;
    background: #f9fafb;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    font-size: 1em;
}

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

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

/* 数学公式样式 */
#previewEditor .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);
    font-size: 1em;
}

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

#previewEditor .math-formulas {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 1em;
}

#previewEditor .math-formula {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px 15px;
    font-family: 'Cambria Math', 'Times New Roman', serif;
    font-size: 1em;
    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公式样式优化 */
#previewEditor .MathJax {
    font-size: 1em !important;
}

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

/* 块级数学公式样式 */
#previewEditor .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);
    font-size: 1em;
}

/* 数学符号特殊样式 */
.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: #2d4a2d;
    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: #2d4a2d;
    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;
}

/* 根号样式修复 - 确保MathJax根号正确显示 */
#previewEditor .mjx-msqrt {
    display: inline-block;
    vertical-align: baseline;
    position: relative;
    line-height: 1;
}

/* 根号容器盒子 */
#previewEditor .mjx-msqrt > .mjx-box {
    display: inline-flex;
    align-items: baseline;
    position: relative;
    vertical-align: baseline;
}

/* 根号符号（surd - √符号本身）样式 */
#previewEditor .mjx-msqrt .mjx-surd {
    display: inline-block;
    vertical-align: baseline;
    position: relative;
    line-height: 1;
    font-size: 1em;
}

/* 根号内容区域（根号下的内容）样式 */
#previewEditor .mjx-msqrt .mjx-root {
    display: inline-block;
    vertical-align: baseline;
    position: relative;
    margin-left: 1px;
}

/* 确保根号内的数学表达式正确显示 */
#previewEditor .mjx-msqrt .mjx-mrow,
#previewEditor .mjx-msqrt .mjx-mstyle {
    display: inline-block;
    vertical-align: baseline;
}

/* 块级公式中的根号特殊处理 */
#previewEditor .mjx-chtml.MJXc-display .mjx-msqrt,
#previewEditor .mjx-container.MJXc-display .mjx-msqrt,
#previewEditor .math-display .mjx-msqrt {
    display: inline-block;
    vertical-align: baseline;
}

/* 修复根号在复杂表达式中的对齐问题 */
#previewEditor .mjx-msqrt .mjx-mrow > .mjx-box {
    vertical-align: baseline;
}

/* 确保根号的上横线正确显示 */
#previewEditor .mjx-msqrt .mjx-overline {
    display: inline-block;
    vertical-align: baseline;
    border-top: 1px solid currentColor;
    margin-top: -1px;
}

/* 修复嵌套根号的情况 */
#previewEditor .mjx-msqrt .mjx-msqrt {
    vertical-align: baseline;
}

/* 确保根号在分数中的正确显示 */
#previewEditor .mjx-mfrac .mjx-msqrt {
    vertical-align: middle;
}

/* 确保根号在上下标中的正确显示 */
#previewEditor .mjx-msub .mjx-msqrt,
#previewEditor .mjx-msup .mjx-msqrt,
#previewEditor .mjx-msubsup .mjx-msqrt {
    vertical-align: baseline;
}

/* 隐私政策弹窗 - 右下角提示 */
.privacy-popup {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 0;
    z-index: 9999;
    max-width: 360px;
    border: none;
    animation: slideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.privacy-popup.hidden {
    display: none;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.privacy-content {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.privacy-content p {
    margin: 0;
    padding: 18px 20px 12px 20px;
    font-size: 15px;
    color: #1a1a1a;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border-bottom: 1px solid #e5e7eb;
}

.privacy-content p::before {
    content: "🛡️";
    font-size: 20px;
}

.privacy-content a {
    color: #059669;
    font-size: 13px;
    text-decoration: none;
    padding: 12px 20px;
    display: block;
    transition: all 0.2s;
}

.privacy-content a:hover {
    background: #f9fafb;
    color: #047857;
}

.privacy-content button {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    margin: 12px 16px 16px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.privacy-content button:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* 隐私政策详情模态框 */
.privacy-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.privacy-modal.show {
    display: flex;
}

.privacy-modal-content {
    background: white;
    border-radius: 20px;
    max-width: 560px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: modalFadeIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.privacy-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.privacy-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-modal {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.privacy-modal-body {
    padding: 28px;
    overflow-y: auto;
    max-height: calc(85vh - 160px);
}

.privacy-modal-body h4 {
    color: #059669;
    margin: 24px 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.privacy-modal-body h4::before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
}

.privacy-modal-body h4:first-child {
    margin-top: 0;
}

.privacy-modal-body p {
    color: #4b5563;
    line-height: 1.8;
    margin: 10px 0;
    font-size: 14px;
}

.privacy-modal-body ul {
    margin: 12px 0;
    padding-left: 0;
    list-style: none;
}

.privacy-modal-body li {
    color: #4b5563;
    line-height: 1.8;
    margin: 10px 0;
    font-size: 14px;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 10px;
}

.privacy-modal-body li strong {
    color: #1f2937;
    display: block;
    margin-bottom: 4px;
}

.privacy-update {
    color: #9ca3af !important;
    font-size: 12px !important;
    margin-top: 24px !important;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.privacy-modal-footer {
    padding: 20px 28px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    text-align: center;
    border-top: 1px solid #e5e7eb;
}

.privacy-modal-footer button {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 14px 48px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.privacy-modal-footer button:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .privacy-popup {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .privacy-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .privacy-modal-body {
        max-height: calc(90vh - 140px);
    }
}