body {
    max-width: 800px;
    margin: 20px auto;
    padding: 0 20px;
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

pre {
    background: #f4f4f4;
    padding: 10px;
    border-left: 3px solid #ccc;
}

code {
    background: #f4f4f4;
    padding: 2px 5px;
}

.section {
    border: 2px solid #007acc;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    background-color: #f9f9f9;
}

.section.hidden {
    display: none;
}

.section-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ccc;
}

.section-nav-center {
    text-align: center;
    flex: 1;
}

.section-nav-center .current-section {
    font-weight: bold;
    color: #007acc;
    display: block;
    margin-bottom: 5px;
}

.section-nav-center .section-progress {
    font-size: 0.9em;
    color: #666;
}

.section-nav button {
    background-color: #007acc;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}

.section-nav button:hover {
    background-color: #005a9e;
}

.section-nav button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.info-panel {
    background-color: #e8f4f8;
    border-left: 4px solid #007acc;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    overflow: auto;
}

.info-panel::before {
    content: "💡 ";
    font-size: 1.2em;
}

/* Content link */
.content-link {
    background-color: #fff9e6;
    border: 2px solid #f39c12;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 20px 0;
}

.content-link p {
    margin: 8px 0;
}

.content-link .link-target {
    font-weight: bold;
    margin-top: 12px;
    font-size: 1.1em;
}

.content-link .link-target a {
    color: #e67e22;
    font-weight: bold;
}

.content-link .link-target a:hover {
    color: #d35400;
}

/* Button styling for index link */
a.button {
    background-color: #007acc;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9em;
    display: inline-block;
}

a.button:hover {
    background-color: #005a9e;
    text-decoration: none;
}

/* Code Exercise */
.code-exercise {
    background: white;
    border: 2px solid #007acc;
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
}

.exercise-instructions {
    margin-bottom: 15px;
}

.exercise-workspace {
    margin-top: 15px;
}

.exercise-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.exercise-header span {
    font-weight: bold;
    color: #007acc;
}

.tip-button {
    background-color: #f39c12;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
}

.tip-button:hover {
    background-color: #e67e22;
}

.code-input {
    width: 95%;
    min-height: 120px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.95em;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    resize: vertical;
    background-color: #f8f9fa;
}

.code-input:focus {
    outline: none;
    border-color: #007acc;
}

.check-code-button {
    margin-top: 10px;
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
}

.check-code-button:hover {
    background-color: #229954;
}

.exercise-feedback {
    margin-top: 15px;
    padding: 15px;
    border-radius: 5px;
    display: none;
}

.exercise-feedback:not(.hidden) {
    display: block;
}

.exercise-feedback.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.exercise-feedback.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.exercise-feedback strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.exercise-feedback .output {
    background-color: rgba(0,0,0,0.05);
    padding: 10px;
    border-radius: 3px;
    margin-top: 10px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
}

.output-comparison {
    margin-top: 10px;
}

.output-comparison > div {
    margin-bottom: 10px;
}

/* Course index styling */
h1 {
    color: #007acc;
    border-bottom: 3px solid #007acc;
    padding-bottom: 10px;
}

ul.course-list {
    list-style: none;
    padding: 0;
}

ul.course-list li {
    background: #f9f9f9;
    border: 2px solid #007acc;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

ul.course-list li a {
    color: #007acc;
    text-decoration: none;
    font-size: 1.3em;
}

ul.course-list li a:hover {
    text-decoration: underline;
}

ul.course-list li p {
    margin: 10px 0 0 0;
    color: #666;
}
