/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
header {
    background-color: #4a6bdf;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

header h1 {
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 标签页样式 */
.tabs {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.tab-buttons {
    display: flex;
    justify-content: center;
    border-bottom: 1px solid #e9ecef;
}

.tab-button {
    padding: 1rem 2rem;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-button:hover {
    color: #4a6bdf;
}

.tab-button.active {
    color: #4a6bdf;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #4a6bdf;
}

.tab-content {
    display: none;
    padding: 1rem 0;
}

.tab-content.active {
    display: block;
}

/* 拖放区域样式 */
.drop-area {
    border: 2px dashed #ced4da;
    border-radius: 8px;
    padding: 3rem;
    text-align: center;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.drop-area.highlight {
    border-color: #4a6bdf;
    background-color: rgba(74, 107, 223, 0.05);
}

.drop-message i {
    font-size: 3rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.drop-message p {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.drop-message p.small {
    font-size: 0.9rem;
    color: #6c757d;
}

.file-input-label {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background-color: #4a6bdf;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 1rem;
    transition: background-color 0.3s ease;
}

.file-input-label:hover {
    background-color: #3a5bbf;
}

/* 编辑器容器样式 */
.editor-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.preview-wrapper {
    width: 100%;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

canvas {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

/* 水印选项样式 */
.watermark-options,
.brush-options {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.watermark-options h3,
.brush-options h3 {
    margin-bottom: 1rem;
    color: #343a40;
    font-size: 1.2rem;
}

.option-group {
    margin-bottom: 1rem;
}

.option-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
}

.option-group input[type="text"],
.option-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
}

.option-group input[type="range"] {
    width: 100%;
    margin-top: 0.5rem;
}

.option-group input[type="color"] {
    width: 100%;
    height: 40px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 2px;
}

/* 按钮样式 */
.action-button {
    padding: 0.75rem 1.5rem;
    background-color: #4a6bdf;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.action-button:hover {
    background-color: #3a5bbf;
}

.action-button i {
    font-size: 1rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* 页脚样式 */
footer {
    background-color: #343a40;
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
}

footer p {
    opacity: 0.8;
}

/* 响应式设计 */
@media (min-width: 768px) {
    .editor-container {
        flex-direction: row;
    }

    .preview-wrapper {
        flex: 2;
    }

    .watermark-options,
    .brush-options {
        flex: 1;
    }
}

/* 笔刷标记样式 */
.brush-marker {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #000;
    transform: translate(-50%, -50%);
    display: none;
}

/* 加载指示器 */
.loading-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(74, 107, 223, 0.3);
    border-radius: 50%;
    border-top-color: #4a6bdf;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}