:root {
    --primary-color: #4a90e2;
    --border-color: #e0e0e0;
    --background-color: #f5f5f5;
    --text-color: #333;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    display: grid;
    grid-template-columns: 250px 1fr 300px;
    gap: 20px;
    padding: 20px;
    height: calc(100vh - 70px);
    margin-bottom: 70px;
}

/* 上传区域样式 */
.upload-section {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.dropzone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.dropzone:hover {
    border-color: var(--primary-color);
}

.upload-hint {
    color: #666;
}

.upload-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.upload-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.upload-btn {
    padding: 6px 12px;
    font-size: 14px;
    background: var(--background-color);
}

/* 预览区域样式 */
.preview-section {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.preview-container {
    flex: 1;
    overflow: auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

#previewCanvas {
    max-width: 100%;
    max-height: calc(100vh - 200px);
    object-fit: contain;
}

/* 控制面板样式 */
.control-panel {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow-y: auto;
    height: 100%;
}

.control-group {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--background-color);
    border-radius: 4px;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

/* 位置选择器样式 */
.position-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    margin: 10px 0;
}

.position-cell {
    aspect-ratio: 1;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.position-cell:hover {
    background-color: var(--primary-color);
    opacity: 0.5;
}

.position-cell.selected {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.position-cell.selected::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: var(--primary-color);
    opacity: 0.3;
    border-radius: 2px;
}

/* 底部操作栏样式 */
.action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 15px 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 10px;
    z-index: 1000;
}

/* 优化底部工具栏按钮样式 */
.action-bar button {
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.action-bar button:hover {
    background-color: #357abd;
}

.action-bar button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* 添加进度提示样式 */
.progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.progress-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 300px;
}

.progress-bar {
    height: 4px;
    background: #eee;
    border-radius: 2px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-bar::before {
    content: '';
    display: block;
    height: 100%;
    width: 0;
    background: var(--primary-color);
    transition: width 0.2s;
}

.progress-text {
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
}

.thumbnail {
    position: relative;
    margin-bottom: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 5px;
    background: var(--background-color);
}

.thumbnail.selected {
    border-color: var(--primary-color);
}

.thumbnail img {
    width: 60px;
    height: auto;
    display: block;
    margin-right: 10px;
}

.thumbnail-info {
    flex: 1;
    font-size: 12px;
    overflow: hidden;
}

.thumbnail-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.thumbnail-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
    max-height: calc(100vh - 300px);
}

/* 优化输入控件样式 */
input[type="text"], select {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 10px;
}

.spacing-controls {
    display: grid;
    gap: 10px;
}

.spacing-controls > div {
    display: grid;
    grid-template-columns: 60px 1fr;
    align-items: center;
}

/* 优化字体设置区域 */
.font-settings {
    display: grid;
    gap: 10px;
}

.font-row {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
}

/* 添加缩略图删除按钮样式 */
.thumbnail .delete-btn {
    position: absolute;
    right: 5px;
    top: 5px;
    width: 20px;
    height: 20px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s;
}

.thumbnail:hover .delete-btn {
    opacity: 1;
}

/* 添加缩放控制样式 */
.zoom-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 10px;
    margin-top: 10px;
    background: var(--background-color);
    border-radius: 4px;
}

.zoom-controls button {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-color);
    transition: all 0.2s ease;
}

.zoom-controls button:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.zoom-controls button:active {
    transform: scale(0.95);
}

#zoomLevel {
    min-width: 60px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    user-select: none;
} 