/* 视频加水印：复用视频压缩(shipinyasuo.css)的列表/格式/进度等样式，布局与按钮由 common.css 提供 */
@import url('shipinyasuo.css');

/* ===== 水印专属样式 ===== */
/* .setting-label-row 与 .link-btn 已移至 common.css 通用样式 */

.watermark-upload {
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafafa;
}

.watermark-upload:hover {
    border-color: #8b5cf6;
    background: #f5f3ff;
}

.watermark-upload.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.watermark-placeholder {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.watermark-placeholder-icon {
    font-size: 36px;
}

.watermark-placeholder-text {
    font-size: 13px;
    color: #9ca3af;
}

.watermark-preview-wrap {
    display: flex;
    justify-content: center;
}

.watermark-preview {
    max-width: 200px;
    max-height: 100px;
    object-fit: contain;
}

.preview-container {
    position: relative;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-canvas {
    display: block;
    max-width: 100%;
    max-height: 220px;
    width: auto;
    height: auto;
    cursor: zoom-in;
}

.preview-zoom-hint {
    position: absolute;
    right: 6px;
    bottom: 6px;
    font-size: 12px;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 8px;
    border-radius: 10px;
    pointer-events: none;
    user-select: none;
}

.preview-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.preview-modal-inner {
    position: relative;
    background: #000;
    border-radius: 8px;
    line-height: 0;
}

.preview-modal-inner img {
    display: block;
    max-width: 95vw;
    max-height: 92vh;
    width: auto;
    height: auto;
}

.preview-modal-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #8b5cf6;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.preview-modal-tip {
    position: absolute;
    left: 8px;
    bottom: 8px;
    font-size: 12px;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 8px;
    border-radius: 10px;
}

.position-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.pos-btn {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.pos-btn:hover:not(:disabled) {
    border-color: #c4b5fd;
    background: #faf5ff;
}

.pos-btn.active {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

/* 已选中项 hover 时保持紫色高亮，避免被普通 hover 覆盖成白底白字 */
.pos-btn.active:hover:not(:disabled) {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.size-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.size-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    cursor: pointer;
}

.size-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    cursor: pointer;
}

.setting-item.disabled input[type="range"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 水印类型切换 */
.mode-switch {
    display: flex;
    gap: 8px;
}

.mode-btn {
    flex: 1;
    padding: 10px 0;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.mode-btn:hover:not(:disabled) {
    border-color: #c4b5fd;
}

.mode-btn.active {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: #fff;
}

/* 文字水印输入 */
.text-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.text-input:focus {
    border-color: #8b5cf6;
    outline: none;
}

.text-style-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.text-style-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.text-style-item input[type="color"] {
    width: 36px;
    height: 28px;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
}

.text-style-item input[type="range"] {
    width: 100%;
}

.mini-label {
    font-size: 12px;
    color: #6b7280;
}
