/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Noto Sans SC', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: #2d3748;
    line-height: 1.6;
}

.main-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部导航栏 */
.main-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-left .main-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.welcome-text {
    font-size: 14px;
    opacity: 0.9;
}

.header-right .user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.username {
    font-size: 16px;
    font-weight: 500;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* 主内容区域 */
.main-content {
    flex: 1;
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* 模块网格布局 */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* 模块卡片 */
.module-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.module-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.module-icon {
    font-size: 48px;
    margin-bottom: 15px;
    text-align: center;
}

.module-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2d3748;
    text-align: center;
}

.module-description {
    color: #718096;
    font-size: 14px;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.5;
}

.module-stats {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.stat-item {
    background: #f7fafc;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.module-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.module-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.module-btn:hover::before {
    left: 100%;
}

.module-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.module-btn-disabled {
    background: #a0aec0;
    cursor: not-allowed;
    opacity: 0.6;
}

.module-btn-disabled:hover {
    transform: none;
    box-shadow: none;
}

/* 模块内容区域 */
.module-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    height: calc(100vh - 180px);
    display: flex;
    flex-direction: column;
}

.module-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

.back-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-2px);
}

.current-module-title {
    font-size: 24px;
    font-weight: 700;
    flex: 1;
}

.module-actions {
    display: flex;
    gap: 10px;
}

.module-container {
    flex: 1;
    overflow: auto;
    padding: 0;
}

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 16px;
    color: #4a5568;
    font-weight: 500;
}

/* 底部信息 */
.main-footer {
    background: #2d3748;
    color: white;
    padding: 20px 30px;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-size: 14px;
}

.footer-separator {
    opacity: 0.5;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-header {
        padding: 0 20px;
        height: 70px;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .modules-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .module-card {
        padding: 25px;
    }
    
    .module-header {
        padding: 15px 20px;
    }
    
    .current-module-title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .main-header {
        flex-direction: column;
        height: auto;
        padding: 15px 20px;
        gap: 10px;
    }
    
    .main-title {
        font-size: 20px;
    }
    
    .module-card {
        padding: 20px;
    }
    
    .module-stats {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 5px;
    }
    
    .footer-separator {
        display: none;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.module-card {
    animation: fadeIn 0.6s ease;
}

.module-card:nth-child(2) { animation-delay: 0.1s; }
.module-card:nth-child(3) { animation-delay: 0.2s; }
.module-card:nth-child(4) { animation-delay: 0.3s; }
.module-card:nth-child(5) { animation-delay: 0.4s; }
.module-card:nth-child(6) { animation-delay: 0.5s; }