/* 全局样式 */
:root {
    --primary-color: #4a6ee0;
    --secondary-color: #6f42c1;
    --accent-color: #ffb74d;
    --success-color: #4caf50;
    --danger-color: #f44336;
    --warning-color: #ffc107;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #333;
    --text-light: #6c757d;
    --body-bg: #f5f7fa;
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
}

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

body {
    font-family: 'Nunito', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--body-bg);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: all var(--transition-speed) ease;
}

a:hover {
    color: var(--secondary-color);
}

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

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    text-align: center;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
    border: none;
    padding: 14px 24px;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #004085;
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(99, 102, 241, 0.4);
    color: white;
}

.btn-primary:active {
    background-color: #0069d9;
    border-color: #005cbf;
    color: white;
}

.btn-primary:focus {
    box-shadow: 0 0 0 0.2rem rgba(38, 143, 255, 0.5);
    color: white;
}

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

.btn-secondary:hover {
    background-color: #5a35a0;
    color: white;
}

.btn-secondary:active {
    background-color: #6f42c1;
    color: white;
}

.btn-secondary:focus {
    box-shadow: 0 0 0 0.2rem rgba(111, 66, 193, 0.5);
    color: white;
}

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

.btn-success:hover {
    background-color: #3d8b40;
    color: white;
}

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

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

.form-control {
    padding: 12px 15px;
    font-size: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    outline: none;
}

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

/* 卡片样式 */
.card {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background-color: white;
    overflow: hidden;
    transition: all 0.3s ease;
    transform: translateY(0);
    margin-bottom: 30px;
    border: none;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.2);
}

.card-header {
    padding: 25px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    position: relative;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    border-bottom: none;
}

.card-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='rgba(255,255,255,.075)' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.3;
}

.card-header h2 {
    position: relative;
    z-index: 2;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.card-body {
    padding: 30px;
    background-color: #f8fafc;
    border-radius: 0 0 12px 12px;
}

.card-footer {
    padding: 15px 20px;
    background-color: rgba(0, 0, 0, 0.03);
    border-top: 1px solid rgba(0, 0, 0, 0.125);
}

/* 导航栏 */
.navbar {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.navbar-brand {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

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

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

.navbar-link {
    color: var(--text-color);
    font-weight: 600;
}

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

/* 页头 */
.header {
    text-align: center;
    padding: 0;
    margin-bottom: 30px;
}

/* 自定义封面样式 */
.custom-banner {
    width: 100%;
    margin: 0 auto;
    padding: 0;
    overflow: hidden;
    position: relative;
}

.custom-cover-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 文字覆盖层 */
.cover-text-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.3));
    text-align: center;
    padding: 20px;
    border-radius: 5px;
}

/* 标题样式 */
.header-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: white;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: 700;
}

.header-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.95);
    max-width: 700px;
    margin: 0 auto;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    line-height: 1.5;
}

/* 媒体查询 */
@media (max-width: 768px) {
    .header-title {
        font-size: 2rem;
    }
    
    .header-subtitle {
        font-size: 1rem;
    }
    
    .navbar-menu {
        flex-direction: column;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-links {
        margin-top: 15px;
    }
}

@media (max-width: 480px) {
    .header-title {
        font-size: 1.6rem;
    }
    
    .header-subtitle {
        font-size: 0.9rem;
    }
    
    .cover-text-overlay {
        padding: 15px;
    }
}

/* 问题卡片 */
.question-card {
    display: none;
}

.question-card.active {
    display: block;
}

.question-number {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.question-text {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
}

/* 选项样式优化 */
.options-list {
    list-style: none;
    padding: 0;
    margin-top: 10px;
}

.option-item {
    margin-bottom: 12px;
}

.option-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s ease;
    background-color: #fff;
}

.option-label:hover {
    border-color: #6366f1;
    background-color: rgba(99, 102, 241, 0.05);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.option-input {
    margin-right: 15px;
    margin-top: 3px;
}

.option-text {
    flex: 1;
    line-height: 1.5;
}

/* 进度条 */
.progress-container {
    margin-bottom: 30px;
}

.progress-bar {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

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

.progress-text {
    margin-top: 10px;
    text-align: right;
    font-size: 14px;
    color: var(--text-light);
}

/* 测试结果页面 */
.result-container {
    text-align: center;
}

.result-score {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 20px 0;
}

.result-message {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--text-color);
}

.result-detail {
    margin-top: 20px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    text-align: left;
}

/* 推荐课程卡片 */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.course-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-speed) ease;
}

.course-card:hover {
    transform: translateY(-5px);
}

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

.course-body {
    padding: 20px;
}

.course-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.course-description {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* 页脚 */
.footer {
    background-color: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    padding: 30px 0;
    margin-top: 60px;
}

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

.footer-text {
    color: var(--text-light);
}

.footer-links {
    display: flex;
    list-style: none;
}

.footer-link {
    margin-left: 20px;
    color: var(--text-light);
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar-menu {
        display: none;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-links {
        margin-top: 20px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* 加载动画 */
.loader {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(74, 110, 224, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

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

/* 工具类 */
.text-center {
    text-align: center;
}

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

.text-primary {
    color: var(--primary-color);
}

.text-success {
    color: var(--success-color);
}

.text-danger {
    color: var(--danger-color);
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-30 {
    margin-top: 30px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.d-none {
    display: none;
}

.d-block {
    display: block;
}

.d-flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

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

/* 系统工具样式 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tool-card {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

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

.tool-card i {
    color: #0071e3;
    margin-bottom: 15px;
}

.tool-card h3 {
    margin: 10px 0;
    font-size: 18px;
}

.tool-card p {
    color: #666;
    margin-bottom: 15px;
    font-size: 14px;
}

.mt-4 {
    margin-top: 2rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

/* 测评说明样式 */
.assessment-header {
    background-color: #6366f1;
    border-radius: 10px 10px 0 0;
}

.assessment-body {
    background-color: #f8f9ff;
    border-radius: 0 0 10px 10px;
    padding: 25px 30px;
}

.card-body ul {
    padding-left: 15px;
    margin: 0;
}

.card-body ul li {
    margin-bottom: 12px;
    padding-left: 10px;
    position: relative;
    list-style-type: none;
}

.card-body ul li:before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: -15px;
}

.card-body ul li:last-child {
    margin-bottom: 0;
}

/* 测评页面样式 */
.assessment-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 15px;
}

.assessment-header {
    background-color: #6366f1;
    color: white;
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    margin-bottom: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.assessment-header .category-badge {
    margin-bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
}

.assessment-header .category-badge i {
    color: white;
    margin-right: 8px;
}

/* 进度条样式优化 */
.progress-container {
    margin: 15px 0 20px;
}

.progress-bar {
    height: 6px;
    background-color: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress {
    height: 100%;
    background-color: #6366f1;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    margin-top: 5px;
    text-align: right;
    font-size: 14px;
    color: #666;
}

/* 问题卡片优化 */
.question-card {
    margin-top: 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.question-number {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
}

.question-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* 结果页面样式 */
.result-content {
    max-width: 800px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.result-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.result-header h2 {
    color: #333;
    font-size: 28px;
    margin-bottom: 15px;
}

.student-name {
    font-size: 20px;
    font-weight: 500;
    color: #555;
    margin-bottom: 5px;
}

.category {
    color: #777;
    font-size: 16px;
}

.score-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.score {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-right: 15px;
}

.score-value {
    color: #6366f1;
    font-size: 32px;
}

.percentage {
    font-size: 28px;
    font-weight: 700;
    color: #6366f1;
    background-color: rgba(99, 102, 241, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
}

.result-level {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    text-align: center;
}

.result-level h3 {
    color: #555;
    font-size: 20px;
    margin-bottom: 15px;
}

.level-name {
    font-size: 26px;
    font-weight: 700;
    color: #6366f1;
    margin-bottom: 15px;
}

.level-comment {
    color: #555;
    line-height: 1.6;
    font-size: 16px;
}

.recommended-courses {
    margin-bottom: 30px;
}

.recommended-courses h3 {
    color: #555;
    font-size: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.courses-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.course-card {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.course-name {
    color: #333;
    font-size: 18px;
    margin-bottom: 10px;
}

.course-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.course-link {
    display: inline-block;
    color: #6366f1;
    font-weight: 500;
    text-decoration: none;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.course-link:hover {
    border-color: #6366f1;
}

.result-details h3 {
    color: #555;
    font-size: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.details-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-item {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.detail-item.correct {
    border-left: 4px solid #4caf50;
}

.detail-item.incorrect {
    border-left: 4px solid #f44336;
}

.question-text {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.5;
    font-weight: 500;
}

.answer-container {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
}

.correct-answer {
    color: #4caf50;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    background-color: rgba(76, 175, 80, 0.1);
    padding: 10px 15px;
    border-radius: 6px;
    border-left: 3px solid #4caf50;
}

.student-answer, .correct-answer {
    display: flex;
    align-items: flex-start;
}

.label {
    font-weight: 500;
    color: #555;
    width: 100px;
    flex-shrink: 0;
}

.value {
    color: #333;
}

.score-info {
    font-weight: 500;
    text-align: right;
}

.score-earned {
    color: #6366f1;
}

.no-details {
    text-align: center;
    color: #777;
    padding: 20px;
}

.error-message {
    text-align: center;
    padding: 30px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.error-message h3 {
    color: #f44336;
    margin-bottom: 15px;
}

.error-message p {
    color: #555;
    margin-bottom: 10px;
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
}

.debug-info {
    margin-top: 30px;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 8px;
    overflow-x: auto;
}

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

.debug-info pre {
    background-color: #333;
    color: #f8f8f8;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.5;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .result-content {
        padding: 20px;
    }
    
    .courses-container {
        grid-template-columns: 1fr;
    }
    
    .score-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .score {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .answer-container {
        padding: 10px;
    }
    
    .student-answer, .correct-answer {
        flex-direction: column;
    }
    
    .label {
        width: 100%;
        margin-bottom: 5px;
    }
}

.btn-home {
    background-color: #4a6ee0;
    border-color: #4a6ee0;
    color: white;
}

.btn-home:hover {
    background-color: #3a5ec0;
    border-color: #3a5ec0;
    color: white;
}

.btn-home:active {
    background-color: #5a7ee0;
    border-color: #5a7ee0;
    color: white;
}

.btn-home:focus {
    box-shadow: 0 0 0 0.2rem rgba(74, 110, 224, 0.5);
    color: white;
} 