* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    position: relative;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #1a5fb4 0%, #2980b9 100%);
    color: white;
    padding: 15px 20px;
    text-align: left;
}

/* 顶部导航 Flex 布局 */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1px;
}

/* 左侧 Logo 和文字 */
.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    height: 50px;
    width: auto;
}

.text-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.main-title {
    font-size: 22px;
    margin: 0;
    padding: 0;
    line-height: 1.2;
}

.sub-title {
    font-size: 13px;
    margin: 5px 0 0 0;
    opacity: 0.85;
}

/* 右侧按钮组 */
.nav-links {
    display: flex;
    gap: 10px;
}

.nav-links .btn {
    font-size: 16px;
    padding: 10px 15px;
}

.nav-links a {
    text-decoration: none !important;
    color: inherit;
}



h1 {
    font-size: 28px;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.subtitle {
    font-size: 16px;
    opacity: 0.9;
    font-weight: 300;
}

.controls {
    padding: 20px 30px;
    background-color: #f0f5ff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.btn {
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 按钮样式微调 */
.btn-outline {
    background-color: rgba(255, 255, 255, 0.15);
    /* border: 1px solid rgba(255, 255, 255, 0.7); */
    color: white;
}

.btn-outline:hover {
    /* background-color: rgba(255, 255, 255, 0.1); */
	background-color: #0d4d9c;
    transform: translateY(-1px);
    border-color: white;
}
.btn-primary {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
}

.btn-primary:hover {
    background-color: #0d4d9c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 77, 156, 0.3);
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 136, 56, 0.3);
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(224, 168, 0, 0.3);
}

/* 配置面板样式 */
.config-panel {
    padding: 15px 30px;
    background-color: #f8fafc;
    border-bottom: 1px solid #eaeaea;
    display: none;
}

/* 弹窗提醒样式 */
.cheat-warning {
    position: fixed;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 0, 0, .65);
    color: #fff;
    padding: 18px 26px;
    border-radius: 8px;
    font-size: 20px;
    z-index: 99999;
    display: none;
}
.config-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.config-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.config-item label {
    font-size: 14px;
    color: #555;
}

.config-item input, .config-item select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    width: 120px;
}

/* 隐藏配置面板 */
.config-panel, #configToggleBtn { 
    display: none !important; 
}

/* 统计信息样式 */
.stats {
    display: flex;
    gap: 20px;
    font-size: 15px;
    color: #555;
    flex-wrap: wrap;
}

.stat-item {
    background-color: white;
    padding: 8px 15px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* 题目容器样式 */
.questions-container {
    padding: 20px 30px 40px;
}

.question-card {
    background-color: white;
    border-left: 4px solid #1a6dcc;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
}

.question-card:hover {
    transform: translateY(-3px);
}

.question-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #eee;
}

.question-type {
    font-size: 14px;
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 600;
}

.single { background-color: #e8f4ff; color: #1a6dcc; }
.multi { background-color: #fff8e1; color: #ff9800; }
.judge { background-color: #f0f9eb; color: #67c23a; }
.short { background-color: #ff40ac; color: #000000; }

/* 简答题题型标签样式 */
.question-type.short-answer {
    background-color: #9b59b6; /* 紫色，与其他题型区分 */
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    display: inline-block;
    margin-right: 8px;
    box-shadow: 0 2px 4px rgba(155, 89, 182, 0.3);
}

/* 简答题输入框样式 */
.short-answer-input {
	width: 100%;
	padding: 12px;
	border: 2px solid #ddd;
	border-radius: 8px;
	font-size: 16px;
	resize: vertical;
	margin-top: 10px;
	transition: border-color 0.3s, box-shadow 0.3s;
	box-sizing: border-box;
}
.short-answer-input:focus {
	outline: none;
	border-color: #3498db;
	box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}


.question-text {
    font-size: 17px;
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.5;
}

.options-list {
    list-style: none;
}

.option-item {
    padding: 12px 15px;
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.option-item:hover {
    background-color: #f9f9f9;
    border-color: #b0c4de;
}

.option-item.selected {
    background-color: #e8f4ff;
    border-color: #1a6dcc;
}

.option-item input {
    margin-right: 12px;
    cursor: pointer;
}

/* 结果页面样式 */
.result-container {
    display: none;
    padding: 30px;
    text-align: center;
    background-color: #f8fafc;
    border-top: 1px solid #eaeaea;
}

.score-display {
    font-size: 48px;
    font-weight: 700;
    color: #1a6dcc;
    margin: 20px 0;
}

.result-details {
    text-align: left;
    max-width: 95%;
    margin: 30px auto;
}

.result-item {
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    border-left: 4px solid;
}

/* 答对区域 */
.correct {
    background-color: #d3f6bf;
    border-left-color: #67c23a;
}

.incorrect {
    background-color: #ffebee;
    border-left-color: #f44336;
}

.explanation {
    margin-top: 10px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1a6dcc;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 直接针对答题结果容器内的段落 */
.result-container > p {
    font-size: 20px;
    color: #0e4000;
    margin: 10px 0 5px 0;
    padding: 12px 20px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-weight: 600;
}


/* 返回顶部按钮 */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #2980b9;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s;
    z-index: 1000;
    display: none;
}

#backToTop:hover {
    background-color: #1a5fb4;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

footer {
    text-align: center;
    padding: 20px;
    color: #777;
    font-size: 14px;
    border-top: 1px solid #eee;
    margin-top: 20px;
}

.footerbuttom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
    padding: 10px;
    color: #7f8c8d;
    font-size: 12px;
    border-top: 1px solid #d6dbdf;
    background-color: #ecf0f1;
    box-sizing: border-box; 
    z-index: 100; 
}

/* 温习题库页面特有样式 */
.search-section {
    padding: 5px 30px;
    background-color: #f8fafc;
    border-bottom: 1px solid #eaeaea;

}

.search-box {
    display: flex;
    gap: 15px;
	margin-top: 10px;
    flex-wrap: wrap;
	max-width:98%;
	margin-left:auto;
	margin-right:auto
}

#searchInput {
    flex: 1;
    min-width: 300px;
    padding: 14px 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
}

#searchInput:focus {
    outline: none;
    border-color: #2980b9;
    box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.2);
}

.filter-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 5px;
}

.filter-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-label {
    font-weight: 600;
    color: #2980b9;
    font-size: 15px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.type-filter-btn, .category-filter-btn {
    padding: 8px 16px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.type-filter-btn:hover, .category-filter-btn:hover {
    background-color: #f0f7ff;
}

.type-filter-btn.active, .category-filter-btn.active {
    background-color: #2980b9;
    color: white;
    border-color: #2980b9;
}

/* 题型筛选按钮颜色 */
.type-filter-btn[data-filter="single"]:hover,
.type-filter-btn[data-filter="single"].active {
    background-color: #1a5fb4;
    border-color: #1a5fb4;
}

.type-filter-btn[data-filter="multi"]:hover,
.type-filter-btn[data-filter="multi"].active {
    background-color: #2e7d32;
    border-color: #2e7d32;
}

.type-filter-btn[data-filter="judge"]:hover,
.type-filter-btn[data-filter="judge"].active {
    background-color: #f39c12;
    border-color: #f39c12;
}


.type-filter-btn[data-filter="short"]:hover,
.type-filter-btn[data-filter="short"].active {
    background-color: #9b59b6;
    border-color: #f39c12;
}


/* 分类筛选按钮颜色 */
.category-filter-btn[data-category="three-system"]:hover,
.category-filter-btn[data-category="three-system"].active {
    background-color: #1a5fb4;
    border-color: #1a5fb4;
}

.category-filter-btn[data-category="law-popularization"]:hover,
.category-filter-btn[data-category="law-popularization"].active {
    background-color: #8e44ad;
    border-color: #8e44ad;
}

.category-filter-btn[data-category="civil-code"]:hover,
.category-filter-btn[data-category="civil-code"].active {
    background-color: #16a085;
    border-color: #16a085;
}

.category-filter-btn[data-category="enterprise-law"]:hover,
.category-filter-btn[data-category="enterprise-law"].active {
    background-color: #d35400;
    border-color: #d35400;
}

.category-filter-btn[data-category="xi-thought"]:hover,
.category-filter-btn[data-category="xi-thought"].active {
    background-color: #c0392b;
    border-color: #c0392b;
}

.category-filter-btn[data-category="constitution"]:hover,
.category-filter-btn[data-category="constitution"].active {
    background-color: #2980b9;
    border-color: #2980b9;
}

.category-filter-btn[data-category="centralized-law"]:hover,
.category-filter-btn[data-category="centralized-law"].active {
    background-color: #27ae60;
    border-color: #27ae60;
}

.category-filter-btn[data-category="administrative-law"]:hover,
.category-filter-btn[data-category="administrative-law"].active {
    background-color: #34495e;
    border-color: #34495e;
}

.category-filter-btn[data-category="security-concept"]:hover,
.category-filter-btn[data-category="security-concept"].active {
    background-color: #7f8c8d;
    border-color: #7f8c8d;
}

.results-info {
    padding: 15px 30px;
    background-color: #f8fafc;
    border-bottom: 1px solid #eaeaea;
    font-size: 15px;
    color: #555;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.current-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-tag {
    padding: 4px 10px;
    background-color: #e8f4fd;
    color: #1a5fb4;
    border-radius: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-tag .remove {
    cursor: pointer;
    font-weight: bold;
}

.question-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.question-category {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    background-color: #f1f8ff;
    color: #1a5fb4;
}

.single-choice {
    background-color: #e8f4fd;
    color: #1a5fb4;
}

.multi-choice {
    background-color: #f0f7e8;
    color: #2e7d32;
}

.judgment {
    background-color: #fef5e7;
    color: #f39c12;
}

.question-number {
    font-weight: bold;
    color: #555;
    font-size: 15px;
}

.options-list {
    margin-left: 10px;
    margin-bottom: 20px;
}

/* 正确答案边框-横条颜色 */
.option-item.correct {
    border-left-color: #008516;
    background-color: #cdf1d3;
}

.answer-section {
    background-color: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

/* 正确答案文本颜色 */
.answer-title {
    font-weight: 600;
    color: #2980b9;
    margin-bottom: 8px;
    font-size: 16px;
}

/* 正确答案文本颜色 */
.answer-text {
    color: #008516;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 16px;
}

.explanation {
    color: #555;
    font-size: 15px;
    line-height: 1.7;
    border-top: 1px dashed #ddd;
    padding-top: 12px;
    margin-top: 10px;
}

.no-results {
    text-align: center;
    padding: 50px 20px;
    color: #777;
    font-size: 18px;
}

#clearFiltersBtn {
    padding: 8px 16px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    margin-left: 15px;
}

#clearFiltersBtn:hover {
    background-color: #c0392b;
}

.clear-filters-link {
    display: none;
}

/* 新增登录模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    width: 300px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.modal-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.modal-buttons button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

#loginConfirmBtn {
    background-color: #1a6dcc;
    color: white;
}

#loginConfirmBtn:hover {
    background-color: #0d4d9c;
}

#loginCancelBtn {
    background-color: #ccc;
    color: #333;
}

#loginCancelBtn:hover {
    background-color: #bbb;
}

#loginError {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 10px;
    text-align: center;
    display: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .nav-links {
        align-self: flex-end;
    }
    
    .stats {
        justify-content: center;
    }
    
    .question-header {
        flex-direction: column;
        gap: 10px;
    }
    
    body {
        padding: 10px;
    }
    
    .container {
        border-radius: 8px;
    }
    
    header {
        padding: 20px 15px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .search-section, .results-info, .questions-container {
        padding: 20px 15px;
    }
    
    .question-card {
        padding: 18px;
    }
    
    .results-info {

		flex-wrap: nowrap;
        gap: 10px;
    }
    
    #backToTop {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}