.chapter-hero{

    background:white;

    border-radius:18px;

    padding:5px 25px 20px 25px;

    margin-bottom:20px;
    
    box-shadow:
        0 4px 12px rgba(0,0,0,0.08);

}

.content-card{

    background:white;

    border-radius:16px;

    padding:20px;

    margin:10px auto;

    margin-top:6;
    
    box-shadow:
        0 4px 12px rgba(0,0,0,0.08);

}

.content-card h3{
    margin:4px 0;
}

.content-card ul{
    padding-left:30px;
    margin:10px 0;
}

.content-card li{
    margin:6px 0;
}

body{
    font-family: Arial, sans-serif;
    margin: 0;
    background: #fafafa;
    color: #222;
}

/* Header */

header {
    position: sticky;
    top: 0;
    background: #243447;
    color: white;
    padding: 15px;
    z-index: 1000;
}

header h1 {
    margin: 0;
}

nav {
    margin-top: 10px;
}

nav a {
    color: white;
    margin-right: 10px;
}

/* Layout */

section {
    padding: 20px;
}

.chapter {
    max-width: 1000px;
    width: 98%;
    margin: auto;
    margin-top: 10px;
    border-bottom: 1px solid #ccc;
}

/* =====================================
   LANDING PAGE
===================================== */

.hero-section{

    display:flex;

    justify-content:center;
    max-width:1000px;
    width: 90%;
    padding:15px 15px;
    max-width:none;
    margin:10px auto 25px auto;
    margin-bottom:0px;
}

.hero-container{
    background:#ffffff;
    border-radius:18px;
    padding:10px;

    /* change this */
    max-width:1000px;
    width:90%;
    margin-bottom:0px;
    border-top:5px solid #2c5b86;
    box-shadow:0 6px 15px rgba(0,0,0,0.08);

    margin:10px auto 25px auto;
}

.hero-container h2{

    width:100%;

    margin:0 auto 10px auto;

    font-size:2rem;
    
    margin-top:6px;
    
    line-height:1.15;

    color:#243447;
    text-align:center;

}

.hero-text{

    width:100%;

    margin:0 auto 20px auto;

    font-size:0.95rem;

    line-height:1.4;

    color:#444;

    white-space:normal;
    text-align:center;

}

.hero-container iframe{
    width:100%;
    max-width:760px;
    height:420px;
    border:none;
    border-radius:12px;
    display:block;
    margin:15px auto;
}
.hero-container a{

    display:inline-block;

    margin-top:6px;

    background:#2c5b86;

    color:white;

    padding:10px 18px;

    border-radius:8px;

    text-decoration:none;

}

.hero-container a:hover{

    background:#163a57;

}

.hero-features{

    display:flex;

    justify-content:center;

    align-items:center;

    gap:10px;

    flex-wrap:nowrap;
    
    max-width:700px;

    margin:15px auto;

}

.feature-card{

    flex:1;

    min-width:0;

    padding:10px 12px;

    font-size:0.9rem;

    background:#f7f9fc;

    border:2px solid #d7e3f1;

    border-radius:12px;

    font-weight:600;

}

.feature-card:hover{

    transform:translateY(-3px);

    box-shadow:0 4px 12px rgba(0,0,0,0.08);

}


@media (max-width:768px){

    .hero-container{

        width:95%;
        max-width:none;
        padding:15px;

    }

    .hero-container iframe{

        max-width:none;

        width:100%;

        height:220px;

    }
    .hero-features{
        flex-wrap:wrap;
        gap:8px;
    }

    .feature-card{
        flex:1 1 100%;
    }

}

html,
body{
    overflow-x:hidden;
}

/* Images */

img {
    max-width: 100%;
    cursor: pointer;
    border-radius: 8px;
}

.lightbox-img {
    width: 1200;
    max-width: 1200px;
    height: auto;
    display: block;
    margin: 2rem auto;
}

.diagram-placeholder {
height: 220px;
background: #eef6f7;
border: 2px dashed #4A908C;
border-radius: 8px;
 
display: flex;
align-items: center;
justify-content: center;
 
font-weight: bold;
color: #42607A;
 
margin-bottom: 20px;
}

.chapter-photo{

    width:40%;

    max-width:450px;

    height:auto;

    display:block;

    margin:20px auto;

    border-radius:12px;

}

.chapter-diagram{

    width:70%;

    max-width:800px;

    height:auto;

    display:block;

    margin:20px auto;

}

.figure-container{

    width:40%;

    max-width:450px;

    margin:20px auto;

}

.figure-container img{

    width:100%;

    display:block;

    border-radius:12px;

}

.diagram-card{

    background:white;

    border-radius:18px;

    padding:10px;

    margin:15px auto;
    margin-top:10px;
    
    box-shadow:
        0 4px 12px rgba(0,0,0,0.08);

}

.diagram-card img{

    width:100%;

    max-width:800px;

    display:block;

    margin:0 auto 20px auto;

}

.diagram-content{

    max-width:800px;

    margin:auto;

}

.diagram-content h3{

    color:#2c5b86;

    margin-top:0;

}

.diagram-content ul{

    margin-top:10px;
    text-align:left;
}

.image-caption{

    margin-top:6px;

    font-size:0.9rem;

    color:#666;

    line-height:1.4;

    text-align:left;

    font-style:italic;

    padding-left:2px;

}


/* YouTube */

iframe {
    width: 100%;
    max-width: 800px;
    height: 450px;
    border: none;
}

/* Headings */

.chapter h2 {
    color: #243447;
    margin-bottom: 15px;
}

.chapter h3 {
    color: #42607A;
    margin-top: 10px;
    margin-bottom: 10px;
}

.chapter img {

    width: 70%;

    max-width: 700px;

    height: auto;

    display:block;

    margin:20px auto;

}

/* Text */

.chapter p,
.chapter li {
    line-height: 1.55;
    font-size: 1rem;
}

.chapter p {
    margin-top: 10px;
    margin-bottom: 8px;
}

.chapter ul,
.chapter ol {
    margin-left: 20px;
}

/* Learning Question */

.learning-question {
    font-size: 1.05rem;
    color: #42607A;
    font-weight: 600;
    margin-top: 4px;
    margin-bottom: 15px;
}

/* Concept Box */

.concept-box {
    background: #eef6f7;
    border-left: 5px solid #4A908C;
    padding: 10px;
    margin: 10px 0;
    margin-top:6px;
    margin-bottom:5px;
    border-radius: 8px;
}

.concept-box h3{
    margin:0 0 10px 0;
    font-size: 1.2rem;
}

.concept-box ul{
    margin:0;
    padding-left:35px;
}

.concept-box li{
    margin:6px 0;
    font-size: 0.95rem;
    line-height:1.4;
}

/* Summary */

.chapter-summary{

   background: linear-gradient(135deg,#f5f9fc,#edf4f8);
    border-left: 8px solid #2c5b86;
    border-radius: 18px;
    padding: 15px;
    font-size: 1rem;
    color: #333;
}

.chapter-summary h3{

    color: #2c5b86;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
    margin-top: 5px;
}

.chapter-summary ul{
scenario-buttons
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 5px;
}


}

/* Game Area */

.game-container{
    background:#ffffff;

    border-radius:18px;

    padding:15px;

    margin:25px auto;

    width:100%;

    max-width:800px;

    border-top:5px solid #2c5b86;

    box-shadow:
        0 4px 12px rgba(0,0,0,0.08);

}


.chapter-summary{
    margin-bottom:50px;
}

.game-container h3{

    color:#2c5b86;

    font-size:1.5rem;

    text-align:left;

    margin:0 0 10px 0;

}

.game p,
.game ul,
.game ol,
.game li {

    text-align:left;

}

.game > p{

    color:#444;

    line-height:1.6;

    margin-bottom:20px;

}

.game h4{

    font-size:1.1rem;

    color:#243447;

    margin-bottom:10px;

}

/* Buttons */

button {
    background: #42607A;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
}

button:hover {
    background: #324b60;
}

.game button{

    background:#2c5b86;

    color:white;

    border:none;

    padding:12px 24px;

    border-radius:10px;

    font-size:1rem;

    font-weight:600;

    cursor:pointer;

    transition:0.3s;

    margin-top:3;
}

.game button:hover{

    background:#163a57;

    transform:translateY(-2px);

}

/* Progress */

#progress {
    margin-top: 10px;
    font-weight: bold;
}

/* Table */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th,
td {
    border: 1px solid #d0d7de;
    padding: 12px;
    text-align: left;
}

th {
    background: #eef6f7;
}

/* Quotes */

blockquote {
    border-left: 4px solid #42607A;
    margin: 20px 0;
    padding-left: 15px;
    font-style: italic;
    color: #555;
}

/* Lightbox */

#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
}

#lightbox img {
    max-width: 90%;
    max-height: 90%;
    display: block;
    margin: auto;
    margin-top: 3%;
}

.correct {
    color: green;
}

/* Responsive */

@media (max-width: 768px) {

    header h1 {
        font-size: 1.8rem;
    }

    iframe {
        height: 250px;
    }

    .chapter {
        margin-top: 30px;
        padding: 10px;
    }
    
/* CH1-game */
.match-game{
    text-align:center;
    margin:40px auto;
}
    
.match-image{

    width:100%;

    max-width:600px;

    height:auto;

    display:block;

    margin:15px auto;

    border-radius:12px;

}
    
.match-question{
    display:grid;
    grid-template-columns:200px 150px;
    gap:15px;
    justify-content:center;
    margin:25px 0;
}

.match-question label{
    font-weight:bold;
    text-align:right;
}

.match-question select{
    padding:8px;
}

#matchResult{
    margin-top:20px;
    font-size:1.2rem;
    font-weight:bold;
}
    .match-question{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:15px;
    margin:25px 0;
}

.match-item{

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:12px 15px;

    background:#f7f9fc;

    border:2px solid #d7e3f1;

    border-radius:12px;

}

.match-item label{
    font-weight:700;
    color:#23415a;
    font-size:1.1rem;
}

.match-item select{

    width:110px;

    padding:8px 10px;

    border-radius:8px;

}

.match-item select:hover{
    border-color:#2c5b86;
}

.match-item select:focus{
    outline:none;
    border-color:#2c5b86;
    box-shadow:0 0 8px rgba(44,91,134,0.3);
}
    
.match-game button{
    background:#2c5b86;
    color:white;
    border:none;
    padding:12px 28px;
    border-radius:10px;
    font-size:1rem;
    font-weight:bold;
    cursor:pointer;
    transition:0.3s;
}

.match-game button:hover{
    background:#1e4566;
    transform:translateY(-2px);
}
.component-review{
    margin-top:20px;
    padding:20px;
    background:#eef5fa;
    border-left:5px solid #2c5b86;
    text-align:left;
    border-radius:8px;
}

.component-review p{
    margin-bottom:16px;
    line-height:1.6;
}

/* CH2-game */
    
.budget-panel,
.selected-panel{

    text-align:left;

    background:#eef6f7;

    padding:15px;

    border-radius:8px;

    margin-bottom:20px;

}

.instrument-grid{

    display:grid;

    grid-template-columns:
        repeat(auto-fit,minmax(180px,1fr));

    gap:10px;

    margin-bottom:20px;

}

.instrument-grid{

    justify-items:stretch;

}

.instrument-grid button{

    text-align:left;

}

.instrument-grid button{

    min-height:60px;

}

.selected-panel{

    background:#f7f9fb;

    padding:15px;

    border-radius:8px;

    margin-bottom:20px;

}

.selected-panel ul{

    margin:0;

    padding-left:20px;

}

.analyze-btn{

    background:#42607A;

    color:white;

    border:none;

    padding:12px 20px;

    border-radius:8px;

    cursor:pointer;

}

.result-success{

    background:#eef7f2;

    border-left:5px solid green;

    padding:15px;

    margin-top:20px;

    border-radius:8px;

}

.result-warning{

    background:#fff8e6;

    border-left:5px solid orange;

    padding:15px;

    margin-top:20px;

    border-radius:8px;

}

    .budget-panel{

    background:#eef6f7;

    border:2px solid #d7e3f1;

    border-radius:12px;

    padding:20px;

    text-align:center;

}
    
/*ch3*/
.pressure-dashboard{

    display:grid;

    grid-template-columns:
        repeat(auto-fit,minmax(300px,1fr));

    gap:20px;

    margin-top:20px;
}

.control-panel,
.status-panel{

    background:#ffffff;

    text-align:left;
    
    padding:20px;

    border-radius:10px;

    border:1px solid #d8dde3;
}

.control-panel label{

    display:block;

    font-weight:600;

    margin-top:15px;
}

.control-panel input[type="range"]{

    width:100%;
}

#pressureMessage{

    margin-top:20px;

    padding:20px;

    border-radius:10px;
}
.pressure-bar{

    width:100%;
    height:28px;

    background:#ddd;

    border-radius:20px;

    overflow:hidden;

    margin:10px 0;

}

#pressureFill{

    height:100%;

    width:50%;

    background:gold;

    transition:0.4s;

}
    
.status-panel p{

    background:#ffffff;

    padding:10px;

    border-radius:8px;

    margin-bottom:10px;

}
    
#eventPanel{

    background:#fff8e0;

    border-left:5px solid orange;

    padding:15px;

    margin-top:20px;

    border-radius:8px;

    font-weight:600;

}

    .status-panel{

    background:#f7f9fc;

    border:2px solid #d7e3f1;

    border-radius:12px;

}

    .status-panel{

    background:#f7f9fc;

    border:2px solid #d7e3f1;

    border-radius:12px;

    padding:20px;

}

.status-panel p{

    background:white;

    padding:12px;

    border-radius:8px;

    margin-bottom:10px;

}
    
/* CH4-game */
#scenarioCard{

    background:#f7f9fc;

    border:2px solid #d7e3f1;

    border-radius:16px;

    padding:25px;

    max-width:650px;

    margin:20px auto;

    text-align:left;
}
    
.scenario-buttons{

    display:flex;

    flex-wrap:wrap;

    gap:10px;

    margin-bottom:20px;

    justify-content:flex-start;
}

.scenario-buttons button{

    flex:1;

    min-width:180px;
    margin-bottom:3px;

}

.progress-panel{

    margin-top:15px;

    font-weight:bold;

}
    
    
.game button{

    background:#42607A;

    color:white;

    border:none;

    border-radius:8px;

    padding:12px 20px;

    cursor:pointer;

    transition:0.2s;

}

.game button:hover{

    background:#324b60;

}

.pressure-dashboard{

    display:grid;

    grid-template-columns:
        repeat(auto-fit,minmax(320px,1fr));

    gap:20px;

    margin-top:20px;
}

.checkanswer{
    margin-top:3px;
}

.control-panel,
.status-panel{

    background:white;

    padding:20px;

    border-radius:10px;

    border:1px solid #d8dde3;
}

.control-panel label{

    display:block;

    margin-top:15px;

    font-weight:600;
}

.control-panel input{

    width:100%;
}

.pressure-bar{

    width:100%;

    height:28px;

    background:#ddd;

    border-radius:20px;

    overflow:hidden;

    margin:8px 0 15px 0;
}

#pressureFill{

    width:50%;

    height:100%;

    background:gold;

    transition:0.3s;
}

#eventPanel{

    background:#fff8e0;

    border-left:5px solid orange;

    padding:15px;

    border-radius:8px;

    margin-top:20px;
}

.success-box{

    background:#eef7f2;

    padding:15px;

    border-left:5px solid green;

    border-radius:8px;
}

.warning-box2{

    background:#fff4f4;

    padding:15px;

    border-left:5px solid red;

    border-radius:8px;
}

/*Ch5 game*/
   #feedbackScenario{

    background:#f7f9fc;

    border:2px solid #d7e3f1;

    border-radius:12px;

    padding:20px;

}
    
#feedbackResult{

    margin-top:15px;

}

#feedbackScenario{

    background:#f7f9fc;

    border:2px solid #d7e3f1;

    border-radius:16px;

    padding:25px;

    max-width:650px;

    margin:20px auto;

}
