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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    overflow: hidden;
}

.card-header {
    background-color: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.card-header h2 {
    color: #333;
    font-size: 1.5rem;
}

.card-body {
    padding: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #2575fc;
    box-shadow: 0 0 0 3px rgba(37, 117, 252, 0.1);
}

.form-hint {
    margin-top: 5px;
    font-size: 0.9rem;
    color: #777;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #2575fc;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.2s;
    text-align: center;
}

.btn:hover {
    background-color: #1a68e8;
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background-color: #2575fc;
}

.btn-primary:hover {
    background-color: #1a68e8;
}

.btn-danger {
    background-color: #e74c3c;
}

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

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

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

.alert-success {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

/* 结果框样式 */
.result-box {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #28a745;
}

.new-card {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2575fc;
    text-align: center;
    padding: 15px;
    background-color: white;
    border-radius: 5px;
    margin: 15px 0;
    font-family: monospace;
    letter-spacing: 1px;
}

.tip {
    color: #666;
    font-style: italic;
    margin-top: 10px;
}

/* 使用说明样式 */
.instructions {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.instructions h3 {
    margin-bottom: 15px;
    color: #333;
}

.instructions ol {
    padding-left: 20px;
}

.instructions li {
    margin-bottom: 8px;
}

/* 底部链接样式 */
.footer-links {
    text-align: center;
    margin-top: 20px;
    padding: 20px;
    color: #666;
}

.separator {
    margin: 0 15px;
    color: #ccc;
}

.footer-links a {
    color: #2575fc;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* 页脚样式 */
footer {
    text-align: center;
    margin-top: auto;
    padding: 20px;
    color: #666;
    border-top: 1px solid #eee;
}

/* 登录页面样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.login-card h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
}

/* 管理后台样式 */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-nav {
    display: flex;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    overflow: hidden;
}

.admin-nav a {
    flex: 1;
    text-align: center;
    padding: 15px;
    color: #555;
    text-decoration: none;
    transition: background-color 0.3s;
    border-bottom: 3px solid transparent;
}

.admin-nav a:hover {
    background-color: #f8f9fa;
}

.admin-nav a.active {
    color: #2575fc;
    border-bottom-color: #2575fc;
    font-weight: 600;
}

/* 仪表板样式 */
.dashboard h2 {
    margin-bottom: 20px;
    color: #333;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: white;
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.stat-info p {
    color: #777;
    font-size: 0.9rem;
}

.recent-activity {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.recent-activity h3 {
    margin-bottom: 15px;
    color: #333;
}

/* 数据表格样式 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

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

.data-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #555;
}

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

.data-table code {
    background-color: #f8f9fa;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: monospace;
}

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

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-success {
    background-color: #d4edda;
    color: #155724;
}

.badge-danger {
    background-color: #f8d7da;
    color: #721c24;
}

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

.page-link {
    padding: 8px 12px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    color: #555;
    text-decoration: none;
    transition: background-color 0.3s;
}

.page-link:hover {
    background-color: #f8f9fa;
}

.page-link.active {
    background-color: #2575fc;
    color: white;
    border-color: #2575fc;
}

/* 信息框样式 */
.info-box {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #2575fc;
}

.info-box h3 {
    margin-bottom: 10px;
    color: #333;
}

.info-box ul {
    padding-left: 20px;
}

.info-box li {
    margin-bottom: 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .admin-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .admin-nav {
        flex-direction: column;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .data-table {
        display: block;
        overflow-x: auto;
    }
}