* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 0;
}

.header h1 {
    font-size: 24px;
    color: #333;
    font-weight: bold;
}

.header-buttons {
    display: flex;
    gap: 10px;
}

/* 统计卡片样式 */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    font-size: 32px;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.stat-label {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .header-buttons {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .header-buttons .btn {
        flex: 1;
        min-width: 120px;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-icon {
        font-size: 24px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .search-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .select-container {
        margin-left: 0;
    }
    
    .question-item {
        padding: 10px;
    }
    
    .question-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .modal-content {
        width: 90% !important;
        margin: 15% auto !important;
    }
    
    #importModal .modal-content {
        width: 95% !important;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .page-link {
        padding: 6px 10px;
        font-size: 14px;
    }
}

.btn-view {
    background-color: #9c27b0;
    color: white;
}

.btn-view:hover {
    background-color: #7b1fa2;
}

.btn-import {
    background-color: #4caf50;
    color: white;
}

.btn-import:hover {
    background-color: #388e3c;
}

.search-bar {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

.search-btn {
    padding: 10px 20px;
    background-color: #4a6cf7;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 14px;
}

.search-btn:hover {
    background-color: #3a58d9;
}

.select-container {
    margin-left: 20px;
}

.type-select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.question-list {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    min-height: 400px;
}

.question-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.question-item:last-child {
    border-bottom: none;
}

.question-content {
    font-weight: bold;
    margin-bottom: 10px;
}

.question-options {
    margin-bottom: 10px;
}

.option {
    margin-bottom: 5px;
}

.option.correct {
    color: #4caf50;
    font-weight: bold;
}

.question-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #666;
}

.question-actions {
    display: flex;
    align-items: center;
}

.question-tags {
    display: flex;
    gap: 5px;
}

.tag {
    background-color: #f0f0f0;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* 按钮样式 */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #4a6cf7;
    color: white;
}

.btn-primary:hover {
    background-color: #3a58d9;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
    margin-right: 10px;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.format-example {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 10px;
}

.import-methods {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.import-methods label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.file-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
}

.file-hint {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.format-example p {
    margin-bottom: 5px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 600px;
    position: relative;
}

/* 批量导入模态框特殊样式 */
#importModal .modal-content {
    width: 800px;
    margin-top: 5%;
    max-height: 80vh;
    overflow-y: auto;
}

/* 调整批量导入的文本区域高度 */
#importModal textarea {
    height: 300px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 18px;
}

.close {
    font-size: 24px;
    cursor: pointer;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* 选项管理 */
.options-container {
    margin-bottom: 10px;
}

.option-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.option-item label {
    width: 20px;
    font-weight: bold;
}

.option-item input {
    flex: 1;
    margin-right: 10px;
}

.remove-option {
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
}

.add-option {
    color: #4a6cf7;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 15px;
}

.add-option:hover {
    text-decoration: underline;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

.page-link {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.page-link:hover {
    background-color: #f5f5f5;
    border-color: #999;
}

.page-link.active {
    background-color: #4caf50;
    color: white;
    border-color: #4caf50;
}

/* 危险按钮样式 */
.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}