/* 全局样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* 容器样式 */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* 按钮样式 */
button, a.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s;
}

button:hover, a.btn:hover {
    background-color: #5a67d8;
}

button.secondary, a.btn-secondary {
    background-color: #e2e8f0;
    color: #4a5568;
}

button.secondary:hover, a.btn-secondary:hover {
    background-color: #cbd5e0;
}

button.danger, a.btn-danger {
    background-color: #e53e3e;
}

button.danger:hover, a.btn-danger:hover {
    background-color: #c53030;
}

/* 表单样式 */
input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    margin-bottom: 15px;
    transition: border-color 0.3s;
}

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

label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: bold;
}

/* 消息提示样式 */
.message {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 14px;
}

.message.success {
    background-color: #e8f5e8;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.message.error {
    background-color: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

.message.warning {
    background-color: #fff3e0;
    color: #ef6c00;
    border-left: 4px solid #ff9800;
}

.message.info {
    background-color: #e3f2fd;
    color: #1565c0;
    border-left: 4px solid #2196f3;
}

/* 卡片样式 */
.card {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

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

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

th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #555;
}

tr:hover {
    background-color: #f5f5f5;
}

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

.pagination a {
    color: #667eea;
    padding: 8px 16px;
    text-decoration: none;
    border: 1px solid #ddd;
    margin: 0 2px;
    border-radius: 5px;
    transition: all 0.3s;
}

.pagination a.active {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination a:hover:not(.active) {
    background-color: #f5f5f5;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .card {
        padding: 15px;
    }
    
    button, a.btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    input, select, textarea {
        padding: 10px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 20px;
    }
    
    h2 {
        font-size: 18px;
    }
    
    h3 {
        font-size: 16px;
    }
    
    .card {
        padding: 10px;
    }
    
    th, td {
        padding: 8px;
        font-size: 14px;
    }
}

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

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

/* 隐藏类 */
.hidden {
    display: none;
}

/* 文本对齐 */
.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; }
.ml-10 { margin-left: 10px; }
.mr-10 { margin-right: 10px; }

/* 浮动类 */
.float-left { float: left; }
.float-right { float: right; }
.clearfix::after { content: ""; display: table; clear: both; }