.tqr-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    position: relative;
}

/* VIP 遮罩 */
.tqr-vip-mask {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.92);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    backdrop-filter: blur(4px);
}

.tqr-vip-mask-inner {
    text-align: center;
    padding: 30px;
}

.tqr-vip-mask-icon { font-size: 48px; margin-bottom: 12px; }
.tqr-vip-mask-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; color: #2d3748; }
.tqr-vip-mask-desc { font-size: 14px; color: #718096; margin-bottom: 20px; }
.tqr-vip-mask-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.tqr-vip-btn {
    padding: 10px 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.tqr-vip-btn-single {
    padding: 10px 24px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* 顶部设置区 */
.tqr-settings {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 卡片区块 */
.tqr-section {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
}

.tqr-section h3 {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tqr-section h3 i {
    color: #667eea;
    font-size: 14px;
}

/* 两列并排区 */
.tqr-row-wrap {
    display: flex;
    gap: 16px;
}

.tqr-half {
    flex: 1;
    min-width: 0;
}

/* 文本域 */
.tqr-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.tqr-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.tqr-textarea:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

/* 输入框 */
.tqr-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    color: #495057;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.tqr-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.tqr-input:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

/* 字段行 */
.tqr-field {
    margin-bottom: 14px;
}

.tqr-field:last-child {
    margin-bottom: 0;
}

.tqr-field label {
    display: block;
    font-size: 13px;
    color: #495057;
    font-weight: 500;
    margin-bottom: 6px;
}

.tqr-field label span {
    color: #667eea;
    font-weight: 600;
}

/* 颜色选择器行 */
.tqr-color-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tqr-color-wrap input[type="color"] {
    width: 36px;
    height: 28px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
    background: #fff;
    transition: border-color 0.2s;
    flex-shrink: 0;
}

.tqr-color-wrap input[type="color"]:hover {
    border-color: #667eea;
}

.tqr-color-wrap input[type="color"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tqr-color-val {
    font-size: 12px;
    color: #718096;
    font-family: 'Courier New', monospace;
}

/* 滑块 */
.tqr-field input[type="range"] {
    width: 100%;
    height: 6px;
    accent-color: #667eea;
    cursor: pointer;
    border-radius: 3px;
}

.tqr-field input[type="range"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 下拉选择 */
.tqr-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    color: #495057;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.tqr-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.tqr-select:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

/* 按钮组 */
.tqr-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

/* 按钮通用 */
.tqr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
    box-sizing: border-box;
}

.tqr-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* 主按钮 - 紫色渐变 */
.tqr-btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

.tqr-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.35);
}

/* 次要按钮 - 描边 */
.tqr-btn-secondary {
    background: #fff;
    color: #667eea;
    border: 2px solid #667eea;
}

.tqr-btn-secondary:hover:not(:disabled) {
    background: #f0f2ff;
    transform: translateY(-1px);
}

/* 下载次数显示 */
.tqr-download-count {
    font-size: 13px;
    color: #999;
    margin-left: 4px;
}

/* 底部预览区 */
.tqr-preview {
    background: #fafbff;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    padding: 30px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Canvas 容器 */
.tqr-canvas-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
}

.tqr-canvas-container canvas {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* 占位提示 */
.tqr-placeholder {
    text-align: center;
    color: #ccc;
}

.tqr-placeholder i {
    font-size: 64px;
    margin-bottom: 16px;
    display: block;
    color: #d0d0d0;
}

.tqr-placeholder p {
    font-size: 14px;
    color: #aaa;
    margin: 0;
}

/* 单次付费弹窗 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 90vw;
    max-height: 90vh;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* 响应式 */
@media (max-width: 768px) {
    .tqr-row-wrap {
        flex-direction: column;
    }

    .tqr-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .tqr-preview {
        min-height: 200px;
        padding: 20px;
    }

    .tqr-vip-mask-actions {
        flex-direction: column;
    }
}
