:root {
    --primary-color: #27ae60;
    --primary-light: #2ecc71;
    --primary-dark: #229954;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --gray-color: #95a5a6;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #3498db;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
    background-color: #f8f9fa;
    color: var(--dark-color);
    line-height: 1.6;
}

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

/* 登录页面样式 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
}

.login-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 100%;
    max-width: 400px;
    padding: 30px;
    text-align: center;
}

.login-logo {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.login-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.login-subtitle {
    color: var(--gray-color);
    margin-bottom: 30px;
}

.user-type-selector {
    display: flex;
    margin-bottom: 25px;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.user-type {
    flex: 1;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.user-type.active {
    background-color: var(--primary-color);
    color: white;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.2);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    text-decoration: none;
}

.btn:hover {
    background-color: var(--primary-dark);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

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

.login-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
}

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

/* 导航栏样式 */
.navbar {
    background-color: white;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.navbar-brand i {
    margin-right: 10px;
    font-size: 24px;
}

.navbar-menu {
    display: flex;
    list-style: none;
}

.navbar-item {
    margin-left: 20px;
}

.navbar-link {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 5px 10px;
    border-radius: var(--border-radius);
}

.navbar-link:hover, .navbar-link.active {
    color: var(--primary-color);
    background-color: rgba(39, 174, 96, 0.1);
}

.user-menu {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 10px;
}

.user-name {
    margin-right: 15px;
    font-weight: 500;
}

/* 侧边栏样式 */
.sidebar {
    background-color: white;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--dark-color);
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-item {
    margin-bottom: 5px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: var(--dark-color);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.sidebar-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.sidebar-link:hover, .sidebar-link.active {
    background-color: rgba(39, 174, 96, 0.1);
    color: var(--primary-color);
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--dark-color);
    margin: 0;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    background-color: #fafafa;
}

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

.stats-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stats-icon {
    font-size: 36px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.stats-value {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.stats-label {
    color: var(--gray-color);
    font-size: 14px;
}

/* 任务列表样式 */
.task-list {
    list-style: none;
}

.task-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

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

.task-item:hover {
    background-color: #f9f9f9;
}

.task-checkbox {
    margin-right: 15px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.task-content {
    flex: 1;
}

.task-title {
    font-weight: 500;
    margin-bottom: 5px;
}

.task-meta {
    font-size: 14px;
    color: var(--gray-color);
}

.task-points {
    background-color: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

/* 打卡样式 */
.checkin-container {
    text-align: center;
    padding: 30px 0;
}

.checkin-status {
    margin-bottom: 20px;
}

.checkin-icon {
    font-size: 64px;
    color: var(--success-color);
    margin-bottom: 15px;
}

.checkin-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.checkin-description {
    color: var(--gray-color);
    margin-bottom: 20px;
}

.checkin-button {
    padding: 15px 30px;
    font-size: 18px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.checkin-button:hover {
    background-color: var(--primary-dark);
}

.checkin-button:disabled {
    background-color: var(--gray-color);
    cursor: not-allowed;
}

/* 奖励样式 */
.reward-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.reward-item {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
}

.reward-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.reward-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.reward-content {
    padding: 15px;
}

.reward-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.reward-description {
    color: var(--gray-color);
    margin-bottom: 15px;
    font-size: 14px;
}

.reward-cost {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.reward-price {
    color: var(--primary-color);
    font-weight: bold;
}

.reward-exchange {
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.reward-exchange:hover {
    background-color: var(--primary-dark);
}

.reward-exchange:disabled {
    background-color: var(--gray-color);
    cursor: not-allowed;
}

/* 错题本样式 */
.mistake-list {
    list-style: none;
}

.mistake-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: var(--transition);
}

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

.mistake-item:hover {
    background-color: #f9f9f9;
}

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

.mistake-title {
    font-weight: 500;
}

.mistake-subject {
    display: inline-block;
    padding: 3px 8px;
    background-color: rgba(39, 174, 96, 0.1);
    color: var(--primary-color);
    border-radius: 4px;
    font-size: 12px;
}

.mistake-content {
    margin-bottom: 10px;
    color: var(--dark-color);
}

.mistake-answer {
    margin-bottom: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    font-size: 14px;
}

.mistake-explanation {
    padding: 10px;
    background-color: rgba(52, 152, 219, 0.1);
    border-radius: var(--border-radius);
    font-size: 14px;
}

.mistake-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.mistake-checkbox {
    margin-right: 10px;
}

/* 统计图表样式 */
.chart-container {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    margin-bottom: 20px;
    height: 300px;
    position: relative;
}

.chart-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
}

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

.table th {
    background-color: #f8f9fa;
    font-weight: 500;
    color: var(--dark-color);
}

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

/* 表单样式 */
.form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.form-col {
    flex: 1;
    padding: 0 10px;
    min-width: 250px;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray-color);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 文件上传样式 */
.file-upload {
    position: relative;
    display: inline-block;
    cursor: pointer;
    width: 100%;
}

.file-upload input[type=file] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-label {
    display: block;
    padding: 12px 15px;
    background-color: var(--light-color);
    border: 2px dashed #ddd;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
}

.file-upload:hover .file-upload-label {
    border-color: var(--primary-color);
    background-color: rgba(39, 174, 96, 0.05);
}

.file-upload-icon {
    font-size: 48px;
    color: var(--gray-color);
    margin-bottom: 10px;
}

.file-upload-text {
    color: var(--gray-color);
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-color);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 15px;
    color: #ddd;
}

.empty-state-text {
    font-size: 16px;
}

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 10px;
}

.badge-primary {
    background-color: var(--primary-color);
    color: white;
}

.badge-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.badge-success {
    background-color: var(--success-color);
    color: white;
}

.badge-warning {
    background-color: var(--warning-color);
    color: white;
}

.badge-danger {
    background-color: var(--danger-color);
    color: white;
}

.badge-info {
    background-color: var(--info-color);
    color: white;
}

/* 等级徽章样式 */
.level-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
}

.level-bronze {
    background-color: #cd7f32;
    color: white;
}

.level-silver {
    background-color: #c0c0c0;
    color: white;
}

.level-gold {
    background-color: #ffd700;
    color: #333;
}

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

.page-item {
    margin: 0 5px;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: white;
    color: var(--dark-color);
    text-decoration: none;
    transition: var(--transition);
}

.page-link:hover, .page-item.active .page-link {
    background-color: var(--primary-color);
    color: white;
}

/* 页脚样式 */
.footer {
    background-color: white;
    border-top: 1px solid #eee;
    padding: 20px 0;
    margin-top: 40px;
    text-align: center;
    color: var(--gray-color);
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .reward-list {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .navbar-container {
        flex-direction: column;
    }
    
    .navbar-brand {
        margin-bottom: 15px;
    }
    
    .navbar-menu {
        flex-direction: column;
        width: 100%;
    }
    
    .navbar-item {
        margin: 5px 0;
    }
    
    .user-menu {
        margin-top: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .reward-list {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-col {
        padding: 0;
        margin-bottom: 15px;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .table {
        font-size: 14px;
    }
    
    .table th, .table td {
        padding: 8px 10px;
    }
}

@media (max-width: 576px) {
    .login-card {
        padding: 20px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .card-header .btn {
        margin-top: 10px;
    }
    
    .task-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .task-checkbox {
        margin-bottom: 10px;
    }
    
    .task-points {
        margin-top: 10px;
    }
    
    .mistake-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .mistake-subject {
        margin-top: 5px;
    }
    
    .mistake-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

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

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

/* 提示消息样式 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    z-index: 2000;
    display: flex;
    align-items: center;
    min-width: 250px;
    animation: slideInRight 0.3s, slideOutRight 0.3s 2.7s;
    animation-fill-mode: forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast-icon {
    margin-right: 10px;
    font-size: 20px;
}

.toast-success {
    border-left: 4px solid var(--success-color);
}

.toast-success .toast-icon {
    color: var(--success-color);
}

.toast-error {
    border-left: 4px solid var(--danger-color);
}

.toast-error .toast-icon {
    color: var(--danger-color);
}

.toast-warning {
    border-left: 4px solid var(--warning-color);
}

.toast-warning .toast-icon {
    color: var(--warning-color);
}

.toast-info {
    border-left: 4px solid var(--info-color);
}

.toast-info .toast-icon {
    color: var(--info-color);
}

/* 进度条样式 */
.progress {
    height: 10px;
    background-color: #eee;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 5px;
    transition: width 0.3s ease;
}

/* 标签样式 */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.tag {
    display: inline-block;
    padding: 3px 10px;
    background-color: var(--light-color);
    color: var(--dark-color);
    border-radius: 15px;
    font-size: 12px;
}

/* 标签页样式 */
.tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    font-weight: 500;
}

.tab:hover {
    color: var(--primary-color);
}

.tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}