/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

body {
    background-color: #f4f7f9;
    color: #333;
    line-height: 1.6;
    font-size: 14px;
}

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

/* 标题样式 */
h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 2.2rem;
    font-weight: bold;
}

h2 {
    margin: 25px 0 15px;
    color: #34495e;
    font-size: 1.6rem;
    font-weight: bold;
}

/* 输入区域样式 */
.input-section {
    background-color: #fff;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    border: 1px solid #e1e8ed;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 15px;
}

.input-group label {
    font-weight: bold;
    color: #555;
    font-size: 14px;
    width: 70px;
    text-align: right;
}

.input-group input, .input-group select {
    padding: 8px 12px;
    border: 1px solid #d3d9de;
    border-radius: 4px;
    font-size: 14px;
    width: 160px;
    transition: border-color 0.3s;
}

.input-group input:focus, .input-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

/* 按钮样式 */
.btn {
    padding: 8px 18px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-right: 10px;
}

.btn:hover {
    opacity: 0.9;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    opacity: 0.6;
}

/* 进度条样式 */
.progress-section {
    margin-bottom: 25px;
}

.progress-bar {
    width: 100%;
    height: 18px;
    background-color: #e0e0e0;
    border-radius: 9px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress {
    height: 100%;
    background-color: #27ae60;
    width: 0%;
    transition: width 0.3s;
    border-radius: 9px;
}

.status {
    text-align: center;
    font-weight: bold;
    color: #555;
    font-size: 14px;
}

/* 结果区域样式 */
.result-section {
    background-color: #fff;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border: 1px solid #e1e8ed;
}

.result-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

#resultCount {
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
}

table th,
table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

table th {
    background-color: #f5f7fa;
    font-weight: bold;
    color: #333;
    border-bottom: 2px solid #ddd;
}

table tr:hover {
    background-color: #f9fafb;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    gap: 10px;
}

.pagination button {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background-color: #fff;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
}

.pagination button:hover:not(:disabled) {
    background-color: #f5f5f5;
}

.pagination button:disabled {
    color: #999;
    cursor: not-allowed;
}

#pageInfo {
    font-size: 14px;
    color: #555;
}

/* 管理员入口链接 */
.admin-link {
    text-align: center;
    margin: 20px 0;
}

.admin-link a {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
}

.admin-link a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .input-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .input-group {
        flex-direction: column;
        align-items: stretch;
        margin-right: 0;
    }
    
    .input-group label {
        width: auto;
        text-align: left;
        margin-bottom: 5px;
    }
    
    .input-group input {
        width: 100%;
    }
    
    .result-controls {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 消息提示样式 */
#message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
    width: 100%;
    text-align: center;
}

#message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}