body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    z-index: 1000;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
}

.header h1 {
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.header p {
    color: #666;
    font-size: 1.1rem;
}

/* 主界面布局 */
.watermark-interface {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 2rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 编辑器区域 */
.editor-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
}

/* 上传区域 */
.upload-area {
    border: 2px dashed #4a90e2;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    margin-bottom: 1.5rem;
}

.upload-area:hover {
    background: rgba(74, 144, 226, 0.05);
}

.upload-content i {
    font-size: 2.5rem;
    color: #4a90e2;
    margin-bottom: 1rem;
}

/* 设置面板 */
.settings-group {
    margin-bottom: 1.5rem;
    background: white;
    padding: 1.2rem;
    border-radius: 8px;
}

.settings-group h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.1rem;
}

.text-input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

.select-input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.font-size-control,
.opacity-control {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.8rem;
}

input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    background: linear-gradient(to right, #4a90e2 50%, #ddd 50%);
    border-radius: 3px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: white;
    border: 2px solid #4a90e2;
    border-radius: 50%;
    cursor: pointer;
}

.color-picker {
    display: flex;
    align-items: center;
    margin: 10px 0;
}

.color-options {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 5px;
}

.color-preset {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.color-preset:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.color-preset.active {
    box-shadow: 0 0 0 2px #4a90e2;
}

/* 自定义颜色选择器包装器 */
.custom-color-wrapper {
    position: relative;
    width: 24px;
    height: 24px;
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.custom-color-wrapper:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* 颜色网格样式 */
.color-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 1px;
    padding: 1px;
    background: #fff;
}

.color-grid span {
    display: block;
    width: 100%;
    height: 100%;
}

/* 给每个格子不同的颜色 */
.color-grid span:nth-child(1) { background: #FF0000; }
.color-grid span:nth-child(2) { background: #00FF00; }
.color-grid span:nth-child(3) { background: #0000FF; }
.color-grid span:nth-child(4) { background: #FFFF00; }
.color-grid span:nth-child(5) { background: #FF00FF; }
.color-grid span:nth-child(6) { background: #00FFFF; }
.color-grid span:nth-child(7) { background: #FFA500; }
.color-grid span:nth-child(8) { background: #800080; }
.color-grid span:nth-child(9) { background: #008000; }

/* 自定义颜色选择器 */
.custom-color-picker {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* 预览区域 */
.preview-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.preview-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 300px);
    min-height: 500px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.preview-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #666;
}

.preview-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #ddd;
}

.watermark-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.watermark-text {
    position: absolute;
    cursor: move;
    user-select: none;
    pointer-events: auto;
    padding: 10px;
}

/* 按钮样式 */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.action-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    min-width: 150px;
    justify-content: center;
}

.reset-btn {
    background: #dc3545;
    color: white;
}

.save-btn {
    background: #28a745;
    color: white;
}

.action-btn:hover {
    transform: translateY(-2px);
}

.position-tip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    margin: 0;
}

.position-tip i {
    color: #4a90e2;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .watermark-interface {
        grid-template-columns: 1fr;
    }
    
    .preview-container {
        height: 500px;
    }
}

/* 滑块样式 */
.slider-wrapper {
    position: relative;
    flex: 1;
    height: 6px;
    background: #ddd;
    border-radius: 3px;
}

.slider-progress {
    position: absolute;
    height: 100%;
    background: #4a90e2;
    border-radius: 3px;
    pointer-events: none;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: transparent;
    position: relative;
    z-index: 2;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: white;
    border: 2px solid #4a90e2;
    border-radius: 50%;
    cursor: pointer;
    margin-top: -6px;
}

/* 滑块容器样式 */
.range-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 8px;
}

/* 滑块样式 */
input[type="range"] {
    -webkit-appearance: none;
    flex: 1;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    outline: none;
}

/* 滑块手柄样式 */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: white;
    border: 2px solid #4a90e2;
    border-radius: 50%;
    cursor: pointer;
    margin-top: -6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 滑块值显示样式 */
.range-value {
    min-width: 45px;
    padding: 4px 8px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

/* 标签样式 */
.font-size-control label,
.opacity-control label {
    display: block;
    margin-bottom: 5px;
    color: #666;
    font-size: 0.9rem;
}

/* 控制行样式 */
.control-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
}

/* 标签样式 */
.control-label {
    font-size: 14px;
    color: #666;
    width: 55px;
}

/* 滑块容器样式 */
.range-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 5px;
}

/* 滑块样式 */
input[type="range"] {
    -webkit-appearance: none;
    flex: 1;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    outline: none;
    margin: 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: white;
    border: 2px solid #4a90e2;
    border-radius: 50%;
    cursor: pointer;
    margin-top: -5px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* 数值显示样式 */
.value-display {
    min-width: 45px;
    padding: 4px 10px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* 设置组样式 */
.settings-group {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.settings-group h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
} 