:root {
    --primary-color: #409eff;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --text-color: #303133;
    --border-color: #e4e7ed;
}

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

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

/* 左侧菜单样式 */
.dashboard {
    display: flex;
    min-height: calc(100vh - 100px); /* 减去底部问答框的高度 */
}

.sidebar {
    width: 220px;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
    margin-right: 20px;
}

.logo {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    margin-bottom: 20px;
}

.menu ul {
    list-style: none;
}

.menu li {
    margin-bottom: 5px;
}

.menu a {
    display: block;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s;
}

.menu a:hover {
    background-color: rgba(64, 158, 255, 0.1);
    color: var(--primary-color);
}

.menu a.active {
    background-color: var(--primary-color);
    color: white;
}

/* 右侧内容区样式 */
.content-area {
    flex: 1;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    background: linear-gradient(135deg, #409eff, #67c23a);
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 28px;
    font-weight: 600;
}

.card {
    background-color: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    padding: 30px;
    margin-bottom: 30px;
}

.user-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

input, select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
}

input:focus, select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
    outline: none;
}

.subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.subject-item {
    background-color: #f8f9fc;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.subject-item strong {
    display: block;
    margin-bottom: 15px;
    font-size: 18px;
    color: var(--primary-color);
}

.subject-item div {
    margin-bottom: 15px;
}

.btn-group {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background-color: #409eff;
    color: white;
}

.btn-primary:hover {
    background-color: #3a8ee6;
}

.btn-secondary {
    background-color: #c0c4cc;
    color: #303133;
}

.btn-secondary:hover {
    background-color: #a8abb3;
}

.progress-bar {
    height: 8px;
    background: #f0f2f5;
    border-radius: 4px;
    overflow: hidden;
    margin: 30px 0;
}

.progress {
    height: 100%;
    background: var(--primary-color);
    width: 0;
    transition: width 0.5s ease-in-out;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    table-layout: auto; /* 自动调整列宽 */
}

th, td {
    padding: 8px 12px; /* 减小内边距 */
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: #f5f7fa;
    font-weight: 600;
}

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

.report-section {
    margin-bottom: 20px;
}

.report-section h3 {
    font-size: 20px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.chart-container {
    height: 400px;
    margin: 20px 0;
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
}

.history-panel {
    margin-top: 15px; /* 减小顶部间隙 */
}

.history-panel h3 {
    margin-bottom: 15px;
    font-size: 18px;
}

.search-bar {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

/* 学生管理模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: var(--card-bg);
    margin: 15% auto;
    padding: 20px;
    border: 1px solid var(--border-color);
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

/* 底部问答框 */
.qa-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.qa-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
}

.qa-input {
    display: flex;
    gap: 10px;
}

.qa-input input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    width: 100%;
}

/* 回答弹窗 */
#answerModal .modal-content {
    background-color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#answerContent {
    padding: 20px;
    line-height: 1.8;
    font-size: 16px;
}

/* 天赋测评面板样式 */
#talentAssessmentPanel {
    padding: 20px;
}

.options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
}

.options label {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background-color: #f5f7fa;
    border-radius: 6px;
    cursor: pointer;
}

.options input[type="radio"], .options input[type="checkbox"] {
    margin-right: 8px;
}

/* 测评结果模态框样式 */
#assessmentResultModal .modal-content {
    max-width: 800px;
    padding: 30px;
}

#assessmentResultContent {
    margin-top: 20px;
    line-height: 1.8;
}

/* 学情报告样式 */
.report-header {
    margin-bottom: 20px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .dashboard {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .menu {
        display: flex;
        overflow-x: auto;
    }
    
    .menu li {
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    .user-info, .subject-grid {
        grid-template-columns: 1fr;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    header h1 {
        font-size: 24px;
    }
    
    .card {
        padding: 20px;
    }
    
    /* 学情报告在手机上的样式 */
    .report-table {
        font-size: 14px;
        overflow-x: auto; /* 水平滚动 */
        display: block;
        width: 100%;
    }
    
    /* 模态框在手机上的样式 */
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    /* 表格内容在手机端换行 */
    .report-table td {
        white-space: normal; /* 允许换行 */
    }
}

/* 用户管理样式 */
.user-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* 进度条样式 */
.progress-container {
    text-align: center;
    margin: 20px 0;
}

.progress-bar {
    height: 8px;
    background: #f0f2f5;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.progress {
    height: 100%;
    background: var(--primary-color);
    width: 0;
    transition: width 0.3s ease-in-out;
}

/* 学生管理表格样式 */
.student-management-table {
    width: 100%;
    border-collapse: collapse;
}

.student-management-table th,
.student-management-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.student-management-table th {
    background-color: #f5f7fa;
    font-weight: 600;
}

.student-management-table tbody tr:hover {
    background-color: #f9fafc;
}

.student-management-table .action-buttons {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.student-management-table .action-buttons button {
    padding: 6px 12px;
    font-size: 14px;
}

/* 高考填报相关样式 */
.college-report {
    margin-top: 20px;
}

.college-report h4 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.college-report p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.college-report ul,
.college-report ol {
    margin-bottom: 15px;
    padding-left: 20px;
}

.college-report li {
    margin-bottom: 8px;
}