/* 全局样式 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
color: #333;
}
.container {
max-width: 1400px;
margin: 0 auto;
padding: 20px;
}
/* 头部样式 */
.header {
text-align: center;
margin-bottom: 30px;
color: white;
}
.header h1 {
font-size: 2.5rem;
margin-bottom: 10px;
text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}
.subtitle {
font-size: 1.2rem;
opacity: 0.9;
}
/* 主要内容布局 */
.main-content {
display: grid;
grid-template-columns: 1fr 350px 1fr;
gap: 20px;
margin-bottom: 30px;
}
/* 面板通用样式 */
.panel-header {
background: linear-gradient(135deg, #667eea, #764ba2);
color: white;
padding: 15px 20px;
border-radius: 10px 10px 0 0;
display: flex;
justify-content: space-between;
align-items: center;
}
.panel-header h2 {
font-size: 1.3rem;
margin: 0;
}
/* 编辑器面板 */
.editor-panel {
background: white;
border-radius: 10px;
box-shadow: 0 10px 30px rgba(0,0,0,0.1);
overflow: hidden;
}
.editor-container {
height: 600px;
position: relative;
}
.editor-container .CodeMirror {
height: 100%;
font-size: 14px;
}
#markdownEditor {
width: 100%;
height: 100%;
border: none;
padding: 20px;
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
font-size: 14px;
line-height: 1.6;
resize: none;
outline: none;
}
/* 配置面板 */
.config-panel {
background: white;
border-radius: 10px;
box-shadow: 0 10px 30px rgba(0,0,0,0.1);
overflow: hidden;
}
.config-content {
padding: 20px;
max-height: 600px;
overflow-y: auto;
}
.config-group {
margin-bottom: 25px;
}
.config-group h3 {
color: #667eea;
margin-bottom: 15px;
font-size: 1.1rem;
border-bottom: 2px solid #e0e0e0;
padding-bottom: 5px;
}
.form-group {
margin-bottom: 15px;
}
.form-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 15px;
}
.form-group label {
display: block;
margin-bottom: 5px;
font-weight: 600;
color: #555;
}
.form-group input,
.form-group select {
width: 100%;
padding: 10px;
border: 2px solid #e0e0e0;
border-radius: 5px;
font-size: 14px;
transition: border-color 0.3s;
}
.form-group input:focus,
.form-group select:focus {
outline: none;
border-color: #667eea;
}
.form-group input[type="range"] {
padding: 0;
}
#qualityValue {
display: inline-block;
margin-left: 10px;
font-weight: bold;
color: #667eea;
}
/* 预设尺寸按钮 */
.preset-sizes {
display: flex;
gap: 10px;
flex-wrap: wrap;
}
.preset-btn {
padding: 8px 12px;
border: 2px solid #667eea;
background: white;
color: #667eea;
border-radius: 5px;
cursor: pointer;
font-size: 12px;
transition: all 0.3s;
}
.preset-btn:hover {
background: #667eea;
color: white;
}
/* 样式网格 */
.style-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
gap: 10px;
max-height: 200px;
overflow-y: auto;
}
.style-item {
padding: 15px;
border: 2px solid #e0e0e0;
border-radius: 8px;
cursor: pointer;
transition: all 0.3s;
text-align: center;
position: relative;
}
.style-item:hover {
border-color: #667eea;
transform: translateY(-2px);
}
.style-item.selected {
border-color: #667eea;
background: #f0f4ff;
}
.style-preview {
width: 100%;
height: 60px;
border-radius: 5px;
margin-bottom: 8px;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 12px;
font-weight: bold;
text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}
.style-name {
font-size: 12px;
font-weight: 600;
color: #333;
}
/* 按钮样式 */
.btn {
padding: 12px 20px;
border: none;
border-radius: 6px;
font-size: 14px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s;
display: inline-flex;
align-items: center;
gap: 8px;
}
.btn:hover {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.btn-primary {
background: linear-gradient(135deg, #667eea, #764ba2);
color: white;
}
.btn-secondary {
background: #6c757d;
color: white;
}
.btn-success {
background: linear-gradient(135deg, #28a745, #20c997);
color: white;
}
.btn:disabled {
opacity: 0.6;
cursor: not-allowed;
transform: none;
}
.btn-icon {
font-size: 16px;
}
.editor-controls {
display: flex;
gap: 10px;
}
.action-buttons {
display: flex;
gap: 15px;
flex-wrap: wrap;
}
/* 预览面板 */
.preview-panel {
background: white;
border-radius: 10px;
box-shadow: 0 10px 30px rgba(0,0,0,0.1);
overflow: hidden;
}
.preview-controls {
display: flex;
gap: 10px;
}
.preview-container {
height: 600px;
padding: 20px;
display: flex;
align-items: center;
justify-content: center;
overflow: auto;
position: relative;
}
.preview-placeholder {
text-align: center;
color: #999;
}
.placeholder-icon {
font-size: 4rem;
margin-bottom: 20px;
}
.preview-image {
max-width: 100%;
max-height: 100%;
border-radius: 10px;
box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
/* 历史记录 */
.history-section {
background: white;
border-radius: 10px;
box-shadow: 0 10px 30px rgba(0,0,0,0.1);
overflow: hidden;
}
.history-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 20px;
padding: 20px;
max-height: 400px;
overflow-y: auto;
}
.history-item {
border: 2px solid #e0e0e0;
border-radius: 8px;
overflow: hidden;
transition: all 0.3s;
cursor: pointer;
}
.history-item:hover {
border-color: #667eea;
transform: translateY(-2px);
}
.history-image {
width: 100%;
height: 120px;
object-fit: cover;
}
.history-info {
padding: 12px;
}
.history-filename {
font-weight: 600;
color: #333;
margin-bottom: 5px;
font-size: 12px;
}
.history-meta {
font-size: 11px;
color: #666;
display: flex;
justify-content: space-between;
}
/* 全屏模态框 */
.modal {
display: none;
position: fixed;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.9);
}
.modal-content {
position: relative;
margin: auto;
padding: 20px;
width: 90%;
max-width: 1000px;
height: 90%;
display: flex;
align-items: center;
justify-content: center;
}
.close {
position: absolute;
top: 10px;
right: 25px;
color: white;
font-size: 35px;
font-weight: bold;
cursor: pointer;
z-index: 1001;
}
.close:hover {
color: #667eea;
}
#fullscreenImage {
max-width: 100%;
max-height: 100%;
border-radius: 10px;
}
/* 加载覆盖层 */
.loading-overlay {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(255,255,255,0.9);
z-index: 999;
}
.loading-spinner {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
}
.spinner {
width: 50px;
height: 50px;
border: 5px solid #f3f3f3;
border-top: 5px solid #667eea;
border-radius: 50%;
animation: spin 1s linear infinite;
margin: 0 auto 20px;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* 响应式设计 */
@media (max-width: 1200px) {
.main-content {
grid-template-columns: 1fr;
gap: 20px;
}
.config-content {
max-height: none;
}
.preview-container {
height: 400px;
}
}
@media (max-width: 768px) {
.container {
padding: 10px;
}
.header h1 {
font-size: 2rem;
}
.form-row {
grid-template-columns: 1fr;
}
.preset-sizes {
flex-direction: column;
}
.action-buttons {
flex-direction: column;
}
.history-grid {
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
}
/* 滚动条样式 */
::-webkit-scrollbar {
width: 8px;
}
::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 4px;
}
::-webkit-scrollbar-thumb {
background: #667eea;
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: #5a67d8;
}
/* 复选框样式 */
.checkbox-container {
display: flex;
align-items: center;
cursor: pointer;
font-size: 14px;
user-select: none;
position: relative;
padding-left: 25px;
}
.checkbox-container input[type="checkbox"] {
position: absolute;
opacity: 0;
cursor: pointer;
height: 0;
width: 0;
}
.checkmark {
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
height: 18px;
width: 18px;
background-color: #fff;
border: 2px solid #667eea;
border-radius: 3px;
transition: all 0.3s;
}
.checkbox-container:hover input ~ .checkmark {
background-color: #f0f4ff;
}
.checkbox-container input:checked ~ .checkmark {
background-color: #667eea;
}
.checkmark:after {
content: "";
position: absolute;
display: none;
}
.checkbox-container input:checked ~ .checkmark:after {
display: block;
}
.checkbox-container .checkmark:after {
left: 5px;
top: 1px;
width: 6px;
height: 10px;
border: solid white;
border-width: 0 2px 2px 0;
transform: rotate(45deg);
}
#heightLimits {
transition: opacity 0.3s, visibility 0.3s;
}
#heightLimits.disabled {
opacity: 0.5;
pointer-events: none;
}
/* 尺寸信息样式 */
.size-info {
position: absolute;
top: 10px;
right: 10px;
background: rgba(0, 0, 0, 0.7);
color: white;
padding: 5px 10px;
border-radius: 5px;
font-size: 12px;
z-index: 10;
}