/* 学习页面样式 */

/* 主容器 */
.learning-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    position: relative;
}

/* 面包屑导航 */
.breadcrumb {
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    color: #0066cc;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* 简介区域 */
.intro-section {
    margin-bottom: 3rem;
    background-color: #f0f8ff;
    border-radius: 8px;
    padding: 1.5rem;
}

.intro-section h2 {
    margin-bottom: 1.5rem;
    color: #00838f;
}

.intro-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.intro-text {
    flex: 2;
    min-width: 300px;
}

.intro-text p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.intro-video {
    flex: 1;
    min-width: 300px;
}

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 宽高比 */
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-container img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-button:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

/* 学习模块卡片 */
.module-selection {
    margin-bottom: 3rem;
}

.module-selection h2 {
    margin-bottom: 1.5rem;
    color: #00838f;
    text-align: center;
}

.module-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.module-card {
    flex: 1;
    min-width: 240px;
    max-width: 280px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

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

.module-card h3 {
    color: #00838f;
    margin-bottom: 1rem;
}

.module-card p {
    margin-bottom: 1.5rem;
    color: #555;
}

.module-btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background-color: #00acc1;
    color: white;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.module-btn:hover {
    background-color: #007c91;
}

/* 模块内容样式 */
.module-content-container {
    margin-bottom: 3rem;
}

.module-content {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    display: none;
}

.module-content.active {
    display: block;
}

.module-content h2 {
    color: #00838f;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0f7fa;
}

.concept-section {
    margin-bottom: 2rem;
}

.concept-section h3 {
    color: #00838f;
    margin-bottom: 1rem;
}

.concept-section p, .concept-section ul {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.concept-section ul li {
    margin-bottom: 0.5rem;
    list-style-type: disc;
    margin-left: 1.5rem;
}

.formula {
    padding: 1rem;
    background-color: #f5f5f5;
    border-left: 4px solid #00acc1;
    margin: 1rem 0;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

/* 交互式演示 */
.interactive-demo {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #f0f8ff;
    border-radius: 8px;
}

.interactive-demo h3 {
    margin-bottom: 1rem;
    color: #00838f;
}

.interactive-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

#basic-concepts-graph {
    flex: 2;
    min-width: 300px;
    height: 300px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.controls {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    font-weight: bold;
}

.equation-display {
    margin-top: 1rem;
    padding: 0.8rem;
    background-color: #e0f7fa;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-align: center;
}

.key-points {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-around;
}

.key-points div {
    padding: 0.5rem 1rem;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 资源区域 */
.resources {
    margin-bottom: 3rem;
}

.resources h2 {
    margin-bottom: 1.5rem;
    color: #00838f;
    text-align: center;
}

.resource-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.resource-item {
    flex: 1;
    min-width: 240px;
    max-width: 350px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    text-align: center;
}

.resource-item h3 {
    color: #00838f;
    margin-bottom: 0.8rem;
}

.resource-item p {
    margin-bottom: 1.2rem;
    color: #555;
}

.download-btn, .tool-btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    color: white;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.download-btn {
    background-color: #4caf50;
}

.download-btn:hover {
    background-color: #388e3c;
}

.tool-btn {
    background-color: #ff9800;
}

.tool-btn:hover {
    background-color: #f57c00;
}

/* 暗黑模式样式适配 */
body.dark-mode .intro-section {
    background-color: #1a2930;
}

body.dark-mode .module-card,
body.dark-mode .module-content,
body.dark-mode .resource-item,
body.dark-mode #basic-concepts-graph,
body.dark-mode .key-points div {
    background-color: #2c3e50;
}

body.dark-mode .formula,
body.dark-mode .interactive-demo {
    background-color: #1a2930;
}

body.dark-mode .equation-display {
    background-color: #102027;
}

body.dark-mode .case-study-card {
    background-color: #2d3748;
}

body.dark-mode .interactive-visualization {
    background-color: #1a202c;
    border-color: #4a5568;
}

body.dark-mode canvas {
    background-color: #2d3748;
}

/* 响应式样式 */
@media (max-width: 768px) {
    .interactive-container {
        flex-direction: column;
    }
    
    #basic-concepts-graph {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .module-card,
    .resource-item {
        min-width: 100%;
    }
    
    .intro-content {
        flex-direction: column;
    }
}

/* 系数效应模块样式 */
#module-coefficients .intro-text {
    margin-bottom: 2rem;
    line-height: 1.6;
}

.coefficient-demo {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.demo-illustration {
    width: 80%;
    max-width: 600px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    background-color: #f9f9f9;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.demo-image {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.concept-section {
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eaeaea;
}

.concept-section h3 {
    color: #1565c0;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.concept-section ul {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.concept-section li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.application-examples {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.application-example {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    background-color: #f5f5f5;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.application-example h4 {
    color: #2e7d32;
    margin-top: 0;
    margin-bottom: 1rem;
}

/* 小测验样式 */
.mini-quiz {
    background-color: #f5f7fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.mini-quiz h3 {
    color: #7b1fa2;
    margin-top: 0;
}

.quiz-questions {
    margin: 1.5rem 0;
}

.quiz-question {
    margin-bottom: 2rem;
}

.quiz-question p {
    font-weight: 600;
    margin-bottom: 1rem;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.quiz-options label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.quiz-options input {
    margin-right: 0.75rem;
}

.quiz-feedback {
    padding: 0.5rem 0;
    font-weight: 500;
    min-height: 1.5rem;
}

.quiz-feedback.correct {
    color: #2e7d32;
}

.quiz-feedback.incorrect {
    color: #c62828;
}

.quiz-feedback.no-answer {
    color: #f57c00;
}

#check-quiz,
#check-trans-quiz,
#check-app-quiz {
    background-color: #6200ea;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

#check-quiz:hover,
#check-trans-quiz:hover,
#check-app-quiz:hover {
    background-color: #3700b3;
}

#quiz-results {
    margin-top: 1rem;
    font-weight: bold;
    font-size: 1.2rem;
    color: #6200ea;
}

/* 交互式演示样式增强 */
.interactive-demo {
    background-color: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.interactive-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .interactive-container {
        flex-direction: row;
    }
    
    #coefficients-graph {
        flex: 2;
    }
    
    .controls {
        flex: 1;
    }
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.control-description {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

.equation-display {
    background-color: #f1f8e9;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
    font-weight: 500;
    text-align: center;
}

.key-points {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.key-points > div {
    background-color: #f5f5f5;
    padding: 0.75rem;
    border-radius: 4px;
    border-left: 3px solid #1565c0;
}

/* 响应式调整 */
@media (max-width: 600px) {
    .application-examples {
        grid-template-columns: 1fr;
    }
    
    .key-points {
        grid-template-columns: 1fr;
    }
}

/* 按钮通用样式 */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background-color: #00acc1;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-align: center;
    font-family: inherit;
}

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

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

/* 实际应用交互式问题解决器 */
.problem-selector {
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.problem-selector label {
    font-weight: bold;
    margin-right: 0.5rem;
}

.problem-selector select {
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-family: inherit;
    min-width: 200px;
}

#problem-container {
    margin-top: 1.5rem;
}

#problem-description {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f5f5f5;
    border-radius: 6px;
}

#problem-description h4 {
    color: #00838f;
    margin-bottom: 0.75rem;
}

#problem-visualization {
    margin-bottom: 1.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

#problem-controls {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

#problem-solution {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #f0f8ff;
    border-radius: 6px;
    border-left: 4px solid #00acc1;
}

.solution-step {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.solution-step:last-child {
    border-bottom: none;
}

.case-study-card {
    background-color: #f5f5f5;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.case-study-btn {
    margin-top: 1rem;
}

/* 暗黑模式适配 */
body.dark-mode .btn {
    background-color: #0097a7;
}

body.dark-mode .btn:hover {
    background-color: #00838f;
}

body.dark-mode #problem-description {
    background-color: #333;
    color: #f0f0f0;
}

body.dark-mode #problem-solution {
    background-color: #2d3748;
    border-left-color: #0097a7;
}

body.dark-mode .solution-step {
    border-bottom-color: #4a5568;
}

body.dark-mode .case-study-card {
    background-color: #2d3748;
}

/* Quiz button specific styles */
#check-quiz,
#check-trans-quiz,
#check-app-quiz {
    display: block;
    width: 180px;
    margin: 1.5rem auto;
    padding: 0.7rem 1.2rem;
    font-weight: bold;
    font-size: 1rem;
}

#check-quiz:hover,
#check-trans-quiz:hover,
#check-app-quiz:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Interactive Problem-Solver Styles */
.application-tabs {
    margin: 2rem 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    background-color: #fff;
}

.tab-navigation {
    display: flex;
    background-color: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

.tab-btn {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #555;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
    position: relative;
}

.tab-btn:hover {
    background-color: #f0f0f0;
    color: #6200ea;
}

.tab-btn.active {
    color: #6200ea;
    background-color: #fff;
    border-bottom: 3px solid #6200ea;
}

.tab-content {
    padding: 0;
}

.tab-pane {
    display: none;
    padding: 0;
}

.tab-pane.active {
    display: block;
}

.sandbox-container {
    display: flex;
    flex-direction: row;
    min-height: 600px;
}

@media (max-width: 992px) {
    .sandbox-container {
        flex-direction: column;
    }
}

.visualization-area {
    flex: 3;
    padding: 1.5rem;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.params-area {
    flex: 2;
    padding: 1.5rem;
    background-color: #f9f9f9;
    overflow-y: auto;
}

.interactive-visualization {
    width: 100%;
    height: 400px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

canvas {
    display: block;
    margin: 0 auto;
    background-color: #fff;
    width: 100%;
    height: 100%;
}

.animation-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.action-btn {
    padding: 0.6rem 1.2rem;
    background-color: #6200ea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.action-btn:hover {
    background-color: #4b00b5;
}

.action-btn:active {
    transform: translateY(1px);
}

.parameter-controls {
    margin: 1.5rem 0;
}

.param-group {
    margin-bottom: 1.5rem;
}

.param-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.param-group input[type="range"] {
    width: 100%;
    margin: 0.5rem 0;
}

.param-hint {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.3rem;
}

.equation-display {
    margin: 1.5rem 0;
    padding: 1rem;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.equation-display h5 {
    margin-top: 0;
    color: #6200ea;
    font-weight: 600;
}

.formula-box {
    background-color: #f7f7f7;
    padding: 1rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.formula-box p {
    margin: 0.5rem 0;
}

.results-box {
    margin: 1.5rem 0;
    padding: 1rem;
    background-color: #edf7ff;
    border: 1px solid #d0e5f5;
    border-radius: 6px;
}

.results-box h5 {
    margin-top: 0;
    color: #0056b3;
    font-weight: 600;
}

.results-box p {
    margin: 0.7rem 0;
    font-size: 1.05rem;
}

.results-box strong {
    color: #333;
} 