html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #aaa;
}

/* MAIN */
.main {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
    background-color: #ccc;
}


.app-inline-link {
    display: inline-block;
    color: blue;
    font-weight: bold;
    cursor: pointer;
}

.app-inline-link:hover {
    text-decoration: underline;
}

/* HEADER */

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 2rem;
}

.header-title {
    margin-left: 10px;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-bot {
    margin-left: 10px;
    cursor: pointer;
}

.header-bot:hover {
    border: 1px solid #ccc;
}

/* INTRO */

.intro-title {
    font-size: 2rem;
    color: #333;
}

.intro-subtitle {
    font-size: 1.5rem;
    color: #555;
    margin-bottom: 2rem;
}


/* MODULES */


/* --- Modules in INTRO div --- */
.module-card {
    background-color: #f9f9f9;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    margin-bottom: 24px;
}

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

.module-card-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 12px;
    color: #333;
}

.module-card-thumbs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 10px;
}

.module-card-thumb {
    width: 18%;
    border: 1px solid #ccc;
}

.module-card-thumb-img {
    width: 100%;
}

.module-card-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
}

.module-card-footer {
    margin-top: 16px;
}

/* --- Modules in MODULE div --- */

.module-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.module-header-title {
    font-size: 2rem;
    color: #333;
}

.module-header-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
}

.module-header-button:hover {
    background-color: #0056b3;
}


/* horizontal bar in the top */
.module-chapters {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

/* each card in the horizontal bar */
.module-chapter {
    flex: 0 0 100px;
    height: 100px;
    background-color: #f0f0f0;
    border-radius: 8px;
    scroll-snap-align: start;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-wrap: true;
    text-align: center;
    padding: 5px;
    cursor: pointer;
}

.module-chapter:hover {
    background-color: #0056b3;
}

.module-chapter-selected {
    background-color: #007bff;
    color: white;
}

.module-chapter-title {
    margin-bottom: 10px;
}

/* CHAPTER */
.chapter-navs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem;
}

.chapter-nav {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
}

.chapter-nav:hover {
    background-color: #0056b3;
}



/* LESSON */

/* each lesson card */
.lesson {
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: white;
    text-align: center;
}

.lesson-check {
    float: right;
}

.lesson-number {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.lesson-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.lesson-description {
    margin-bottom: 1rem;
} 

.lesson-video {
    margin-bottom: 1rem;
    width: 100%;
    max-width: 100%;
} 

.lesson-video-responsive {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

.lesson-youtube-responsive {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0 auto;
}

.lesson-youtube-iframe {
    aspect-ratio: 9 / 9;
    width: 100% !important;
}


/* EDITOR */

#editor {
    display: none;
}

#editor-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

#editor-modal {
    position: fixed; 
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    width: 90%;
    max-height: 90%;
    height: fit-content;
    z-index: 9999;
    overflow: auto; 
    background-color: #292929;
    padding: 10px;
    border: 2px solid white;
}


#editor-button-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    visibility: hidden;
}

#editor-button-left {
    display: flex;
    justify-content: start;
    align-items: center;
}


.editor-button {
	background-color: #333333;
	border: 1px solid #333333;
	color: white;
	padding: 10px;
	text-align: center;
	border-radius: 5px;
	cursor: pointer;
    margin-right: 10px;
}

.editor-button:hover {
	border: 1px solid #AAA;
}

#editor-code-container {
    visibility: hidden;
    border: 1px solid #555;
}

#editor-console-container {
    visibility: hidden;
}

#editor-console {
	overflow-y: scroll;
	height: 300px;
	padding: 20px;
	background-color: #292929;
	color: #DDD;
	font-family: 'Lucida Console', 'Courier New', monospace;
}


/* CHATBOT */

#chatbot {
    display: none;
}

#chatbot-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

#chatbot-modal {
    position: fixed; 
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    width: 85%;
    height: 85%;
    z-index: 9999;
    overflow: auto; 
    background-color: white;
    padding: 10px;
    border: 2px solid white;
}

#chatbot-button-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

#chatbot-button-left {
    display: flex;
    justify-content: start;
    align-items: center;
}


.chatbot-button {
	background-color: #c0c0c0;
	border: 1px solid #333333;
	padding: 10px;
	text-align: center;
	border-radius: 5px;
	cursor: pointer;
    margin-right: 5px;
}

.chatbot-button:hover {
	border: 1px solid #AAA;
}

#chatbot-messages-container {
    height: calc(100% - 140px);
    margin-bottom: 20px;
    overflow-y: auto;
}

#chatbot-input-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#chatbot-input-text {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-right: 10px;
}

.chatbot-message-input {
    background-color: #ccc;
    color: white;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.chatbot-message-output {
    background-color: #f0f0f0;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}

