/* SLA Course Dashboard */
.cd-wrap,
.cd-wrap *,
.cd-wrap *::before,
.cd-wrap *::after {
    box-sizing: border-box;
}

:root {
    --cd-primary: #3b82f6;
    --cd-primary-hover: #2563eb;
    --cd-success: #22c55e;
    --cd-bg-card: rgba(255, 255, 255, 0.03);
    --cd-border: rgba(255, 255, 255, 0.08);
    --cd-text: #ffffff;
    --cd-text-muted: rgba(255, 255, 255, 0.5);
}

.cd-wrap {
    max-width: 100%;
    margin: 0 auto;
    font-family: 'Inter', -apple-system, sans-serif;
    width: 100%;
    overflow-x: hidden;
    position: relative;
}

/* Full-width background hero */
.cd-bg-hero {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: calc(60vh + 100px);
    min-height: 600px;
    max-height: 750px;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 0;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 1) 30%,
        rgba(0, 0, 0, 0.5) 60%,
        rgba(0, 0, 0, 0) 100%
    );
    mask-image: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 1) 30%,
        rgba(0, 0, 0, 0.5) 60%,
        rgba(0, 0, 0, 0) 100%
    );
}

.cd-bg-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.25);
    pointer-events: none;
}

.cd-error {
    padding: 20px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    color: #fca5a5;
    text-align: center;
}

.cd-layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    align-items: start;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 40px;
}

.cd-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
    width: 100%;
}

.cd-sidebar {
    position: sticky;
    top: 100px;
    min-width: 0;
    width: 100%;
}

/* Hero - now a glass card overlay */
.cd-hero {
    position: relative;
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.8), rgba(20, 30, 50, 0.85));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 100%;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.cd-hero-image {
    display: none;
}

.cd-hero-image::after {
    display: none;
}

.cd-hero-content {
    position: relative;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-x: visible;
    overflow-y: visible;
}

.cd-hero-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    overflow: visible;
}

.cd-hero-top-row {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
}

.cd-hero-top-row::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 120px;
    background: linear-gradient(to right, transparent, rgba(15, 23, 42, 0.95) 60%);
    pointer-events: none;
    z-index: 2;
}

.cd-hero-tags {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1;
    min-width: 0;
    touch-action: pan-x;
    padding-right: 120px;
    position: relative;
    z-index: 1;
}

.cd-hero-tags::-webkit-scrollbar {
    display: none;
}

.cd-hero-tag {
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    font-size: 9px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Instructor Preview (in hero header) */
.cd-instructor-preview {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px 4px 4px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.cd-hero-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--cd-text);
    margin: 0;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.cd-hero-badge {
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    color: #60a5fa;
    white-space: nowrap;
    backdrop-filter: blur(10px);
}

/* Hero Description */
.cd-hero-desc {
    position: relative;
}

.cd-hero-desc-text {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cd-hero-desc.is-expanded .cd-hero-desc-text {
    display: block;
    -webkit-line-clamp: unset;
}

.cd-hero-desc-toggle {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--cd-primary);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 10px;
    margin-top: 6px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.cd-hero-desc-toggle:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
}

/* Progress */
.cd-progress {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cd-progress-bar {
    flex: 1;
    height: 10px;
    width: 100%;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    overflow: hidden;
}

.cd-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cd-primary), #60a5fa);
    border-radius: 5px;
    transition: width 0.5s ease;
}

.cd-wrap[data-status="completed"] .cd-progress-fill {
    background: linear-gradient(90deg, var(--cd-success), #4ade80);
}

.cd-progress-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--cd-text-muted);
    white-space: nowrap;
}

/* Continue */
.cd-continue {
    display: flex;
    align-items: stretch;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(20, 30, 48, 0.9));
    border: 1px solid var(--cd-border);
    border-radius: 16px;
    text-decoration: none;
    overflow: hidden;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 100%;
}

.cd-continue:hover {
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.cd-continue-thumb {
    width: 140px;
    min-height: 90px;
    background-size: cover;
    background-position: center;
    background-color: rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cd-continue-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 60%, rgba(20, 30, 48, 0.8) 100%);
}

.cd-continue-thumb-empty svg {
    width: 32px;
    height: 32px;
    color: rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
}

.cd-continue-content {
    flex: 1;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
}

.cd-continue-label {
    font-size: 11px;
    font-weight: 600;
    color: #60a5fa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cd-continue-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cd-continue-excerpt {
    font-size: 12px;
    color: var(--cd-text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cd-continue-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 28px;
    background: linear-gradient(135deg, var(--cd-primary), var(--cd-primary-hover));
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Certificate Block */
.cd-certificate {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(16, 185, 129, 0.1));
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.cd-certificate::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.cd-certificate-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(16, 185, 129, 0.15));
    border: 2px solid rgba(34, 197, 94, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cd-certificate-icon svg {
    width: 28px;
    height: 28px;
    color: #22c55e;
}

/* Certificate Block - Pending State */
.cd-certificate:has(.cd-certificate-icon-pending) {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(245, 158, 11, 0.08));
    border-color: rgba(251, 191, 36, 0.3);
}

.cd-certificate:has(.cd-certificate-icon-pending)::before {
    background: radial-gradient(circle, rgba(251, 191, 36, 0.1) 0%, transparent 70%);
}

.cd-certificate-icon-pending {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.15));
    border-color: rgba(251, 191, 36, 0.4);
}

.cd-certificate-icon-pending svg {
    color: #fbbf24;
}

.cd-certificate-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.cd-certificate-label {
    font-size: 12px;
    font-weight: 600;
    color: #22c55e;
}

.cd-certificate-icon-pending + .cd-certificate-content .cd-certificate-label,
.cd-certificate:has(.cd-certificate-icon-pending) .cd-certificate-label {
    color: #fbbf24;
}

.cd-certificate-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
}

.cd-certificate-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
}

.cd-certificate-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.cd-certificate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.cd-certificate-btn svg {
    width: 18px;
    height: 18px;
}

.cd-certificate-btn-disabled {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.1));
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: rgba(251, 191, 36, 0.8);
    cursor: default;
    box-shadow: none;
}

.cd-certificate-btn-disabled svg {
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.cd-certificate-btn-disabled:hover {
    transform: none;
    box-shadow: none;
}

@media (max-width: 640px) {
    .cd-certificate {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .cd-certificate-content {
        align-items: center;
    }
    
    .cd-certificate-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Instructor Preview (in hero header) */
.cd-instructor-preview {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px 4px 4px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    order: 1;
    margin-left: auto;
}

.cd-instructor-preview:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.cd-instructor-preview-photo {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cd-instructor-preview-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cd-instructor-preview-photo svg {
    width: 12px;
    height: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.cd-instructor-preview-name {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
}

/* Instructor Modal */
.cd-instructor-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 99998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.cd-instructor-modal-backdrop.is-active {
    opacity: 1;
    pointer-events: auto;
}

.cd-instructor-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: calc(100vw - 40px);
    max-width: 380px;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(20, 30, 50, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.cd-instructor-modal.is-active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

.cd-instructor-modal-header {
    display: flex;
    justify-content: flex-end;
    padding: 12px 12px 0;
}

.cd-instructor-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cd-instructor-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cd-instructor-modal-close svg {
    width: 18px;
    height: 18px;
    color: rgba(255, 255, 255, 0.6);
}

.cd-instructor-modal-content {
    padding: 0 24px 24px;
    text-align: center;
}

.cd-instructor-modal-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 16px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(59, 130, 246, 0.3);
}

.cd-instructor-modal-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cd-instructor-modal-photo svg {
    width: 40px;
    height: 40px;
    color: rgba(255, 255, 255, 0.4);
}

.cd-instructor-modal-info {
    margin-bottom: 16px;
}

.cd-instructor-modal-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: #60a5fa;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.cd-instructor-modal-name {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
}

.cd-instructor-modal-role {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

.cd-instructor-modal-quote {
    font-size: 14px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin: 0 0 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border-left: 3px solid rgba(59, 130, 246, 0.5);
    text-align: left;
}

.cd-instructor-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.cd-instructor-modal-actions a,
.cd-instructor-modal-actions button {
    flex: 1;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
}

.cd-instructor-modal-btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border: none;
}

.cd-instructor-modal-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.cd-instructor-modal-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
}

.cd-instructor-modal-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Stats */
.cd-stats {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.8), rgba(20, 30, 50, 0.85));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 0;
    width: 100%;
    box-shadow: 
        0 15px 40px -10px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    overflow: hidden;
}

.cd-stats-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cd-stats-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.cd-stats-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cd-stats-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cd-stats-icon {
    width: 18px;
    height: 18px;
    color: #60a5fa;
}

.cd-stats-toggle {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.cd-stats-toggle:hover {
    background: rgba(59, 130, 246, 0.2);
}

.cd-stats-toggle svg {
    width: 16px;
    height: 16px;
    color: #60a5fa;
    transition: transform 0.3s ease;
}

.cd-stats.is-collapsed .cd-stats-toggle svg {
    transform: rotate(-90deg);
}

.cd-stats-content {
    padding: 0 20px 20px;
    max-height: 500px;
    opacity: 1;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cd-stats.is-collapsed .cd-stats-content {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

.cd-stats-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--cd-text);
}

.cd-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.cd-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 10px;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.5), rgba(15, 23, 42, 0.5));
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 10px;
    text-align: center;
}

.cd-stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

.cd-stat-icon-lessons {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

.cd-stat-icon-topics {
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #a78bfa;
}

.cd-stat-icon-xp {
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

.cd-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--cd-text);
    line-height: 1;
}

.cd-stat-total {
    font-size: 14px;
    font-weight: 500;
    color: var(--cd-text-muted);
}

.cd-stat-xp .cd-stat-value {
    color: #fbbf24;
}

.cd-stat-label {
    font-size: 9px;
    font-weight: 600;
    color: var(--cd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Outline */
.cd-outline {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.8), rgba(20, 30, 50, 0.85));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 140px);
    box-shadow: 
        0 15px 40px -10px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.cd-outline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--cd-border);
    flex-shrink: 0;
}

.cd-outline-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--cd-text);
}

.cd-outline-count {
    font-size: 12px;
    color: var(--cd-text-muted);
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
}

.cd-outline-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Module */
.cd-module {
    border-radius: 12px;
}

.cd-module-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cd-module-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.cd-module.is-active .cd-module-header,
.cd-module-header.is-current {
    background: rgba(59, 130, 246, 0.1);
}

.cd-module.is-open .cd-module-header {
    border-radius: 12px 12px 0 0;
}

/* Open module container styling */
.cd-module.is-open {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}

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

.cd-module-num {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: var(--cd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.cd-module.is-active .cd-module-num,
.cd-module-header.is-current .cd-module-num {
    color: #60a5fa;
}

.cd-module-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--cd-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cd-module-status {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 600;
}

.cd-module-status-done {
    background: var(--cd-primary);
}

.cd-module-status-done svg {
    width: 12px;
    height: 12px;
    color: #fff;
}

.cd-module-status-progress {
    background: rgba(59, 130, 246, 0.2);
    width: auto;
    min-width: 24px;
    padding: 0 8px;
    border-radius: 12px;
    height: 22px;
}

.cd-module-count {
    color: #60a5fa;
}

.cd-module-status-todo {
    border: 2px solid rgba(255, 255, 255, 0.15);
}

/* Topics */
.cd-topics {
    display: none;
    padding: 0 8px 12px 8px;
}

.cd-module.is-open .cd-topics {
    display: block;
}

.cd-topic {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
    padding-right: 4px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.cd-topic:hover {
    background: rgba(255, 255, 255, 0.05);
}

.cd-topic.is-current {
    background: rgba(59, 130, 246, 0.1);
}

.cd-topic-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-color: rgba(255, 255, 255, 0.05);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.cd-topic-icon svg {
    width: 14px;
    height: 14px;
    color: rgba(255, 255, 255, 0.5);
}

.cd-topic-icon.is-intro {
    background: rgba(59, 130, 246, 0.1);
}

.cd-topic-icon.is-intro svg {
    color: #60a5fa;
}

/* Lesson icon - groter */
.cd-topic-icon.is-lesson {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

/* Video play icon overlay */
.cd-topic-icon.has-video {
    position: relative;
}

.cd-topic-icon.has-video::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    border-radius: inherit;
    z-index: 1;
}

.cd-play-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.cd-play-icon svg {
    width: 16px;
    height: 16px;
    color: #fff;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.cd-topic-icon.is-quiz {
    background-color: rgba(168, 85, 247, 0.15);
}

.cd-topic-icon.is-quiz::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.cd-quiz-icon {
    position: relative;
    z-index: 1;
    font-size: 14px;
    font-weight: 700;
    color: #a855f7;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.cd-topic-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cd-topic-num {
    display: block;
    font-size: 9px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cd-module.is-active .cd-topic-num {
    color: rgba(96, 165, 250, 0.7);
}

.cd-topic-num-intro {
    color: #60a5fa !important;
}

.cd-topic-num-quiz {
    color: #60a5fa !important;
}

.cd-topic-title {
    flex: 1;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cd-topic.is-current .cd-topic-title {
    color: #60a5fa;
    font-weight: 500;
}

.cd-topic-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    margin-right: 6px;
}

.cd-topic-check.is-done {
    background: var(--cd-primary);
    border-color: var(--cd-primary);
}

.cd-topic-check.is-done svg {
    width: 9px;
    height: 9px;
    color: #fff;
}

/* Topic Wrap met Preview */
.cd-topic-wrap {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.cd-topic-wrap .cd-topic {
    flex: 1;
    min-width: 0;
}

.cd-topic-expand {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 4px;
}

.cd-topic-expand:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

.cd-topic-expand svg {
    width: 11px;
    height: 11px;
    color: rgba(255, 255, 255, 0.5);
    transition: transform 0.2s ease;
}

.cd-topic-wrap.is-expanded .cd-topic-expand {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

.cd-topic-wrap.is-expanded .cd-topic-expand svg {
    transform: rotate(180deg);
    color: #60a5fa;
}

.cd-topic-preview {
    display: none;
    width: 100%;
    padding: 0 12px 8px 0;
}

.cd-topic-wrap.is-expanded .cd-topic-preview {
    display: block;
}

.cd-topic-preview p {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.5);
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 2px solid rgba(59, 130, 246, 0.3);
}

/* Scrollbar */
.cd-outline-list::-webkit-scrollbar,
.cd-float-content::-webkit-scrollbar {
    width: 6px;
}

.cd-outline-list::-webkit-scrollbar-track,
.cd-float-content::-webkit-scrollbar-track {
    background: transparent;
}

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

/* Responsive */
@media (max-width: 1024px) {
    .cd-layout {
        grid-template-columns: 1fr 350px;
        gap: 24px;
        padding-top: 180px;
    }
    .cd-bg-hero {
        height: 55vh;
        min-height: 450px;
    }
}

@media (max-width: 900px) {
    .cd-layout {
        grid-template-columns: 1fr;
        padding-top: 160px;
        padding-left: 20px;
        padding-right: 20px;
    }
    .cd-bg-hero {
        height: 50vh;
        min-height: 400px;
    }
    .cd-sidebar {
        position: static;
    }
    .cd-outline-list {
        max-height: 500px;
    }
}

@media (max-width: 768px) {
    .cd-layout {
        display: flex;
        flex-direction: column;
        gap: 16px;
        padding-top: 16px;
        padding-left: 16px;
        padding-right: 16px;
        padding-bottom: 80px; /* ruimte voor course navbar */
    }
    
    .cd-main {
        display: contents;
    }
    
    .cd-sidebar {
        display: contents;
    }
    
    .cd-hero {
        order: 1;
    }
    
    .cd-outline {
        order: 2;
    }
    
    .cd-stats {
        order: 3;
    }
    
    .cd-bg-hero {
        height: 45vh;
        min-height: 350px;
        max-height: 450px;
    }
    
    .cd-hero {
        overflow-x: visible;
        overflow-y: hidden;
    }
    
    .cd-hero-content {
        overflow: visible;
    }
    
    /* Geen scroll op mobiel - alles in beeld */
    .cd-outline {
        max-height: none;
    }
    
    .cd-outline-list {
        max-height: none;
        overflow: visible;
    }
    
    /* Modules standaard ingeklapt op mobiel - negeer is-open van PHP */
    .cd-module.is-open .cd-topics {
        display: none;
    }
    
    /* Alleen open als user klikt (JS voegt is-clicked toe) */
    .cd-module.is-clicked .cd-topics {
        display: block;
    }
    
    /* Verberg mobile float button */
    .cd-mobile-float {
        display: none;
    }
    
    .cd-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .cd-stats {
        padding: 16px;
    }
    .cd-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .cd-stat {
        padding: 16px 12px;
        gap: 8px;
    }
    .cd-stat-icon {
        width: 32px;
        height: 32px;
    }
    .cd-stat-icon svg {
        width: 16px;
        height: 16px;
    }
    .cd-stat-value {
        font-size: 22px;
    }
    .cd-stat:last-child {
        grid-column: span 2;
    }
    .cd-hero {
        border-radius: 12px;
    }
    .cd-hero-content {
        padding: 20px;
        gap: 16px;
    }
    .cd-hero-title {
        font-size: 24px;
    }
    .cd-outline {
        border-radius: 12px;
    }
    .cd-outline-header {
        padding: 16px;
    }
    .cd-outline-list {
        padding: 8px;
    }
    .cd-module-header {
        padding: 12px;
    }
}

@media (max-width: 640px) {
    .cd-wrap {
        padding: 0 6px;
    }
    .cd-layout {
        gap: 12px;
        padding-left: 10px;
        padding-right: 10px;
    }
    .cd-hero-content {
        padding: 14px;
    }
    .cd-hero-title {
        font-size: 22px;
        word-break: break-word;
    }
    .cd-hero-header {
        gap: 8px;
    }
    .cd-hero-top-row {
        overflow: visible;
    }
    .cd-hero-top-row::after {
        width: 100px;
    }
    .cd-hero-tags {
        gap: 4px;
        padding-right: 100px;
        overflow-x: scroll;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x;
        scroll-behavior: smooth;
    }
    .cd-hero-tag {
        padding: 2px 6px;
        font-size: 8px;
        border-radius: 8px;
    }
    .cd-hero-image {
        height: 120px;
    }
    .cd-progress {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .cd-progress-bar {
        flex: none;
        width: 100%;
        height: 8px;
        min-height: 8px;
        order: 1;
    }
    .cd-progress-text {
        text-align: right;
        order: 2;
    }
    .cd-instructor-preview {
        padding: 3px 6px 3px 3px;
        gap: 4px;
    }
    .cd-instructor-preview-photo {
        width: 18px;
        height: 18px;
    }
    .cd-instructor-preview-photo svg {
        width: 10px;
        height: 10px;
    }
    .cd-instructor-preview-name {
        font-size: 10px;
    }
    .cd-instructor-modal {
        width: calc(100vw - 24px);
        max-width: none;
    }
    .cd-instructor-modal-content {
        padding: 0 16px 20px;
    }
    .cd-instructor-modal-photo {
        width: 64px;
        height: 64px;
    }
    .cd-instructor-modal-name {
        font-size: 18px;
    }
    .cd-instructor-modal-quote {
        font-size: 13px;
        padding: 12px;
    }
    .cd-continue {
        flex-direction: column;
    }
    .cd-continue-thumb {
        width: 100%;
        min-height: 100px;
    }
    .cd-continue-thumb::after {
        background: linear-gradient(180deg, transparent 40%, rgba(20, 30, 48, 0.9) 100%);
    }
    .cd-continue-content {
        padding: 12px;
    }
    .cd-continue-title {
        font-size: 14px;
        white-space: normal;
    }
    .cd-continue-excerpt {
        font-size: 11px;
        -webkit-line-clamp: 2;
    }
    .cd-continue-btn {
        padding: 14px;
        justify-content: center;
    }
    .cd-stats {
        padding: 10px;
    }
    .cd-stats-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .cd-stat {
        flex-direction: row;
        padding: 14px;
        gap: 12px;
        text-align: left;
    }
    .cd-stat-icon {
        width: 36px;
        height: 36px;
    }
    .cd-stat-value {
        font-size: 20px;
    }
    .cd-stat-label {
        font-size: 9px;
    }
    .cd-stat:last-child {
        grid-column: span 1;
    }
    .cd-module-name {
        font-size: 13px;
    }
    .cd-topic {
        padding: 8px 10px;
        gap: 10px;
    }
    .cd-topic-icon {
        width: 24px;
        height: 24px;
    }
    .cd-topic-icon svg {
        width: 12px;
        height: 12px;
    }
    .cd-topic-title {
        font-size: 12px;
    }
}

/* Floating Sidebar voor Topic/Lesson pagina's */
.cd-float-btn,
.cd-float-overlay,
.cd-float-sidebar,
.cd-float-sidebar * {
    box-sizing: border-box;
}

/* Mobile float button - verborgen op desktop */
.cd-mobile-float {
    display: none;
}

.cd-float-btn {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    height: auto;
    padding: 12px 8px;
    border-radius: 4px 0 0 4px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    z-index: 9998;
    transition: all 0.3s ease;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.cd-float-btn:hover {
    padding-right: 12px;
    box-shadow: 0 6px 30px rgba(59, 130, 246, 0.5);
}

.cd-float-btn span {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
    font-family: 'Inter', -apple-system, sans-serif;
}

.cd-float-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
}

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

.cd-float-sidebar {
    position: fixed;
    right: -420px;
    top: 0;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(10, 15, 30, 0.98));
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 10000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.cd-float-sidebar.is-active {
    right: 0;
}

.cd-float-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.cd-float-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cd-float-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.cd-float-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cd-float-close svg {
    width: 18px;
    height: 18px;
    color: rgba(255, 255, 255, 0.5);
}

.cd-float-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    min-height: 0;
}

.cd-float-content .cd-outline-list {
    max-height: none;
    padding: 0;
    overflow-y: visible;
}

.cd-float-sidebar .cd-module-name {
    color: #ffffff;
    text-decoration: none;
}

.cd-float-sidebar .cd-module-name:hover {
    color: #3b82f6;
}

.cd-float-sidebar .cd-topic.is-current {
    background: rgba(59, 130, 246, 0.15);
    border-radius: 8px;
}

.cd-float-sidebar .cd-topic.is-current .cd-topic-title {
    color: #60a5fa;
    font-weight: 500;
}

@media (max-width: 640px) {
    .cd-float-btn {
        padding: 10px 6px;
    }
    
    .cd-float-btn span {
        font-size: 10px;
    }
    
    .cd-float-sidebar {
        width: 100%;
        max-width: 100%;
        right: -100%;
    }
    
    .cd-float-header {
        padding: 16px;
    }
    
    .cd-float-content {
        padding: 12px;
    }
}

/* Stat Popup (hidden, content for modal) */
.cd-stat-popup {
    display: none;
}

/* Stat Card clickable */
.cd-stat[data-stat] {
    cursor: pointer;
    transition: all 0.2s ease;
}

.cd-stat[data-stat]:hover {
    transform: translateY(-2px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

/* Stat Modal Backdrop */
.cd-stat-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 99998;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.cd-stat-modal-backdrop.is-active {
    opacity: 1;
    pointer-events: auto;
}

/* Stat Modal */
.cd-stat-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: calc(100vw - 40px);
    max-width: 420px;
    max-height: calc(100vh - 80px);
    background: linear-gradient(135deg, rgba(10, 15, 30, 0.98) 0%, rgba(20, 30, 50, 0.98) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 
        0 0 40px rgba(59, 130, 246, 0.15),
        0 25px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    opacity: 0;
    transition: all 0.2s ease;
    pointer-events: none;
}

.cd-stat-modal::before,
.cd-stat-modal::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border-color: rgba(59, 130, 246, 0.6);
    border-style: solid;
    border-width: 0;
    pointer-events: none;
}

.cd-stat-modal::before {
    top: -1px;
    left: -1px;
    border-top-width: 2px;
    border-left-width: 2px;
    border-radius: 16px 0 0 0;
}

.cd-stat-modal::after {
    bottom: -1px;
    right: -1px;
    border-bottom-width: 2px;
    border-right-width: 2px;
    border-radius: 0 0 16px 0;
}

.cd-stat-modal.is-active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

.cd-stat-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.1) 0%, transparent 100%);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    flex-shrink: 0;
}

.cd-stat-modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.5), transparent);
}

.cd-stat-modal-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.3));
}

.cd-stat-modal-header h4 {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    flex: 1;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cd-stat-modal-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.cd-stat-modal-close:hover {
    background: rgba(59, 130, 246, 0.2);
    color: #fff;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.cd-stat-modal-close svg {
    width: 16px;
    height: 16px;
}

.cd-stat-modal-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

/* Popup Content Styling */
.cd-stat-popup-header {
    display: none;
}

.cd-stat-popup-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cd-stat-popup-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    gap: 12px;
}

.cd-popup-name {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cd-popup-status {
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.cd-popup-status-done {
    color: #22c55e;
}

.cd-popup-status-progress {
    color: #60a5fa;
}

.cd-popup-status-todo {
    color: rgba(255, 255, 255, 0.4);
}

.cd-stat-popup-more {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    margin: 12px 0 0;
}

.cd-stat-popup-empty {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    padding: 16px;
}

/* Topics Popup Sections */
.cd-popup-section {
    margin-bottom: 16px;
}

.cd-popup-section:last-child {
    margin-bottom: 0;
}

.cd-popup-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.5);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.cd-popup-section-toggle {
    cursor: pointer;
    transition: color 0.2s ease;
}

.cd-popup-section-toggle:hover {
    color: rgba(255, 255, 255, 0.7);
}

.cd-popup-section-icon {
    width: 16px;
    text-align: center;
}

.cd-popup-section-title {
    flex: 1;
}

.cd-popup-section-count {
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 10px;
}

.cd-popup-section-chevron {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.cd-popup-section-toggle[data-collapsed="false"] .cd-popup-section-chevron {
    transform: rotate(180deg);
}

/* Todo list */
.cd-popup-todo-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cd-popup-todo-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.cd-popup-todo-item:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateX(4px);
}

.cd-popup-todo-lesson {
    font-size: 10px;
    font-weight: 600;
    color: #60a5fa;
    text-transform: uppercase;
    white-space: nowrap;
}

.cd-popup-todo-title {
    flex: 1;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cd-popup-todo-arrow {
    width: 14px;
    height: 14px;
    color: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.cd-popup-todo-item:hover .cd-popup-todo-arrow {
    color: #60a5fa;
    transform: translateX(2px);
}

/* Done list */
.cd-popup-done-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cd-popup-done-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.cd-popup-done-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.cd-popup-done-lesson {
    font-size: 10px;
    font-weight: 500;
    color: rgba(34, 197, 94, 0.7);
    text-transform: uppercase;
    white-space: nowrap;
}

.cd-popup-done-title {
    flex: 1;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cd-popup-section-done .cd-popup-section-icon {
    color: #22c55e;
}

.cd-stat-popup-big {
    font-size: 48px;
    font-weight: 700;
    color: #60a5fa;
    text-align: center;
    margin-bottom: 8px;
    text-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
}

.cd-stat-popup-big.cd-xp-gold {
    color: #fbbf24;
    text-shadow: 0 0 30px rgba(251, 191, 36, 0.5);
}

.cd-stat-popup-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    margin: 0 0 12px;
}

.cd-stat-popup-badge {
    font-size: 13px;
    color: #22c55e;
    text-align: center;
    margin: 12px 0 0;
    padding: 8px 12px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 8px;
}

.cd-stat-popup-breakdown {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cd-stat-popup-breakdown li {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.cd-stat-popup-breakdown li span:last-child {
    color: #fbbf24;
    font-weight: 600;
}
