/* Prevent page scroll when slides are visible */
body:has(.cd-slides) {
    overflow: hidden;
    height: 100vh;
}

.cd-slides.alignfull {
    width: 100%;
    height: 95vh;
    max-height: 95vh;
    overflow-x: scroll;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    max-width: none;
    margin: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
}

.cd-slides.alignfull *,
.cd-slides.alignfull *::before,
.cd-slides.alignfull *::after {
    box-sizing: border-box;
}

/* Hide scrollbar */
.cd-slides.alignfull::-webkit-scrollbar { display: none; }
.cd-slides.alignfull { -ms-overflow-style: none; scrollbar-width: none; }

.cd-slides.alignfull > .cd-slide {
    width: 100%;
    min-width: 100%;
    height: 95vh;
    min-height: 95vh;
    max-height: 95vh;
    scroll-snap-align: start;
    background: #0f172a no-repeat center / cover;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
}

/* Subtle content animation on slide change */
.cd-slide__content {
    transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cd-slide__overlay {
    transition: opacity 0.6s ease;
}

.cd-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15,23,42,0.5), rgba(15,23,42,0.95));
    pointer-events: none;
}

/* Glassmorphism blur overlay on right side - only for lesson slides */
.cd-slide--lesson::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 50%;
    background: linear-gradient(90deg, 
        rgba(15,23,42,0) 0%,
        rgba(15,23,42,0.2) 30%,
        rgba(15,23,42,0.4) 60%,
        rgba(15,23,42,0.5) 100%
    );
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 40%, black 100%);
    mask-image: linear-gradient(90deg, transparent 0%, black 40%, black 100%);
    pointer-events: none;
    z-index: 1;
}

/* Quiz slide styling */
.cd-slide--quiz::before {
    background: linear-gradient(180deg, rgba(15,23,42,0.7), rgba(15,23,42,0.98));
}

.cd-slide--quiz .cd-slide__content {
    justify-content: center;
    padding-top: 20px;
    padding-bottom: 80px;
}

.cd-quiz {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.cd-quiz__header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.cd-quiz__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(139,92,246,0.2);
    border: 1px solid rgba(139,92,246,0.3);
    border-radius: 16px;
    color: #a78bfa;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cd-quiz__badge svg {
    width: 14px;
    height: 14px;
}

.cd-quiz__title {
    display: none; /* Hide, quiz has its own title */
}

.cd-quiz__subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    margin: 0;
}

.cd-quiz__body {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    max-height: none;
    overflow: visible;
}

/* Override smart quiz styles for slide context */
.cd-quiz__body .sqe-quiz {
    background: transparent;
}

.cd-quiz__body .sqe-header {
    background: rgba(15,23,42,0.6);
    backdrop-filter: blur(10px);
    border-radius: 16px 16px 0 0;
    border: 1px solid rgba(255,255,255,0.1);
    border-bottom: none;
}

.cd-quiz__body .sqe-body {
    background: rgba(15,23,42,0.6);
    backdrop-filter: blur(10px);
    border-radius: 0 0 16px 16px;
    border: 1px solid rgba(255,255,255,0.1);
    border-top: none;
}

.cd-quiz__body .sqe-results {
    background: rgba(15,23,42,0.8);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
}

.cd-quiz__completed {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px 20px;
    background: rgba(16,185,129,0.15);
    border: 1px solid rgba(16,185,129,0.3);
    border-radius: 12px;
    color: #10b981;
    font-weight: 600;
}

.cd-quiz__completed svg {
    width: 20px;
    height: 20px;
}

/* Quiz indicator node */
.cd-indicator__node--quiz .cd-indicator__node-dot {
    background: rgba(139,92,246,0.2);
    border-color: rgba(139,92,246,0.5);
}

.cd-indicator__node--quiz .cd-indicator__node-dot svg {
    width: 14px;
    height: 14px;
    color: #a78bfa;
}

.cd-indicator__node--quiz.is-active .cd-indicator__node-dot {
    background: rgba(139,92,246,0.3);
    border-color: #a78bfa;
    box-shadow: 0 0 12px rgba(139,92,246,0.4);
}

.cd-slide__content {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 1400px;
    height: 100%;
    margin: auto;
    padding: 40px 20px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    overflow: visible;
}

.cd-lesson {
    display: grid;
    grid-template-columns: minmax(300px, 550px) minmax(300px, 400px);
    gap: 60px;
    width: 100%;
    align-items: center;
    max-width: 100%;
    justify-content: space-between;
}

.cd-lesson__header {
    grid-column: 1;
    max-width: 550px;
    overflow: hidden;
}

.cd-lesson__meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.cd-lesson__sidebar {
    grid-column: 2;
    grid-row: 1;
    max-width: 100%;
    max-height: calc(95vh - 200px);
    overflow: visible;
    position: relative;
}

.cd-topics { 
    display: flex; 
    flex-direction: column; 
    gap: 0;
    position: relative;
    max-height: calc(95vh - 220px);
    overflow-y: auto;
    overflow-x: visible;
    padding: 20px;
    padding-left: 50px; /* Space for ring animation */
    padding-bottom: 50px;
    margin: -20px;
    margin-left: -50px;
    margin-right: 0;
    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.cd-topics::-webkit-scrollbar {
    width: 6px;
}

.cd-topics::-webkit-scrollbar-track {
    background: transparent;
}

.cd-topics::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.cd-topics::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}

/* Scroll hint arrow */
.cd-lesson__sidebar::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-size: 16px;
    background-repeat: no-repeat;
    background-position: center;
    animation: scrollHintBounce 1.5s ease-in-out infinite;
}

.cd-lesson__sidebar.has-scroll::after {
    opacity: 1;
}

@keyframes scrollHintBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(4px); }
}

.cd-dashboard {
    display: grid;
    grid-template-columns: 1fr minmax(300px, 400px);
    gap: 40px;
    width: 100%;
}

.cd-dashboard__sidebar {
    position: relative;
    max-height: calc(95vh - 200px);
}

.cd-card--outline {
    display: flex;
    flex-direction: column;
    max-height: calc(95vh - 220px);
}

.cd-card--outline .cd-card__heading {
    flex-shrink: 0;
}

.cd-outline {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.cd-outline::-webkit-scrollbar {
    width: 6px;
}

.cd-outline::-webkit-scrollbar-track {
    background: transparent;
}

.cd-outline::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.cd-outline::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}

/* Scroll hint for dashboard sidebar */
.cd-dashboard__sidebar::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-size: 16px;
    background-repeat: no-repeat;
    background-position: center;
    animation: scrollHintBounce 1.5s ease-in-out infinite;
}

.cd-dashboard__sidebar.has-scroll::after {
    opacity: 1;
}

.cd-card {
    background: rgba(15,23,42,0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 24px;
    color: #fff;
}

.cd-card__title { font-size: 38px; font-weight: 700; margin: 0 0 12px; line-height: 1.1; }
.cd-card__description { font-size: 17px; line-height: 1.6; color: rgba(255,255,255,0.8); margin: 0 0 24px; }
.cd-card__heading { font-size: 16px; font-weight: 600; margin: 0 0 16px; display: flex; justify-content: space-between; }
.cd-card__heading span { font-size: 12px; opacity: 0.5; }

/* Search */
.cd-search {
    position: relative;
    margin-bottom: 20px;
}

.cd-search__input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.cd-search__icon {
    position: absolute;
    left: 12px;
    width: 18px;
    height: 18px;
    color: rgba(255,255,255,0.4);
    pointer-events: none;
}

.cd-search__input {
    width: 100%;
    padding: 12px 40px 12px 40px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

.cd-search__input::placeholder {
    color: rgba(255,255,255,0.4);
}

.cd-search__input:focus {
    background: rgba(255,255,255,0.08);
    border-color: rgba(59,130,246,0.5);
}

.cd-search__clear {
    position: absolute;
    right: 8px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.cd-search__clear:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.cd-search__clear svg {
    width: 16px;
    height: 16px;
}

.cd-search__results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(15,23,42,0.98);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.cd-search__results.is-active {
    display: block;
}

.cd-search__result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    color: #fff;
    font-family: inherit;
}

.cd-search__result:hover {
    background: rgba(59,130,246,0.15);
}

.cd-search__result:first-child {
    border-radius: 11px 11px 0 0;
}

.cd-search__result:last-child {
    border-radius: 0 0 11px 11px;
}

.cd-search__result:only-child {
    border-radius: 11px;
}

.cd-search__result-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59,130,246,0.2);
    border-radius: 8px;
    color: #60a5fa;
}

.cd-search__result-icon svg {
    width: 16px;
    height: 16px;
}

.cd-search__result--topic .cd-search__result-icon {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
}

.cd-search__result--done .cd-search__result-icon {
    background: rgba(16,185,129,0.2);
    color: #10b981;
}

.cd-search__result-info {
    flex: 1;
    min-width: 0;
}

.cd-search__result-label {
    display: block;
    font-size: 10px;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.cd-search__result-title {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cd-search__result-check {
    width: 18px;
    height: 18px;
    color: #10b981;
}

.cd-search__empty {
    padding: 20px;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 14px;
}

.cd-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.cd-progress__bar { flex: 1; height: 8px; background: rgba(255,255,255,0.15); border-radius: 4px; }
.cd-progress__fill { height: 100%; background: #3b82f6; border-radius: 4px; }
.cd-progress__text { font-weight: 600; opacity: 0.7; }

.cd-continue { 
    display: flex; 
    align-items: center;
    gap: 16px;
    padding: 12px; 
    background: rgba(59,130,246,0.1); 
    border: 1px solid rgba(59,130,246,0.25); 
    border-radius: 16px; 
    text-decoration: none; 
    color: #fff;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    width: 100%;
}
.cd-continue:hover {
    background: rgba(59,130,246,0.2);
    border-color: rgba(59,130,246,0.4);
    transform: translateY(-2px);
}
.cd-continue__thumb {
    width: 80px;
    height: 80px;
    min-width: 80px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    background-color: rgba(255,255,255,0.1);
}
.cd-continue__content {
    flex: 1;
    min-width: 0;
}
.cd-continue__label { 
    display: block; 
    font-size: 11px; 
    color: #60a5fa; 
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.cd-continue__title { 
    display: block;
    font-size: 16px; 
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.3;
}
.cd-continue__excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    line-height: 1.5;
}
.cd-continue__arrow {
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59,130,246,0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
}
.cd-continue__arrow svg {
    width: 20px;
    height: 20px;
    color: #60a5fa;
}
.cd-continue:hover .cd-continue__arrow {
    background: #3b82f6;
}
.cd-continue:hover .cd-continue__arrow svg {
    color: #fff;
    transform: translateX(2px);
}

.cd-card--stats { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    text-align: center;
    margin-top: 20px;
}
.cd-stat__value { display: block; font-size: 24px; font-weight: 700; }
.cd-stat__label { font-size: 12px; opacity: 0.5; }

.cd-outline__item { 
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px; 
    background: rgba(255,255,255,0.03); 
    border-radius: 12px; 
    border: 1px solid rgba(255,255,255,0.06);
    cursor: pointer;
    text-align: left;
    transition: all 0.25s ease;
}
.cd-outline__item:hover { 
    background: rgba(255,255,255,0.08); 
    border-color: rgba(255,255,255,0.12);
    transform: translateX(4px);
}
.cd-outline__item--done { 
    background: rgba(34,197,94,0.08);
    border-color: rgba(34,197,94,0.15);
}
.cd-outline__item--done:hover {
    background: rgba(34,197,94,0.12);
    border-color: rgba(34,197,94,0.25);
}
.cd-outline__item--progress { 
    background: rgba(245,158,11,0.08);
    border-color: rgba(245,158,11,0.15);
}
.cd-outline__item--progress:hover {
    background: rgba(245,158,11,0.12);
    border-color: rgba(245,158,11,0.25);
}
.cd-outline__thumb {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-color: rgba(255,255,255,0.08);
    position: relative;
    overflow: hidden;
}
.cd-outline__thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(0,0,0,0.3));
    border-radius: 8px;
}
.cd-outline__thumb--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(59,130,246,0.1));
}
.cd-outline__thumb--empty span {
    font-size: 16px;
    font-weight: 700;
    color: #60a5fa;
    position: relative;
    z-index: 1;
}
.cd-outline__item--done .cd-outline__thumb--empty {
    background: linear-gradient(135deg, rgba(34,197,94,0.25), rgba(34,197,94,0.1));
}
.cd-outline__item--done .cd-outline__thumb--empty span {
    color: #22c55e;
}
.cd-outline__item--progress .cd-outline__thumb--empty {
    background: linear-gradient(135deg, rgba(245,158,11,0.25), rgba(245,158,11,0.1));
}
.cd-outline__item--progress .cd-outline__thumb--empty span {
    color: #f59e0b;
}
.cd-outline__content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.cd-outline__num { 
    display: block; 
    font-size: 10px; 
    color: #60a5fa; 
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.cd-outline__item--done .cd-outline__num { color: #22c55e; }
.cd-outline__item--progress .cd-outline__num { color: #f59e0b; }
.cd-outline__title { 
    font-size: 13px; 
    font-weight: 500;
    color: #fff; 
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cd-outline__meta {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
}
.cd-outline__status {
    width: 28px;
    height: 28px;
    min-width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cd-outline__status svg {
    width: 18px;
    height: 18px;
}
.cd-outline__item--done .cd-outline__status svg {
    color: #22c55e;
}
.cd-outline__progress-ring {
    width: 28px;
    height: 28px;
}
.cd-outline__progress-ring svg {
    width: 100%;
    height: 100%;
}
.cd-outline__chevron {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.3;
    transition: all 0.2s ease;
}
.cd-outline__chevron svg {
    width: 16px;
    height: 16px;
}
.cd-outline__item:hover .cd-outline__chevron {
    opacity: 0.7;
    transform: translateX(2px);
}

.cd-lesson__num { font-size: 14px; color: #3b82f6; text-transform: uppercase; letter-spacing: 2px; font-weight: 600; }
.cd-lesson__title { font-size: 42px; font-weight: 700; margin: 0 0 8px; color: #fff; line-height: 1.1; overflow-wrap: break-word; word-wrap: break-word; }
.cd-lesson__status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 6px 12px; border-radius: 20px; background: rgba(255,255,255,0.1); }
.cd-lesson__status svg { width: 16px; height: 16px; }
.cd-lesson__status--done { color: #22c55e; background: rgba(34,197,94,0.15); }
.cd-lesson__status--progress { color: #f59e0b; background: rgba(245,158,11,0.15); }

.cd-lesson__intro { font-size: 18px; line-height: 1.7; color: rgba(255,255,255,0.9); margin-bottom: 24px; max-width: 100%; }
.cd-lesson__intro .intro { font-size: inherit; font-weight: 400; color: inherit; }
.cd-lesson__intro p { margin: 0; }

.cd-lesson__body { color: rgba(255,255,255,0.85); line-height: 1.7; margin-bottom: 20px; max-height: 300px; overflow-y: auto; }
.cd-lesson__body p { margin: 0 0 16px; }
.cd-lesson__body .intro { font-size: 16px; font-weight: 400; line-height: 1.8; color: rgba(255,255,255,0.9); }
.cd-lesson__empty { opacity: 0.4; font-style: italic; }

.cd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    background: transparent;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.3);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    line-height: 1;
}

.cd-btn:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(59,130,246,0.3);
}

.cd-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.cd-btn:hover svg {
    transform: translateX(4px);
}

/* Hint text below Start module button */
.cd-lesson__hint {
    margin-top: 16px;
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    font-style: italic;
}

@media (max-width: 900px) {
    .cd-lesson__hint {
        display: none;
    }
}

/* Connecting line - positioned through center of nodes */
.cd-topics::before {
    content: '';
    position: absolute;
    left: 81px; /* Adjusted for left padding */
    top: 52px;
    bottom: 82px;
    width: 2px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
}

.cd-topic { 
    display: flex; 
    align-items: center; 
    gap: 20px; 
    padding: 10px 0;
    padding-left: 0;
    text-decoration: none; 
    position: relative;
    transition: all 0.3s ease;
    overflow: visible;
    /* Button reset */
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    width: 100%;
    font-family: inherit;
    color: inherit;
    /* Animation setup */
    opacity: 0;
    transform: translateY(20px);
}

/* Animate topics when slide is visible */
.cd-slide.is-visible .cd-topic {
    animation: topicPopIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes topicPopIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cd-topic:hover { 
    transform: translateX(6px);
}

/* Hover state for non-done topics */
.cd-topic:not(.cd-topic--done):not(.cd-topic--current):hover .cd-topic__node {
    width: 80px;
    height: 80px;
    min-width: 80px;
    margin-left: -8px;
    margin-right: -8px;
    border-color: rgba(255,255,255,0.8);
    box-shadow: 0 0 20px rgba(255,255,255,0.3);
}

.cd-topic:not(.cd-topic--done):not(.cd-topic--current):hover .cd-topic__thumb {
    width: 68px;
    height: 68px;
}

.cd-topic:not(.cd-topic--done):not(.cd-topic--current):hover .cd-topic__title {
    color: #fff;
    font-weight: 600;
}

.cd-topic:not(.cd-topic--done):not(.cd-topic--current):hover .cd-topic__label {
    color: rgba(255,255,255,0.7);
}

.cd-topic__node {
    width: 64px;
    height: 64px;
    min-width: 64px;
    border-radius: 50%;
    background: #0f172a;
    border: 3px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.cd-topic__thumb { 
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #1e293b no-repeat center / cover;
    transition: all 0.3s ease;
}

.cd-topic__info { flex: 1; min-width: 0; overflow: visible; }
.cd-topic__label { display: block; font-size: 11px; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; transition: color 0.3s ease; }
.cd-topic__title { display: block; font-size: 17px; color: rgba(255,255,255,0.85); font-weight: 500; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: all 0.3s ease; }

/* Excerpt - hidden by default, shown on hover */
.cd-topic__excerpt {
    display: block;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    line-height: 1.5;
    margin-top: 8px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.cd-topic:hover .cd-topic__excerpt {
    max-height: 100px;
    opacity: 1;
}

/* Done topics - dimmer excerpt */
.cd-topic--done:hover .cd-topic__excerpt {
    color: rgba(255,255,255,0.4);
}

/* Slightly expand topic row on hover to make room */
.cd-topic:hover {
    padding-top: 12px;
    padding-bottom: 12px;
}

.cd-topic__check { 
    width: 24px; 
    height: 24px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    flex-shrink: 0;
    opacity: 0;
}
.cd-topic__check svg { width: 18px; height: 18px; color: #10b981; }

/* Topics title - hidden on desktop */
.cd-topics__title {
    display: none;
}

/* Default (not started) topic - make more clickable looking */
.cd-topic:not(.cd-topic--done):not(.cd-topic--current) .cd-topic__node {
    border-color: rgba(255,255,255,0.25);
    background: rgba(15, 23, 42, 0.8);
}

.cd-topic:not(.cd-topic--done):not(.cd-topic--current) .cd-topic__title {
    color: rgba(255,255,255,0.9);
}

.cd-topic:not(.cd-topic--done):not(.cd-topic--current) .cd-topic__label {
    color: rgba(255,255,255,0.5);
}

/* Clickable indicator arrow for non-current topics */
.cd-topic:not(.cd-topic--current)::after {
    content: '';
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: rgba(59,130,246,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2360a5fa' stroke-width='2'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E");
    background-size: 16px;
    background-repeat: no-repeat;
    background-position: center;
}

.cd-topic:not(.cd-topic--current):hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* DONE state */
.cd-topic--done .cd-topic__node {
    background: #0f172a;
    border-color: #10b981;
}

.cd-topic--done .cd-topic__title {
    color: rgba(255,255,255,0.5);
}

.cd-topic--done .cd-topic__check {
    opacity: 1;
}

/* CURRENT state - eye-catching with ring pulse animation */
.cd-topic--current {
    padding: 18px 0;
    position: relative;
}

.cd-topic--current .cd-topic__node {
    width: 96px;
    height: 96px;
    min-width: 96px;
    margin-left: -16px;
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
    border-color: #3b82f6;
    border-width: 3px;
    box-shadow: 0 0 30px rgba(59,130,246,0.6), 0 0 60px rgba(59,130,246,0.3);
    animation: topicGlow 2s ease-in-out infinite;
    position: relative;
}

/* Animated ring pulse */
.cd-topic--current .cd-topic__node::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px solid rgba(59,130,246,0.6);
    animation: ringPulse 2s ease-out infinite;
}

.cd-topic--current .cd-topic__node::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid rgba(59,130,246,0.4);
    animation: ringPulse 2s ease-out infinite 0.5s;
}

.cd-topic--current .cd-topic__thumb {
    width: 84px;
    height: 84px;
}

.cd-topic--current .cd-topic__title {
    font-size: 19px;
    color: #fff;
    font-weight: 600;
}

.cd-topic--current .cd-topic__label {
    color: #60a5fa;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: labelPulse 2s ease-in-out infinite;
}

@keyframes topicGlow {
    0%, 100% { 
        box-shadow: 0 0 25px rgba(59,130,246,0.5), 0 0 50px rgba(59,130,246,0.25);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 40px rgba(59,130,246,0.7), 0 0 80px rgba(59,130,246,0.35);
        transform: scale(1.04);
    }
}

/* Animated hint next to current topic */
.cd-sidebar__hint {
    position: absolute;
    right: calc(100% + 30px);
    top: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease, top 0.25s ease;
    z-index: 10;
}

.cd-sidebar__hint.is-visible {
    opacity: 1;
    animation: hintBounce 1.5s ease-in-out infinite;
}

.cd-sidebar__hint-text {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    white-space: nowrap;
}

.cd-sidebar__hint-arrow {
    width: 20px;
    height: 20px;
    color: #fff;
}

@keyframes hintBounce {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(3px);
    }
}

/* Remove old hint styles */
.cd-topic__hint,
.cd-topics__hint {
    display: none;
}

@keyframes ringPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes labelPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* LOCKED state */
.cd-topic--locked .cd-topic__node {
    background: #0f172a;
    opacity: 0.6;
}

.cd-topic--locked .cd-topic__title {
    color: rgba(255,255,255,0.3);
}

.cd-topic--locked .cd-topic__label {
    color: rgba(255,255,255,0.2);
}

/* INTRO state - lesson introduction with video */
.cd-topic--intro .cd-topic__node {
    background: rgba(96, 165, 250, 0.15);
}

.cd-topic--intro .cd-topic__thumb {
    border: 2px solid rgba(96, 165, 250, 0.4);
}

.cd-topic--intro .cd-topic__label {
    color: #60a5fa;
    font-weight: 600;
}

.cd-topic--intro .cd-topic__title {
    color: #fff;
}

.cd-scroll-hint { 
    position: absolute; 
    bottom: 140px; 
    left: 50%; 
    transform: translateX(-50%); 
    color: rgba(255,255,255,0.5); 
    text-align: center; 
    animation: bounceRight 2s infinite; 
    z-index: 10; 
    display: flex; 
    align-items: center; 
    gap: 8px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 10px 18px;
    border-radius: 50px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}
.cd-scroll-hint:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.8);
}
.cd-scroll-hint svg { width: 20px; height: 20px; }
@keyframes bounceRight { 0%,100% { transform: translateX(-50%); } 50% { transform: translateX(-40%); } }

/* ================================
   NAVIGATION BUTTONS (hidden)
   ================================ */
.cd-slide__nav { 
    display: none; /* Navigation removed */
}
.cd-slide__nav-btn { 
    display: flex; 
    flex-direction: column;
    align-items: center; 
    gap: 8px; 
    padding: 0;
    background: none; 
    border: none; 
    color: #fff; 
    cursor: pointer; 
    pointer-events: auto;
    transition: all 0.2s ease;
}
.cd-slide__nav-btn:hover .cd-slide__nav-arrow { 
    background: rgba(59,130,246,0.3); 
    border-color: rgba(59,130,246,0.5); 
    transform: scale(1.08);
}
.cd-slide__nav-arrow {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15,23,42,0.7); 
    backdrop-filter: blur(12px); 
    border: 1px solid rgba(255,255,255,0.15); 
    border-radius: 50%;
    transition: all 0.2s ease;
}
.cd-slide__nav-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.cd-slide__nav-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-align: center;
}
.cd-slide__nav-label {
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.5;
}
.cd-slide__nav-title {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    max-width: 120px;
    opacity: 0.8;
}

/* ================================
   PROGRESS INDICATOR
   ================================ */
.cd-indicator {
    position: fixed;
    bottom: 24px;
    left: var(--sla-cnav-content-offset, 0);
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    pointer-events: none;
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cd-indicator__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
}

/* Timeline with nodes */
.cd-indicator__timeline {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    background: rgba(10, 15, 30, 0.85);
    backdrop-filter: blur(20px);
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 4px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05);
}

/* Connecting lines between nodes */
.cd-indicator__timeline::before {
    display: none;
}

/* Individual node */
.cd-indicator__node {
    position: relative;
    width: 28px;
    height: 28px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.cd-indicator__node:hover {
    transform: scale(1.15);
}

.cd-indicator__node-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.cd-indicator__num {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,0.4);
    line-height: 1;
}

.cd-indicator__check {
    width: 12px;
    height: 12px;
    color: #fff;
}

/* Dashboard node */
.cd-indicator__node--dashboard .cd-indicator__node-dot {
    background: rgba(255,255,255,0.05);
}

.cd-indicator__node--dashboard .cd-indicator__node-dot svg {
    width: 12px;
    height: 12px;
    color: rgba(255,255,255,0.4);
}

/* Done state */
.cd-indicator__node--done .cd-indicator__node-dot {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
}

.cd-indicator__node--done .cd-indicator__check {
    color: #10b981;
}

/* Progress state */
.cd-indicator__node--progress .cd-indicator__node-dot {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.6);
}

.cd-indicator__node--progress .cd-indicator__num {
    color: #fbbf24;
}

/* Active/Current state */
.cd-indicator__node.is-active .cd-indicator__node-dot {
    width: 28px;
    height: 28px;
    background: rgba(37, 99, 235, 0.2);
    border-color: #2563eb;
    border-width: 2px;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15), 0 0 20px rgba(37, 99, 235, 0.3);
    animation: indicatorPulse 2s ease-in-out infinite;
}

.cd-indicator__node.is-active .cd-indicator__num {
    color: #fff;
    font-size: 11px;
}

.cd-indicator__node.is-active.cd-indicator__node--dashboard .cd-indicator__node-dot svg {
    color: #60a5fa;
}

.cd-indicator__node.is-active.cd-indicator__node--done .cd-indicator__node-dot {
    background: rgba(16, 185, 129, 0.25);
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15), 0 0 20px rgba(16, 185, 129, 0.3);
}

@keyframes indicatorPulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15), 0 0 20px rgba(37, 99, 235, 0.3); }
    50% { box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.1), 0 0 30px rgba(37, 99, 235, 0.4); }
}

/* Tooltip */
.cd-indicator__tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 8px 12px;
    background: rgba(10, 15, 30, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.cd-indicator__tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(10, 15, 30, 0.95);
}

.cd-indicator__node:hover .cd-indicator__tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-12px);
}

/* Narrower desktop - when sidebar is open */
@media (max-width: 1200px) {
    .cd-slide__content {
        width: 95%;
        padding: 30px 16px;
    }
    .cd-lesson {
        grid-template-columns: 1fr 300px;
        gap: 30px;
    }
    .cd-dashboard {
        grid-template-columns: 1fr 300px;
        gap: 24px;
    }
    .cd-slide--lesson::after {
        width: 45%;
    }
    .cd-lesson__title {
        font-size: 36px;
    }
    .cd-lesson__intro {
        font-size: 16px;
    }
    .cd-topic__title {
        font-size: 14px;
    }
    .cd-topic--current .cd-topic__title {
        font-size: 15px;
    }
    .cd-topic__node {
        width: 52px;
        height: 52px;
        min-width: 52px;
    }
    .cd-topic__thumb {
        width: 40px;
        height: 40px;
    }
    .cd-topic--current .cd-topic__node {
        width: 80px;
        height: 80px;
        min-width: 80px;
        margin-left: -14px;
    }
    .cd-topic--current .cd-topic__node::before {
        inset: -8px;
    }
    .cd-topic--current .cd-topic__node::after {
        inset: -4px;
    }
    .cd-topic--current .cd-topic__thumb {
        width: 68px;
        height: 68px;
    }
    .cd-topics::before {
        left: 75px;
    }
}

/* ===========================================
   MOBILE LAYOUT - Complete rewrite
   =========================================== */
@media (max-width: 1024px) {
    /* Base slide container - vertical scroll */
    .cd-slides.alignfull { 
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        height: 100vh;
        height: 100dvh; 
        max-height: 100vh;
        max-height: 100dvh;
        margin: 0; 
        overflow-x: hidden;
        overflow-y: scroll;
        scroll-snap-type: y mandatory;
        flex-direction: column;
        z-index: 100;
        overscroll-behavior-y: contain;
    }
    
    /* Each slide - full screen */
    .cd-slides.alignfull > .cd-slide { 
        width: 100%;
        min-width: 100%;
        height: 100vh;
        height: 100dvh; 
        min-height: 100vh;
        min-height: 100dvh;
        max-height: none;
        scroll-snap-align: start;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    
    /* Dark gradient overlay */
    .cd-slide::before {
        background: linear-gradient(180deg, 
            rgba(10,15,30,0.95) 0%, 
            rgba(10,15,30,0.85) 40%,
            rgba(15,23,42,0.6) 100%
        );
    }
    
    /* Hide glassmorphism on mobile */
    .cd-slide--lesson::after {
        display: none;
    }
    
    /* Content wrapper - MORE top padding for header */
    .cd-slide__content { 
        width: 100%; 
        height: 100%;
        padding: 0;
        padding-top: max(70px, env(safe-area-inset-top) + 60px); /* More space for header */
        padding-bottom: calc(90px + env(safe-area-inset-bottom)); /* Space for bottom nav */
        display: flex;
        flex-direction: column;
        overflow: hidden;
        position: relative;
    }
    
    /* Hide desktop elements */
    .cd-dashboard__sidebar { display: none; }
    .cd-indicator { display: none; }
    .cd-slide__nav { display: none; }
    .cd-scroll-hint { display: none; }
    .cd-lesson__hint { display: none; }
    .cd-topic__hint { display: none; }
    .cd-topics__hint { display: none; }
    .cd-sidebar__hint { display: none; }
    
    /* ---- LESSON SLIDE LAYOUT ---- */
    .cd-lesson { 
        display: flex;
        flex-direction: column;
        height: 100%;
        padding: 0 20px;
        gap: 0;
    }
    
    /* Header section - top aligned */
    .cd-lesson__header { 
        flex: 0 0 auto;
        padding-top: 8px;
        padding-bottom: 12px;
    }
    
    .cd-lesson__meta { 
        display: flex;
        align-items: center;
        gap: 10px; 
        margin-bottom: 10px;
        flex-wrap: wrap;
    }
    
    .cd-lesson__num { 
        font-size: 11px;
        letter-spacing: 1.5px;
    }
    
    .cd-lesson__status { 
        font-size: 11px; 
        padding: 4px 10px;
    }
    
    .cd-lesson__title { 
        font-size: 26px;
        line-height: 1.2;
        margin-bottom: 12px;
    }
    
    .cd-lesson__intro { 
        font-size: 16px; 
        line-height: 1.6;
        color: rgba(255,255,255,0.85);
        margin-bottom: 16px;
        display: -webkit-box;
        -webkit-line-clamp: 6;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .cd-btn { 
        padding: 14px 24px; 
        font-size: 14px;
        font-weight: 600;
        border-radius: 12px;
        width: 100%;
        justify-content: center;
    }
    
    /* Sidebar with topics - FIXED at bottom */
    .cd-lesson__sidebar { 
        position: absolute;
        bottom: calc(75px + env(safe-area-inset-bottom));
        left: 0;
        right: 0;
        display: flex;
        flex-direction: column;
        padding: 0;
        z-index: 10;
        overflow: visible;
    }
    
    /* Topics section title */
    .cd-topics__title {
        display: block;
        font-size: 15px;
        font-weight: 600;
        color: #fff;
        text-transform: none;
        letter-spacing: 0;
        margin: 0 0 12px 20px;
        padding: 0;
        position: relative;
        z-index: 2;
        flex-shrink: 0;
    }
    
    /* Topics carousel container */
    .cd-topics {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        gap: 10px;
        padding: 0 20px 10px 20px;
        margin: 0;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-padding-left: 20px;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x;
        overscroll-behavior-x: contain;
        position: relative;
        z-index: 1;
        flex-shrink: 0;
    }
    
    .cd-topics::before { display: none; }
    .cd-topics::-webkit-scrollbar { display: none; }
    .cd-topics { -ms-overflow-style: none; scrollbar-width: none; }
    
    /* Topic card - SMALL but readable */
    .cd-topic {
        flex: 0 0 auto;
        width: 140px;
        min-width: 140px;
        height: 165px;
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        scroll-snap-align: start;
        background: rgba(20,25,40,0.9);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid rgba(255,255,255,0.12);
        border-radius: 12px;
        overflow: hidden;
        position: relative;
        opacity: 0.75;
        touch-action: manipulation;
    }
    
    /* Remove hover arrow on mobile */
    .cd-topic::after,
    .cd-topic:not(.cd-topic--current)::after {
        display: none !important;
        content: none !important;
    }
    
    /* CURRENT topic - BIG */
    .cd-topic--current {
        width: 190px;
        min-width: 190px;
        height: 210px;
        opacity: 1;
        border-color: rgba(59,130,246,0.5);
        box-shadow: 0 0 0 2px rgba(59,130,246,0.2), 0 8px 24px rgba(0,0,0,0.4);
        background: rgba(25,30,50,0.95);
    }
    
    /* Intro topic - medium */
    .cd-topic--intro:not(.cd-topic--current) {
        width: 150px;
        min-width: 150px;
        height: 175px;
        opacity: 0.85;
    }
    
    /* Thumbnail - top of card */
    .cd-topic__node {
        display: contents;
    }
    
    .cd-topic__thumb { 
        width: 100% !important; 
        height: 85px !important;
        border-radius: 0 !important;
        flex-shrink: 0;
        background-size: cover !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
        background-color: rgba(30,41,59,0.5);
    }
    
    /* CURRENT - bigger thumb */
    .cd-topic--current .cd-topic__thumb {
        height: 115px !important;
    }
    
    /* Intro - medium thumb */
    .cd-topic--intro:not(.cd-topic--current) .cd-topic__thumb {
        height: 95px !important;
    }
    
    /* Info section */
    .cd-topic__info { 
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 10px 12px;
        text-align: left;
    }
    
    /* Hide excerpt on mobile */
    .cd-topic__excerpt {
        display: none !important;
    }
    
    .cd-topic--current .cd-topic__info {
        padding: 12px 14px;
    }
    
    .cd-topic__label { 
        font-size: 9px;
        font-weight: 600;
        letter-spacing: 0.5px;
        color: rgba(255,255,255,0.5);
        margin-bottom: 3px;
        text-transform: uppercase;
    }
    
    .cd-topic--current .cd-topic__label {
        font-size: 10px;
        color: #60a5fa;
    }
    
    .cd-topic__title { 
        font-size: 13px;
        font-weight: 500;
        line-height: 1.3;
        color: rgba(255,255,255,0.85);
        display: -webkit-box; 
        -webkit-line-clamp: 2; 
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .cd-topic--current .cd-topic__title {
        font-size: 15px;
        font-weight: 600;
        color: #fff;
    }
    
    /* "Continue" badge on current topic */
    .cd-topic--current::before {
        content: 'Ga verder';
        position: absolute;
        top: 6px;
        left: 6px;
        padding: 3px 8px;
        background: #3b82f6;
        border-radius: 12px;
        font-size: 8px;
        font-weight: 600;
        color: #fff;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        z-index: 3;
    }
    
    /* Check mark - top right */
    .cd-topic__check { 
        position: absolute; 
        top: 8px; 
        right: 8px;
        width: 22px;
        height: 22px;
        background: rgba(16,185,129,0.95);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        z-index: 2;
    }
    
    .cd-topic__check svg {
        width: 12px;
        height: 12px;
        color: #fff;
    }
    
    .cd-topic--current .cd-topic__check {
        width: 26px;
        height: 26px;
    }
    
    .cd-topic--current .cd-topic__check svg {
        width: 14px;
        height: 14px;
    }
    
    /* State variations */
    .cd-topic--done .cd-topic__check { opacity: 1; }
    .cd-topic--done .cd-topic__thumb { opacity: 0.5; }
    .cd-topic--done .cd-topic__title { color: rgba(255,255,255,0.5); }
    .cd-topic--done { opacity: 0.6; }
    
    /* Reset all desktop state styles */
    .cd-topic--current .cd-topic__node,
    .cd-topic--done .cd-topic__node {
        width: auto;
        height: auto;
        min-width: auto;
        border: none;
        background: none;
        box-shadow: none;
        animation: none;
        margin: 0;
    }
    
    .cd-topic--current .cd-topic__node::before,
    .cd-topic--current .cd-topic__node::after {
        display: none;
    }
    
    /* Intro card styling */
    .cd-topic--intro .cd-topic__label {
        color: #60a5fa;
    }
    
    .cd-topic--intro .cd-topic__thumb {
        border: none;
    }
    
    /* ---- DASHBOARD SLIDE ---- */
    .cd-dashboard { 
        display: flex;
        flex-direction: column;
        height: 100%;
        padding: 8px 20px 20px;
    }
    
    .cd-dashboard__main {
        flex: 1;
    }
    
    .cd-card { 
        padding: 20px;
        border-radius: 16px;
    }
    
    .cd-card--hero {
        margin-bottom: 16px;
    }
    
    .cd-card__title { 
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    .cd-card__description {
        font-size: 14px;
    }
    
    .cd-progress {
        margin-top: 16px;
    }
    
    .cd-card--stats { 
        margin-top: 16px;
    }
    
    .cd-stat__value { 
        font-size: 20px;
    }
    
    .cd-stat__label { 
        font-size: 11px;
    }
    
    .cd-continue {
        margin-top: 16px;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .cd-slide__content {
        padding-top: max(65px, env(safe-area-inset-top) + 55px);
    }
    
    .cd-lesson {
        padding: 0 16px;
    }
    
    .cd-lesson__title { 
        font-size: 22px;
    }
    
    .cd-lesson__intro { 
        font-size: 14px;
        -webkit-line-clamp: 4;
        margin-bottom: 12px;
    }
    
    .cd-btn { 
        padding: 12px 20px;
        font-size: 13px;
    }
    
    .cd-lesson__sidebar {
        bottom: calc(70px + env(safe-area-inset-bottom));
    }
    
    .cd-topics__title {
        font-size: 14px;
        margin-left: 16px;
        margin-bottom: 10px;
    }
    
    .cd-topics {
        gap: 8px;
        padding: 0 16px 8px 16px;
        scroll-padding-left: 16px;
    }
    
    /* Small cards - still readable */
    .cd-topic { 
        width: 120px;
        min-width: 120px;
        height: 145px;
        border-radius: 10px;
    }
    
    /* CURRENT - BIG */
    .cd-topic--current {
        width: 165px;
        min-width: 165px;
        height: 190px;
    }
    
    .cd-topic--intro:not(.cd-topic--current) {
        width: 130px;
        min-width: 130px;
        height: 155px;
    }
    
    .cd-topic__thumb {
        height: 70px !important;
    }
    
    .cd-topic--current .cd-topic__thumb {
        height: 100px !important;
    }
    
    .cd-topic--intro:not(.cd-topic--current) .cd-topic__thumb {
        height: 80px !important;
    }
    
    .cd-topic__info {
        padding: 8px 10px;
    }
    
    .cd-topic--current .cd-topic__info {
        padding: 10px 12px;
    }
    
    .cd-topic__label {
        font-size: 8px;
    }
    
    .cd-topic__title { 
        font-size: 12px;
    }
    
    .cd-topic--current .cd-topic__title {
        font-size: 14px;
    }
    
    .cd-topic--current::before {
        font-size: 7px;
        padding: 2px 6px;
        top: 5px;
        left: 5px;
    }
    
    .cd-topic__check {
        width: 16px;
        height: 16px;
        top: 4px;
        right: 4px;
    }
    
    .cd-topic__check svg {
        width: 9px;
        height: 9px;
    }
}


/* ================================================
   TOPIC MODAL - Fullscreen with sidebar
   ================================================ */
.cd-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cd-modal.is-active {
    opacity: 1;
    visibility: visible;
}

.cd-modal__overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 1;
}

/* Main layout - full viewport with space for side nav */
.cd-modal__layout {
    position: fixed;
    top: 0;
    left: 90px;
    right: 90px;
    bottom: 0;
    z-index: 2;
    transform: scale(0.98);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.cd-modal.is-active .cd-modal__layout {
    transform: scale(1);
    opacity: 1;
}

/* Left: Main content area */
.cd-modal__main {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #000;
}

/* Top bar */
.cd-modal__topbar {
    display: flex;
    align-items: center;
    padding: 16px 40px;
    flex-shrink: 0;
    background: #000;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    justify-content: center;
}

.cd-modal__breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    width: 100%;
    max-width: 720px;
}

.cd-modal__lesson-title {
    max-width: 400px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cd-modal__separator {
    opacity: 0.3;
}

.cd-modal__progress {
    color: rgba(255,255,255,0.7);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.cd-modal__close {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10;
    width: 44px;
    height: 44px;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 50%;
}

.cd-modal.is-active .cd-modal__close {
    display: flex; /* Show when modal active */
}

.cd-modal__close:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.cd-modal__close svg {
    width: 24px;
    height: 24px;
}

/* Scrollable content */
.cd-modal__scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 40px;
    background: #000;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
    display: flex;
    justify-content: center;
}

.cd-modal__scroll::-webkit-scrollbar {
    width: 6px;
}

.cd-modal__scroll::-webkit-scrollbar-track {
    background: transparent;
}

.cd-modal__scroll::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

/* Loading */
.cd-modal__loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    width: 100%;
}

.cd-modal__spinner {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255,255,255,0.1);
    border-top-color: #fff;
    border-radius: 50%;
    animation: modalSpin 0.8s linear infinite;
}

@keyframes modalSpin {
    to { transform: rotate(360deg); }
}

.cd-modal__content {
    display: none;
    width: 100%;
    max-width: 720px;
    padding-bottom: 120px; /* Space for floating button */
}

.cd-modal.is-loaded .cd-modal__loading {
    display: none;
}

.cd-modal.is-loaded .cd-modal__content {
    display: block;
    animation: modalContentFade 0.4s ease;
}

@keyframes modalContentFade {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero image */
.cd-modal__hero {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    overflow: hidden;
    display: none;
    margin-bottom: 32px;
}

.cd-modal__hero.has-image {
    display: block;
}

.cd-modal__hero.has-video {
    display: block;
    aspect-ratio: auto;
}

.cd-modal__hero.has-video .cd-modal__image {
    display: none;
}

/* Video wrapper in hero */
.cd-modal__video-wrap {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
}

.cd-modal__video-wrap .vo-aspect {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.cd-modal__video-wrap .vo-aspect::before {
    content: "";
    display: block;
    padding-bottom: var(--vo-pb, 56.25%);
}

.cd-modal__video-wrap .vo-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 0.3s ease;
    border-radius: 12px;
}

.cd-modal__video-wrap .vo-content {
    position: absolute;
    left: 1.5em;
    bottom: 1.5em;
    display: flex;
    flex-direction: column;
    gap: 0.6em;
    max-width: 85%;
    pointer-events: none;
}

.cd-modal__video-wrap .vo-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6em;
}

.cd-modal__video-wrap .vo-badge-cat {
    display: inline-block;
    font-weight: 800;
    letter-spacing: 0.02em;
    padding: 0.55em 0.8em;
    border-radius: 0.45em;
    font-size: 10px;
    line-height: 1;
    color: #fff;
    background: rgba(24, 72, 255, 0.9);
    text-transform: uppercase;
}

.cd-modal__video-wrap .vo-badge-ch {
    font-size: 1.5em;
    color: #cfe0ff;
    opacity: 0.95;
    font-weight: 800;
}

.cd-modal__video-wrap .vo-quote {
    font-size: 1em;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
    font-style: italic;
}

.cd-modal__video-wrap .vo-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 3;
    width: 72px;
    height: 72px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}

.cd-modal__video-wrap .vo-overlay:hover .vo-play {
    background: rgba(37, 99, 235, 0.8);
    transform: translate(-50%, -50%) scale(1.1);
}

.cd-modal__video-wrap .vo-play svg {
    width: 32px;
    height: 32px;
}

.cd-modal__video-wrap .vo-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    background: #000;
    border-radius: 12px;
}

.cd-modal__video-wrap .vo-player video,
.cd-modal__video-wrap .vo-player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    border: none;
    object-fit: contain;
    border-radius: 12px;
}

.cd-modal__video-wrap.video-playing .vo-overlay {
    opacity: 0;
    pointer-events: none;
}

.cd-modal__video-wrap .vo-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    z-index: 11;
}

.cd-modal__video-wrap .vo-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.cd-modal__video-wrap .vo-close svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

.cd-modal__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Content */
.cd-modal__body {
    padding: 0;
}

.cd-modal__title {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 24px 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.cd-modal__text {
    color: rgba(255,255,255,0.8);
    font-size: 17px;
    line-height: 1.8;
}

.cd-modal__text p { margin-bottom: 1.5em; }
.cd-modal__text p:last-child { margin-bottom: 0; }

.cd-modal__text h2,
.cd-modal__text h3,
.cd-modal__text h4 {
    color: #fff;
    margin-top: 2em;
    margin-bottom: 0.75em;
    font-weight: 600;
}

.cd-modal__text h2 { font-size: 26px; }
.cd-modal__text h3 { font-size: 21px; }
.cd-modal__text h4 { font-size: 18px; }

.cd-modal__text strong { color: #fff; font-weight: 600; }

.cd-modal__text a {
    color: #60a5fa;
    text-decoration: none;
    border-bottom: 1px solid rgba(96, 165, 250, 0.3);
}

.cd-modal__text a:hover {
    border-color: #60a5fa;
}

.cd-modal__text ul,
.cd-modal__text ol {
    margin-bottom: 1.5em;
    padding-left: 1.5em;
}

.cd-modal__text li { margin-bottom: 0.5em; }

.cd-modal__text img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5em 0;
}

.cd-modal__text blockquote {
    border-left: 3px solid rgba(255,255,255,0.2);
    padding-left: 20px;
    margin: 1.5em 0;
    color: rgba(255,255,255,0.6);
    font-style: italic;
}

/* SLA Content Blocks in modal */
.cd-modal__text .sla-did-you-know {
    background: rgba(251, 191, 36, 0.1);
    border-left: 3px solid rgba(251, 191, 36, 0.6);
    border-radius: 0 8px 8px 0;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.cd-modal__text .sla-did-you-know__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.cd-modal__text .sla-did-you-know__header span {
    font-size: 1rem;
}

.cd-modal__text .sla-did-you-know__header h4 {
    margin: 0;
    color: #fbbf24;
    font-size: 1rem;
    font-weight: 600;
}

.cd-modal__text .sla-did-you-know__content {
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
}

.cd-modal__text .sla-did-you-know__content p {
    margin: 0 0 0.5rem 0;
}

.cd-modal__text .sla-did-you-know__content p:last-child {
    margin-bottom: 0;
}

/* SLA Callout Box */
.cd-modal__text .sla-callout-box {
    padding: 1.25rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.cd-modal__text .sla-callout-box--info {
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid rgba(59, 130, 246, 0.6);
}

.cd-modal__text .sla-callout-box--warning {
    background: rgba(245, 158, 11, 0.1);
    border-left: 3px solid rgba(245, 158, 11, 0.6);
}

.cd-modal__text .sla-callout-box--success {
    background: rgba(34, 197, 94, 0.1);
    border-left: 3px solid rgba(34, 197, 94, 0.6);
}

.cd-modal__text .sla-callout-box--danger {
    background: rgba(239, 68, 68, 0.1);
    border-left: 3px solid rgba(239, 68, 68, 0.6);
}

/* SLA Summary Box */
.cd-modal__text .sla-summary-box {
    background: rgba(37, 99, 235, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.cd-modal__text .sla-summary-box__title {
    color: #60a5fa;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.cd-modal__text .sla-summary-box__content {
    color: rgba(255,255,255,0.8);
}

/* SLA Tips List */
.cd-modal__text .sla-tips-list {
    background: rgba(34, 197, 94, 0.06);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.cd-modal__text .sla-tips-list__title {
    color: #22c55e;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.cd-modal__text .sla-tips-list__item {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.cd-modal__text .sla-tips-list__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 197, 94, 0.2);
    border-radius: 50%;
    color: #22c55e;
    font-size: 12px;
}

/* SLA Definition Highlight */
.cd-modal__text .sla-definition-highlight {
    background: rgba(139, 92, 246, 0.1);
    border-left: 3px solid rgba(139, 92, 246, 0.6);
    padding: 1rem 1.25rem;
    border-radius: 0 8px 8px 0;
    margin: 1.5rem 0;
}

.cd-modal__text .sla-definition-highlight strong {
    color: #a78bfa;
}

/* SLA Reflection Block */
.cd-modal__text .sla-reflection-block {
    background: rgba(59, 130, 246, 0.08);
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.cd-modal__text .sla-reflection-block__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.cd-modal__text .sla-reflection-block__header h4 {
    margin: 0;
    color: #60a5fa;
    font-size: 1rem;
}

/* SLA Warning Block */
.cd-modal__text .sla-warning-block {
    background: rgba(239, 68, 68, 0.08);
    border-left: 3px solid rgba(239, 68, 68, 0.6);
    border-radius: 0 8px 8px 0;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.cd-modal__text .sla-warning-block__header h4 {
    margin: 0 0 0.5rem 0;
    color: #f87171;
    font-size: 1rem;
}

/* SLA Quote Highlight */
.cd-modal__text .sla-quote-highlight {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 2rem;
    margin: 1.5rem 0;
}

.cd-modal__text .sla-quote-highlight::before {
    content: '"';
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.1);
    line-height: 1;
}

.cd-modal__text .sla-quote-highlight p {
    font-size: 1.25rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
}

.cd-modal__text .sla-quote-highlight__author {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* SLA Scenario Block */
.cd-modal__text .sla-scenario-block {
    background: rgba(16, 185, 129, 0.08);
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.cd-modal__text .sla-scenario-block__header h4 {
    margin: 0 0 0.75rem 0;
    color: #34d399;
    font-size: 1rem;
}

/* SLA Legal Block */
.cd-modal__text .sla-legal-block {
    background: rgba(107, 114, 128, 0.1);
    border-left: 3px solid rgba(107, 114, 128, 0.5);
    border-radius: 0 8px 8px 0;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.cd-modal__text .sla-legal-block__header h4 {
    margin: 0 0 0.5rem 0;
    color: #9ca3af;
    font-size: 1rem;
}

/* SLA Stappenplan */
.cd-modal__text .sla-stappenplan {
    margin: 1.5rem 0;
}

.cd-modal__text .sla-stappenplan__step {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cd-modal__text .sla-stappenplan__number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.cd-modal__text .sla-stappenplan__content h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
}

/* SLA Pop Culture Block */
.cd-modal__text .sla-pop-culture {
    display: flex;
    gap: 1.5rem;
    background: rgba(236, 72, 153, 0.08);
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.cd-modal__text .sla-pop-culture__image {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
}

.cd-modal__text .sla-pop-culture__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cd-modal__text .sla-pop-culture__label {
    color: #ec4899;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.cd-modal__text .sla-pop-culture__source {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* SLA Comparison Block */
.cd-modal__text .sla-comparison-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.cd-modal__text .sla-comparison-block__side {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1.25rem;
}

.cd-modal__text .sla-comparison-block__side--left {
    border-top: 3px solid #22c55e;
}

.cd-modal__text .sla-comparison-block__side--right {
    border-top: 3px solid #ef4444;
}

.cd-modal__text .sla-comparison-block__title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* SLA Contrast Block */
.cd-modal__text .sla-contrast-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.cd-modal__text .sla-contrast-block__side {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1.25rem;
}

/* 
 * Force all scroll-animated elements to be visible in modal
 * Many SLA blocks use scroll-triggered animations that don't work in modal context
 * because they observe the window scroll instead of the modal scroll container
 */
.cd-modal__text [class*="sla-"],
.cd-modal__text .animate-on-scroll,
.cd-modal__text .scroll-animate,
.cd-modal__text .reveal-on-scroll,
.cd-modal__text .fade-in,
.cd-modal__text .slide-up,
.cd-modal__text .awv-animate {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
    animation: none !important;
    transition: none !important;
}

/* Video player in modal */
.cd-modal__text .vo-wrap {
    margin: 1.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.cd-modal__text .vo-aspect {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.cd-modal__text .vo-aspect::before {
    content: "";
    display: block;
    padding-bottom: var(--vo-pb, 56.25%);
}

.cd-modal__text .vo-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 0.3s ease;
    border-radius: 12px;
}

.cd-modal__text .vo-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--vo-mask);
    background-size: cover;
    background-position: center;
    opacity: 0.75;
    pointer-events: none;
    border-radius: 12px;
}

.cd-modal__text .vo-content {
    position: absolute;
    left: 1em;
    bottom: 1em;
    display: flex;
    flex-direction: column;
    gap: 0.6em;
    max-width: 92%;
    pointer-events: none;
}

.cd-modal__text .vo-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6em;
}

.cd-modal__text .vo-badge-cat {
    display: inline-block;
    font-weight: 800;
    letter-spacing: 0.02em;
    padding: 0.55em 0.8em;
    border-radius: 0.45em;
    font-size: 9px;
    line-height: 1;
    color: #fff;
    background: rgba(24, 72, 255, 0.9);
    text-transform: uppercase;
}

.cd-modal__text .vo-badge-ch {
    font-size: 1.5em;
    color: #cfe0ff;
    opacity: 0.95;
    font-weight: 800;
}

.cd-modal__text .vo-quote {
    font-size: clamp(0.85em, 2vw, 1em);
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
    font-style: italic;
}

.cd-modal__text .vo-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 3;
}

.cd-modal__text .vo-play svg {
    width: 48px;
    height: 48px;
}

.cd-modal__text .videoblok {
    margin: 1.5rem 0;
}

.cd-modal__text .vo-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    background: #000;
    border-radius: 12px;
}

.cd-modal__text .vo-player video,
.cd-modal__text .vo-player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    border: none;
    object-fit: contain;
    border-radius: 12px;
}

.cd-modal__text .vo-wrap.video-playing .vo-overlay {
    opacity: 0;
    pointer-events: none;
}

.cd-modal__text .vo-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    z-index: 11;
}

.cd-modal__text .vo-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.cd-modal__text .vo-close svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

/* Floating complete button - appears on scroll */
.cd-modal__complete-wrap {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.cd-modal__complete-wrap.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Side navigation - Behance style, at bottom */
.cd-modal__sidenav {
    position: fixed;
    bottom: 20px;
    z-index: 10;
    display: none; /* Hidden by default */
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.cd-modal.is-active .cd-modal__sidenav {
    display: flex; /* Show when modal active */
}

.cd-modal__sidenav--prev {
    left: 20px;
}

.cd-modal__sidenav--next {
    right: 20px;
}

.cd-modal__sidenav-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cd-modal__sidenav-circle svg {
    width: 22px;
    height: 22px;
    color: rgba(255,255,255,0.7);
    transition: all 0.2s ease;
}

.cd-modal__sidenav-label {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.cd-modal__sidenav:hover:not(:disabled) .cd-modal__sidenav-circle {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.25);
    transform: scale(1.05);
}

.cd-modal__sidenav:hover:not(:disabled) .cd-modal__sidenav-circle svg {
    color: #fff;
}

.cd-modal__sidenav:hover:not(:disabled) .cd-modal__sidenav-label {
    color: rgba(255,255,255,0.7);
}

.cd-modal__sidenav:disabled {
    opacity: 0.25;
    cursor: default;
}

/* Next slide variant - accent color */
.cd-modal__sidenav--next-slide .cd-modal__sidenav-circle {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

.cd-modal__sidenav--next-slide .cd-modal__sidenav-circle svg {
    color: #60a5fa;
}

.cd-modal__sidenav--next-slide .cd-modal__sidenav-label {
    color: #60a5fa;
}

.cd-modal__complete {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 100px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.05) inset;
}

.cd-modal__complete:hover:not(:disabled):not(.is-done) {
    background: rgba(50, 50, 50, 0.8);
    border-color: rgba(255,255,255,0.2);
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.1) inset;
}

.cd-modal__complete:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.cd-modal__complete svg {
    width: 20px;
    height: 20px;
}

.cd-modal__complete.is-done {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
    color: #10b981;
    cursor: default;
}

.cd-modal__complete.is-done span { display: none; }
.cd-modal__complete.is-done::after { content: 'Voltooid ✓'; }

.cd-modal__complete.is-loading {
    pointer-events: none;
}

.cd-modal__complete.is-loading span { display: none; }
.cd-modal__complete.is-loading::after { content: 'Even geduld...'; }
.cd-modal__complete.is-loading svg { animation: modalSpin 0.8s linear infinite; }

/* Right sidebar - topic thumbnails (floating) */
.cd-modal__sidebar {
    position: fixed;
    top: 50%;
    right: 25px;
    transform: translateY(-50%);
    z-index: 10;
    display: none;
    flex-direction: column;
    gap: 16px;
    overflow: visible;
    margin-bottom: 100px; /* Space above bottom nav */
}

.cd-modal.is-active .cd-modal__sidebar {
    display: flex;
}

.cd-modal__sidebar-inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: visible;
}

/* Sidebar topic thumbnail */
.cd-modal__thumb {
    position: relative !important;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    border-radius: 50% !important;
    overflow: visible !important; /* Allow tooltip to show */
    cursor: pointer;
    background: rgba(255,255,255,0.1);
    border: 2px solid transparent;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.cd-modal__thumb:hover {
    border-color: rgba(255,255,255,0.5);
    transform: scale(1.08);
}

.cd-modal__thumb.is-active {
    border-color: #fff;
    transform: scale(1.08);
}

.cd-modal__thumb.is-done::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    background: #10b981;
    border-radius: 50%;
    border: 2px solid #000;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
    background-size: 10px;
    background-position: center;
    background-repeat: no-repeat;
}

.cd-modal__thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%; /* Round the image itself */
}

.cd-modal__thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.3);
    font-size: 11px;
    font-weight: 600;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}

/* Intro thumbnail styling */
.cd-modal__thumb.is-intro {
    border: 2px solid rgba(96, 165, 250, 0.5);
}

.cd-modal__thumb.is-intro .cd-modal__thumb-placeholder {
    color: #60a5fa;
    font-size: 14px;
}

/* Tooltip on hover */
.cd-modal__thumb-tooltip {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 14px;
    background: rgba(20,20,20,0.95);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    max-width: 200px;
    text-overflow: ellipsis;
    overflow: hidden;
}

.cd-modal__thumb-tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: rgba(20,20,20,0.95);
}

.cd-modal__thumb:hover .cd-modal__thumb-tooltip {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(-50%) translateX(-4px);
}

/* Mobile */
@media (max-width: 900px) {
    .cd-modal.is-active .cd-modal__sidebar {
        display: none !important;
    }
    
    .cd-modal__layout {
        left: 70px;
        right: 70px;
    }
    
    .cd-modal__sidenav--prev {
        left: 12px;
    }
    
    .cd-modal__sidenav--next {
        right: 12px;
    }
    
    .cd-modal__topbar {
        padding: 16px 24px;
    }
    
    .cd-modal__scroll {
        padding: 0 24px;
    }
    
    .cd-modal__title {
        font-size: 28px;
    }
    
    .cd-modal__text {
        font-size: 16px;
    }
}

@media (max-width: 600px) {
    .cd-modal__layout {
        left: 0;
        right: 0;
    }
    
    .cd-modal.is-active .cd-modal__sidenav {
        display: none !important;
    }
    
    .cd-modal__topbar {
        padding: 12px 16px;
    }
    
    .cd-modal__breadcrumb {
        font-size: 12px;
    }
    
    .cd-modal__lesson-title {
        max-width: 180px;
    }
    
    .cd-modal__scroll {
        padding: 0 16px;
    }
    
    .cd-modal__content {
        padding-bottom: 20px;
    }
    
    .cd-modal__title {
        font-size: 24px;
        margin-bottom: 16px;
    }
    
    .cd-modal__text {
        font-size: 15px;
        line-height: 1.7;
    }
    
    .cd-modal__complete-wrap {
        bottom: 24px;
    }
    
    .cd-modal__complete {
        padding: 14px 24px;
        font-size: 14px;
    }
}
