/**
 * 星核搜索引擎 - 全局样式
 */

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background: #fff;
}

a {
    color: #667eea;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* 通用类 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }

/* 按钮 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn:hover {
    background: #5a6fd6;
    text-decoration: none;
}

.btn-primary { background: #667eea; }
.btn-success { background: #4CAF50; }
.btn-danger { background: #f44336; }
.btn-warning { background: #ff9800; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 15px 30px; font-size: 16px; }

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

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

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

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #667eea;
    outline: none;
}

.form-group .hint {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

/* 表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

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

.data-table th {
    background: #f5f5f5;
    font-weight: bold;
}

.data-table tr:hover {
    background: #fafafa;
}

/* 标签 */
.label {
    display: inline-block;
    padding: 3px 8px;
    font-size: 12px;
    border-radius: 3px;
}

.label-success { background: #e8f5e9; color: #2e7d32; }
.label-danger { background: #ffebee; color: #c62828; }
.label-warning { background: #fff3e0; color: #e65100; }
.label-info { background: #e3f2fd; color: #1565c0; }

/* 提示框 */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success { background: #e8f5e9; color: #2e7d32; }
.alert-error { background: #ffebee; color: #c62828; }
.alert-warning { background: #fff3e0; color: #e65100; }
.alert-info { background: #e3f2fd; color: #1565c0; }

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

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    color: #333;
}

.pagination a:hover {
    background: #f5f5f5;
    text-decoration: none;
}

.pagination .current {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.pagination .dots {
    border: none;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式 */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .btn {
        padding: 8px 15px;
    }
}
