:root {
    --font-body: "Roboto", sans-serif;
    --color-primary: #E67E22;
    --color-primary-light: #FDF2E9;
    --color-secondary: #2C3E50;
    --color-muted: #7F8C8D;
}

* {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    font-family: var(--font-body);
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    color: #333;
    font-size: 2rem;
    margin: 1.5rem 0 1rem 0;
}

h2 {
    color: #444;
    font-size: 1.2rem;
    font-weight: bold;
    margin: 1.5rem 0 1rem 0;
}

h3 {
    color: #555;
    font-size: 1rem;
    font-weight: bold;
    margin: 1rem 0 0.75rem 0;
}

a {
    text-decoration: none;
    color: var(--color-secondary);
}

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

/* Building blocks */
.container {
    width: 100%;
    max-width: 1200px;
}

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

.box {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.8rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

a.box:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    outline: 1px solid var(--color-primary);
    cursor: pointer;
}

.breadcrumbs {
    display: inline-block;
    font-size: 0.9rem;
    margin: 1rem 0;
}

/* Course list */
.course-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;;
    margin-bottom: 0.5rem;
}

.course-description {
    line-height: 1.6rem;
    color: #666;
}

/* Course detail */
.chapters {
    display: block;
    font-size: 1.1rem;
    color: var(--color-muted);
    margin: 2rem 0 1rem 0;
}

.chapter-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #444;
}

.icon-text {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.icon-text--completed {
    color: green;
    font-weight: 600;
}

.icon {
    width: 1rem;
    height: 1rem;
}

/* Chapter item detail */
.box--chapter-item {
    border-left: none;
    border-right: none;
    border-radius: 0;

}

.btns-container {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    margin: 1rem 0 3rem 0;
}

/* Item - Lesson */
.lesson-container {
    max-width: 70ch;
    margin: 0 auto;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", "Roboto", sans-serif;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #1f2937;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.lesson-container form {
    align-self: center;
}

.completed-message {
    background-color: rgba(11, 102, 35, 0.2);
    color: rgba(11, 102, 35, 0.9);
    font-weight: 550;
    font-size: 1.05rem;
    padding: 0.6rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    align-self: center
}

/* Item - Question and Exercise */
.question-container,
.exercise-container {
    width: auto;
    max-width: 640px;
    margin: 0 auto;
}

.question-container button,
.exercise-container button {
    margin: 2rem auto 1rem auto;
    display: block;
}

/* Item - Question */
.question-prompt {
    font-weight: 600;
    font-size: 1.1rem;
    text-align: center;
}

.question-option {
    display: flex;
    gap: 0.6rem;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
}

.question-container:not(.question--completed) .question-option:hover {
    background: var(--color-primary-light);
}

.question--completed .question-option {
    cursor: default;
    opacity: 0.7;
}

.correct-option {
    background-color: #eafaf1;
    border: 1px solid #27AE60;
    color: #1e8449;
}

.question-option input:disabled {
    opacity: 0.6;
}

/* Item - Exercise */
.exercise-prompt {
    line-height: 1.8rem;
}

.exercise-input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.exercise--completed .exercise-input {
    background-color: #f9fafb;
    border-color: #27AE60;
    color: #1e8449;
}

.exercise--completed .exercise-input:disabled {
    opacity: 1;
}

/* Utilities */
.btn {
    background-color: #fff;
    font-weight: 550;
    font-size: 1.05rem;
    padding: 0.6rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.btn:hover {
    background-color: var(--color-primary);
    color: #fff;
    cursor: pointer;
}

.muted {
    color: var(--color-muted);
}

.flex-grow {
    display: block;
    flex-grow: 1;
}

/* Messages */
.messages {
    padding: 0.8rem;
    font-size: 0.8rem;
    border-radius: 8px;
    font-weight: bold;
}

.success {
    background-color: rgba(11, 102, 35, 0.2);
    color: rgba(11, 102, 35, 0.9);
}

.error {
    background-color: rgba(220, 53, 69, 0.2);
    color: rgba(220, 53, 69, 0.9);
}

.info {
    background-color: rgba(1, 87, 155, 0.2);
    color: rgba(1, 87, 155, 0.9);
}
