/* 基本样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 20px;
    height: 100vh;
    overflow: hidden;
}

.container {
    margin: 0 auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

main {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

h1 {
    color: #2c3e50;
}

h2 {
    color: #3498db;
    margin-bottom: 15px;
}

/* 三栏布局样式 */
.three-column-layout {
    display: flex;
    height: calc(100% - 200px); /* 减去使用说明区域的高度 */
    min-height: 400px;
    overflow: hidden;
    margin-bottom: 20px;
}

/* 左侧面板样式 */
.left-panel {
    width: 240px;
    min-width: 180px;
    max-width: 300px;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    overflow-y: auto;
    flex-shrink: 0;
}

.left-panel h2 {
    color: #3498db;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* 中间面板样式 */
.middle-panel {
    flex: 1;
    min-width: 250px;
    padding: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 右侧面板样式 */
.right-panel {
    flex: 1;
    min-width: 250px;
    padding: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 拖拽分隔线样式 */
.resizer {
    width: 6px;
    background: #f0f0f0;
    cursor: col-resize;
    border-radius: 3px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.resizer:hover, .resizer.active {
    background: #3498db;
}

/* 配置选项区域 */
.config-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.theme-selector-container, .indent-size-control, .line-number-toggle {
    margin-bottom: 10px;
}

/* 输入区域样式 */
#input-code {
    width: 100%;
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    resize: none;
    margin-bottom: 0;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

button {
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

#clear-btn {
    background-color: #e74c3c;
}

#clear-btn:hover {
    background-color: #c0392b;
}

/* Word复制按钮 */
#copy-word-btn {
    background-color: #8e44ad;
}

#copy-word-btn:hover {
    background-color: #7d3c98;
}

/* 输出区域样式 */
#output-code {
    width: 100%;
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    overflow: auto;
}

/* 代码内容样式 */
.code-content {
    font-family: 'Courier New', monospace;
    white-space: pre;
    padding: 10px;
    line-height: 1.5;
}

/* 错误消息样式 */
.error-message {
    padding: 10px;
    background-color: #ffebee;
    color: #d32f2f;
    border-left: 4px solid #f44336;
    margin-bottom: 10px;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* 代码行号样式 */
.code-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Courier New', monospace;
    border: 1px solid #eee;
}

/* 隐藏行号的样式 */
.hide-line-numbers .line-number {
    display: none;
    width: 0;
}

/* 当行号被隐藏时，调整代码行样式 */
.hide-line-numbers .code-line {
    padding-left: 10px;
    border-left: none;
}

.line-number {
    text-align: right;
    padding: 0 8px;
    color: #999;
    border-right: 1px solid #ddd;
    user-select: none;
    min-width: 50px;
    background-color: #f5f5f5;
    font-size: 0.9em;
}

.code-line {
    padding-left: 10px;
    white-space: pre;
}

/* 行悬停效果 */
.code-table tr:hover {
    background-color: #f0f8ff;
}

.code-table tr:hover .line-number {
    background-color: #e6e6e6;
    color: #333;
}

/* 表格边框样式 */
.code-table td {
    padding: 1px 0;
    border-bottom: 1px solid #f0f0f0;
}

/* 说明区域样式 */
.instructions {
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
    overflow-y: auto;
    max-height: 200px;
}

.instructions ol {
    padding-left: 20px;
    margin-bottom: 20px;
}

.instructions li {
    margin-bottom: 10px;
}

.feature-highlight {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    border-left: 4px solid var(--accent-color);
}

.feature-highlight h3 {
    margin-top: 0;
    color: var(--accent-color);
    font-size: 0.95em;
}

.feature-highlight p {
    margin-bottom: 0;
    font-size: 0.9em;
    line-height: 1.5;
}

/* 页脚样式 */
footer {
    text-align: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    color: #777;
    flex-shrink: 0;
}

/* 高亮主题样式 */
.theme-dark {
    background-color: #1e1e1e !important;
    color: #d4d4d4 !important;
    border-color: #333333 !important;
}
.theme-dark .line-number {
    background-color: #252526 !important;
    color: #858585 !important;
    border-right-color: #3e3e3e !important;
}
.theme-dark .code-table {
    border-color: #3e3e3e !important;
}
.theme-dark .code-table tr:hover {
    background-color: #264f78 !important;
}

.theme-light {
    background-color: #f8f8f8 !important;
    color: #383a42 !important;
    border-color: #e0e0e0 !important;
}
.theme-light .line-number {
    background-color: #f0f0f0 !important;
    color: #a0a1a7 !important;
    border-right-color: #e0e0e0 !important;
}
.theme-light .code-table {
    border-color: #e0e0e0 !important;
}
.theme-light .code-table tr:hover {
    background-color: #e6f3ff !important;
}

.theme-default {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #ddd !important;
}
.theme-default .line-number {
    background-color: #f5f5f5 !important;
    color: #999 !important;
    border-right-color: #ddd !important;
}
.theme-default .code-table {
    border-color: #ddd !important;
}
.theme-default .code-table tr:hover {
    background-color: #f0f8ff !important;
}

/* Word复制时的MSO样式 */
/* Microsoft Office特定样式 */
.mso-container {
    mso-font-charset: 0;
    mso-generic-font-family: modern;
    mso-font-pitch: fixed;
    mso-font-signature: 3 0 0 0 1 0;
}

.mso-table {
    mso-table-lspace: 0pt;
    mso-table-rspace: 0pt;
    mso-padding-alt: 0cm 0cm 0cm 0cm;
    mso-para-margin: 0cm;
    mso-para-margin-bottom: .0001pt;
    mso-pagination: widow-orphan;
    font-size: 10.0pt;
    font-family: "Courier New";
}

.mso-cell {
    mso-border-alt: none;
    padding: 0cm 5.4pt 0cm 5.4pt;
    mso-border-insideh: none;
    mso-border-insidev: none;
}

/* Word高亮元素样式 */
.word-code-line {
    mso-style-parent: style0;
    margin: 0cm;
    margin-bottom: .0001pt;
    line-height: normal;
    mso-pagination: none;
    font-size: 10.0pt;
    font-family: "Courier New";
    mso-fareast-font-family: "Times New Roman";
    mso-bidi-font-family: "Times New Roman";
    white-space: pre;
}

.word-highlight .hljs-keyword {
    color: blue !important;
    font-weight: bold !important;
    mso-style-textfill-fill-color: blue;
    mso-style-textfill-fill-alpha: 100%;
}

.word-highlight .hljs-comment {
    color: green !important;
    font-style: italic !important;
    mso-style-textfill-fill-color: green;
    mso-style-textfill-fill-alpha: 100%;
}

.word-highlight .hljs-string {
    color: #a31515 !important;
    mso-style-textfill-fill-color: #a31515;
    mso-style-textfill-fill-alpha: 100%;
}

.word-highlight .hljs-number {
    color: #098658 !important;
    mso-style-textfill-fill-color: #098658;
    mso-style-textfill-fill-alpha: 100%;
}

.word-highlight .hljs-function {
    color: #795E26 !important;
    font-weight: bold !important;
    mso-style-textfill-fill-color: #795E26;
    mso-style-textfill-fill-alpha: 100%;
}

.word-highlight .hljs-title {
    color: #795E26 !important;
    mso-style-textfill-fill-color: #795E26;
    mso-style-textfill-fill-alpha: 100%;
}

.word-highlight .hljs-params {
    color: #5c2699 !important;
    mso-style-textfill-fill-color: #5c2699;
    mso-style-textfill-fill-alpha: 100%;
}

.word-highlight .hljs-built_in {
    color: #0000ff !important;
    font-weight: bold !important;
    mso-style-textfill-fill-color: #0000ff;
    mso-style-textfill-fill-alpha: 100%;
}

/* 复制成功提示 */
.copy-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    background-color: #2ecc71;
    color: white;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: none;
}

.copy-toast.show {
    display: block;
    animation: fadeInOut 2s;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { opacity: 0; }
}

.copy-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 25px;
    border-radius: 5px;
    z-index: 1000;
}

/* 行号开关样式 */
.line-number-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 复制模式选择器样式 */
.copy-mode-toggle {
    margin-top: 8px;
    margin-bottom: 8px;
}

.copy-mode-toggle span {
    display: block;
    margin-bottom: 4px;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

/* 开关样式 */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .3s;
}

input:checked + .slider {
    background-color: #3498db;
}

input:focus + .slider {
    box-shadow: 0 0 1px #3498db;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.slider.round {
    border-radius: 20px;
}

.slider.round:before {
    border-radius: 50%;
}

/* 缩进大小控制样式 */
.indent-size-control {
    display: flex;
    align-items: center;
    gap: 5px;
}

.indent-size-control label {
    font-size: 0.9rem;
    color: #666;
}

#indent-size {
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background-color: white;
    color: #333;
    font-size: 0.9rem;
}

/* 移动端样式 */
@media (max-width: 768px) {
    .three-column-layout {
        flex-direction: column;
        height: auto;
    }
    
    .left-panel, .middle-panel, .right-panel {
        width: 100%;
        max-width: none;
        min-width: 0;
    }
    
    .resizer {
        display: none;
    }
    
    .button-group {
        flex-direction: row;
    }
    
    body {
        padding: 10px;
        height: auto;
        overflow: auto;
    }
    
    .container {
        height: auto;
        overflow: visible;
    }
    
    main {
        overflow: visible;
    }
    
    #input-code, #output-code {
        height: 250px;
    }
}

/* 拖拽相关样式 */
body.resizing {
    cursor: col-resize;
    user-select: none;
}

body.resizing .left-panel,
body.resizing .middle-panel,
body.resizing .right-panel {
    pointer-events: none;
    transition: none;
}

body.resizing #input-code,
body.resizing #output-code {
    cursor: col-resize;
}

/* 确保拖拽期间的文本不会被选中 */
body.resizing ::selection {
    background: transparent;
}

/* 自定义样式相关样式 */
.custom-style-container {
    margin-bottom: 15px;
}

#custom-style-btn {
    width: 100%;
    background-color: #9b59b6;
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#custom-style-btn:hover {
    background-color: #8e44ad;
}

/* 图标样式优化 */
button i, h1 i, h2 i, h3 i, label i, span i {
    margin-right: 5px;
}

/* 实时预览指示器 */
.live-preview-indicator {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    background-color: #f8f9fa;
    padding: 5px 10px;
    border-radius: 4px;
    border-left: 3px solid #2ecc71;
}

.live-preview-indicator span {
    font-size: 0.9rem;
    color: #333;
}

.live-preview-indicator i {
    color: #2ecc71;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* 样式预览区域改进 */
.style-preview-section {
    margin-top: 20px;
    background-color: #f8f9fa;
    border-radius: 5px;
    padding: 15px;
    border: 1px solid #e9ecef;
}

.style-preview-section h3 {
    margin-top: 0;
    color: #3498db;
}

.style-preview-sample {
    margin-top: 10px !important;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    overflow: auto;
    max-height: 200px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 改进模态框 */
.modal-content {
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* 样式设置组改进 */
.style-setting-group {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.style-setting-group h3 {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 10px;
    margin-top: 0;
    color: #3498db;
}

/* 样式操作区域改进 */
.style-actions {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 15px;
}

@media (max-width: 768px) {
    .style-actions {
        grid-template-columns: 1fr;
    }
}

/* 按钮组样式 */
.style-apply {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 样式预设下拉框美化 */
#style-preset-select {
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background-color: white;
    flex-grow: 1;
}

/* 自定义CSS编辑器改进 */
#custom-css {
    font-family: 'Consolas', 'Courier New', monospace;
    line-height: 1.5;
    border-radius: 4px;
    border: 1px solid #ddd;
    background-color: #f5f5f5;
    color: #333;
}

/* 选项卡样式改进 */
.tab-btn {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    font-weight: 500;
    border: 1px solid transparent;
}

.tab-btn.active {
    border: 1px solid #ddd;
    border-bottom: none;
    background-color: #3498db;
}

/* 优化左侧面板样式 */
.left-panel {
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.left-panel h2 {
    color: #3498db;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* 表单元素样式改进 */
.style-setting label {
    color: #555;
    font-weight: 500;
}

/* 样式导入文件输入框 */
#style-file-input {
    display: none;
}

/* 预设样式保存对话框 */
.preset-save-dialog {
    display: none;
    position: fixed;
    z-index: 1010;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow: auto;
}

.preset-dialog-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 8px;
    width: 80%;
    max-width: 400px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.preset-dialog-content h3 {
    margin-top: 0;
}

.preset-dialog-content input {
    width: 100%;
    padding: 8px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.preset-dialog-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
    gap: 10px;
}

/* 自定义滚动条样式 */
.custom-scrollbar::-webkit-scrollbar {
    width: 10px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 自定义样式相关样式 */
.custom-style-container {
    margin-bottom: 15px;
}

#custom-style-btn {
    width: 100%;
    background-color: #9b59b6;
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#custom-style-btn:hover {
    background-color: #8e44ad;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 12px;
    width: 80%;
    max-width: 1200px;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: #000;
    text-decoration: none;
}

/* 样式选项卡 */
.style-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.tab-btn {
    background-color: #f1f1f1;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 10px 16px;
    margin-right: 2px;
    font-size: 16px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    font-weight: 500;
    border: 1px solid transparent;
}

.tab-btn:hover {
    background-color: #ddd;
}

.tab-btn.active {
    background-color: #3498db;
    color: white;
    border: 1px solid #ddd;
    border-bottom: none;
}

.tab-panel {
    display: none;
    padding: 15px;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 5px 5px;
}

.tab-panel.active {
    display: block;
}

/* 样式设置区域 */
.style-settings {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.style-setting-group {
    flex: 1;
    min-width: 250px;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.style-setting-group h3 {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 10px;
    margin-top: 0;
    color: #3498db;
}

.style-setting {
    margin-bottom: 15px;
}

.style-setting label {
    display: inline-block;
    width: 120px;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

.style-setting input[type="range"] {
    width: 150px;
    vertical-align: middle;
}

.style-setting span {
    display: inline-block;
    width: 50px;
    text-align: center;
    margin-left: 10px;
}

.style-setting select {
    width: 180px;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.style-setting input[type="color"] {
    width: 50px;
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* 自定义 CSS 编辑器 */
.custom-css-container {
    padding: 15px;
}

.custom-css-container p {
    margin-bottom: 10px;
}

#custom-css {
    width: 100%;
    height: 300px;
    font-family: 'Consolas', 'Courier New', monospace;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    line-height: 1.5;
    background-color: #f5f5f5;
    color: #333;
}

/* 样式操作按钮 */
.style-actions {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 15px;
}

@media (max-width: 768px) {
    .style-actions {
        grid-template-columns: 1fr;
    }
}

.style-presets, .style-import-export, .style-apply {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.style-presets {
    flex: 2;
}

#style-preset-select {
    flex: 1;
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background-color: white;
    flex-grow: 1;
}

.style-import-export {
    flex: 1;
}

.style-apply {
    flex: 1;
    justify-content: flex-end;
    gap: 10px;
}

.style-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#save-as-preset-btn {
    background-color: #2ecc71;
}

#save-as-preset-btn:hover {
    background-color: #27ae60;
}

#delete-preset-btn {
    background-color: #e74c3c;
}

#delete-preset-btn:hover {
    background-color: #c0392b;
}

#import-style-btn, #export-style-btn {
    background-color: #3498db;
    color: white;
}

#import-style-btn:hover, #export-style-btn:hover {
    background-color: #2980b9;
}

#cancel-style-btn {
    background-color: #e74c3c;
    color: white;
}

#cancel-style-btn:hover {
    background-color: #c0392b;
}

#apply-style-btn {
    background-color: #2ecc71;
    color: white;
}

#apply-style-btn:hover {
    background-color: #27ae60;
}

/* 自定义对话框样式 */
.dialog-container {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    overflow: hidden;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.dialog {
    position: relative;
    max-width: 500px;
    width: 90%;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    margin: 10px;
}

.dialog-show {
    opacity: 1;
    transform: translateY(0);
}

.dialog-box {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    background-color: #f8f9fa;
}

.dialog-title {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.dialog-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    color: #aaa;
    line-height: 1;
    padding: 0;
    margin: 0;
}

.dialog-close:hover {
    color: #333;
}

.dialog-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.dialog-message {
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    margin-bottom: 15px;
}

.dialog-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    margin-top: 10px;
}

.dialog-input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3);
}

.dialog-footer {
    padding: 15px 20px;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #e9ecef;
    gap: 10px;
}

.dialog-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.dialog-btn-cancel {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.dialog-btn-cancel:hover {
    background-color: #e9ecef;
}

.dialog-btn-confirm {
    background-color: #3498db;
    color: white;
}

.dialog-btn-confirm:hover {
    background-color: #2980b9;
}

/* 图标样式 */
.dialog-body {
    position: relative;
}

.dialog-icon {
    margin-right: 15px;
    width: 32px;
    height: 32px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    flex-shrink: 0;
    margin-bottom: 10px;
}

/* 不同类型的对话框样式 */
.dialog-info .dialog-icon-info {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="%233498db"><path d="M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"/></svg>');
}

.dialog-success .dialog-icon-success {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="%232ecc71"><path d="M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"/></svg>');
}

.dialog-warning .dialog-icon-warning {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="%23f39c12"><path d="M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"/></svg>');
}

.dialog-error .dialog-icon-error {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="%23e74c3c"><path d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z"/></svg>');
}

/* Toast通知样式 */
.dialog-toast {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    padding: 15px 20px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    max-width: 400px;
    width: 90%;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 2001;
}

.dialog-toast-show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.dialog-toast-icon {
    width: 24px;
    height: 24px;
    margin-right: 15px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.dialog-toast-message {
    flex-grow: 1;
    font-size: 14px;
    color: #333;
}

/* 不同类型的toast样式 */
.dialog-toast-info {
    border-left: 4px solid #3498db;
}

.dialog-toast-success {
    border-left: 4px solid #2ecc71;
}

.dialog-toast-warning {
    border-left: 4px solid #f39c12;
}

.dialog-toast-error {
    border-left: 4px solid #e74c3c;
}

/* 复制模式相关样式 */
.copy-mode-toggle {
    margin-bottom: 10px;
}

.copy-mode-toggle span {
    font-size: 0.95rem;
    color: #666;
}

.radio-group {
    display: flex;
    margin-top: 5px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

/* 纯文本行号开关样式 */
.text-line-numbers-toggle {
    margin-bottom: 10px;
    padding-left: 20px;
    border-left: 3px solid #f0f0f0;
    animation: fadeIn 0.3s ease-in-out;
}

.text-line-numbers-toggle .switch-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.text-line-numbers-toggle span {
    font-size: 0.9rem;
    color: #666;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
} 