/* --- Tutorial Engine Styles --- */

body.tutorial-body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    background-color: var(--bg-dark, #1f2833); 
    color: var(--text-primary, #ffffff);
    font-family: 'Inter', sans-serif;
    outline: none; 
}

#tutorialContainer {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    background-color: #1f2833; 
    color: #c5c8c6;
}

#tutorialSection {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

/* Slide Wrapper */
.slide-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 0; /* Let flex grow handle it */
}

.tutorial-slide {
    /* Force full size */
    width: 100%;
    height: 100%;
    /* Contain ensures the whole image is visible without cropping,
       while filling the dimension that fits first */
    object-fit: contain; 
    cursor: pointer;
}

/* Navigation Bar */
.nav-bar {
    flex-shrink: 0;
    height: auto;
    min-height: 60px;
    background-color: var(--bg-medium, #2c3e50);
    border-top: 2px solid var(--bg-dark, #1f2833);
    padding: 10px 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.tutorial-title {
    font-size: 1.1rem;
    font-weight: bold;
    flex: 1 1 100%;
    text-align: center;
    margin-bottom: 5px;
}

@media (min-width: 600px) {
    .tutorial-title {
        flex: 0 1 auto;
        text-align: left;
        margin-bottom: 0;
    }
}

.controls-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Buttons */
.engine-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
}

.engine-btn.primary {
    background-color: var(--text-accent, #66fcf1);
    color: var(--bg-dark, #1f2833);
    font-weight: bold;
}

.engine-btn.secondary {
    background-color: transparent;
    border: 1px solid var(--text-light, #c5c8c6);
    color: var(--text-light, #c5c8c6);
}

.engine-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(1);
}

.engine-btn:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
}

.page-counter {
    font-family: 'IBM Plex Mono', monospace;
    min-width: 60px;
    text-align: center;
    color: var(--text-light, #c5c8c6);
}

/* Loading / Error States */
.content-loader, .error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #c5c8c6;
}

.spinner {
    border: 5px solid var(--bg-medium, #2c3e50); 
    border-top: 5px solid var(--text-accent, #66fcf1); 
    border-radius: 50%;
    width: 50px; height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
