/* 导出部分 */
.export-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
}

.export-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
    align-items: center;
}

.option-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

input[type="number"] {
    width: 80px;
}

#copy-btn {
    margin-left: auto;
    padding: 10px 20px;
    font-size: 15px;
    background-color: #4a6cf7;
}

#copy-btn:hover {
    background-color: #3a57d7;
}

#export-btn {
    margin-left: 10px;
    padding: 10px 20px;
    font-size: 15px;
    background-color: #22c55e;
}

#export-btn:hover {
    background-color: #16a34a;
}

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

body {
    font-family: "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

button {
    cursor: pointer;
    background: #4a6cf7;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.3s ease;
}

button:hover {
    background: #3a57d7;
}

select, input[type="number"], input[type="color"] {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* 布局 */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 1.5rem 2rem;
    text-align: center;
}

header p {
    color: #666;
    font-size: 16px;
}

main {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.container {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex: 1;
    min-height: 500px;
}

@media (max-width: 1024px) {
    .container {
        flex-direction: column;
    }
}

/* 编辑器部分 */
.editor-section {
    flex: 1;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    position: relative;
}

.editor-header {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

.CodeMirror {
    height: auto !important;
    min-height: 500px;
    font-size: 15px;
    flex: 1;
    width: 100%;
    border: none;
}

.CodeMirror-scroll {
    min-height: 500px;
    max-height: calc(100vh - 250px);
    overflow-y: auto !important;
}

/* 预览部分 */
.preview-section {
    flex: 1;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.preview-header {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.preview-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.transparent-bg {
    display: flex;
    align-items: center;
    margin-left: 8px;
    user-select: none;
}

#preview-container {
    flex: 1;
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
    background-image: linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
                      linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
                      linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

#svg-preview {
    max-width: 100%;
    max-height: 100%;
    transition: transform 0.3s ease;
}

/* 编辑器区域优化 */
textarea#svg-code {
    display: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .CodeMirror, .CodeMirror-scroll {
        min-height: 350px;
    }
}

/* 页脚 */
footer {
    margin-top: auto;
    text-align: center;
    padding: 1.5rem;
    color: #666;
    background-color: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
} 