/* 照片水印工具样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #ffffff;
    color: #2c3e50;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1400px;
    padding: 40px 20px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content {
    flex: 1;
    padding-bottom: 60px;
    animation: fadeIn 0.6s ease;
}

.back-link {
    margin-bottom: 30px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    color: #666;
    text-decoration: none;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    color: #2c3e50;
    border-color: #2c3e50;
    transform: translateX(-3px);
}

.watermark-section {
    animation: fadeInUp 0.6s ease 0.1s both;
}

.page-title {
    font-size: 42px;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.page-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 40px;
    font-weight: 300;
}

/* 上传区域 */
.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.upload-area:hover {
    border-color: #2c3e50;
    background: #e9ecef;
}

.upload-area.drag-over {
    border-color: #2c3e50;
    background: #e9ecef;
    border-style: solid;
}

.upload-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.upload-text {
    font-size: 18px;
    font-weight: 400;
    color: #2c3e50;
    margin-bottom: 8px;
}

.upload-hint {
    font-size: 14px;
    color: #868e96;
}

/* 编辑器容器 - 左右布局 */
.editor-container {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.left-panel {
    flex: 0 0 400px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.right-panel {
    flex: 1;
    min-width: 0;
}

/* 设置区域 */
.settings-section {
    padding: 25px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.exif-editor-section {
    padding: 25px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.brand-select-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-select-container select {
    flex: 1;
}

.brand-with-logo .logo-display {
    flex-shrink: 0;
    min-width: 40px;
    max-width: 80px;
    height: 40px;
    display: none;
    align-items: center;
    justify-content: flex-start;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 5px;
}

.brand-with-logo .logo-display.show {
    display: flex;
}

.brand-with-logo .logo-display img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: left center;
}

.section-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 20px;
    color: #2c3e50;
}

.settings-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.exif-edit-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-item span {
    font-size: 14px;
    font-weight: 400;
    color: #495057;
}

.setting-item select,
.setting-item input[type="text"] {
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.setting-item select:focus,
.setting-item input[type="text"]:focus {
    outline: none;
    border-color: #2c3e50;
}

.setting-item input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #dee2e6;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.setting-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2c3e50;
    cursor: pointer;
    transition: all 0.3s ease;
}

.setting-item input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    background: #1a252f;
}

.checkbox-item {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* 预览区域 */
.preview-section {
    display: flex;
    flex-direction: column;
}

.canvas-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8f9fa;
    padding: 20px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: auto;
    margin-bottom: 20px;
    min-height: 200px;
}

#preview-canvas {
    max-width: 100%;
    height: auto;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    display: block;
}

/* 按钮 */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #2c3e50;
    color: white;
    border-color: #2c3e50;
}

.btn-primary:hover {
    background: #1a252f;
    border-color: #1a252f;
}

.btn-secondary {
    background: white;
    color: #2c3e50;
}

.btn-secondary:hover {
    background: #f8f9fa;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 0;
    color: #adb5bd;
    font-size: 13px;
    margin-top: 60px;
    border-top: 1px solid #e9ecef;
}

.footer a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #2c3e50;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .editor-container {
        flex-direction: column;
    }
    
    .left-panel {
        flex: none;
        width: 100%;
    }
    
    .right-panel {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .watermark-section {
        padding: 30px 20px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .upload-area {
        padding: 40px 20px;
    }
    
    .upload-icon {
        font-size: 48px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e9ecef;
    border-radius: 50%;
    border-top-color: #2c3e50;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 深色模式 */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a1a1a;
        color: #e0e0e0;
    }

    .back-btn {
        color: #999;
        border-color: #3c3c3c;
    }

    .back-btn:hover {
        color: #e0e0e0;
        border-color: #e0e0e0;
    }

    .page-title {
        color: #ffffff;
    }

    .page-subtitle {
        color: #999;
    }

    .upload-area {
        background: #2c2c2c;
        border-color: #3c3c3c;
    }

    .upload-area:hover {
        border-color: #e0e0e0;
        background: #333333;
    }

    .upload-area.drag-over {
        border-color: #e0e0e0;
        background: #333333;
    }

    .upload-icon {
        color: #666;
    }

    .upload-text {
        color: #e0e0e0;
    }

    .upload-hint {
        color: #999;
    }

    /* 编辑器容器 */
    .editor-container {
        background: transparent;
    }

    .left-panel {
        background: transparent;
    }

    .right-panel {
        background: transparent;
    }

    .workspace {
        background: #2c2c2c;
    }

    /* 设置区域和EXIF编辑区域 */
    .settings-section,
    .exif-editor-section {
        background: #2c2c2c;
        border-color: #3c3c3c;
    }

    .section-title {
        color: #ffffff;
    }

    .settings-panel {
        background: #2c2c2c;
        border-right-color: #3c3c3c;
    }

    .settings-panel h3 {
        color: #ffffff;
        border-bottom-color: #3c3c3c;
    }

    .form-group label {
        color: #b0b0b0;
    }

    .form-group input,
    .form-group select {
        background: #1a1a1a;
        color: #e0e0e0;
        border-color: #3c3c3c;
    }

    .form-group input::placeholder {
        color: #666;
    }

    .form-group input:focus,
    .form-group select:focus {
        background: #1a1a1a;
        border-color: #e0e0e0;
        box-shadow: 0 0 0 3px rgba(224, 224, 224, 0.05);
    }

    .form-group select option {
        background: #1a1a1a;
        color: #e0e0e0;
    }

    .brand-logo-display {
        background: #1a1a1a;
        border-color: #3c3c3c;
    }

    /* 品牌Logo显示区域 */
    .brand-with-logo .logo-display {
        background: #1a1a1a;
        border-color: #3c3c3c;
    }

    .logo-placeholder {
        color: #666;
    }

    .info-text {
        color: #999;
    }

    .btn {
        background: #2c2c2c;
        color: #e0e0e0;
        border-color: #3c3c3c;
    }

    .btn:hover {
        background: #333333;
        border-color: #e0e0e0;
    }

    .btn-primary {
        background: #0d6efd;
        border-color: #0d6efd;
    }

    .btn-primary:hover {
        background: #0b5ed7;
        border-color: #0b5ed7;
    }

    .preview-panel {
        background: #1a1a1a;
    }

    .preview-container {
        background: #1a1a1a;
    }

    .no-image {
        color: #666;
    }

    #preview:not(:empty) {
        background: #2c2c2c;
    }

    .loading {
        border-color: #333;
        border-top-color: #e0e0e0;
    }
}
