/* --- Tutorial Page Interactive Specific Styles --- */
.tutorial-page-interactive {
    padding-top: var(--navbar-height);
}

.tutorial-header-section {
    padding: 3rem 2rem 2.5rem; /* More padding */
    text-align: center;
    background: linear-gradient(160deg, var(--bg-dark-teal) 0%, var(--bg-dark-navy) 80%);
    position: relative;
    overflow: hidden; /* For hero-background-emojis */
}
.tutorial-header-section h1 {
    color: var(--accent-bright-teal);
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 3.8rem);
    margin-bottom: 0.5rem;
}
.tutorial-header-section .subtitle {
    color: var(--text-primary);
    max-width: 700px;
    margin: 0 auto 2rem auto;
    font-size: clamp(1rem, 2vw, 1.25rem);
}

#tutorial-progress-container {
    max-width: 900px;
    margin: 1.5rem auto 0;
    background-color: rgba(14, 42, 71, 0.7); /* var(--bg-light-accent) with alpha */
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}
.progress-bar-track {
    width: 100%;
    height: 20px;
    background-color: var(--bg-dark-navy);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid var(--accent-cyan);
}
#progress-bar-fill {
    width: 0%; /* JS will update */
    height: 100%;
    background: linear-gradient(90deg, var(--accent-bright-teal), var(--accent-cyan));
    border-radius: 10px;
    transition: width 0.5s ease-in-out;
}
#module-navigation-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 0.5rem;
}
.module-tab {
    background-color: var(--bg-light-accent);
    color: var(--text-secondary);
    padding: 10px 18px;
    border-radius: 20px; /* Pill shape */
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid transparent;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
}
.module-tab:hover {
    background-color: var(--accent-cyan);
    color: var(--bg-dark-navy);
    border-color: var(--accent-cyan);
}
.module-tab.active {
    background-color: var(--accent-bright-teal);
    color: var(--bg-dark-navy);
    border-color: var(--accent-bright-teal);
    box-shadow: 0 0 15px rgba(100, 255, 218, 0.4);
}
.module-tab.completed {
    background-color: #28c84022; /* Greenish tint */
    border-color: #28c840;
    color: var(--accent-bright-teal);
}
.module-tab.completed::before { /* Checkmark for completed */
    content: "\f00c"; /* FontAwesome check */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 8px;
    color: #28c840;
}
.module-tab.active.completed {
     background-color: var(--accent-bright-teal);
     color: var(--bg-dark-navy);
}

#progress-text {
    display: block;
    margin-top: 1rem;
    font-weight: 600;
    color: var(--accent-bright-teal);
    font-size: 1rem;
}


#active-module-display-area {
    padding: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
}
.module-placeholder {
    text-align: center;
    padding: 3rem;
    background-color: var(--bg-light-accent);
    border-radius: 15px;
    color: var(--text-secondary);
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px dashed var(--accent-cyan);
}
.module-placeholder .module-icon { font-size: 3rem; margin-bottom: 1rem; color: var(--accent-cyan); }
.module-placeholder h2 { color: var(--text-headings); font-size: 1.8rem; }

.module-content-wrapper {
    display: flex;
    gap: 2rem;
    background-color: var(--bg-light-accent); /* Matches home card bg */
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.2);
}
.module-left-panel {
    flex: 3; /* Takes more space */
    padding-right: 1.5rem; /* Space before code panel */
    border-right: 1px solid var(--bg-dark-teal); /* Subtle separator */
}
.module-right-panel {
    flex: 2; /* Takes less space */
}

.module-left-panel .module-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--accent-cyan);
    padding-bottom: 0.8rem;
}
.module-icon-display {
    font-size: 2.5rem;
    margin-right: 1rem;
    color: var(--accent-bright-teal);
    background-color: rgba(100, 255, 218, 0.1);
    padding: 0.5rem;
    border-radius: 10px;
    line-height: 1;
}
.module-title-display {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--text-headings);
    margin-bottom: 0;
}
.module-subheading-display {
    font-size: clamp(1.3rem, 3vw, 1.6rem);
    color: var(--accent-cyan);
    margin-bottom: 1.5rem;
    font-weight: 600;
}
.module-text-content p, .module-text-content h4, .module-text-content ul {
    margin-bottom: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.8;
}
.module-text-content h4 { /* Example titles within text */
    font-size: 1.2rem;
    color: var(--accent-bright-teal);
    margin-top: 1.8rem;
    font-weight: 700;
}
.module-text-content .emojilang-inline-code { /* Small inline code snippet in text */
    background-color: var(--bg-dark-navy);
    color: var(--accent-fun-orange);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}
.module-text-content .emoji-inline { /* From previous CSS for consistency */
    font-size: 1.2em;
    background-color: rgba(100, 255, 218, 0.1);
    padding: 0.1em 0.3em;
    border-radius: 4px;
    line-height: 1;
    display: inline-block;
}


.module-right-panel h4 { /* "Emojilang Code Examples" title */
    font-size: 1.4rem;
    color: var(--accent-bright-teal);
    margin-bottom: 1rem;
    text-align: center;
}
.module-code-box {
    background-color: #0a1f33; /* Darker, like homepage mock editor code area */
    border-radius: 10px;
    padding: 1.5rem;
    min-height: 300px; /* Ensure it has some height */
    box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
    border: 1px solid var(--bg-light-accent);
    font-family: 'Courier New', Courier, monospace; /* Match home page */
    font-size: 1rem; /* Match home page */
    line-height: 1.9;
    overflow-y: auto; /* Scroll if content is too long */
    max-height: 60vh; /* Max height to prevent excessive length */
}
.module-code-box .code-line { display: block; white-space: pre-wrap; } /* Same as before */
/* Reuse .emoji-command, .string, .number, .operator, .comment, .indent, .indent-more, .emoji-control styles for code */
.module-code-box .emojilang-syntax-note {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 1rem;
    display: block;
    text-align: center;
}


.complete-module-btn { /* Styling for the complete button */
    display: inline-block;
    background-color: var(--accent-bright-teal);
    color: var(--bg-dark-navy);
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    margin-top: 2rem;
    transition: all var(--transition-speed);
}
.complete-module-btn:hover {
    background-color: var(--accent-cyan);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,188,212,0.3);
}
.complete-module-btn.completed {
    background-color: #28c840; /* Green */
    color: white;
    cursor: not-allowed;
}
.complete-module-btn.completed i { margin-left: 0.5em; }

.module-navigation-buttons {
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
}
.module-navigation-buttons button {
    background-color: var(--bg-dark-teal);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 20px;
    border: 1px solid var(--accent-cyan);
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-speed);
}
.module-navigation-buttons button:hover:not(:disabled) {
    background-color: var(--accent-cyan);
    color: var(--bg-dark-navy);
}
.module-navigation-buttons button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* Responsive for Interactive Tutorial */
@media (max-width: 992px) {
    .module-content-wrapper {
        flex-direction: column;
    }
    .module-left-panel {
        padding-right: 0;
        border-right: none;
        margin-bottom: 2rem; /* Space before code panel when stacked */
        border-bottom: 1px solid var(--bg-dark-teal);
        padding-bottom: 1.5rem;
    }
}
@media (max-width: 768px) {
    #tutorial-progress-container { padding: 1rem; }
    .module-tab { padding: 8px 15px; font-size: 0.85rem; }
    .module-code-box { font-size: 0.9rem; }
    .module-navigation-buttons button { font-size: 0.9rem; padding: 8px 15px;}
}