:root {
    --soft-pink: #3911b4;
    --dark-pink: #3c13a1;
    --cream: #FFFBFC;
    --white: #ffffff;
    --bg-dark: #2A1A1D;
}

* { box-sizing: border-box; margin: 0; padding: 0; 
    font-family: 'Segoe UI', Arial, sans-serif; }

body { 
    background-color: var(--cream); 
    color: #4A3A3C; 
    text-align: center; 
    transition: background-color 0.4s ease; 
}

body.dark-mode {
    background-color: var(--bg-dark); color: #FCE4EC;
}

header {
    padding: 50px;
    background: var(--white); 
    border-bottom: 5px solid var(--soft-pink); 
}

.accent { color: var(--dark-pink); }

.dashboard-controls {
    display: flex; 
    justify-content: center; 
    gap: 10px; padding: 20px; 
}

.dash-btn { 
    padding: 15px 30px; background: #fff; 
    border: 5px solid var(--soft-pink); 
    border-radius: 8px; cursor: pointer; 
    font-weight: bold; color: #4A3A3C;
}

body.dark-mode .dash-btn {
    background: #3D2B2E; 
    color: #fff; border-color: var(--dark-pink); 
}

.module-card { 
    max-width: 1000px; margin: 30px auto; 
    border: 5px solid var(--soft-pink); background: #fefcfc; 
    border-radius: 15px; overflow: hidden; 
}

body.dark-mode .module-card { 
    background: #040404; border-color: var(--dark-pink); 
}

.module-label { 
    background: var(--soft-pink);
    color: #4A3A3C; padding: 10px;
    font-weight: bold; text-transform: uppercase; 
}

.exercise-header { 
    padding: 15px; background: #0e1bae;
    border-bottom: 1px solid var(--soft-pink); 
}

.ex-title { color: var(--dark-pink); font-size: 1.1rem; 
}

.activity-bar { 
    display: flex; justify-content: center; 
    gap: 8px; padding: 15px; 
}

.exercise-box { 
    width: 500px; height: 300px; 
    background-color: #f0f0f0; border: 4px solid #dacece; 
    border-radius: 8px; font-size: 1.2rem; 
    color: #0f0f0f; display: flex; 
    align-items: center; justify-content: center; 
    text-align: center; white-space: nowrap; 
    overflow: visible; cursor: pointer;
}

.activity-bar button { 
    width: 40px; height: 40px; 
    border: 1px solid var(--soft-pink); 
    border-radius: 4px; background: #ffffff; 
    cursor: pointer; 
}

.terminal-view { 
    padding: 25px; text-align: left; 
    min-height: 250px; 
}

.action-btn {
    position: relative;   
    background: var(--dark-pink); 
    color: #fff; padding: 10px 20px; 
    border: none; border-radius: 5px; 
    cursor: pointer; 
    min-width: 100px;
    white-space: nowrap;
}

.btn-label{ 
    position: absolute; justify-content: center; 
    top: 50%; left:50%; transform: translate(-50%, -50%); 
    z-index:1; font-size: 1rem; color:#666; 
    width: 200px; text-align: center;
}

.activity-bar.tiny button {
    width:40px; height:40px; 
    background-color: #eee; 
    border: 1px solid #aaa;
    border-radius: 4px; font-size: 1rem; 
    display: flex; align-items: center; 
    justify-content: center; margin: 0 3px; 
}

.hidden { display: none !important; }

input { 
    display: block; width: 100%; 
    max-width: 400px; padding:20px; 
    margin: 10px 0; 
    border: 1px solid var(--soft-pink); 
}
 

/* --- OFFLINE IMAGE SWITCHER STYLING --- */
#targetImg {
    width: 250px;
    height: auto;
    margin-top: 20px;
    border: 5px solid var(--white); 
    outline: 2px solid var(--soft-pink); 
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(212, 112, 136, 0.2);
    transition: opacity 0.2s ease-in-out, transform 0.2s ease;
}

#targetImg:hover {
    transform: scale(1.03);
}

/* Adjustments for the image area in Dark Mode */
body.dark-mode #targetImg {
    border-color: #3E272B;
    outline-color: var(--dark-pink);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}



/* Pink buttons only for Calculate and Reset */
#calculateGrade, #resetGrade{
    width: auto;
    height: auto;
    padding: 10px 20px;
    background: var(--dark-pink);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

#calculateGrade:hover, #resetGrade:hover{
    background: var(--soft-pink);
    color: #4A3A3C;
}

/* Layout for Exercise 4 Dynamic Inputs */
.ex4-container-flex {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.input-group {
    flex: 1;
    min-width: 150px;
}

.score-container {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.score-input {
    max-width: 120px;
    padding: 8px;
}

.results-display {
    text-align: center;
    border-top: 2px solid var(--soft-pink);
    padding-top: 20px;
    margin-top: 20px;
}

.final-grade-text {
    color: var(--dark-pink);
    margin-top: 10px;
}

/* Layout for Exercise 4 Dynamic Inputs */
.ex4-container-flex {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.input-group {
    flex: 1;
    min-width: 200px;
}

.score-row {
    display: flex;
    gap: 5px;
    align-items: center;
    margin-bottom: 8px;
}

.score-input-small {
    width: 60px;
    padding: 5px;
    margin: 0;
}

.results-display {
    text-align: center;
    border-top: 2px solid var(--soft-pink);
    padding-top: 20px;
    margin-top: 20px;
}