:root {
    --bg-primary: #d7dfeb;
    --bg-secondary: #d3d3d3;
    --bg-tertiary: #111d2a;
    --accent-primary: #06798e;
    --accent-secondary: #7c3aed;
    --text-primary: #601919;
    --text-secondary: #17243d;
    --border-color: #2a3654;
    --shadow-glow: rgba(0, 217, 255, 0.15);
}

#tutorialDiv {
    display: none;
    height: calc(100vh - var(--header-height)) !important;
    position: relative;
    z-index: 100;
}

.container {
    display: flex;
    height: 100%;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
}

/* Sidebar */
#tutorialDiv .sideBar {
    width: 270px;
    background: var(--bg-secondary);
    padding: 1rem 10px;
    position: sticky;
    top: 0;
    height: calc(100vh - var(--tvhd-height)) !important;
    overflow-y: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#tutorialDiv .sideBar::-webkit-scrollbar {
    width: 6px;
}

#tutorialDiv .sideBar::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

#tutorialDiv .sideBar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.sidebar-header {
    padding: 0 1rem 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: .5rem;
}

.sidebar-title {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.2rem;
}

.sidebar-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* Navigation Topics */
.nav-section {
    margin-bottom: 0rem;
}

.nav-topic {
    cursor: pointer;
    padding: 0.6rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.25s ease;
    position: relative;
    font-weight: 600;
    font-size: 1.2rem;
}

.nav-topic::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent-primary);
    transform: scaleY(0);
    transition: transform 0.25s ease;
}

.nav-topic:hover {
    background: rgba(0, 217, 255, 0.05);
}

.nav-topic:hover::before {
    transform: scaleY(1);
}

.nav-topic.active {
    background: linear-gradient(90deg, rgba(0, 217, 255, 0.1), transparent);
    color: var(--accent-primary);
}

.nav-topic.active::before {
    transform: scaleY(1);
}

.topic-icon {
    display: inline-block;
    font-size: 20px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-topic.expanded .topic-icon {
    transform: rotate(90deg);
}

.subtopics {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.subtopics.expanded {
    max-height: 500px;
}

.subtopic {
    padding: 0.3rem 2rem 0.3rem 2rem;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    position: relative;
    line-height: 1.2em;
}

.subtopic:hover {
    color: var(--text-primary);
    padding-left: 2.5rem;
}

.subtopic:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.subtopic.active {
    color: var(--accent-primary);
    font-weight: bold;
}

/* Main Content Area */
.main-content {
    flex: 1;
    padding: 2rem 3rem;
    position: relative;
    overflow: auto;
}

.content-section {
    /*display: none;*/
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-section.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

#content-container {
    font-size: 1.2rem;
}

.content-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.content-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-weight: 300;
}

.content-body h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem;
    color: var(--text-primary);
}

.content-body h3 {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 2rem 0 0.75rem;
    color: var(--accent-primary);
}

.content-body p {
    line-height: 1.4;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.content-body ul,
.content-body ol {
    margin: 1.5rem 0 1.5rem 1.5rem;
    line-height: 1;
}

.content-body li {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    padding-left: 0.5rem;
}

#content-container img {
    max-width: 100%;
}

#content-container p.center-text {
    text-align: center;
}

.code-block {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.code-block code {
    color: var(--accent-primary);
}

.info-box {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.05), rgba(124, 58, 237, 0.05));
    border-left: 3px solid var(--accent-primary);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}

.info-box strong {
    color: var(--accent-primary);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

/* Responsive */
@media (max-width: 900px) {
    #tutorialDiv .sideBar {
        position: fixed;
        left: 0;
        z-index: 100;
        transform: translateX(-100%);
    }

    #tutorialDiv .sideBar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        padding: 2rem 1.5rem;
    }

    .content-title {
        font-size: 2rem;
    }
}

.progress-indicator {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.progress-bar {
    height: 4px;
    background: var(--accent-primary);
    position: absolute;
    top: 0;
    left: 0;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--shadow-glow);
}

/* Loading indicator */
.loading-indicator {
    display: none;
    text-align: center;
    padding: 4rem 2rem;
    animation: fadeIn 0.3s ease;
}

.loading-indicator.active {
    display: block;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1.5rem;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.error-message {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.05));
    border-left: 3px solid #ef4444;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 4px;
    color: #fca5a5;
}

.error-message strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #ef4444;
}

/* Navigation buttons container */
.content-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
    gap: 1rem;
}

#sidebarNav {
    height: auto;
}

/* Base button styles */
.nav-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 140px;
}

/* Hover state */
.nav-button:hover:not(:disabled) {
    background: linear-gradient(90deg, rgba(0, 217, 255, 0.1), transparent);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-glow);
}

/* Disabled state */
.nav-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Previous button specific */
.nav-button.prev {
    padding-left: 1rem;
}

/* Next button specific */
.nav-button.next {
    padding-right: 1rem;
    margin-left: auto;
}

/* Icon styles */
.nav-button-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

/* Previous button icon animation */
.nav-button.prev:hover:not(:disabled) .nav-button-icon {
    transform: translateX(-4px);
}

/* Next button icon animation */
.nav-button.next:hover:not(:disabled) .nav-button-icon {
    transform: translateX(4px);
}

/* Label (PREVIOUS/NEXT) */
.nav-button-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Topic title */
.nav-button-title {
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* Content wrapper */
.nav-button-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-align: left;
}

/* Next button content alignment */
.nav-button.next .nav-button-content {
    text-align: right;
}

.closeTutorialBtn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    color: rgb(140, 30, 30);
}

.closeTutorialBtn:hover {
    color: #06798e;
}

/* Mobile responsive */
@media (max-width: 900px) {
    .content-navigation {
        flex-direction: column;
    }

    .nav-button {
        width: 100%;
    }

    .nav-button.next {
        margin-left: 0;
    }
}