/* 视频水印工具独有样式 */

/* ===== 左右分栏布局 ===== */
.vwat-tool-layout {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
    align-items: stretch;
    min-height: 400px;
}
.vwat-layout-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.vwat-layout-right {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 550px;
}

/* 左侧上传/预览区域 */
.vwat-left-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #dee2e6;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.vwat-left-container h4 {
    font-size: 15px;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.vwat-left-container h4 i {
    color: #2196F3;
}

/* 上传区域（左侧） */
.vwat-upload-area {
    flex: 1;
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}
.vwat-upload-area:hover {
    border-color: #2196F3;
    background: rgba(33, 150, 243, 0.05);
}
.vwat-upload-area.vwat-dragover {
    border-color: #2196F3;
    background: rgba(33, 150, 243, 0.1);
}
.vwat-upload-area.vwat-hidden {
    display: none !important;
}
.vwat-upload-icon {
    font-size: 64px;
    color: #2196F3;
    margin-bottom: 16px;
}
.vwat-upload-text {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 500;
}
.vwat-upload-hint {
    font-size: 13px;
    color: #888;
}

/* 预览区域 */
.vwat-preview-wrapper {
    display: none;
    flex: 1;
}
.vwat-preview-wrapper.vwat-visible {
    display: flex;
    flex-direction: column;
}
.vwat-preview-canvas {
    width: 100%;
    flex: 1;
    border-radius: 8px;
    background: #000;
    object-fit: contain;
}

/* ===== 右侧设置区域 ===== */
.vwat-settings-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-right: 8px;
}

/* ===== 底部按钮区域 ===== */
.vwat-bottom-btns {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 20px 0;
    padding: 16px 0;
}
.vwat-bottom-btns .btn {
    min-width: 140px;
}

/* 文件信息卡片 */
.vwat-file-card {
    display: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    padding: 16px 20px;
    color: #fff;
    position: relative;
    align-items: center;
    gap: 16px;
}
.vwat-file-card.vwat-visible {
    display: flex;
}
.vwat-file-card-icon {
    font-size: 40px;
    flex-shrink: 0;
}
.vwat-file-card-details {
    flex: 1;
    min-width: 0;
}
.vwat-file-card-name {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}
.vwat-file-card-meta {
    font-size: 12px;
    opacity: 0.9;
}
.vwat-file-card-replace {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    flex-shrink: 0;
}
.vwat-file-card-replace:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 选项卡 */
.vwat-watermark-tabs {
    display: flex;
    gap: 10px;
}
.vwat-tab-btn {
    flex: 1;
    padding: 10px 16px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.vwat-tab-btn:hover {
    border-color: #2196F3;
    color: #2196F3;
}
.vwat-tab-btn.vwat-active {
    background: #2196F3;
    color: #fff;
    border-color: #2196F3;
}
.vwat-tab-btn i {
    font-size: 18px;
}

/* 水印设置面板 */
.vwat-watermark-panel {
    display: none;
}
.vwat-watermark-panel.vwat-active {
    display: block;
}

.vwat-params-section {
    background: #fff;
    padding: 18px;
    border-radius: 10px;
    border: 1px solid #dee2e6;
}
.vwat-params-section h4 {
    font-size: 14px;
    margin: 0 0 14px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}
.vwat-params-section h4 i {
    color: #2196F3;
}
.vwat-param-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}
.vwat-param-row:last-child {
    margin-bottom: 0;
}
.vwat-param-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.vwat-param-item label {
    font-size: 12px;
    font-weight: 500;
    color: #555;
}
.vwat-param-item input[type="text"],
.vwat-param-item select {
    padding: 8px 10px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    transition: border-color 0.2s;
}
.vwat-param-item input[type="text"]:focus,
.vwat-param-item select:focus {
    outline: none;
    border-color: #2196F3;
}
.vwat-param-item input[type="range"] {
    width: 100%;
    margin: 0;
}
.vwat-range-value {
    font-size: 12px;
    color: #2196F3;
    font-weight: 600;
}

/* 九宫格定位 */
.vwat-position-section {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}
.vwat-position-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    width: 150px;
}
.vwat-position-cell {
    width: 46px;
    height: 46px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}
.vwat-position-cell:hover {
    border-color: #2196F3;
    transform: scale(1.05);
}
.vwat-position-cell.vwat-active {
    background: #2196F3;
    border-color: #2196F3;
}
.vwat-position-cell.vwat-active i {
    color: #fff;
}
.vwat-position-cell i {
    font-size: 18px;
    color: #666;
}
.vwat-position-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}
.vwat-margin-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    flex: 1;
    min-width: 200px;
    max-width: 100%;
    overflow: hidden;
}
.vwat-margin-inputs .vwat-param-item input[type="text"] {
    width: 100%;
    box-sizing: border-box;
}

/* 图片水印上传 */
.vwat-image-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fff;
}
.vwat-image-upload-area:hover {
    border-color: #2196F3;
    background: rgba(33, 150, 243, 0.05);
}
.vwat-image-preview {
    max-width: 160px;
    max-height: 120px;
    border-radius: 6px;
    margin-top: 8px;
}
.vwat-image-info {
    display: none;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}
.vwat-image-info.vwat-visible {
    display: flex;
}
.vwat-image-remove {
    background: #ff4444;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}
.vwat-image-remove:hover {
    background: #cc0000;
}

/* 进度区域 */
.vwat-progress-section {
    background: #fff;
    padding: 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: none;
    border: 1px solid #dee2e6;
}
.vwat-progress-section.vwat-visible {
    display: block;
}
.vwat-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.vwat-progress-title {
    font-size: 14px;
    font-weight: 500;
}
.vwat-progress-percent {
    font-size: 14px;
    color: #2196F3;
    font-weight: 600;
}
.vwat-progress-bar {
    width: 100%;
    height: 8px;
    background: #dee2e6;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}
.vwat-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2196F3, #2ecc71);
    border-radius: 4px;
    transition: width 0.3s;
    width: 0%;
}
.vwat-progress-info {
    font-size: 12px;
    color: #888;
}

/* 导出完成区域 */
.vwat-download-section {
    border: 2px solid #2ecc71;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    display: none;
    background: #f0faf0;
}
.vwat-download-section.vwat-visible {
    display: block;
}
.vwat-download-section h4 {
    font-size: 16px;
    margin: 0 0 12px 0;
    color: #2ecc71;
}
.vwat-result-info {
    font-size: 13px;
    margin-bottom: 14px;
    color: #555;
}

/* 颜色选择器 */
.vwat-color-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.vwat-color-input {
    width: 70px;
    height: 36px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
    padding: 0;
    cursor: pointer;
}
.vwat-color-hex {
    padding: 8px 10px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 13px;
    width: 100px;
}

.vwat-hidden {
    display: none !important;
}

/* 响应式 */
@media (max-width: 900px) {
    .vwat-tool-layout {
        flex-direction: column;
    }
    .vwat-layout-left {
        flex: none;
        position: static;
        width: 100%;
    }
    .vwat-layout-right {
        width: 100%;
    }
    .vwat-preview-section {
        order: -1;
    }
    .vwat-position-section {
        flex-direction: column;
    }
    .vwat-margin-inputs {
        min-width: auto;
        width: 100%;
    }
}
@media (max-width: 600px) {
    .vwat-param-row {
        grid-template-columns: 1fr;
    }
    .vwat-watermark-tabs {
        flex-direction: column;
    }
    .vwat-tab-btn {
        width: 100%;
    }
}
