:root {
    --primary-color: #2A5CAA;
    --secondary-color: #89C13D;
    --background-color: #F5F8FC;
    --text-color: #333;
    --hover-color: #EFF7FF;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: '微软雅黑', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--background-color);
}

.filter-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.97);
    box-shadow: var(--shadow);
    padding: 15px;
    height: auto; /* 改为自动高度 */
}
.filter-controls {
    position: relative;
    width: 100%;
    margin-top: 15px;
    text-align: center;
}
.filter-container.collapsed {
    transform: translateY(calc(-100% + 40px));
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.toggle-filter {
    position: relative;
    right: auto;
    top: auto;
    margin: 10px auto;
    transition: all 0.3s ease;
}


.filter-container.collapsed .toggle-filter {
    position: fixed;
    top: 10px;
    right: 10px;
    margin: 0;
    z-index: 1001;
    background: var(--primary-color);
}
.wechat-qr img {
    width: 100%;
    border: 2px solid var(--secondary-color);
    border-radius: 4px;
}

.filter-section {
    flex: 1 1 300px;
    min-width: 300px;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 150px;
    overflow-y: auto;
}

.filter-tag {
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-tag.active {
    background: var(--secondary-color);
    color: white;
    border-color: transparent;
}




.question-list {
    display: grid;
    gap: 10px;
        padding-bottom:50px;
}

.question-item {
    padding: 15px;
    background: white;
    border-radius: 6px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s;
}

.question-item.selected {
    background: var(--primary-color);
    color: white;
}

.price-box {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.95);
    padding: 15px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    /* 移除top定位相关属性 */
}

.main-container {
    padding-bottom: 150px; /* 根据实际高度调整 */
}

.submit-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    width: 45%;
    margin: 10px;
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
    }




    .question-item {
        padding: 5px;
    }

    .filter-tag {
        padding: 4px 8px;
        font-size: 13px;
    }



    .button-group {
          display: flex;
			    gap: 15px;
			    margin-top: 10px;
    }

    .clear-btn {
    flex: 1;
    max-width: 120px;
		}
    .submit-btn {
        flex: 2;
    }

    .toggle-filter {
        display: none; /* 隐藏折叠按钮 */
    }
    
    .filter-section {
        margin-bottom: 8px;
    }

    .filter-section h3 {
        font-size: 15px;
        margin-bottom: 5px;
    }

    .filter-tags {
        gap: 5px;
        max-height: 120px;
    }

    .question-list {
        gap: 6px;
    }

    .code-modal {
        padding: 15px;
    }

    .code-area {
        font-size: 28px;
        padding: 6px;
    }

    .copy-btn {
        padding: 12px 25px;
        font-size: 16px;
    }
}
    /* 电脑端多列布局 */
@media (min-width: 1024px) {
			.question-list {
	        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	        gap: 20px;
	        max-width: 1200px;
	        margin: 0 auto;
	    }
	    
	    .price-box {
	        width: 100%;
	        max-width: 1200px;
	        left: 50%;
	        transform: translateX(-50%);
	        border-radius: 8px 8px 0 0;
	    }
	    
	    .main-container {
	        padding-bottom: 100px;
	    }
}


/* 全选按钮 */
.action-bar {
    margin-bottom: 15px;
}

.select-all {
    background: var(--primary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

/* 代码弹窗 */
.code-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    padding: 30px;
    border-radius: 15px;
    z-index: 2000;
    color: white;
}
.modal-content h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--secondary-color);
}
.modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.code-area {
    font-size: 42px;
    
    color: #fff;
    padding: 5px;
    border-radius: 8px;
    
    word-break: break-all;
}
.close-modal {
    background: #666;
    color: white;
    padding: 10px 30px;
}
.copy-btn {
    background: var(--primary-color);
    padding: 15px 40px;
    font-size: 18px;
    margin: 10px;
}




/* 禁用按钮样式 */
.submit-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

/* 清空按钮 */
.clear-btn {
    background: #ff4444;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 45%;
    margin: 10px;
}

/* 防止重叠通用设置 */
.question-list-wrapper {
    position: relative;
    z-index: 100;

}



.price-content {
    pointer-events: auto; /* 内容区域可交互 */
}


/* PDF预览弹窗 */
.pdf-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    height: 80vh;
    background: white;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
    z-index: 9999;
    border-radius: 8px;
    overflow: hidden;
}

.pdf-viewer {
    height: calc(100% - 60px);
    background: #f5f5f5;
}

.modal-actions {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: #fff;
    border-top: 1px solid #ddd;
}

.download-btn {
    background: var(--secondary-color);
    color: white;
    padding: 8px 20px;
    border-radius: 4px;
    text-decoration: none;
}

.close-pdf-modal {
    background: #666;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
}

/* 调整按钮组间距 */
.button-group {
    gap: 10px;
}

.preview-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    width: 15%;
    margin: 10px;
}

.customer-service-bar {
        position: fixed;
        right: 20px;
        bottom: 200px;
        z-index: 999;
        background: #fff;
        padding: 15px;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .service-text {
        font-size: 14px;
        color: #666;
        text-align: center;
    }
    
    .service-icon {
        width: 40px;
        height: 40px;
        cursor: pointer;
        transition: transform 0.3s;
    }
    
    .service-icon:hover {
        transform: scale(1.1);
    }
    
    @media (max-width: 768px) {
        .customer-service-bar {
            bottom:200px;
            right: 10px;
            padding: 10px;
        }
        
        .service-text {
            font-size: 12px;
        }
        
        .service-icon {
            width: 35px;
            height: 35px;
        }
    }
			/* 科目切换容器 */
				.subject-switch-container {
				    position: relative;
				    margin-right: 20px;
				}

				.subject-trigger {
				    cursor: pointer;
				    padding: 8px 15px;
				    background: #f0f0f0;
				    border-radius: 20px;
				    display: inline-flex;
				    align-items: center;
				    transition: all 0.3s;
				}

				.subject-trigger:hover {
				    background: #e0e0e0;
				}

				.current-subject {
				    color: #666;
				    font-size: 0.9em;
				    margin-left: 8px;
				}

				.subject-switch {
				    position: absolute;
				    top: 100%;
				    left: 0;
				    background: #fff;
				    padding: 15px;
				    border-radius: 8px;
				    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
				    z-index: 100;
				    min-width: 280px;
				    margin-top: 10px;
				}

				.subject-switch::before {
				    content: '';
				    position: absolute;
				    bottom: 100%;
				    left: 20px;
				    border: 8px solid transparent;
				    border-bottom-color: #fff;
				}

				.subject-selector {
				    display: flex;
				    flex-wrap: wrap;
				    gap: 10px;
				}

				.subject-option {
				    padding: 8px 15px;
				    background: #f5f5f5;
				    border-radius: 20px;
				    transition: all 0.3s;
				}

				.subject-option.active {
				    background: var(--primary-color);
				    color: white;
				}

				.subject-option:hover {
				    transform: translateY(-2px);
				    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
				}
				
				
				/* 微信客服弹窗 */
				.wechat-modal {
				    display: none;
				    position: fixed;
				    top: 50%;
				    left: 50%;
				    transform: translate(-50%, -50%);
				    background: rgba(0,0,0,0.5);
				    width: 100%;
				    height: 100%;
				    z-index: 1000;
				}

				.wechat-modal .modal-content {
				    background: #fff;
				    padding: 20px;
				    border-radius: 10px;
				    position: relative;
				    top: 50%;
				    left: 50%;
				    transform: translate(-50%, -50%);
				    max-width: 300px;
				    text-align: center;
				}

				.qrcode-wrapper img {
				    width: 200px;
				    height: 200px;
				    margin: 0 auto;
				}

				.wechat-info {
				    margin: 15px 0;
				}

				.copy-wechat {
				    background: #09bb07;
				    color: white;
				    border: none;
				    padding: 8px 20px;
				    border-radius: 20px;
				    cursor: pointer;
				    margin-top: 10px;
				}
				
				.subject-trigger {
				    display: flex;
				    align-items: center;
				    gap: 10px;
				}

				.seller-backend-link {
				    margin-left: auto;
				    color: #4CAF50;
				    text-decoration: none;
				    padding: 5px 10px;
				    border: 1px solid #4CAF50;
				    border-radius: 4px;
				}

				.seller-backend-link:hover {
				    background-color: #4CAF50;
				    color: white;
				}
				
				/* 装订方式选择器 */
				.binding-type {
				    padding: 5px 10px;
				    border: 1px solid #4CAF50;
				    border-radius: 4px;
				    margin-left: 10px;
				}

				/* 确认弹窗 */
				.confirm-modal {
				    display: none;
				    position: fixed;
				    top: 50%;
				    left: 50%;
				    transform: translate(-50%, -50%);
				    background: white;
				    padding: 20px;
				    box-shadow: 0 0 20px rgba(0,0,0,0.2);
				    z-index: 1000;
				}

				.confirm-modal button {
				    margin: 10px;
				    padding: 8px 20px;
				}
				
				/* 提交中状态 */
				.confirm-submit[disabled] {
				    opacity: 0.6;
				    cursor: not-allowed;
				    background: #cccccc;
				}






