/* Course Detail Page Styles */
    .course-detail-page {
        background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
        min-height: 100vh;
    }

    .course-hero-premium {
        position: relative;
        border-radius: 16px;
        overflow: hidden;
        margin-bottom: 1.5rem;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
        border: 1px solid rgba(0, 0, 0, 0.1);
        animation: slideInFromTop 0.8s ease-out;
        transform: translateY(0);
        background: transparent;
    }

    /* Hero Banner with Background Image */
    .course-banner {
        position: relative;
        height: 300px;
        overflow: hidden;
        background: transparent;
    }

    .banner-background {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        transition: transform 0.3s ease;
    }

    .course-banner:hover .banner-background {
        transform: scale(1.02);
    }

    .banner-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(220, 38, 38, 0.8) 0%, rgba(59, 130, 246, 0.8) 100%);
        animation: gradientShift 3s ease-in-out infinite alternate;
    }

    .banner-content {
        position: relative;
        z-index: 2;
        height: 100%;
        padding: 2rem;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .banner-logos {
        display: flex;
        gap: 2rem;
        align-items: flex-start;
    }

    .logo-item {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }

    .logo-text {
        font-size: 1.5rem;
        font-weight: 800;
        color: white;
        line-height: 1;
    }

    .logo-text:first-child {
        color: #f97316;
    }

    .logo-subtitle {
        font-size: 0.7rem;
        color: rgba(255, 255, 255, 0.8);
        font-weight: 500;
        line-height: 1.2;
        max-width: 120px;
    }

    .banner-title {
        text-align: center;
        color: white;
        margin: 2rem 0;
    }

    .banner-title h1 {
        font-size: 2.5rem;
        font-weight: 700;
        margin: 0 0 0.5rem 0;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }

    .banner-title h2 {
        font-size: 1.8rem;
        font-weight: 600;
        margin: 0;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }

    .banner-graphics {
        position: absolute;
        bottom: 0;
        right: 0;
        width: 200px;
        height: 150px;
        pointer-events: none;
    }

    .growth-arrow {
        position: absolute;
        bottom: 60px;
        right: 20px;
        width: 80px;
        height: 40px;
        background: linear-gradient(45deg, #f97316 0%, #ea580c 100%);
        border-radius: 20px;
        transform: rotate(-15deg);
        box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
    }

    .growth-arrow::after {
        content: '';
        position: absolute;
        top: -8px;
        right: -8px;
        width: 0;
        height: 0;
        border-left: 12px solid #ea580c;
        border-top: 8px solid transparent;
        border-bottom: 8px solid transparent;
    }

    .chart-bars {
        position: absolute;
        bottom: 20px;
        right: 40px;
        display: flex;
        gap: 4px;
        align-items: end;
    }

    .bar {
        width: 8px;
        background: linear-gradient(180deg, #f97316 0%, #ea580c 100%);
        border-radius: 4px 4px 0 0;
        box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
    }

    .bar:nth-child(1) { height: 20px; }
    .bar:nth-child(2) { height: 35px; }
    .bar:nth-child(3) { height: 50px; }

    .digital-cubes {
        position: absolute;
        bottom: 20px;
        left: 20px;
        display: flex;
        gap: 8px;
    }

    .cube {
        width: 12px;
        height: 12px;
        background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
        border-radius: 2px;
        box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
    }

    .cube:nth-child(2) {
        transform: translateY(-4px);
    }

    .cube:nth-child(3) {
        transform: translateY(-8px);
    }

    /* White Card Section */
    .course-card {
        position: relative;
        background: white;
        margin: -50px 2rem 0 2rem;
        border-radius: 16px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
        border: 1px solid rgba(0, 0, 0, 0.1);
        z-index: 3;
    }

    .card-content {
        padding: 2rem;
    }

    .card-header {
        margin-bottom: 1.5rem;
    }

    .card-title {
        font-size: 1.5rem;
        font-weight: 700;
        color: #1e293b;
        margin: 0 0 1rem 0;
        line-height: 1.4;
    }

    .instructors-info {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .instructor-icons {
        display: flex;
        gap: 4px;
    }

    .instructor-icon {
        width: 24px;
        height: 24px;
        background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
        border-radius: 50%;
        box-shadow: 0 2px 8px rgba(139, 69, 19, 0.3);
    }

    .instructor-count {
        font-size: 0.9rem;
        color: #64748b;
        font-weight: 600;
    }

    .card-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .course-id {
        display: flex;
        align-items: center;
    }

    .id-tag {
        background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
        color: #1e40af;
        padding: 0.5rem 1rem;
        border-radius: 20px;
        font-size: 0.8rem;
        font-weight: 700;
        border: 1px solid rgba(30, 64, 175, 0.2);
    }

    .card-actions {
        display: flex;
        gap: 0.75rem;
        align-items: center;
    }

    .btn-start-learning {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
        color: white;
        border: none;
        padding: 0.75rem 1.5rem;
        border-radius: 8px;
        font-size: 0.9rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(30, 41, 59, 0.3);
    }

    .btn-start-learning:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(30, 41, 59, 0.4);
    }

    .btn-add {
        background: white;
        color: #1e293b;
        border: 2px solid #e2e8f0;
        width: 40px;
        height: 40px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
        font-size: 1.2rem;
    }

    .btn-add:hover {
        background: #f8fafc;
        border-color: #cbd5e1;
        transform: scale(1.05);
    }

    @keyframes slideInFromTop {
        0% {
            opacity: 0;
            transform: translateY(-50px);
        }
        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .course-hero-image {
        height: 250px;
        background-size: cover;
        background-position: center;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.3s ease;
    }

    .course-hero-image:hover {
        transform: scale(1.02);
    }

    .course-hero-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(220, 38, 38, 0.8) 0%, rgba(59, 130, 246, 0.8) 100%);
        animation: gradientShift 3s ease-in-out infinite alternate;
    }

    @keyframes gradientShift {
        0% {
            background: linear-gradient(135deg, rgba(220, 38, 38, 0.8) 0%, rgba(59, 130, 246, 0.8) 100%);
        }
        100% {
            background: linear-gradient(135deg, rgba(59, 130, 246, 0.8) 0%, rgba(220, 38, 38, 0.8) 100%);
        }
    }

    .course-hero-content {
        position: absolute;
        bottom: 2rem;
        left: 2rem;
        right: 2rem;
        z-index: 2;
        text-align: left;
        color: white;
        animation: fadeInUp 1s ease-out 0.3s both;
    }

    @keyframes fadeInUp {
        0% {
            opacity: 0;
            transform: translateY(30px);
        }
        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .course-badge {
        width: 60px;
        height: 60px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 15px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 1rem;
        font-size: 1.5rem;
        color: white;
        backdrop-filter: blur(10px);
        border: 2px solid rgba(255, 255, 255, 0.3);
        animation: pulse 2s ease-in-out infinite;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }

    @keyframes pulse {
        0%, 100% {
            transform: scale(1);
        }
        50% {
            transform: scale(1.05);
        }
    }

    .course-hero-title {
        font-size: 2rem;
        font-weight: 700;
        margin: 0;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        letter-spacing: -0.5px;
        animation: titleGlow 2s ease-in-out infinite alternate;
        background: rgba(0, 0, 0, 0.6);
        padding: 1rem 1.5rem;
        border-radius: 12px;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        display: inline-block;
        max-width: 100%;
    }

    @keyframes titleGlow {
        0% {
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        }
        100% {
            text-shadow: 0 2px 20px rgba(255, 255, 255, 0.2);
        }
    }

    .course-hero-meta {
        font-size: 1.1rem;
        opacity: 0.95;
        animation: fadeInUp 1s ease-out 0.6s both;
    }

    .meta-item {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
        background: rgba(255, 255, 255, 0.1);
        padding: 0.75rem 1.5rem;
        border-radius: 50px;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        transition: all 0.3s ease;
    }

    .meta-item:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-2px);
    }

    .content-card {
        background: white;
        border-radius: 16px;
        box-shadow: 0 6px 25px rgba(220, 38, 38, 0.08);
        margin-bottom: 1.5rem;
        overflow: hidden;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        border: 1px solid rgba(220, 38, 38, 0.08);
        animation: slideInFromBottom 0.8s ease-out;
        position: relative;
    }

    @keyframes slideInFromBottom {
        0% {
            opacity: 0;
            transform: translateY(50px);
        }
        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .content-card:hover {
        transform: translateY(-6px) scale(1.01);
        box-shadow: 0 15px 35px rgba(220, 38, 38, 0.15);
        border-color: rgba(220, 38, 38, 0.2);
    }

    .content-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, #dc2626 0%, #3b82f6 100%);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .content-card:hover::before {
        opacity: 1;
    }

    .card-header-custom {
        background: linear-gradient(135deg, #dc2626 0%, #3b82f6 100%);
        color: white;
        padding: 1.25rem 1.5rem;
        display: flex;
        align-items: center;
        gap: 1rem;
        position: relative;
        overflow: hidden;
    }

    .card-header-custom::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
        animation: shimmer 3s ease-in-out infinite;
    }

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

    .icon-wrapper {
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.25rem;
        backdrop-filter: blur(10px);
        border: 2px solid rgba(255, 255, 255, 0.3);
        transition: all 0.3s ease;
        position: relative;
        z-index: 2;
    }

    .icon-wrapper:hover {
        transform: rotate(360deg) scale(1.1);
        background: rgba(255, 255, 255, 0.3);
    }

    .card-title-custom {
        font-size: 1.4rem;
        font-weight: 700;
        margin: 0;
        position: relative;
        z-index: 2;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }

    .card-body-custom {
        padding: 1.5rem;
        background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    }

    .course-description {
        line-height: 1.6;
        color: #555;
    }

    .chapters-list {
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
        animation: fadeInUp 0.8s ease-out 0.6s both;
    }

    .chapter-item {
        border: 1px solid rgba(220, 38, 38, 0.1);
        border-radius: 16px;
        overflow: hidden;
        background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
        box-shadow: 0 4px 20px rgba(220, 38, 38, 0.06);
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        position: relative;
    }

    .chapter-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, #dc2626 0%, #3b82f6 100%);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .chapter-item:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 30px rgba(220, 38, 38, 0.12);
        border-color: rgba(220, 38, 38, 0.2);
    }

    .chapter-item:hover::before {
        opacity: 1;
    }


    .chapter-header {
        padding: 1rem 1.5rem;
        background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
        border-bottom: 1px solid rgba(220, 38, 38, 0.1);
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        transition: all 0.4s ease;
        user-select: none;
        position: relative;
        overflow: hidden;
    }

    .chapter-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent 0%, rgba(220, 38, 38, 0.1) 50%, transparent 100%);
        transition: left 0.6s ease;
    }

    .chapter-header:hover {
        background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
        transform: translateX(5px);
    }

    .chapter-header:hover::before {
        left: 100%;
    }

    .chapter-title {
        font-size: 1.2rem;
        font-weight: 700;
        color: #1e293b;
        margin: 0;
        transition: all 0.3s ease;
        position: relative;
        z-index: 2;
    }

    .chapter-header:hover .chapter-title {
        color: #dc2626;
        transform: scale(1.02);
    }

    .chapter-toggle {
        font-size: 1.5rem;
        color: #64748b;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        position: relative;
        z-index: 2;
    }

    .chapter-header:hover .chapter-toggle {
        color: #dc2626;
        transform: scale(1.1);
    }

    .chapter-header[aria-expanded="true"] .chapter-toggle {
        transform: rotate(180deg) scale(1.1);
        color: #3b82f6;
    }

    .collapse {
        transition: height 0.35s ease;
    }

    .topics-list {
        padding: 1rem 1.5rem;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    }

    .topic-item-link {
        text-decoration: none;
        color: inherit;
        display: block;
        transition: all 0.4s ease;
    }
    
    .topic-item-link:hover {
        text-decoration: none;
        color: inherit;
    }
    
    .topic-item {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1rem 1.25rem;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 12px;
        border: 1px solid rgba(220, 38, 38, 0.1);
        transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        position: relative;
        overflow: hidden;
        cursor: pointer;
        backdrop-filter: blur(10px);
    }

    .topic-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        width: 4px;
        background: linear-gradient(135deg, #dc2626 0%, #3b82f6 100%);
        transform: scaleY(0);
        transition: transform 0.3s ease;
    }

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

    .topic-item::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 0;
        height: 100%;
        background: linear-gradient(135deg, rgba(220, 38, 38, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
        transition: width 0.3s ease;
    }

    .topic-item:hover::after {
        width: 100%;
    }
    
    .topic-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.5s ease;
    }
    
    .topic-item-link:hover .topic-item::before {
        transform: scaleX(1);
    }

    .topic-item-link:hover .topic-item {
        transform: translateY(-3px) scale(1.01);
        box-shadow: 0 8px 25px rgba(220, 38, 38, 0.15);
        border-color: rgba(220, 38, 38, 0.3);
        background: rgba(255, 255, 255, 1);
    }

    .topic-icon {
        width: 40px;
        height: 40px;
        background: linear-gradient(135deg, #dc2626 0%, #3b82f6 100%);
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.25rem;
        color: white;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        position: relative;
        z-index: 2;
        box-shadow: 0 3px 15px rgba(220, 38, 38, 0.25);
    }

    .topic-icon::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(45deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
        pointer-events: none;
    }
    
    .topic-item-link:hover .topic-icon {
        transform: rotate(360deg) scale(1.05);
        box-shadow: 0 6px 20px rgba(220, 38, 38, 0.35);
    }

    .topic-icon i[class*="play-circle"] {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }

    .topic-icon i[class*="question-circle"] {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }

    .topic-icon i[class*="file-text"] {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }
    
    .topic-icon i {
        color: #495057;
        position: relative;
        z-index: 1;
    }

    .topic-content {
        flex: 1;
    }

    .topic-title {
        font-size: 1rem;
        font-weight: 700;
        color: #1e293b;
        margin: 0 0 0.5rem 0;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
        position: relative;
        z-index: 2;
    }

    .topic-item:hover .topic-title {
        color: #dc2626;
        transform: scale(1.02);
    }

    .topic-meta {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        flex-wrap: wrap;
    }

    .topic-type {
        font-size: 0.9rem;
        color: #3b82f6;
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
        padding: 0.5rem 1rem;
        border-radius: 25px;
        font-weight: 700;
        border: 2px solid rgba(59, 130, 246, 0.2);
        transition: all 0.3s ease;
    }

    .topic-item:hover .topic-type {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(220, 38, 38, 0.2) 100%);
        transform: scale(1.05);
    }

    .completion-status {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.8rem;
        font-weight: 700;
        padding: 0.5rem 1rem;
        border-radius: 25px;
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        color: white;
        box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
        transition: all 0.3s ease;
    }

    .completion-status.pending {
        background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
        box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    }

    .topic-item:hover .completion-status {
        transform: scale(1.1);
    }

    .completion-status i {
        font-size: 1rem;
        animation: pulse 2s ease-in-out infinite;
    }

    .topic-item.completed {
        border-left: 6px solid #10b981;
        background: linear-gradient(90deg, rgba(16, 185, 129, 0.05) 0%, transparent 100%);
    }

    .topic-item.completed .topic-icon {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
    }

    .topic-item.completed:hover .topic-icon {
        box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
    }

    /* Certificate Card */
    .certificate-card {
        margin-bottom: 2.5rem;
    }

    .certificate-info {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 2rem;
        padding: 2rem;
        background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(32, 201, 151, 0.1) 100%);
        border-radius: 16px;
        border: 1px solid rgba(40, 167, 69, 0.2);
    }

    .certificate-status {
        display: flex;
        align-items: center;
        gap: 1.5rem;
        flex: 1;
    }

    .certificate-status .status-icon {
        width: 60px;
        height: 60px;
        background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 1.5rem;
    }

    .certificate-status .status-content {
        flex: 1;
    }

    .certificate-status .status-title {
        font-size: 1.25rem;
        font-weight: 600;
        color: #28a745;
        margin: 0 0 0.5rem 0;
    }

    .certificate-status .status-description {
        font-size: 1rem;
        color: #6c757d;
        margin: 0;
    }

    .certificate-actions .btn {
        padding: 0.75rem 2rem;
        font-size: 1.1rem;
        font-weight: 600;
        border-radius: 12px;
        background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
        border: none;
        color: white;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    }

    .certificate-actions .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
        color: white;
        text-decoration: none;
    }

    .certificate-actions .btn i {
        font-size: 1.2rem;
    }

    /* Course Tabs */
    .tabs-card {
        margin-bottom: 2.5rem;
        animation: slideInFromBottom 0.8s ease-out 0.4s both;
    }

    .course-tabs {
        border-bottom: 3px solid #e2e8f0;
        margin-bottom: 2rem;
        position: relative;
        background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
        border-radius: 16px 16px 0 0;
        padding: 1rem 1rem 0 1rem;
    }

    .course-tabs::before {
        content: '';
        position: absolute;
        bottom: -3px;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #dc2626 0%, #3b82f6 100%);
        border-radius: 2px;
    }

    .course-tabs .nav-link {
        border: none;
        border-radius: 16px 16px 0 0;
        padding: 1.25rem 2rem;
        font-weight: 700;
        color: #64748b;
        background: transparent;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        margin-right: 0.75rem;
        display: flex;
        align-items: center;
        position: relative;
        overflow: hidden;
        font-size: 1rem;
    }

    .course-tabs .nav-link::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .course-tabs .nav-link:hover {
        color: #dc2626;
        background: rgba(220, 38, 38, 0.05);
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(220, 38, 38, 0.15);
    }

    .course-tabs .nav-link:hover::before {
        opacity: 1;
    }

    .course-tabs .nav-link.active {
        color: white;
        background: linear-gradient(135deg, #dc2626 0%, #3b82f6 100%);
        border-color: transparent;
        box-shadow: 0 8px 30px rgba(220, 38, 38, 0.3);
        transform: translateY(-5px);
        position: relative;
        z-index: 2;
    }

    .course-tabs .nav-link.active::after {
        content: '';
        position: absolute;
        bottom: -3px;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #dc2626 0%, #3b82f6 100%);
        z-index: 3;
    }

    .course-tabs .nav-link i {
        font-size: 1.2rem;
        margin-right: 0.75rem;
        transition: all 0.3s ease;
    }

    .course-tabs .nav-link:hover i {
        transform: scale(1.1) rotate(5deg);
    }

    .course-tabs .nav-link.active i {
        animation: iconPulse 2s ease-in-out infinite;
    }

    @keyframes iconPulse {
        0%, 100% {
            transform: scale(1);
        }
        50% {
            transform: scale(1.1);
        }
    }

    .tab-content {
        padding: 2rem 0;
        animation: fadeInUp 0.6s ease-out;
    }

    .tab-pane {
        min-height: 200px;
    }

    .tab-pane .course-description {
        padding: 2rem;
        background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
        border-radius: 16px;
        border-left: 6px solid #dc2626;
        box-shadow: 0 4px 20px rgba(220, 38, 38, 0.1);
        position: relative;
        overflow: hidden;
    }

    .tab-pane .course-description::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 100px;
        height: 100px;
        background: radial-gradient(circle, rgba(220, 38, 38, 0.1) 0%, transparent 70%);
        border-radius: 50%;
        transform: translate(30px, -30px);
    }

    .tab-pane .course-description p {
        margin-bottom: 1.5rem;
        line-height: 1.8;
        color: #475569;
        font-size: 1.1rem;
        position: relative;
        z-index: 2;
    }

    .tab-pane .course-description p:last-child {
        margin-bottom: 0;
    }

    /* Status Cards */
    .status-card {
        margin-bottom: 2.5rem;
        animation: slideInFromBottom 0.8s ease-out 0.3s both;
    }

    .course-status-closed,
    .course-status-not-started,
    .course-status-active {
        display: flex;
        align-items: center;
        gap: 1.5rem;
        padding: 1.5rem;
        border-radius: 16px;
        backdrop-filter: blur(20px);
        position: relative;
        overflow: hidden;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .course-status-closed::before,
    .course-status-not-started::before,
    .course-status-active::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
        animation: shimmer 3s ease-in-out infinite;
    }

    .course-status-closed {
        background: linear-gradient(135deg, rgba(220, 53, 69, 0.95) 0%, rgba(220, 53, 69, 0.8) 100%);
        color: white;
        border: 2px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 15px 40px rgba(220, 53, 69, 0.3);
    }

    .course-status-closed:hover {
        transform: translateY(-4px) scale(1.01);
        box-shadow: 0 15px 35px rgba(220, 53, 69, 0.3);
    }

    .course-status-not-started {
        background: linear-gradient(135deg, rgba(255, 193, 7, 0.95) 0%, rgba(255, 193, 7, 0.8) 100%);
        color: #212529;
        border: 2px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 15px 40px rgba(255, 193, 7, 0.3);
    }

    .course-status-not-started:hover {
        transform: translateY(-4px) scale(1.01);
        box-shadow: 0 15px 35px rgba(255, 193, 7, 0.3);
    }

    .course-status-active {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.95) 0%, rgba(220, 38, 38, 0.95) 100%);
        color: white;
        border: 2px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 15px 40px rgba(59, 130, 246, 0.3);
        animation: statusPulse 2s ease-in-out infinite;
    }

    @keyframes statusPulse {
        0%, 100% {
            box-shadow: 0 15px 40px rgba(59, 130, 246, 0.3);
        }
        50% {
            box-shadow: 0 20px 50px rgba(59, 130, 246, 0.5);
        }
    }

    .course-status-active:hover {
        transform: translateY(-4px) scale(1.01);
        box-shadow: 0 15px 35px rgba(59, 130, 246, 0.3);
    }

    .status-icon {
        width: 50px;
        height: 50px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        backdrop-filter: blur(10px);
        border: 2px solid rgba(255, 255, 255, 0.3);
        transition: all 0.4s ease;
        position: relative;
        z-index: 2;
        animation: iconFloat 3s ease-in-out infinite;
    }

    @keyframes iconFloat {
        0%, 100% {
            transform: translateY(0px);
        }
        50% {
            transform: translateY(-5px);
        }
    }

    .status-icon:hover {
        transform: scale(1.1) rotate(360deg);
        background: rgba(255, 255, 255, 0.3);
    }

    .status-content {
        flex: 1;
        position: relative;
        z-index: 2;
    }

    .status-title {
        font-size: 1.3rem;
        font-weight: 800;
        margin: 0 0 0.5rem 0;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
        animation: titleSlide 0.8s ease-out 0.2s both;
    }

    @keyframes titleSlide {
        0% {
            opacity: 0;
            transform: translateX(-20px);
        }
        100% {
            opacity: 1;
            transform: translateX(0);
        }
    }

    .status-description {
        margin: 0;
        opacity: 0.95;
        font-size: 1rem;
        font-weight: 500;
        animation: descriptionSlide 0.8s ease-out 0.4s both;
    }

    @keyframes descriptionSlide {
        0% {
            opacity: 0;
            transform: translateX(-20px);
        }
        100% {
            opacity: 0.95;
            transform: translateX(0);
        }
    }

    /* Progress Block Styles */
    .progress-container {
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
        animation: fadeInUp 0.8s ease-out 0.2s both;
    }

    .progress-info {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1rem;
        background: linear-gradient(135deg, rgba(220, 38, 38, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
        padding: 1rem;
        border-radius: 12px;
        border: 1px solid rgba(220, 38, 38, 0.1);
    }

    .progress-stats {
        display: flex;
        gap: 1.5rem;
    }

    .stat-item {
        text-align: center;
        padding: 0.75rem;
        background: white;
        border-radius: 10px;
        box-shadow: 0 3px 15px rgba(220, 38, 38, 0.08);
        border: 1px solid rgba(220, 38, 38, 0.1);
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }

    .stat-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #dc2626 0%, #3b82f6 100%);
    }

    .stat-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 30px rgba(220, 38, 38, 0.2);
    }

    .stat-number {
        font-size: 2rem;
        font-weight: 800;
        background: linear-gradient(135deg, #dc2626 0%, #3b82f6 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin-bottom: 0.25rem;
        animation: countUp 1s ease-out;
    }

    @keyframes countUp {
        0% {
            transform: scale(0.5);
            opacity: 0;
        }
        100% {
            transform: scale(1);
            opacity: 1;
        }
    }

    .stat-label {
        font-size: 0.9rem;
        color: #64748b;
        font-weight: 600;
    }

    .progress-percentage {
        font-size: 1.5rem;
        font-weight: 800;
        background: linear-gradient(135deg, #3b82f6 0%, #dc2626 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        animation: pulse 2s ease-in-out infinite;
    }

    .progress-bar-container {
        margin: 1rem 0;
        position: relative;
    }

    .progress-bar {
        width: 100%;
        height: 12px;
        background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
        border-radius: 8px;
        overflow: hidden;
        box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
        position: relative;
    }

    .progress-bar::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(45deg, transparent 25%, rgba(255, 255, 255, 0.2) 25%, rgba(255, 255, 255, 0.2) 50%, transparent 50%, transparent 75%, rgba(255, 255, 255, 0.2) 75%);
        background-size: 20px 20px;
        animation: progressStripes 1s linear infinite;
    }

    @keyframes progressStripes {
        0% {
            background-position: 0 0;
        }
        100% {
            background-position: 20px 0;
        }
    }

    .progress-fill {
        height: 100%;
        background: linear-gradient(135deg, #dc2626 0%, #3b82f6 100%);
        border-radius: 8px;
        transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        overflow: hidden;
    }

    .progress-fill::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
        animation: progressShine 2s ease-in-out infinite;
    }

    @keyframes progressShine {
        0% {
            transform: translateX(-100%);
        }
        100% {
            transform: translateX(100%);
        }
    }

    .progress-details {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .detail-item {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1rem 1.5rem;
        background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
        border-radius: 12px;
        font-size: 0.9rem;
        color: #475569;
        border: 1px solid rgba(220, 38, 38, 0.1);
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }

    .detail-item::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: linear-gradient(135deg, #dc2626 0%, #3b82f6 100%);
        transform: scaleY(0);
        transition: transform 0.3s ease;
    }

    .detail-item:hover {
        transform: translateX(5px);
        box-shadow: 0 4px 20px rgba(220, 38, 38, 0.1);
    }

    .detail-item:hover::before {
        transform: scaleY(1);
    }

    .detail-item i {
        color: #dc2626;
        font-size: 1.2rem;
        transition: all 0.3s ease;
    }

    .detail-item:hover i {
        transform: scale(1.2);
        color: #3b82f6;
    }

    /* Page Loading Animation */
    .course-detail-page {
        animation: pageLoad 0.8s ease-out;
    }

    @keyframes pageLoad {
        0% {
            opacity: 0;
            transform: translateY(20px);
        }
        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Floating Elements Animation */
    .course-hero-premium::after {
        content: '';
        position: absolute;
        top: 20%;
        right: 10%;
        width: 100px;
        height: 100px;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
        border-radius: 50%;
        animation: float 6s ease-in-out infinite;
    }

    @keyframes float {
        0%, 100% {
            transform: translateY(0px) rotate(0deg);
        }
        50% {
            transform: translateY(-20px) rotate(180deg);
        }
    }

    /* Scroll Reveal Animation */
    .content-card {
        opacity: 0;
        transform: translateY(50px);
        animation: scrollReveal 0.8s ease-out forwards;
    }

    .content-card:nth-child(1) { animation-delay: 0.1s; }
    .content-card:nth-child(2) { animation-delay: 0.2s; }
    .content-card:nth-child(3) { animation-delay: 0.3s; }
    .content-card:nth-child(4) { animation-delay: 0.4s; }

    @keyframes scrollReveal {
        0% {
            opacity: 0;
            transform: translateY(50px);
        }
        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Hover Effects Enhancement */
    .content-card:hover .card-header-custom {
        background: linear-gradient(135deg, #3b82f6 0%, #dc2626 100%);
    }

    /* Progress Bar Animation Enhancement */
    .progress-fill {
        animation: progressGlow 2s ease-in-out infinite alternate;
    }

    @keyframes progressGlow {
        0% {
            box-shadow: 0 0 5px rgba(220, 38, 38, 0.5);
        }
        100% {
            box-shadow: 0 0 20px rgba(59, 130, 246, 0.8);
        }
    }

    /* Certificate Button Enhancement */
    .certificate-actions .btn {
        position: relative;
        overflow: hidden;
    }

    .certificate-actions .btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
        transition: left 0.6s ease;
    }

    .certificate-actions .btn:hover::before {
        left: 100%;
    }

    /* ========================================
       MODERN COURSE PAGE STYLES
       ======================================== */
    
    /* Hero Section */
    .modern-course-hero {
        position: relative;
        border-radius: 20px;
        overflow: visible;
        margin-bottom: 80px;
    }
    
    /* Banner Image */
    .hero-banner-image {
        position: relative;
        min-height: 300px;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        border-radius: 20px;
        overflow: hidden;
    }
    
    .hero-banner-overlay {
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, rgba(220, 38, 38, 0.85), rgba(59, 130, 246, 0.85));
        background-size: 200% 200%;
        animation: gradientShift 10s ease-in-out infinite;
        z-index: 1;
    }
    
    @keyframes gradientShift {
        0% {
            background-position: 0% 50%;
        }
        25% {
            background-position: 50% 0%;
        }
        50% {
            background-position: 100% 50%;
        }
        75% {
            background-position: 50% 100%;
        }
        100% {
            background-position: 0% 50%;
        }
    }
    
    /* Floating Title Card */
    .hero-floating-card {
        position: absolute;
        bottom: -40px;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        max-width: 800px;
        background: white;
        border-radius: 20px;
        padding: 2.5rem;
        box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
        z-index: 10;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.8);
    }
    
    .floating-card-title {
        font-size: 2rem;
        font-weight: 700;
        color: #1e293b;
        margin: 0 0 1rem 0;
        line-height: 1.3;
    }
    
    .floating-card-description {
        font-size: 1.05rem;
        color: #64748b;
        line-height: 1.6;
        margin: 0;
    }
    
    @keyframes slideInUp {
        0% {
            opacity: 0;
            transform: translateY(50px);
        }
        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Modern Cards */
    .modern-card {
        background: white;
        border-radius: 16px;
        margin-bottom: 1.5rem;
        overflow: hidden;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
        transition: all 0.3s ease;
    }
    
    .modern-card:hover {
        box-shadow: 0 4px 24px rgba(99, 102, 241, 0.12);
        transform: translateY(-2px);
    }
    
    .card-header-modern {
        padding: 1.5rem;
        background: linear-gradient(135deg, #f8fafc, #e8f0f6);
        border-bottom: 1px solid #e2e8f0;
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }
    
    .card-header-modern i {
        font-size: 1.5rem;
        color: #6366f1;
    }
    
    .card-header-modern h3 {
        margin: 0;
        font-size: 1.25rem;
        font-weight: 600;
        color: #1e293b;
    }
    
    .card-body-modern {
        padding: 1.5rem;
    }
    
    /* Progress Bar */
    .progress-bar-modern {
        width: 100%;
        height: 32px;
        background: #e2e8f0;
        border-radius: 50px;
        overflow: hidden;
        margin-bottom: 2rem;
        position: relative;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
    }
    
    .progress-bar-fill {
        height: 100%;
        background: linear-gradient(135deg, #6366f1, #8b5cf6);
        border-radius: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        transition: width 0.8s ease;
        box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    }
    
    .progress-text {
        color: white;
        font-size: 0.875rem;
        font-weight: 700;
    }
    
    .progress-stats-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
    
    .stat-item {
        text-align: center;
        padding: 1rem;
        background: #f8fafc;
        border-radius: 12px;
        transition: all 0.3s ease;
    }
    
    .stat-item:hover {
        background: #f1f5f9;
        transform: translateY(-2px);
    }
    
    .stat-number {
        display: block;
        font-size: 2rem;
        font-weight: 700;
        color: #6366f1;
    }
    
    .stat-label {
        display: block;
        font-size: 0.875rem;
        color: #64748b;
        margin-top: 0.25rem;
        font-weight: 600;
    }
    
    /* Status Badge */
    .status-badge {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.75rem 1.5rem;
        border-radius: 50px;
        font-weight: 600;
    }
    
    .status-badge i {
        font-size: 1.25rem;
    }
    
    .status-active {
        background: #dbeafe;
        color: #1e40af;
    }
    
    .status-pending {
        background: #fef3c7;
        color: #92400e;
    }
    
    .status-closed {
        background: #fee2e2;
        color: #991b1b;
    }
    
    /* Chapters & Topics */
    .modern-chapters {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .chapter-modern {
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        overflow: hidden;
    }
    
    .chapter-header-modern {
        width: 100%;
        padding: 1.25rem 1.5rem;
        background: white;
        border: none;
        display: flex;
        align-items: center;
        gap: 1rem;
        text-align: left;
        transition: all 0.2s ease;
        cursor: pointer;
    }
    
    .chapter-header-modern:hover {
        background: #f8fafc;
    }
    
    .chapter-header-modern i:first-child {
        font-size: 1.5rem;
        color: #6366f1;
    }
    
    .chapter-header-modern h4 {
        flex: 1;
        margin: 0;
        font-size: 1.1rem;
        font-weight: 600;
        color: #1e293b;
    }
    
    .chevron {
        transition: transform 0.2s ease;
        color: #64748b;
    }
    
    .chapter-header-modern[aria-expanded="true"] .chevron {
        transform: rotate(180deg);
    }
    
    .topics-modern {
        padding: 1rem;
        background: #f8fafc;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .topic-item-modern {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1.25rem;
        background: white;
        border-radius: 12px;
        text-decoration: none;
        transition: all 0.2s ease;
        border: 2px solid #e2e8f0;
        position: relative;
    }
    
    /* Content items styling */
    .topic-item-modern.topic-content {
        border-left: 4px solid #3b82f6;
    }
    
    .topic-item-modern.topic-content:hover {
        border-color: #3b82f6;
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
        transform: translateX(4px);
        text-decoration: none;
    }
    
    /* Quiz items styling - more prominent */
    .topic-item-modern.topic-quiz {
        border-left: 4px solid #dc2626;
        background: linear-gradient(to right, #fef2f2 0%, #ffffff 10%);
        border-color: #fecaca;
    }
    
    .topic-item-modern.topic-quiz:hover {
        border-color: #dc2626;
        box-shadow: 0 4px 16px rgba(220, 38, 38, 0.2);
        transform: translateX(4px);
        text-decoration: none;
        background: linear-gradient(to right, #fee2e2 0%, #ffffff 10%);
    }
    
    .topic-item-modern.completed {
        background: #f0fdf4;
        border-color: #bbf7d0;
    }
    
    .topic-item-modern.topic-quiz.completed {
        background: linear-gradient(to right, #dcfce7 0%, #f0fdf4 10%);
        border-color: #86efac;
    }
    
    .topic-icon-modern {
        width: 48px;
        height: 48px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        flex-shrink: 0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        background: #f8f9fa;
        color: #6c757d;
    }
    
    /* เมื่อเสร็จแล้ว ให้ใช้สีเขียวเหมือนหน้า topic */
    .topic-item-modern.completed .topic-icon-modern {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        color: white;
    }
    
    .topic-icon-modern.video {
        background: #f8f9fa;
        color: #6c757d;
    }
    
    .topic-icon-modern.content {
        background: #f8f9fa;
        color: #6c757d;
    }
    
    .topic-icon-modern.quiz {
        background: #f8f9fa;
        color: #6c757d;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    /* เมื่อเสร็จแล้ว ให้ override สีของ video, content, quiz */
    .topic-item-modern.completed .topic-icon-modern.video,
    .topic-item-modern.completed .topic-icon-modern.content,
    .topic-item-modern.completed .topic-icon-modern.quiz {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        color: white;
    }
    
    .topic-info {
        flex: 1;
        min-width: 0;
    }
    
    .topic-info h5 {
        margin: 0 0 0.5rem 0;
        font-size: 1.1rem;
        font-weight: 600;
        color: #1e293b;
    }
    
    .topic-type-label {
        display: inline-flex;
        align-items: center;
        gap: 0.375rem;
        padding: 0.375rem 0.875rem;
        background: #f1f5f9;
        color: #64748b;
        border-radius: 8px;
        font-size: 0.8125rem;
        font-weight: 600;
    }
    
    .topic-type-label i {
        font-size: 0.875rem;
    }
    
    .topic-type-label.quiz-label {
        background: linear-gradient(135deg, #fee2e2, #fecaca);
        color: #991b1b;
        font-weight: 700;
        border: 1px solid #fca5a5;
    }
    
    .quiz-passed-badge {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.375rem 0.875rem;
        background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
        color: #065f46;
        border-radius: 8px;
        font-size: 0.875rem;
        font-weight: 600;
        margin-top: 0.5rem;
        border: 1px solid #10b981;
    }

    .quiz-passed-badge i {
        color: #10b981;
        font-size: 1rem;
    }

    .quiz-passed-badge span {
        color: #065f46;
    }
    
    .topic-status {
        display: flex;
        align-items: center;
    }
    
    .topic-type-badge {
        display: inline-block;
        padding: 0.25rem 0.75rem;
        background: #f1f5f9;
        color: #64748b;
        border-radius: 6px;
        font-size: 0.75rem;
        font-weight: 600;
    }
    
    .completed-badge {
        font-size: 1.75rem;
        color: #10b981;
    }
    
    /* Certificate Section */
    .certificate-content {
        text-align: center;
        padding: 2rem 0;
    }
    
    .trophy-icon {
        font-size: 4rem;
        color: #fbbf24;
        margin-bottom: 1rem;
    }
    
    .certificate-content h4 {
        font-size: 1.5rem;
        font-weight: 700;
        color: #1e293b;
        margin-bottom: 0.5rem;
    }
    
    .certificate-content p {
        color: #64748b;
        margin-bottom: 1.5rem;
    }
    
    .btn-certificate-modern {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.875rem 2rem;
        background: linear-gradient(135deg, #6366f1, #8b5cf6);
        color: white;
        border-radius: 10px;
        font-weight: 600;
        text-decoration: none;
        transition: all 0.3s ease;
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    }
    
    .btn-certificate-modern:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
        color: white;
    }
    
    /* Tabs */
    .modern-tabs {
        border-bottom: 2px solid #e2e8f0;
        margin-bottom: 1.5rem;
        display: flex;
        gap: 0.5rem;
    }
    
    .modern-tabs .nav-item {
        flex: 1;
    }
    
    .modern-tabs .nav-link {
        width: 100%;
        padding: 1rem;
        border: none;
        border-bottom: 3px solid transparent;
        background: transparent;
        color: #64748b;
        font-weight: 600;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .modern-tabs .nav-link:hover {
        color: #6366f1;
        background: rgba(99, 102, 241, 0.05);
    }
    
    .modern-tabs .nav-link.active {
        color: #6366f1;
        border-bottom-color: #6366f1;
        background: rgba(99, 102, 241, 0.05);
    }
    
    .modern-tabs .nav-link i {
        font-size: 1.25rem;
    }
    
    .tab-content {
        padding-top: 0;
    }
    
    .tab-pane {
        min-height: 200px;
    }
    
    /* Description Tab */
    .course-description-modern {
        padding: 1.5rem 0;
        line-height: 1.8;
        color: #475569;
    }
    
    .course-description-modern h1,
    .course-description-modern h2,
    .course-description-modern h3,
    .course-description-modern h4 {
        color: #1e293b;
        margin-top: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .course-description-modern p {
        margin-bottom: 1rem;
    }
    
    .course-description-modern ul,
    .course-description-modern ol {
        padding-left: 2rem;
        margin-bottom: 1rem;
    }
    
    .course-description-modern li {
        margin-bottom: 0.5rem;
    }
    
    .course-description-modern img {
        max-width: 100%;
        height: auto;
        border-radius: 8px;
        margin: 1rem 0;
    }
    
    .course-description-modern a {
        color: #6366f1;
        text-decoration: none;
    }
    
    .course-description-modern a:hover {
        text-decoration: underline;
    }
    
    /* Certificate Tab in Content */
    .certificate-content {
        text-align: center;
        padding: 2rem 0;
    }
    
    .trophy-icon {
        font-size: 4rem;
        color: #fbbf24;
        margin-bottom: 1rem;
        display: block;
    }
    
    .certificate-content h4 {
        font-size: 1.5rem;
        font-weight: 700;
        color: #1e293b;
        margin-bottom: 0.75rem;
    }
    
    .certificate-content p {
        font-size: 1rem;
        color: #64748b;
        margin-bottom: 1.5rem;
    }
    
    .btn-certificate-modern {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.875rem 2rem;
        background: linear-gradient(135deg, #dc2626 0%, #3b82f6 100%);
        color: white;
        border: none;
        border-radius: 12px;
        font-weight: 600;
        font-size: 1rem;
        text-decoration: none;
        transition: all 0.3s ease;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    .btn-certificate-modern:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
        color: white;
    }
    
    .btn-certificate-modern i {
        font-size: 1.125rem;
    }
    
    /* Responsive */
    @media (max-width: 768px) {
        .modern-course-hero {
            margin-bottom: 100px;
        }
        
        .hero-banner-image {
            min-height: 250px;
        }
        
        .hero-floating-card {
            bottom: -50px;
            width: 95%;
            padding: 1.5rem;
        }
        
        .floating-card-title {
            font-size: 1.5rem;
        }
        
        .floating-card-description {
            font-size: 0.95rem;
        }
        
        .card-header-modern {
            padding: 1.25rem;
        }
        
        .card-header-modern h3 {
            font-size: 1.1rem;
        }
        
        .card-body-modern {
            padding: 1.25rem;
        }
        
        .progress-stats-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 1rem;
        }
        
        .stat-item {
            padding: 0.75rem;
        }
        
        .stat-number {
            font-size: 1.5rem;
        }
        
        .modern-tabs {
            flex-wrap: nowrap;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
            -ms-overflow-style: none;
        }
        
        .modern-tabs::-webkit-scrollbar {
            display: none;
        }
        
        .modern-tabs .nav-link {
            padding: 0.75rem 0.75rem;
            font-size: 0.875rem;
            white-space: nowrap;
            min-width: fit-content;
        }
        
        .modern-tabs .nav-link i {
            font-size: 1rem;
        }
        
        .modern-tabs .nav-link span {
            display: inline;
            margin-left: 0.5rem;
        }
        
        /* Chapters Mobile */
        .chapter-modern {
            margin-bottom: 1rem;
        }
        
        .chapter-header-modern {
            padding: 1rem 1.25rem;
            font-size: 1rem;
        }
        
        .chapter-header-modern h4 {
            font-size: 1.1rem;
        }
        
        .topics-modern {
            padding: 0.75rem;
        }
        
        .topic-item-modern {
            padding: 1rem;
            margin-bottom: 0.75rem;
        }
        
        .topic-info h5 {
            font-size: 1rem;
        }
        
        .topic-type-label {
            font-size: 0.8rem;
        }
        
        /* Certificate Section Mobile */
        .certificate-content {
            padding: 1.5rem 0;
        }
        
        .trophy-icon {
            font-size: 3rem;
            margin-bottom: 0.75rem;
        }
        
        .certificate-content h4 {
            font-size: 1.25rem;
        }
        
        .certificate-content p {
            font-size: 0.9rem;
            margin-bottom: 1rem;
        }
        
        .btn-certificate-modern {
            padding: 0.75rem 1.5rem;
            font-size: 0.9rem;
            width: 100%;
            justify-content: center;
        }
        
        .certificate-actions {
            flex-direction: column;
            gap: 0.75rem !important;
        }
        
        /* Course Description Mobile */
        .course-description-modern {
            font-size: 0.95rem;
            line-height: 1.7;
        }
        
        .course-description-modern img {
            max-width: 100%;
            height: auto;
        }
    }
    
    @media (max-width: 480px) {
        .modern-course-hero {
            margin-bottom: 80px;
        }
        
        .hero-banner-image {
            min-height: 200px;
        }
        
        .hero-floating-card {
            bottom: -40px;
            width: 98%;
            padding: 1.25rem;
            border-radius: 16px;
        }
        
        .floating-card-title {
            font-size: 1.25rem;
            line-height: 1.4;
        }
        
        .modern-card {
            border-radius: 12px;
            margin-bottom: 1rem;
        }
        
        .card-header-modern {
            padding: 1rem;
        }
        
        .card-header-modern i {
            font-size: 1.25rem;
        }
        
        .card-header-modern h3 {
            font-size: 1rem;
        }
        
        .card-body-modern {
            padding: 1rem;
        }
        
        .progress-bar-modern {
            height: 28px;
        }
        
        .progress-text {
            font-size: 0.8rem;
        }
        
        .progress-stats-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 0.75rem;
        }
        
        .stat-item {
            padding: 0.625rem;
        }
        
        .stat-number {
            font-size: 1.25rem;
        }
        
        .stat-label {
            font-size: 0.75rem;
        }
        
        .modern-tabs .nav-link {
            padding: 0.625rem 0.5rem;
            font-size: 0.8rem;
        }
        
        .modern-tabs .nav-link i {
            font-size: 0.9rem;
        }
        
        .modern-tabs .nav-link span {
            font-size: 0.75rem;
        }
        
        .chapter-header-modern {
            padding: 0.875rem 1rem;
        }
        
        .chapter-header-modern h4 {
            font-size: 1rem;
        }
        
        .topic-item-modern {
            padding: 0.875rem;
            margin-bottom: 0.5rem;
        }
        
        .topic-icon-modern {
            width: 36px;
            height: 36px;
            font-size: 1rem;
        }
        
        .topic-info h5 {
            font-size: 0.95rem;
        }
        
        .certificate-content {
            padding: 1rem 0;
        }
        
        .trophy-icon {
            font-size: 2.5rem;
        }
        
        .certificate-content h4 {
            font-size: 1.125rem;
        }
        
        .certificate-content p {
            font-size: 0.875rem;
        }
        
        .btn-certificate-modern {
            padding: 0.625rem 1.25rem;
            font-size: 0.875rem;
        }
    }
    
    @media (max-width: 480px) {
        .certificate-content {
            padding: 1rem 0;
        }
        
        .trophy-icon {
            font-size: 2.5rem;
        }
        
        .certificate-content h4 {
            font-size: 1.125rem;
        }
        
        .certificate-content p {
            font-size: 0.875rem;
        }
        
        .btn-certificate-modern {
            padding: 0.625rem 1.25rem;
            font-size: 0.875rem;
        }
    }

{{if .system_font}}
        :root {
            --system-font: {{if eq .system_font "Sarabun"}}'Sarabun', sans-serif{{else if eq .system_font "THSarabunNew"}}'TH Sarabun New', sans-serif{{else if eq .system_font "THBaijam"}}'TH Baijam', sans-serif{{else if eq .system_font "THChakraPetch"}}'TH Chakra Petch', sans-serif{{else if eq .system_font "THFahkwang"}}'TH Fahkwang', sans-serif{{else if eq .system_font "THK2DJuly8"}}'TH K2D July8', sans-serif{{else if eq .system_font "THKodchasal"}}'TH Kodchasal', sans-serif{{else if eq .system_font "THKoHo"}}'TH KoHo', sans-serif{{else if eq .system_font "THKrub"}}'TH Krub', sans-serif{{else if eq .system_font "THMaliGrade6"}}'TH Mali Grade6', sans-serif{{else if eq .system_font "THNiramitAS"}}'TH Niramit AS', sans-serif{{else if eq .system_font "BKKDraft5"}}'BKK Draft5', sans-serif{{else if eq .system_font "SaoChingcha"}}'Sao Chingcha', sans-serif{{else}}'Sarabun', sans-serif{{end}};
        }
        
        /* Apply font to all elements EXCEPT TinyMCE content */
        body, html, * {
            font-family: var(--system-font) !important;
        }
        
        /* Override Bootstrap and other frameworks */
        .navbar,
        .navbar-brand,
        .nav-link,
        .dropdown-menu,
        .dropdown-item,
        .btn,
        .card,
        .card-title,
        .card-body,
        .form-control,
        .form-label,
        .alert,
        .table,
        .table th,
        .table td,
        .footer,
        .container,
        main,
        h1, h2, h3, h4, h5, h6,
        p, span, div, a, li, ul, ol,
        input, textarea, select, option,
        .row,
        .col,
        .col-md-*,
        .col-lg-*,
        .col-sm-*,
        .col-xl-* {
            font-family: var(--system-font) !important;
        }
        
        /* TinyMCE Exceptions - Keep original fonts for content editing */
        .tox-tinymce,
        .tox-editor-container,
        .tox-edit-area,
        .tox-edit-area__iframe,
        .tox-edit-focus,
        .mce-content-body,
        .mce-content-body *,
        .tox .tox-edit-area iframe,
        .tox .tox-edit-area iframe *,
        .tox-editor-header,
        .tox-toolbar,
        .tox-toolbar__group,
        .tox-toolbar__primary,
        .tox-toolbar__overflow,
        .tox-toolbar__overflow__open,
        .tox-toolbar__overflow__open *,
        .tox-sidebar,
        .tox-sidebar *,
        .tox-dialog,
        .tox-dialog *,
        .tox-menu,
        .tox-menu *,
        .tox-collection,
        .tox-collection *,
        .tox-selected-menu,
        .tox-selected-menu *,
        .tox-listbox,
        .tox-listbox *,
        .tox-color-picker,
        .tox-color-picker *,
        .tox-insert-table-picker,
        .tox-insert-table-picker *,
        .tox-emoji-picker,
        .tox-emoji-picker *,
        .tox-autocompleter,
        .tox-autocompleter *,
        .tox-notification,
        .tox-notification *,
        .tox-notification__body,
        .tox-notification__body *,
        .tox-notification__body p,
        .tox-notification__body div,
        .tox-notification__body span,
        .tox-notification__body a,
        .tox-notification__body button,
        .tox-notification__body input,
        .tox-notification__body textarea,
        .tox-notification__body select,
        .tox-notification__body option,
        .tox-notification__body h1,
        .tox-notification__body h2,
        .tox-notification__body h3,
        .tox-notification__body h4,
        .tox-notification__body h5,
        .tox-notification__body h6,
        .tox-notification__body ul,
        .tox-notification__body ol,
        .tox-notification__body li,
        .tox-notification__body table,
        .tox-notification__body th,
        .tox-notification__body td,
        .tox-notification__body tr,
        .tox-notification__body caption,
        .tox-notification__body thead,
        .tox-notification__body tbody,
        .tox-notification__body tfoot,
        .tox-notification__body colgroup,
        .tox-notification__body col,
        .tox-notification__body blockquote,
        .tox-notification__body pre,
        .tox-notification__body code,
        .tox-notification__body kbd,
        .tox-notification__body samp,
        .tox-notification__body var,
        .tox-notification__body sub,
        .tox-notification__body sup,
        .tox-notification__body mark,
        .tox-notification__body ins,
        .tox-notification__body del,
        .tox-notification__body small,
        .tox-notification__body strong,
        .tox-notification__body em,
        .tox-notification__body b,
        .tox-notification__body i,
        .tox-notification__body u,
        .tox-notification__body s,
        .tox-notification__body cite,
        .tox-notification__body q,
        .tox-notification__body abbr,
        .tox-notification__body acronym,
        .tox-notification__body dfn,
        .tox-notification__body address,
        .tox-notification__body fieldset,
        .tox-notification__body legend,
        .tox-notification__body label,
        .tox-notification__body datalist,
        .tox-notification__body optgroup,
        .tox-notification__body option,
        .tox-notification__body button,
        .tox-notification__body input,
        .tox-notification__body textarea,
        .tox-notification__body select,
        .tox-notification__body output,
        .tox-notification__body progress,
        .tox-notification__body meter,
        .tox-notification__body details,
        .tox-notification__body summary,
        .tox-notification__body dialog,
        .tox-notification__body menu,
        .tox-notification__body menuitem,
        .tox-notification__body slot,
        .tox-notification__body template,
        .tox-notification__body canvas,
        .tox-notification__body svg,
        .tox-notification__body math,
        .tox-notification__body picture,
        .tox-notification__body source,
        .tox-notification__body track,
        .tox-notification__body map,
        .tox-notification__body area,
        .tox-notification__body object,
        .tox-notification__body param,
        .tox-notification__body embed,
        .tox-notification__body iframe,
        .tox-notification__body video,
        .tox-notification__body audio,
        .tox-notification__body figure,
        .tox-notification__body figcaption,
        .tox-notification__body article,
        .tox-notification__body section,
        .tox-notification__body nav,
        .tox-notification__body aside,
        .tox-notification__body header,
        .tox-notification__body footer,
        .tox-notification__body main,
        .tox-notification__body body,
        .tox-notification__body html {
            font-family: inherit !important;
        }
        
        /* TinyMCE Content Display Exception - Force Original Font */
        .tinymce-content,
        .tinymce-content *,
        .tinymce-content p,
        .tinymce-content div,
        .tinymce-content span,
        .tinymce-content h1,
        .tinymce-content h2,
        .tinymce-content h3,
        .tinymce-content h4,
        .tinymce-content h5,
        .tinymce-content h6,
        .tinymce-content ul,
        .tinymce-content ol,
        .tinymce-content li,
        .tinymce-content table,
        .tinymce-content th,
        .tinymce-content td,
        .tinymce-content tr,
        .tinymce-content caption,
        .tinymce-content thead,
        .tinymce-content tbody,
        .tinymce-content tfoot,
        .tinymce-content colgroup,
        .tinymce-content col,
        .tinymce-content blockquote,
        .tinymce-content pre,
        .tinymce-content code,
        .tinymce-content kbd,
        .tinymce-content samp,
        .tinymce-content var,
        .tinymce-content sub,
        .tinymce-content sup,
        .tinymce-content mark,
        .tinymce-content ins,
        .tinymce-content del,
        .tinymce-content small,
        .tinymce-content strong,
        .tinymce-content em,
        .tinymce-content b,
        .tinymce-content i,
        .tinymce-content u,
        .tinymce-content s,
        .tinymce-content cite,
        .tinymce-content q,
        .tinymce-content abbr,
        .tinymce-content acronym,
        .tinymce-content dfn,
        .tinymce-content address,
        .tinymce-content fieldset,
        .tinymce-content legend,
        .tinymce-content label,
        .tinymce-content datalist,
        .tinymce-content optgroup,
        .tinymce-content option,
        .tinymce-content button,
        .tinymce-content input,
        .tinymce-content textarea,
        .tinymce-content select,
        .tinymce-content output,
        .tinymce-content progress,
        .tinymce-content meter,
        .tinymce-content details,
        .tinymce-content summary,
        .tinymce-content dialog,
        .tinymce-content menu,
        .tinymce-content menuitem,
        .tinymce-content slot,
        .tinymce-content template,
        .tinymce-content canvas,
        .tinymce-content svg,
        .tinymce-content math,
        .tinymce-content picture,
        .tinymce-content source,
        .tinymce-content track,
        .tinymce-content map,
        .tinymce-content area,
        .tinymce-content object,
        .tinymce-content param,
        .tinymce-content embed,
        .tinymce-content iframe,
        .tinymce-content video,
        .tinymce-content audio,
        .tinymce-content figure,
        .tinymce-content figcaption,
        .tinymce-content article,
        .tinymce-content section,
        .tinymce-content nav,
        .tinymce-content aside,
        .tinymce-content header,
        .tinymce-content footer,
        .tinymce-content main,
        .tinymce-content body,
        .tinymce-content html {
            font-family: 'Sarabun', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
        }
        
        /* Ultra High Specificity Override for TinyMCE Content */
        body .tinymce-content,
        html .tinymce-content,
        body .tinymce-content *,
        html .tinymce-content *,
        body .tinymce-content p,
        html .tinymce-content p,
        body .tinymce-content div,
        html .tinymce-content div,
        body .tinymce-content span,
        html .tinymce-content span,
        body .tinymce-content h1,
        html .tinymce-content h1,
        body .tinymce-content h2,
        html .tinymce-content h2,
        body .tinymce-content h3,
        html .tinymce-content h3,
        body .tinymce-content h4,
        html .tinymce-content h4,
        body .tinymce-content h5,
        html .tinymce-content h5,
        body .tinymce-content h6,
        html .tinymce-content h6,
        body .tinymce-content ul,
        html .tinymce-content ul,
        body .tinymce-content ol,
        html .tinymce-content ol,
        body .tinymce-content li,
        html .tinymce-content li,
        body .tinymce-content table,
        html .tinymce-content table,
        body .tinymce-content th,
        html .tinymce-content th,
        body .tinymce-content td,
        html .tinymce-content td,
        body .tinymce-content tr,
        html .tinymce-content tr,
        body .tinymce-content caption,
        html .tinymce-content caption,
        body .tinymce-content thead,
        html .tinymce-content thead,
        body .tinymce-content tbody,
        html .tinymce-content tbody,
        body .tinymce-content tfoot,
        html .tinymce-content tfoot,
        body .tinymce-content colgroup,
        html .tinymce-content colgroup,
        body .tinymce-content col,
        html .tinymce-content col,
        body .tinymce-content blockquote,
        html .tinymce-content blockquote,
        body .tinymce-content pre,
        html .tinymce-content pre,
        body .tinymce-content code,
        html .tinymce-content code,
        body .tinymce-content kbd,
        html .tinymce-content kbd,
        body .tinymce-content samp,
        html .tinymce-content samp,
        body .tinymce-content var,
        html .tinymce-content var,
        body .tinymce-content sub,
        html .tinymce-content sub,
        body .tinymce-content sup,
        html .tinymce-content sup,
        body .tinymce-content mark,
        html .tinymce-content mark,
        body .tinymce-content ins,
        html .tinymce-content ins,
        body .tinymce-content del,
        html .tinymce-content del,
        body .tinymce-content small,
        html .tinymce-content small,
        body .tinymce-content strong,
        html .tinymce-content strong,
        body .tinymce-content em,
        html .tinymce-content em,
        body .tinymce-content b,
        html .tinymce-content b,
        body .tinymce-content i,
        html .tinymce-content i,
        body .tinymce-content u,
        html .tinymce-content u,
        body .tinymce-content s,
        html .tinymce-content s,
        body .tinymce-content cite,
        html .tinymce-content cite,
        body .tinymce-content q,
        html .tinymce-content q,
        body .tinymce-content abbr,
        html .tinymce-content abbr,
        body .tinymce-content acronym,
        html .tinymce-content acronym,
        body .tinymce-content dfn,
        html .tinymce-content dfn,
        body .tinymce-content address,
        html .tinymce-content address,
        body .tinymce-content fieldset,
        html .tinymce-content fieldset,
        body .tinymce-content legend,
        html .tinymce-content legend,
        body .tinymce-content label,
        html .tinymce-content label,
        body .tinymce-content datalist,
        html .tinymce-content datalist,
        body .tinymce-content optgroup,
        html .tinymce-content optgroup,
        body .tinymce-content option,
        html .tinymce-content option,
        body .tinymce-content button,
        html .tinymce-content button,
        body .tinymce-content input,
        html .tinymce-content input,
        body .tinymce-content textarea,
        html .tinymce-content textarea,
        body .tinymce-content select,
        html .tinymce-content select,
        body .tinymce-content output,
        html .tinymce-content output,
        body .tinymce-content progress,
        html .tinymce-content progress,
        body .tinymce-content meter,
        html .tinymce-content meter,
        body .tinymce-content details,
        html .tinymce-content details,
        body .tinymce-content summary,
        html .tinymce-content summary,
        body .tinymce-content dialog,
        html .tinymce-content dialog,
        body .tinymce-content menu,
        html .tinymce-content menu,
        body .tinymce-content menuitem,
        html .tinymce-content menuitem,
        body .tinymce-content slot,
        html .tinymce-content slot,
        body .tinymce-content template,
        html .tinymce-content template,
        body .tinymce-content canvas,
        html .tinymce-content canvas,
        body .tinymce-content svg,
        html .tinymce-content svg,
        body .tinymce-content math,
        html .tinymce-content math,
        body .tinymce-content picture,
        html .tinymce-content picture,
        body .tinymce-content source,
        html .tinymce-content source,
        body .tinymce-content track,
        html .tinymce-content track,
        body .tinymce-content map,
        html .tinymce-content map,
        body .tinymce-content area,
        html .tinymce-content area,
        body .tinymce-content object,
        html .tinymce-content object,
        body .tinymce-content param,
        html .tinymce-content param,
        body .tinymce-content embed,
        html .tinymce-content embed,
        body .tinymce-content iframe,
        html .tinymce-content iframe,
        body .tinymce-content video,
        html .tinymce-content video,
        body .tinymce-content audio,
        html .tinymce-content audio,
        body .tinymce-content figure,
        html .tinymce-content figure,
        body .tinymce-content figcaption,
        html .tinymce-content figcaption,
        body .tinymce-content article,
        html .tinymce-content article,
        body .tinymce-content section,
        html .tinymce-content section,
        body .tinymce-content nav,
        html .tinymce-content nav,
        body .tinymce-content aside,
        html .tinymce-content aside,
        body .tinymce-content header,
        html .tinymce-content header,
        body .tinymce-content footer,
        html .tinymce-content footer,
        body .tinymce-content main,
        html .tinymce-content main,
        body .tinymce-content body,
        html .tinymce-content body,
        body .tinymce-content html {
            font-family: 'Sarabun', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
        }
        
        /* Maximum Specificity Override - Force Original Font */
        html body .tinymce-content,
        body html .tinymce-content,
        html body .tinymce-content *,
        body html .tinymce-content *,
        html body .tinymce-content p,
        body html .tinymce-content p,
        html body .tinymce-content div,
        body html .tinymce-content div,
        html body .tinymce-content span,
        body html .tinymce-content span,
        html body .tinymce-content h1,
        body html .tinymce-content h1,
        html body .tinymce-content h2,
        body html .tinymce-content h2,
        html body .tinymce-content h3,
        body html .tinymce-content h3,
        html body .tinymce-content h4,
        body html .tinymce-content h4,
        html body .tinymce-content h5,
        body html .tinymce-content h5,
        html body .tinymce-content h6,
        body html .tinymce-content h6,
        html body .tinymce-content ul,
        body html .tinymce-content ul,
        html body .tinymce-content ol,
        body html .tinymce-content ol,
        html body .tinymce-content li,
        body html .tinymce-content li,
        html body .tinymce-content table,
        body html .tinymce-content table,
        html body .tinymce-content th,
        body html .tinymce-content th,
        html body .tinymce-content td,
        body html .tinymce-content td,
        html body .tinymce-content tr,
        body html .tinymce-content tr,
        html body .tinymce-content caption,
        body html .tinymce-content caption,
        html body .tinymce-content thead,
        body html .tinymce-content thead,
        html body .tinymce-content tbody,
        body html .tinymce-content tbody,
        html body .tinymce-content tfoot,
        body html .tinymce-content tfoot,
        html body .tinymce-content colgroup,
        body html .tinymce-content colgroup,
        html body .tinymce-content col,
        body html .tinymce-content col,
        html body .tinymce-content blockquote,
        body html .tinymce-content blockquote,
        html body .tinymce-content pre,
        body html .tinymce-content pre,
        html body .tinymce-content code,
        body html .tinymce-content code,
        html body .tinymce-content kbd,
        body html .tinymce-content kbd,
        html body .tinymce-content samp,
        body html .tinymce-content samp,
        html body .tinymce-content var,
        body html .tinymce-content var,
        html body .tinymce-content sub,
        body html .tinymce-content sub,
        html body .tinymce-content sup,
        body html .tinymce-content sup,
        html body .tinymce-content mark,
        body html .tinymce-content mark,
        html body .tinymce-content ins,
        body html .tinymce-content ins,
        html body .tinymce-content del,
        body html .tinymce-content del,
        html body .tinymce-content small,
        body html .tinymce-content small,
        html body .tinymce-content strong,
        body html .tinymce-content strong,
        html body .tinymce-content em,
        body html .tinymce-content em,
        html body .tinymce-content b,
        body html .tinymce-content b,
        html body .tinymce-content i,
        body html .tinymce-content i,
        html body .tinymce-content u,
        body html .tinymce-content u,
        html body .tinymce-content s,
        body html .tinymce-content s,
        html body .tinymce-content cite,
        body html .tinymce-content cite,
        html body .tinymce-content q,
        body html .tinymce-content q,
        html body .tinymce-content abbr,
        body html .tinymce-content abbr,
        html body .tinymce-content acronym,
        body html .tinymce-content acronym,
        html body .tinymce-content dfn,
        body html .tinymce-content dfn,
        html body .tinymce-content address,
        body html .tinymce-content address,
        html body .tinymce-content fieldset,
        body html .tinymce-content fieldset,
        html body .tinymce-content legend,
        body html .tinymce-content legend,
        html body .tinymce-content label,
        body html .tinymce-content label,
        html body .tinymce-content datalist,
        body html .tinymce-content datalist,
        html body .tinymce-content optgroup,
        body html .tinymce-content optgroup,
        html body .tinymce-content option,
        body html .tinymce-content option,
        html body .tinymce-content button,
        body html .tinymce-content button,
        html body .tinymce-content input,
        body html .tinymce-content input,
        html body .tinymce-content textarea,
        body html .tinymce-content textarea,
        html body .tinymce-content select,
        body html .tinymce-content select,
        html body .tinymce-content output,
        body html .tinymce-content output,
        html body .tinymce-content progress,
        body html .tinymce-content progress,
        html body .tinymce-content meter,
        body html .tinymce-content meter,
        html body .tinymce-content details,
        body html .tinymce-content details,
        html body .tinymce-content summary,
        body html .tinymce-content summary,
        html body .tinymce-content dialog,
        body html .tinymce-content dialog,
        html body .tinymce-content menu,
        body html .tinymce-content menu,
        html body .tinymce-content menuitem,
        body html .tinymce-content menuitem,
        html body .tinymce-content slot,
        body html .tinymce-content slot,
        html body .tinymce-content template,
        body html .tinymce-content template,
        html body .tinymce-content canvas,
        body html .tinymce-content canvas,
        html body .tinymce-content svg,
        body html .tinymce-content svg,
        html body .tinymce-content math,
        body html .tinymce-content math,
        html body .tinymce-content picture,
        body html .tinymce-content picture,
        html body .tinymce-content source,
        body html .tinymce-content source,
        html body .tinymce-content track,
        body html .tinymce-content track,
        html body .tinymce-content map,
        body html .tinymce-content map,
        html body .tinymce-content area,
        body html .tinymce-content area,
        html body .tinymce-content object,
        body html .tinymce-content object,
        html body .tinymce-content param,
        body html .tinymce-content param,
        html body .tinymce-content embed,
        body html .tinymce-content embed,
        html body .tinymce-content iframe,
        body html .tinymce-content iframe,
        html body .tinymce-content video,
        body html .tinymce-content video,
        html body .tinymce-content audio,
        body html .tinymce-content audio,
        html body .tinymce-content figure,
        body html .tinymce-content figure,
        html body .tinymce-content figcaption,
        body html .tinymce-content figcaption,
        html body .tinymce-content article,
        body html .tinymce-content article,
        html body .tinymce-content section,
        body html .tinymce-content section,
        html body .tinymce-content nav,
        body html .tinymce-content nav,
        html body .tinymce-content aside,
        body html .tinymce-content aside,
        html body .tinymce-content header,
        body html .tinymce-content header,
        html body .tinymce-content footer,
        body html .tinymce-content footer,
        html body .tinymce-content main,
        body html .tinymce-content main,
        html body .tinymce-content body,
        body html .tinymce-content body,
        html body .tinymce-content html {
            font-family: 'Sarabun', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
        }
        {{end}}
        body {
            font-family: var(--system-font) !important;
            background: linear-gradient(135deg, #f8fafc 0%, #e9ecef 100%);
            min-height: 100vh;
        }
        .navbar {
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
            background: rgba(255,255,255,0.85);
            backdrop-filter: blur(12px);
            transition: background 0.3s;
            z-index: 1030;
            position: relative;
        }
        .navbar-brand {
            font-weight: 700;
            letter-spacing: 1px;
            color: #2563eb !important;
            font-size: 1.5rem;
        }
        .nav-link {
            font-weight: 500;
            color: #334155 !important;
            position: relative;
            transition: color 0.3s, background 0.3s;
        }
        .nav-link::after {
            content: '';
            position: absolute;
            width: 0;
            height: 2px;
            bottom: -5px;
            left: 50%;
            transform: translateX(-50%);
            background-color: #2563eb;
            transition: width 0.3s;
        }
        .nav-link:hover, .nav-link.active {
            color: #2563eb !important;
            background: rgba(37,99,235,0.07);
        }
        .nav-link:hover::after, .nav-link.active::after {
            width: 60%;
        }
        .dropdown-menu {
            border-radius: 1rem;
            box-shadow: 0 4px 24px 0 rgba(0,0,0,0.08);
            animation: fadeInDown 0.3s;
        }
        .dropdown-item {
            transition: background 0.2s, color 0.2s;
        }
        .dropdown-item:hover {
            background: #2563eb;
            color: #fff;
        }
        .btn-primary, .btn-outline-primary {
            transition: transform 0.2s, box-shadow 0.2s;
        }
        .btn-primary:hover, .btn-outline-primary:hover {
            transform: translateY(-2px) scale(1.03);
            box-shadow: 0 4px 16px rgba(37,99,235,0.15);
        }
        .container {
            max-width: 960px;
        }
        main {
            min-height: 70vh;
        }
        footer {
            background: #f1f5f9;
            color: #64748b;
            border-top: 1px solid #e2e8f0;
            padding: 2rem 0 1rem 0;
            margin-top: 3rem;
            text-align: center;
            font-size: 1rem;
        }
        .footer-brand {
            font-weight: 700;
            color: #2563eb;
            font-size: 1.2rem;
            margin-bottom: 0.5rem;
        }
        @media (max-width: 576px) {
            .navbar-brand { font-size: 1.1rem; }
            .container { padding-left: 0.5rem; padding-right: 0.5rem; }
        }

/* Sidebar Animation */
        .offcanvas-end {
            background: rgba(255, 255, 255, 0.8) !important;
            backdrop-filter: blur(15px) !important;
            -webkit-backdrop-filter: blur(15px) !important;
            box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
            animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }
        
        /* Backdrop ไม่ต้องมีพื้นหลัง */
        .offcanvas-backdrop {
            background: transparent !important;
        }
        
        /* Make sure body is transparent */
        #profileSidebar .offcanvas-body {
            background: transparent !important;
        }
        
        #profileSidebar .offcanvas-header {
            background: transparent !important;
        }
        
        @keyframes slideInRight {
            from {
                transform: translateX(100%);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }
        
        /* Header Styles */
        .offcanvas-header {
            border-bottom: 1px solid rgba(226, 232, 240, 0.8);
            padding: 1.5rem;
            animation: fadeInDown 0.4s ease-out;
        }
        
        @keyframes fadeInDown {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        /* Body Content Animation */
        .offcanvas-body {
            animation: fadeInUp 0.5s ease-out;
            animation-delay: 0.1s;
            animation-fill-mode: both;
        }
        
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        /* Menu Items */
        .hover-menu-item {
            color: #1e293b;
            border-radius: 8px;
            transition: all 0.2s ease;
        }
        
        .hover-menu-item i {
            transition: transform 0.2s ease;
        }
        
        .hover-menu-item:hover {
            background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
            color: #3b82f6;
            transform: translateX(5px);
        }
        
        .hover-menu-item:hover i {
            transform: scale(1.15);
        }
        
        .hover-menu-item.text-danger:hover {
            background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
            color: #dc2626;
        }
        
        /* Sidebar Width */
        .offcanvas {
            width: 320px;
            max-width: 90vw;
        }
        
        /* Profile Title */
        .offcanvas-title {
            font-weight: 600;
            color: #1e293b;
        }
        
        .offcanvas-title .fw-bold {
            font-size: 1.1rem;
            line-height: 1.4;
        }
        
        /* Close Button */
        .btn-close {
            transition: transform 0.2s ease;
        }
        
        .btn-close:hover {
            transform: rotate(90deg);
        }
        
        /* Calendar Styles */
        .calendar-container {
            padding: 0.5rem 0;
        }
        
        .calendar-grid .row {
            margin: 0;
        }
        
        .calendar-day {
            min-height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .calendar-day:hover {
            background-color: #f8fafc;
        }
        
        .calendar-day.selected {
            background-color: rgba(59, 130, 246, 0.15);
            color: #3b82f6;
            font-weight: 600;
            border-radius: 8px;
        }
        
        .calendar-view-btn {
            width: 32px;
            height: 32px;
            padding: 0;
            border: 1px solid #e2e8f0;
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .calendar-view-btn.active {
            background-color: #3b82f6;
            color: white;
            border-color: #3b82f6;
        }
        
        .calendar-view-btn:not(.active) {
            background-color: white;
            color: #64748b;
        }
        
        /* Selected date */
        .calendar-day.selected {
            background-color: rgba(59, 130, 246, 0.15) !important;
            color: #3b82f6 !important;
            font-weight: 600;
        }
        
        /* Activities List */
        #activitiesList .border {
            transition: all 0.2s;
        }
        
        #activitiesList .border:hover {
            border-color: #3b82f6 !important;
            box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
        }
        
        /* Responsive สำหรับมือถือ */
        @media (max-width: 768px) {
            /* ปรับ navbar */
            .navbar > .container {
                display: flex !important;
                flex-direction: row !important;
                align-items: center !important;
                justify-content: space-between !important;
                width: 100% !important;
            }
            
            .navbar-brand {
                font-size: 1.1rem !important;
                margin-bottom: 0 !important;
                margin-right: auto !important;
            }
            
            .navbar > .container > .d-flex {
                display: flex !important;
                flex-direction: row !important;
                align-items: center !important;
                gap: 0 !important;
            }
            
            .navbar > .container > .d-flex > ul:first-child {
                display: none !important;
            }
            
            .navbar > .container > .d-flex > ul:last-child {
                display: flex !important;
                flex-direction: row !important;
                align-items: center !important;
                margin: 0 !important;
                gap: 0 !important;
            }
            
            /* ปรับไอคอนใน navbar */
            .navbar-nav .nav-link i {
                font-size: 1.25rem !important;
            }
            
            .navbar-nav .nav-link {
                padding: 0.5rem !important;
            }
            
            .navbar .d-flex ul:last-child .nav-item {
                margin: 0 !important;
            }
            
            /* ปรับ sidebar */
            .offcanvas-end {
                width: 100vw !important;
                max-width: 100% !important;
                top: 0 !important;
                height: 100vh !important;
                border-radius: 0 !important;
                transform: translateY(100%) !important;
                transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
            }
            
            .offcanvas-end.show {
                transform: translateY(0) !important;
            }
            
            /* ปรับ backdrop */
            .offcanvas-backdrop {
                opacity: 0.5 !important;
                transition: opacity 0.3s ease !important;
            }
            
            .offcanvas-backdrop.show {
                opacity: 0.5 !important;
            }
            
            /* ปรับ calendar */
            .calendar-day {
                min-height: 40px !important;
                padding: 5px !important;
                font-size: 0.85rem;
            }
            
            /* ปรับ card ใน continue learning */
            .card-body {
                padding: 1rem !important;
            }
            
            .card-body img {
                width: 50px !important;
                height: 50px !important;
            }
            
            h6.fw-bold {
                font-size: 0.95rem;
            }
        }
        
        /* Calendar Grid - ไม่มีเส้นแบ่ง */
        .calendar-grid .row + .row {
            border-top: none;
        }
        
        .calendar-grid .col + .col {
            border-left: none;
        }
        
        .calendar-grid .col {
            min-height: 50px;
            position: relative;
        }
        
        /* วันในสัปดาห์ */
        .calendar-grid .row:first-child .col {
            background-color: transparent;
            font-weight: 500;
            padding: 12px 8px !important;
            color: #64748b;
            font-size: 0.875rem;
        }
        
        /* ปรับ calendar-day */
        .calendar-day {
            min-height: 50px;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            padding: 10px !important;
            font-weight: 500;
            color: #1f2937;
            font-size: 0.95rem;
            border-radius: 8px;
            transition: all 0.2s;
        }
        
        .calendar-day:hover {
            background-color: #f1f5f9;
        }
        
        .calendar-day.today {
            background-color: #3b82f6;
            color: white;
            font-weight: 600;
        }
        
        .calendar-day.has-event:hover {
            background-color: #e0e7ff;
        }
        
        /* Event dot */
        .event-dot {
            width: 5px;
            height: 5px;
            background-color: #3b82f6;
            border-radius: 50%;
            position: absolute;
            bottom: 6px;
            left: 50%;
            transform: translateX(-50%);
        }
        
        .calendar-day.today .event-dot {
            background-color: white;
        }

