body {
    background-color: #f8f9fa;
    min-height: 100vh;
}

.card {
    border: none;
    border-radius: 10px;
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
}

/* Hover effects only for interactive elements (links, buttons) */
.hover-shadow-interactive:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-2px);
}

.lesson-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.lesson-content p {
    margin-bottom: 1.5rem;
}

.lesson-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #0d6efd;
}

.lesson-content ul, .lesson-content ol {
    margin-bottom: 1.5rem;
}

.lesson-content li {
    margin-bottom: 0.5rem;
}

/* ========================================
   RESPONSIVE IMAGES & VIDEOS SYSTEM
   ======================================== */

/* Default Image Styling - Mobile First */
.lesson-content img {
    max-width: 100%;
    height: auto !important;
    display: block;
    margin: 1.5rem auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Images are not clickable - no hover effect to avoid confusion */

/* Image Layout Classes */

/* Full Width Image */
.lesson-content .img-full {
    width: 100%;
    max-width: 100%;
    margin: 2rem 0;
}

/* Center Image (default behavior on mobile) */
.lesson-content .img-center {
    display: block;
    margin: 1.5rem auto;
    max-width: 100%;
}

/* Left Float Image - Desktop only, stacks on mobile */
.lesson-content .img-left {
    display: block;
    margin: 1.5rem auto;
    max-width: 100%;
}

/* Right Float Image - Desktop only, stacks on mobile */
.lesson-content .img-right {
    display: block;
    margin: 1.5rem auto;
    max-width: 100%;
}

/* Small Image (thumbnail size) */
.lesson-content .img-small {
    max-width: 300px;
    margin: 1rem auto;
}

/* Medium Image */
.lesson-content .img-medium {
    max-width: 500px;
    margin: 1.5rem auto;
}

/* Large Image */
.lesson-content .img-large {
    max-width: 800px;
    margin: 2rem auto;
}

/* Desktop & Tablet Responsive Behavior */
@media (min-width: 768px) {
    /* Left Float on Desktop */
    .lesson-content .img-left {
        float: left;
        margin: 0.5rem 1.5rem 1rem 0;
        max-width: 45%;
        display: inline-block;
    }
    
    /* Right Float on Desktop */
    .lesson-content .img-right {
        float: right;
        margin: 0.5rem 0 1rem 1.5rem;
        max-width: 45%;
        display: inline-block;
    }
    
    /* Clear floats after images */
    .lesson-content .img-left + p,
    .lesson-content .img-right + p {
        display: inline;
    }
}

/* Mobile Override - Stack All Images */
@media (max-width: 767px) {
    .lesson-content img,
    .lesson-content .img-left,
    .lesson-content .img-right,
    .lesson-content .img-center {
        float: none !important;
        display: block !important;
        margin: 1.5rem auto !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* Image Caption Styling */
.lesson-content .img-caption {
    text-align: center;
    font-style: italic;
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Image Container with Caption */
.lesson-content .img-container {
    margin: 1.5rem 0;
    display: inline-block;
    max-width: 100%;
}

.lesson-content .img-container.left {
    float: left;
    margin-right: 1.5rem;
    max-width: 45%;
}

.lesson-content .img-container.right {
    float: right;
    margin-left: 1.5rem;
    max-width: 45%;
}

@media (max-width: 767px) {
    .lesson-content .img-container,
    .lesson-content .img-container.left,
    .lesson-content .img-container.right {
        float: none !important;
        display: block !important;
        margin: 1.5rem auto !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* ========================================
   VIDEO EMBEDS
   ======================================== */

/* Responsive Video Container */
.lesson-content .video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin: 2rem 0;
    background: #000;
}

.lesson-content .video-container iframe,
.lesson-content .video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}

/* Video Caption */
.lesson-content .video-caption {
    text-align: center;
    font-style: italic;
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Alternative square video (1:1) */
.lesson-content .video-container.square {
    padding-bottom: 100%;
}

/* Alternative vertical video (9:16) */
.lesson-content .video-container.vertical {
    padding-bottom: 177.78%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Clear floats helper */
.lesson-content .clearfix::after {
    content: "";
    display: table;
    clear: both;
}

#nextButton:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.progress {
    border-radius: 10px;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.modal-content {
    border-radius: 15px;
}

.modal-header {
    border-radius: 15px 15px 0 0;
}

.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.alert {
    border-radius: 10px;
}

.btn {
    border-radius: 8px;
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* ========================================
   TINYMCE CONTENT BOX STYLES
   ======================================== */

/* Info Box - Blue */
.lesson-content .info-box,
.info-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 4px solid #2196f3;
    padding: 15px 20px;
    border-radius: 0 8px 8px 0;
    margin: 20px 0;
}

/* Warning Box - Orange */
.lesson-content .warning-box,
.warning-box {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-left: 4px solid #ff9800;
    padding: 15px 20px;
    border-radius: 0 8px 8px 0;
    margin: 20px 0;
}

/* Danger Box - Red */
.lesson-content .danger-box,
.danger-box {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-left: 4px solid #f44336;
    padding: 15px 20px;
    border-radius: 0 8px 8px 0;
    margin: 20px 0;
}

/* Success Box - Green */
.lesson-content .success-box,
.success-box {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-left: 4px solid #4caf50;
    padding: 15px 20px;
    border-radius: 0 8px 8px 0;
    margin: 20px 0;
}

/* Tip Box - Purple */
.lesson-content .tip-box,
.tip-box {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    border-left: 4px solid #9c27b0;
    padding: 15px 20px;
    border-radius: 0 8px 8px 0;
    margin: 20px 0;
}

/* Content Box Typography */
.lesson-content .info-box strong,
.lesson-content .warning-box strong,
.lesson-content .danger-box strong,
.lesson-content .success-box strong,
.lesson-content .tip-box strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.lesson-content .info-box p,
.lesson-content .warning-box p,
.lesson-content .danger-box p,
.lesson-content .success-box p,
.lesson-content .tip-box p {
    margin: 0;
}

/* ========================================
   ADDITIONAL IMAGE STYLES
   ======================================== */

/* Rounded corners */
.lesson-content .img-rounded {
    border-radius: 20px;
}

/* Shadow effect */
.lesson-content .img-shadow {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

/* Border */
.lesson-content .img-border {
    border: 3px solid #667eea;
    padding: 5px;
    background: white;
}

/* Responsive default */
.lesson-content .img-responsive {
    max-width: 100%;
    height: auto;
}

/* ========================================
   CODE SAMPLE STYLES
   ======================================== */

.lesson-content pre[class*="language-"] {
    background: #2d3748;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.5;
}

.lesson-content code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.9em;
    color: #e11d48;
}

.lesson-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

/* ========================================
   TABLE IMPROVEMENTS
   ======================================== */

.lesson-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.lesson-content table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
}

.lesson-content table td {
    border: 1px solid #e2e8f0;
    padding: 12px 16px;
}

.lesson-content table tr:nth-child(even) {
    background: #f8fafc;
}

.lesson-content table tr:hover {
    background: #f1f5f9;
}

/* ========================================
   BLOCKQUOTE IMPROVEMENTS
   ======================================== */

.lesson-content blockquote {
    border-left: 4px solid #667eea;
    padding: 15px 20px;
    margin: 20px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #475569;
}

.lesson-content blockquote p {
    margin: 0;
}

/* ========================================
   ACCORDION STYLES (TinyMCE)
   ======================================== */

.lesson-content details {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin: 15px 0;
    overflow: hidden;
}

.lesson-content details summary {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 15px 20px;
    cursor: pointer;
    font-weight: 600;
    color: #334155;
    transition: background 0.2s ease;
}

.lesson-content details summary:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.lesson-content details[open] summary {
    border-bottom: 1px solid #e2e8f0;
}

.lesson-content details > div,
.lesson-content details > p {
    padding: 15px 20px;
}

.lesson-img-right {
    float: right;
    margin: 0 0 12px 16px;
    max-width: 200px;
    max-height: 300px;
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
@media (max-width: 576px) {
    .lesson-img-right {
        float: none;
        display: block;
        margin: 0 auto 12px auto;
        max-width: 180px;
        max-height: 250px;
    }
}
