/* =============================================================================
   PORTACOURSE ENHANCED SCORM PLAYER - STYLES.CSS
   Modern, Professional Learning Module Interface
   
   Design Direction: "Focused Scholar" - Clean, sophisticated, calm yet engaging
   - Soft neutral backgrounds with strategic color accents
   - Refined typography with excellent readability
   - Subtle animations that guide without distraction
   - Professional depth through layered shadows
   ============================================================================= */

/* -----------------------------------------------------------------------------
   GOOGLE FONTS IMPORT
   Using DM Sans (clean, modern body) + Fraunces (elegant headings)
   ----------------------------------------------------------------------------- */

/* -----------------------------------------------------------------------------
   CSS CUSTOM PROPERTIES (Design Tokens)
   ----------------------------------------------------------------------------- */
:root {
    /* Primary Palette - Deep Teal to Slate */
    --primary-50: #f0fdfa;
    --primary-100: #ccfbf1;
    --primary-200: #99f6e4;
    --primary-300: #5eead4;
    --primary-400: #2dd4bf;
    --primary-500: #14b8a6;
    --primary-600: #0d9488;
    --primary-700: #0f766e;
    --primary-800: #115e59;
    --primary-900: #134e4a;
    
    /* Accent - Warm Amber for CTAs and highlights */
    --accent-400: #fbbf24;
    --accent-500: #f59e0b;
    --accent-600: #d97706;
    
    /* Neutrals - Warm Gray */
    --neutral-25: #fdfcfb;
    --neutral-50: #faf9f7;
    --neutral-100: #f5f3f0;
    --neutral-200: #e8e5e0;
    --neutral-300: #d6d2ca;
    --neutral-400: #a8a29e;
    --neutral-500: #78716c;
    --neutral-600: #57534e;
    --neutral-700: #44403c;
    --neutral-800: #292524;
    --neutral-900: #1c1917;
    
    /* Semantic Colors */
    --success-50: #ecfdf5;
    --success-100: #d1fae5;
    --success-500: #10b981;
    --success-600: #059669;
    --success-700: #047857;
    
    --error-50: #fef2f2;
    --error-100: #fee2e2;
    --error-500: #ef4444;
    --error-600: #dc2626;
    --error-700: #b91c1c;
    
    --warning-50: #fffbeb;
    --warning-500: #f59e0b;
    
    --info-50: #eff6ff;
    --info-500: #3b82f6;
    
    /* Typography */
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
    
    /* Spacing Scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    
    /* Shadows - Layered for depth */
    --shadow-xs: 0 1px 2px rgba(28, 25, 23, 0.04);
    --shadow-sm: 0 1px 3px rgba(28, 25, 23, 0.06), 0 1px 2px rgba(28, 25, 23, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(28, 25, 23, 0.07), 0 2px 4px -1px rgba(28, 25, 23, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(28, 25, 23, 0.08), 0 4px 6px -2px rgba(28, 25, 23, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(28, 25, 23, 0.1), 0 10px 10px -5px rgba(28, 25, 23, 0.03);
    --shadow-inner: inset 0 2px 4px 0 rgba(28, 25, 23, 0.04);
    
    /* Focus Ring */
    --ring-color: rgba(20, 184, 166, 0.4);
    --ring-offset: 2px;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Layout */
    --nav-width: 300px;
    --header-height: 72px;
    --footer-height: 76px;
    --content-max-width: 860px;
}

/* -----------------------------------------------------------------------------
   RESET & BASE
   ----------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--neutral-800);
    background: linear-gradient(135deg, var(--neutral-50) 0%, var(--neutral-100) 100%);
    min-height: 100vh;
    min-height: 100dvh; /* Use dynamic viewport height for mobile browsers */
    overflow: hidden;
}

/* Subtle background texture */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.015;
    pointer-events: none;
    z-index: 0;
}

/* Selection styling */
::selection {
    background: var(--primary-200);
    color: var(--primary-900);
}

/* Focus styles */
:focus-visible {
    outline: none;
    box-shadow: 0 0 0 var(--ring-offset) var(--neutral-25), 0 0 0 calc(var(--ring-offset) + 2px) var(--ring-color);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--neutral-100);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--neutral-300);
    border-radius: var(--radius-full);
    border: 2px solid var(--neutral-100);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neutral-400);
}

/* -----------------------------------------------------------------------------
   TYPOGRAPHY
   ----------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.3;
    color: var(--neutral-900);
    letter-spacing: -0.01em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; font-weight: 500; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

p {
    margin-bottom: var(--space-4);
    color: var(--neutral-700);
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--primary-600);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-700);
    text-decoration: underline;
}

strong, b {
    font-weight: 600;
    color: var(--neutral-800);
}

/* -----------------------------------------------------------------------------
   LAYOUT STRUCTURE
   ----------------------------------------------------------------------------- */
.h5p-container {
    height: 100vh;
    height: 100dvh; /* Use dynamic viewport height for mobile browsers */
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.stage {
    display: flex;
    flex-direction: column;
    height: 100%;
    opacity: 0;
    animation: stageReveal 0.6s ease-out forwards;
}

@keyframes stageReveal {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.hidden {
    display: none !important;
}

/* -----------------------------------------------------------------------------
   LOADER
   ----------------------------------------------------------------------------- */
.loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: var(--space-6);
    color: var(--neutral-500);
    font-size: 1.125rem;
    font-weight: 500;
}

.loader::before {
    content: '';
    width: 48px;
    height: 48px;
    border: 3px solid var(--neutral-200);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* -----------------------------------------------------------------------------
   HEADER
   ----------------------------------------------------------------------------- */
.module-header {
    height: var(--header-height);
    background: var(--neutral-25);
    border-bottom: 1px solid var(--neutral-200);
    padding: 0 var(--space-8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    position: relative;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.module-header h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--neutral-800);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.module-header h1::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--primary-500);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

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

/* Progress Bar */
.progress-container {
    width: 200px;
    height: 6px;
    background: var(--neutral-200);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-500), var(--primary-400));
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius-full);
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

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

/* -----------------------------------------------------------------------------
   CONTENT LAYOUT
   ----------------------------------------------------------------------------- */
.content-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: var(--neutral-100);
}

/* -----------------------------------------------------------------------------
   SIDEBAR NAVIGATION
   ----------------------------------------------------------------------------- */
.sidebar {
    width: var(--nav-width);
    background: var(--neutral-25);
    border-right: 1px solid var(--neutral-200);
    overflow-y: auto;
    flex-shrink: 0;
    padding: var(--space-4) 0;
}

.sidebar ul {
    list-style: none;
}

.nav-item {
    padding: var(--space-4) var(--space-6);
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all var(--transition-base);
    font-size: 0.9375rem;
    color: var(--neutral-600);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin: var(--space-1) var(--space-3);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--primary-500);
    border-radius: var(--radius-full);
    transition: height var(--transition-base);
}

.nav-item:hover {
    background: var(--neutral-100);
    color: var(--neutral-800);
}

.nav-item:hover::before {
    height: 60%;
}

.nav-item.active {
    background: var(--primary-50);
    color: var(--primary-700);
    font-weight: 500;
}

.nav-item.active::before {
    height: 100%;
    background: var(--primary-500);
}

.nav-item.completed {
    color: var(--neutral-500);
}

.nav-item .status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--success-100);
    color: var(--success-600);
    font-size: 0.75rem;
    font-weight: 600;
}

/* -----------------------------------------------------------------------------
   MAIN CONTENT AREA
   ----------------------------------------------------------------------------- */
.content-area {
    flex: 1;
    padding: var(--space-8);
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.widget-wrapper {
    width: 100%;
    max-width: var(--content-max-width);
    background: var(--neutral-25);
    border-radius: var(--radius-xl);
    padding: var(--space-10);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--neutral-200);
    animation: slideUp 0.4s ease-out;
    position: relative;
    overflow: hidden;
}

.widget-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-400), var(--primary-600));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.widget-wrapper:hover::before {
    opacity: 1;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* -----------------------------------------------------------------------------
   FOOTER
   ----------------------------------------------------------------------------- */
.module-footer {
    height: var(--footer-height);
    background: var(--neutral-25);
    border-top: 1px solid var(--neutral-200);
    padding: 0 var(--space-8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    box-shadow: 0 -4px 6px -1px rgba(28, 25, 23, 0.03);
}

#slide-counter {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--neutral-500);
    background: var(--neutral-100);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
}

/* Navigation Buttons */
.nav-btn {
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-md);
    border: 1px solid var(--neutral-300);
    background: var(--neutral-25);
    color: var(--neutral-700);
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.nav-btn:hover:not(:disabled) {
    background: var(--neutral-100);
    border-color: var(--neutral-400);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.nav-btn:active:not(:disabled) {
    transform: translateY(0);
}

.nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.nav-btn.primary,
#btn-next {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    color: white;
    border-color: var(--primary-700);
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.15);
}

.nav-btn.primary:hover:not(:disabled),
#btn-next:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.15);
}

/* Button Icons */
#btn-prev::before {
    content: '←';
    font-size: 1.1em;
}

#btn-next::after {
    content: '→';
    font-size: 1.1em;
}

#btn-next.finish-btn::after {
    content: '✓';
    font-size: 1.1em;
}

/* -----------------------------------------------------------------------------
   TEXT CONTENT (H5P.Text)
   ----------------------------------------------------------------------------- */
.h5p-text h2,
.widget-wrapper > h2:first-child {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--neutral-900);
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 2px solid var(--neutral-200);
    position: relative;
}

.h5p-text-content,
.h5p-text p {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--neutral-700);
}

.h5p-text-content p {
    margin-bottom: var(--space-5);
}

.h5p-text-content ul,
.h5p-text-content ol {
    margin: var(--space-4) 0;
    padding-left: var(--space-6);
}

.h5p-text-content li {
    margin-bottom: var(--space-2);
}

.h5p-text-content blockquote {
    border-left: 4px solid var(--primary-400);
    padding: var(--space-4) var(--space-6);
    margin: var(--space-6) 0;
    background: var(--primary-50);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--neutral-600);
}

.h5p-text-content code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--neutral-100);
    padding: 0.125em 0.375em;
    border-radius: var(--radius-sm);
    color: var(--primary-700);
}

.h5p-text-content pre {
    background: var(--neutral-800);
    color: var(--neutral-100);
    padding: var(--space-5);
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: var(--space-5) 0;
}

.h5p-text-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* -----------------------------------------------------------------------------
   ACCORDION (H5P.Accordion)
   ----------------------------------------------------------------------------- */
.h5p-accordion-item {
    border: 1px solid var(--neutral-200);
    margin-bottom: var(--space-3);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--neutral-25);
    transition: box-shadow var(--transition-base), border-color var(--transition-base);
}

.h5p-accordion-item:hover {
    border-color: var(--neutral-300);
    box-shadow: var(--shadow-sm);
}

.h5p-accordion-header {
    padding: var(--space-5) var(--space-6);
    background: var(--neutral-50);
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    color: var(--neutral-800);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background var(--transition-base);
    user-select: none;
}

.h5p-accordion-header:hover {
    background: var(--neutral-100);
}

.h5p-accordion-header .accordion-title {
    flex: 1;
}

.h5p-accordion-header .accordion-icon {
    transition: transform var(--transition-base), color var(--transition-base);
    color: var(--neutral-400);
    font-size: 0.875rem;
    display: inline-block;
}

.h5p-accordion-item.open .h5p-accordion-header {
    background: var(--primary-50);
    color: var(--primary-800);
}

.h5p-accordion-item.open .h5p-accordion-header .accordion-icon {
    transform: rotate(180deg);
    color: var(--primary-500);
}

.h5p-accordion-content {
    padding: 0 var(--space-6);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-out, padding 0.35s ease-out;
    line-height: 1.7;
    color: var(--neutral-600);
}

.h5p-accordion-item.open .h5p-accordion-content {
    padding: var(--space-5) var(--space-6);
    max-height: 800px;
    border-top: 1px solid var(--neutral-200);
}

/* -----------------------------------------------------------------------------
   VIDEO (H5P.Video)
   ----------------------------------------------------------------------------- */
.h5p-video video,
.h5p-video iframe {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.h5p-video video {
    background: var(--neutral-900);
}

/* -----------------------------------------------------------------------------
   IMAGE (H5P.Image)
   ----------------------------------------------------------------------------- */
.h5p-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: block;
    margin: 0 auto;
}

/* -----------------------------------------------------------------------------
   IMAGE SLIDER (H5P.ImageSlider)
   ----------------------------------------------------------------------------- */
.h5p-slider-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    background: var(--neutral-900);
}

.h5p-slider-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.h5p-slide {
    min-width: 100%;
    box-sizing: border-box;
}

.h5p-slide img {
    width: 100%;
    display: block;
    object-fit: cover;
}

.h5p-slider-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 var(--space-4);
    pointer-events: none;
    background: none;
    border: none;
}

.h5p-slider-btn {
    pointer-events: auto;
    background: rgba(255,255,255,0.95);
    color: var(--neutral-800);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
}

.h5p-slider-btn:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

/* -----------------------------------------------------------------------------
   QUIZ STYLES - SHARED
   ----------------------------------------------------------------------------- */
.h5p-question-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.h5p-question-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    color: white;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.2);
}

.h5p-question-header h2 {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 500;
    color: var(--neutral-800);
    line-height: 1.4;
    margin: 0;
    padding: 0;
    border: none;
}

.h5p-instruction {
    font-size: 0.9375rem;
    color: var(--neutral-500);
    margin-bottom: var(--space-6);
    padding: var(--space-3) var(--space-4);
    background: var(--neutral-100);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary-400);
}

/* Feedback Display */
.h5p-feedback {
    margin-top: var(--space-6);
    padding: var(--space-5);
    border-radius: var(--radius-md);
    background: var(--neutral-100);
    border-left: 4px solid var(--neutral-400);
    font-weight: 500;
    animation: feedbackSlide 0.3s ease-out;
}

@keyframes feedbackSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.h5p-feedback.correct {
    background: var(--success-50);
    border-left-color: var(--success-500);
    color: var(--success-700);
}

.h5p-feedback.incorrect {
    background: var(--error-50);
    border-left-color: var(--error-500);
    color: var(--error-700);
}

/* -----------------------------------------------------------------------------
   MULTIPLE CHOICE (H5P.MultiChoice)
   ----------------------------------------------------------------------------- */
.h5p-option {
    padding: var(--space-5);
    border: 2px solid var(--neutral-200);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all var(--transition-base);
    background: var(--neutral-25);
    position: relative;
    overflow: hidden;
}

.h5p-option::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: var(--primary-100);
    transition: width var(--transition-base);
    z-index: 0;
}

.h5p-option:hover {
    border-color: var(--primary-300);
    box-shadow: var(--shadow-sm);
}

.h5p-option:hover::before {
    width: 100%;
}

.h5p-option.selected {
    border-color: var(--primary-500);
    background: var(--primary-50);
}

.h5p-option.selected::before {
    width: 100%;
    background: var(--primary-100);
}

.h5p-option.correct {
    border-color: var(--success-500);
    background: var(--success-50);
}

.h5p-option.correct::before {
    width: 100%;
    background: var(--success-100);
}

.h5p-option.incorrect {
    border-color: var(--error-500);
    background: var(--error-50);
}

.h5p-option.incorrect::before {
    width: 100%;
    background: var(--error-100);
}

.h5p-option-marker {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border: 2px solid var(--neutral-300);
    border-radius: var(--radius-sm);
    margin-right: var(--space-4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--neutral-500);
    background: var(--neutral-25);
    transition: all var(--transition-base);
    position: relative;
    z-index: 1;
}

.h5p-option:hover .h5p-option-marker {
    border-color: var(--primary-400);
    color: var(--primary-600);
}

.h5p-option.selected .h5p-option-marker {
    background: var(--primary-500);
    border-color: var(--primary-500);
    color: white;
}

.h5p-option.correct .h5p-option-marker {
    background: var(--success-500);
    border-color: var(--success-500);
    color: white;
}

.h5p-option.incorrect .h5p-option-marker {
    background: var(--error-500);
    border-color: var(--error-500);
    color: white;
}

.h5p-option-text {
    font-size: 1rem;
    color: var(--neutral-700);
    position: relative;
    z-index: 1;
}

.h5p-option.selected .h5p-option-text {
    color: var(--primary-800);
}

.h5p-option.correct .h5p-option-text {
    color: var(--success-800);
}

.h5p-option.incorrect .h5p-option-text {
    color: var(--error-800);
}

/* -----------------------------------------------------------------------------
   TRUE/FALSE (H5P.TrueFalse)
   ----------------------------------------------------------------------------- */
.h5p-true-false-options {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    margin: var(--space-8) 0;
}

.h5p-tf-btn {
    padding: var(--space-5) var(--space-10);
    font-size: 1.125rem;
    font-family: var(--font-body);
    font-weight: 600;
    border: 2px solid var(--neutral-300);
    border-radius: var(--radius-lg);
    background: var(--neutral-25);
    color: var(--neutral-700);
    cursor: pointer;
    transition: all var(--transition-base);
    min-width: 140px;
}

.h5p-tf-btn:hover:not(:disabled) {
    border-color: var(--primary-400);
    background: var(--primary-50);
    color: var(--primary-700);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.h5p-tf-btn:active:not(:disabled) {
    transform: translateY(0);
}

.h5p-tf-btn.selected {
    background: var(--primary-500);
    border-color: var(--primary-500);
    color: white;
    box-shadow: var(--shadow-md);
}

.h5p-tf-btn:disabled {
    cursor: not-allowed;
}

/* -----------------------------------------------------------------------------
   FILL IN BLANKS (H5P.Blanks)
   ----------------------------------------------------------------------------- */
.h5p-blanks-container {
    line-height: 2.4;
    font-size: 1.125rem;
    margin-bottom: var(--space-6);
    padding: var(--space-6);
    background: var(--neutral-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--neutral-200);
}

.h5p-blank-input {
    border: none;
    border-bottom: 2px solid var(--neutral-400);
    background: transparent;
    padding: var(--space-1) var(--space-2);
    width: 140px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 500;
    color: var(--primary-700);
    transition: border-color var(--transition-base), background var(--transition-base);
    margin: 0 var(--space-2);
}

.h5p-blank-input:focus {
    outline: none;
    border-bottom-color: var(--primary-500);
    background: var(--primary-50);
}

.h5p-blank-input.correct {
    border-bottom-color: var(--success-500);
    color: var(--success-700);
    background: var(--success-50);
}

.h5p-blank-input.incorrect {
    border-bottom-color: var(--error-500);
    color: var(--error-600);
    background: var(--error-50);
    text-decoration: line-through;
}

/* -----------------------------------------------------------------------------
   DRAG AND DROP (H5P.DragQuestion)
   ----------------------------------------------------------------------------- */
.h5p-dnd-container {
    display: flex;
    gap: var(--space-6);
    margin-top: var(--space-6);
    flex-wrap: wrap;
}

.h5p-dnd-zones {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    min-width: 300px;
}

.h5p-dropzone {
    background: var(--neutral-50);
    border: 2px dashed var(--neutral-300);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    min-height: 120px;
    transition: all var(--transition-base);
}

.h5p-dropzone h3 {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--neutral-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-3);
}

.h5p-dropzone:hover {
    border-color: var(--primary-400);
    background: var(--primary-50);
}

.h5p-dnd-items {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    background: var(--neutral-100);
    padding: var(--space-5);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    min-width: 200px;
}

.h5p-draggable {
    padding: var(--space-4);
    background: var(--neutral-25);
    border: 1px solid var(--neutral-300);
    border-radius: var(--radius-md);
    cursor: grab;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    font-weight: 500;
}

.h5p-draggable:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--primary-400);
}

.h5p-draggable:active {
    cursor: grabbing;
}

.h5p-draggable.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

.h5p-draggable.correct {
    border-color: var(--success-500);
    background: var(--success-50);
    color: var(--success-700);
}

.h5p-draggable.incorrect {
    border-color: var(--error-500);
    background: var(--error-50);
    color: var(--error-700);
}

/* -----------------------------------------------------------------------------
   IMAGE HOTSPOTS (H5P.ImageHotspots)
   ----------------------------------------------------------------------------- */
.h5p-hotspot-container {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--neutral-900);
    box-shadow: var(--shadow-lg);
}

.h5p-hotspot-marker {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    border: 3px solid var(--primary-500);
    color: var(--primary-600);
    font-weight: 700;
    font-size: 1.25rem;
    cursor: pointer;
    transform: translate(-50%, -50%);
    z-index: 10;
    transition: all var(--transition-bounce);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.h5p-hotspot-marker:hover {
    transform: translate(-50%, -50%) scale(1.15);
    background: var(--primary-500);
    color: white;
}

.h5p-hotspot-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: var(--neutral-25);
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 320px;
    max-width: 90%;
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-base);
    z-index: 20;
    border: 1px solid var(--neutral-200);
}

.h5p-hotspot-popup.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

/* -----------------------------------------------------------------------------
   TIMELINE (H5P.Timeline)
   ----------------------------------------------------------------------------- */
.h5p-timeline-container {
    position: relative;
    padding-left: 40px;
    margin-left: var(--space-4);
    margin-top: var(--space-6);
}

.h5p-timeline-container::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--primary-400), var(--primary-200));
    border-radius: var(--radius-full);
}

.h5p-timeline-item {
    position: relative;
    margin-bottom: var(--space-8);
    animation: timelineReveal 0.5s ease-out backwards;
}

.h5p-timeline-item:nth-child(1) { animation-delay: 0.1s; }
.h5p-timeline-item:nth-child(2) { animation-delay: 0.2s; }
.h5p-timeline-item:nth-child(3) { animation-delay: 0.3s; }
.h5p-timeline-item:nth-child(4) { animation-delay: 0.4s; }
.h5p-timeline-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes timelineReveal {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.h5p-tl-marker {
    position: absolute;
    left: -34px;
    top: var(--space-4);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-500);
    border: 4px solid var(--neutral-25);
    box-shadow: 0 0 0 3px var(--primary-200);
    z-index: 1;
}

.h5p-tl-date {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary-600);
    margin-bottom: var(--space-2);
    background: var(--primary-100);
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
}

.h5p-tl-content {
    background: var(--neutral-25);
    padding: var(--space-5) var(--space-6);
    border-radius: var(--radius-md);
    border: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.h5p-tl-content:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-200);
}

.h5p-tl-content h3 {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--neutral-800);
    margin-bottom: var(--space-2);
}

.h5p-tl-content p {
    color: var(--neutral-600);
    margin: 0;
    line-height: 1.6;
}

.h5p-tl-content img {
    margin-top: var(--space-4);
    border-radius: var(--radius-md);
    max-width: 100%;
}

/* -----------------------------------------------------------------------------
   INTERACTIVE VIDEO (H5P.InteractiveVideo)
   ----------------------------------------------------------------------------- */
.h5p-iv-container {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--neutral-900);
}

.h5p-iv-container video,
.h5p-iv-container iframe {
    width: 100%;
    display: block;
}

.h5p-iv-assets {
    margin-top: var(--space-6);
    padding: var(--space-6);
    background: linear-gradient(135deg, var(--neutral-50) 0%, var(--neutral-100) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--neutral-200);
}

.h5p-iv-assets > div {
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--neutral-200);
}

.h5p-iv-assets > div:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* -----------------------------------------------------------------------------
   UTILITY CLASSES
   ----------------------------------------------------------------------------- */
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

.text-center { text-align: center; }
.text-muted { color: var(--neutral-500); }

/* -----------------------------------------------------------------------------
   RESPONSIVE DESIGN
   ----------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    :root {
        --nav-width: 260px;
    }
    
    .content-area {
        padding: var(--space-6);
    }
    
    .widget-wrapper {
        padding: var(--space-8);
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 64px;
        --footer-height: 68px;
    }

    /* Show mobile menu toggle */
    .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
    }

    /* Sidebar becomes overlay */
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 85%;
        max-width: 320px;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform var(--transition-slow);
        box-shadow: var(--shadow-xl);
        display: flex !important;
        flex-direction: column;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-header {
        display: flex !important;
    }

    .sidebar-overlay {
        display: block !important;
    }

    .sidebar-overlay.hidden {
        display: none !important;
    }
    
    .sidebar-overlay:not(.hidden) {
        animation: fadeIn 0.2s ease-out;
    }
    
    #nav-list {
        flex: 1;
        overflow-y: auto;
    }
    
    /* Prevent body scroll when sidebar open */
    body.sidebar-open {
        overflow: hidden;
    }
    
    .module-header {
        padding: 0 var(--space-4);
    }
    
    .module-header h1 {
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 200px;
    }
    
    .progress-container {
        width: 80px;
    }
    
    .content-area {
        padding: var(--space-4);
    }
    
    .widget-wrapper {
        padding: var(--space-5);
        border-radius: var(--radius-lg);
    }
    
    .h5p-question-header {
        flex-direction: column;
        gap: var(--space-3);
    }
    
    .h5p-question-icon {
        width: 44px;
        height: 44px;
        min-width: 44px;
        font-size: 1.25rem;
    }
    
    .h5p-dnd-container {
        flex-direction: column;
    }
    
    .h5p-true-false-options {
        flex-direction: column;
        align-items: stretch;
    }
    
    .h5p-tf-btn {
        min-width: 100%;
    }
    
    .module-footer {
        padding: 0 var(--space-4);
        gap: var(--space-3);
    }

    .nav-btn {
        padding: var(--space-3) var(--space-5);
        font-size: 0.9375rem;
        min-width: 90px;
    }

    .footer-center {
        flex-shrink: 0;
    }
    
    .error-actions {
        flex-direction: column;
    }
    
    .modal-content {
        margin: var(--space-4);
    }
}

@media (max-width: 480px) {
    .h5p-option {
        padding: var(--space-4);
    }

    .h5p-option-marker {
        width: 28px;
        height: 28px;
        min-width: 28px;
        font-size: 0.75rem;
    }

    .h5p-blank-input {
        width: 100px;
    }

    .h5p-timeline-container {
        padding-left: 30px;
    }

    .h5p-tl-marker {
        left: -24px;
        width: 14px;
        height: 14px;
    }

    /* Improve footer layout on very small screens */
    .module-footer {
        padding: 0 var(--space-2);
    }

    .nav-btn {
        padding: var(--space-2) var(--space-3);
        font-size: 0.875rem;
        min-width: 75px;
    }

    #slide-counter {
        font-size: 0.75rem;
        padding: var(--space-1) var(--space-2);
    }

    .module-header h1 {
        font-size: 0.875rem;
        max-width: 150px;
    }

    .progress-container {
        width: 60px;
    }
}

/* -----------------------------------------------------------------------------
   SKIP LINK (Accessibility)
   ----------------------------------------------------------------------------- */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-600);
    color: white;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-md);
    z-index: 9999;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: var(--space-4);
}

/* -----------------------------------------------------------------------------
   ERROR SCREEN
   ----------------------------------------------------------------------------- */
.error-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: var(--space-8);
    background: var(--neutral-50);
}

.error-content {
    max-width: 500px;
    text-align: center;
    background: var(--neutral-25);
    padding: var(--space-10);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.error-icon {
    font-size: 4rem;
    margin-bottom: var(--space-4);
    color: var(--warning-500);
}

.error-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--neutral-800);
    margin-bottom: var(--space-4);
}

.error-message {
    color: var(--neutral-600);
    margin-bottom: var(--space-6);
}

.error-actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    margin-bottom: var(--space-6);
}

.error-details {
    text-align: left;
    background: var(--neutral-100);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

.error-details summary {
    cursor: pointer;
    color: var(--neutral-500);
    margin-bottom: var(--space-2);
}

.error-details pre {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    overflow-x: auto;
    color: var(--neutral-600);
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

/* -----------------------------------------------------------------------------
   MODAL DIALOG
   ----------------------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(28, 25, 23, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    padding: var(--space-4);
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    background: var(--neutral-25);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    max-width: 400px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease-out;
}

.modal-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: var(--space-4);
    color: var(--neutral-800);
}

.modal-message {
    color: var(--neutral-600);
    margin-bottom: var(--space-6);
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: flex-end;
}

/* -----------------------------------------------------------------------------
   MOBILE MENU TOGGLE
   ----------------------------------------------------------------------------- */
.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--neutral-300);
    background: var(--primary-500);
    border-radius: var(--radius-md);
    cursor: pointer;
    position: relative;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
}

.menu-toggle:hover {
    background: var(--primary-600);
    box-shadow: var(--shadow-lg);
}

.menu-toggle:active {
    transform: scale(0.95);
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
    display: block;
    width: 20px;
    height: 3px;
    background: white;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: all var(--transition-fast);
    border-radius: 2px;
}

.menu-icon {
    top: 50%;
    transform: translate(-50%, -50%);
}

.menu-icon::before {
    content: '';
    top: -6px;
}

.menu-icon::after {
    content: '';
    top: 6px;
}

.menu-toggle[aria-expanded="true"] .menu-icon {
    background: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-icon::before {
    top: 0;
    transform: translateX(-50%) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-icon::after {
    top: 0;
    transform: translateX(-50%) rotate(-45deg);
}

.progress-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--neutral-500);
    min-width: 36px;
    text-align: right;
}

/* -----------------------------------------------------------------------------
   SIDEBAR ENHANCEMENTS
   ----------------------------------------------------------------------------- */
.sidebar-header {
    display: none;
    padding: var(--space-4) var(--space-6);
    border-bottom: 2px solid var(--primary-200);
    background: var(--primary-50);
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
}

.sidebar-title {
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--primary-800);
    flex: 1;
}

.sidebar-close {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--error-100);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--error-600);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    font-weight: bold;
    flex-shrink: 0;
}

.sidebar-close:hover {
    background: var(--error-500);
    color: white;
    transform: scale(1.1);
}

.sidebar-footer {
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--neutral-200);
    margin-top: auto;
}

.score-display {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--neutral-600);
    background: var(--neutral-100);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    text-align: center;
}

.score-display span {
    font-weight: 600;
    color: var(--primary-600);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    cursor: pointer;
    backdrop-filter: blur(2px);
}

/* -----------------------------------------------------------------------------
   FOOTER ENHANCEMENTS
   ----------------------------------------------------------------------------- */
.footer-center {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

/* -----------------------------------------------------------------------------
   CONTENT HELPERS
   ----------------------------------------------------------------------------- */
.empty-content {
    color: var(--neutral-500);
    font-style: italic;
    padding: var(--space-6);
    text-align: center;
    background: var(--neutral-100);
    border-radius: var(--radius-md);
}

.render-error,
.unsupported-content {
    padding: var(--space-6);
    background: var(--warning-50);
    border: 1px solid var(--warning-500);
    border-radius: var(--radius-md);
}

.render-error h2,
.unsupported-content h2 {
    color: var(--neutral-800);
    margin-bottom: var(--space-3);
}

.render-error details {
    margin-top: var(--space-4);
}

.render-error pre {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    background: var(--neutral-100);
    padding: var(--space-3);
    border-radius: var(--radius-sm);
    overflow-x: auto;
}

/* -----------------------------------------------------------------------------
   NOSCRIPT FALLBACK
   ----------------------------------------------------------------------------- */
.noscript-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: var(--space-8);
    text-align: center;
    background: var(--neutral-50);
}

.noscript-message h1 {
    font-family: var(--font-display);
    margin-bottom: var(--space-4);
}

.noscript-message p {
    max-width: 400px;
    color: var(--neutral-600);
}

/* -----------------------------------------------------------------------------
   IMAGE SLIDER ENHANCEMENTS
   ----------------------------------------------------------------------------- */
.h5p-slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    padding: var(--space-4) 0;
}

.h5p-slider-counter {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--neutral-500);
    min-width: 60px;
    text-align: center;
}

.h5p-slider-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--neutral-300);
    background: var(--neutral-25);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--neutral-600);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.h5p-slider-btn:hover:not(:disabled) {
    background: var(--neutral-100);
    border-color: var(--neutral-400);
}

.h5p-slider-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* -----------------------------------------------------------------------------
   INTERACTIVE VIDEO ENHANCEMENTS
   ----------------------------------------------------------------------------- */
.h5p-iv-asset-item {
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--neutral-200);
}

.h5p-iv-asset-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* -----------------------------------------------------------------------------
   FEEDBACK ENHANCEMENTS
   ----------------------------------------------------------------------------- */
.h5p-feedback {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}

.feedback-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.h5p-feedback.correct .feedback-icon {
    color: var(--success-600);
}

.h5p-feedback.incorrect .feedback-icon {
    color: var(--error-600);
}

/* -----------------------------------------------------------------------------
   FIGURE AND CAPTION
   ----------------------------------------------------------------------------- */
.h5p-image-figure {
    margin: 0;
}

.h5p-image-figure figcaption {
    margin-top: var(--space-3);
    font-size: 0.875rem;
    color: var(--neutral-500);
    text-align: center;
    font-style: italic;
}

.img-attribution {
    margin: 0.2rem 0 0;
    font-size: 0.65rem;
    color: var(--neutral-400);
    text-align: right;
    line-height: 1.2;
}

/* -----------------------------------------------------------------------------
   VIDEO CONTAINER
   ----------------------------------------------------------------------------- */
.h5p-video-container {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--neutral-900);
}

.h5p-video-container video,
.h5p-video-container iframe {
    display: block;
    width: 100%;
}

/* -----------------------------------------------------------------------------
   PRINT STYLES
   ----------------------------------------------------------------------------- */
@media print {
    .sidebar,
    .module-footer,
    .nav-btn,
    .progress-container {
        display: none !important;
    }
    
    .content-wrapper {
        display: block;
    }
    
    .content-area {
        padding: 0;
    }
    
    .widget-wrapper {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}

/* -----------------------------------------------------------------------------
   ANIMATION PREFERENCES
   ----------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* -----------------------------------------------------------------------------
   HIGH CONTRAST MODE
   ----------------------------------------------------------------------------- */
@media (prefers-contrast: high) {
    :root {
        --primary-500: #0a7c72;
        --primary-600: #065f58;
        --neutral-200: #9ca3af;
        --neutral-300: #6b7280;
    }
    
    .h5p-option,
    .h5p-accordion-item,
    .widget-wrapper {
        border-width: 2px;
    }
    
    .h5p-feedback {
        border-left-width: 6px;
    }
}

/* PortACourse ver3: local type and restrained teaching interface. */
:root{--font-display:system-ui,-apple-system,"Segoe UI",sans-serif;--font-body:system-ui,-apple-system,"Segoe UI",sans-serif;--font-mono:ui-monospace,Consolas,monospace;--primary-50:#f3f3fb;--primary-100:#e9eafa;--primary-200:#d5d7f2;--primary-300:#b4b7e3;--primary-400:#9296d5;--primary-500:#5b60b7;--primary-600:#45499f;--primary-700:#363897;--primary-800:#2e307e;--primary-900:#252769;--neutral-25:#fff;--neutral-50:#f8f9fc;--neutral-100:#f1f3f8;--neutral-200:#dce0e9;--neutral-300:#c6ccda;--neutral-400:#8d96ac;--neutral-500:#68728a;--neutral-600:#555f76;--neutral-700:#3d465f;--neutral-800:#262e47;--neutral-900:#20253d;--shadow-sm:none;--shadow-md:none;--shadow-lg:none;--radius-lg:8px;--radius-xl:8px}
.module-header h1::before{display:none}.stage{animation:none;opacity:1;transform:none}.module-header,.module-footer{box-shadow:none}.h5p-text-image img{box-shadow:none!important}.h5p-option,.h5p-accordion-item{box-shadow:none}.h5p-text-content table{width:100%;border-collapse:collapse;font-size:15px;margin:20px 0}.h5p-text-content th,.h5p-text-content td{padding:14px;text-align:left;border:1px solid #dce0e9;vertical-align:top}.h5p-text-content th{background:#f3f4fa}.h5p-text-content ul,.h5p-text-content ol{padding-left:24px}.h5p-text-content li{margin-bottom:8px}.h5p-text-content .case-note{font-size:13px;color:#68728a}.h5p-hotspot-marker{min-width:44px;min-height:44px}.h5p-question-icon{border-radius:6px;background:#eef0fa}.h5p-tl-content{box-shadow:none;border:1px solid #dce0e9}.h5p-draggable[aria-pressed=true]{outline:3px solid #363897;outline-offset:2px}.dnd-place-button{font:inherit;font-size:12px;border:1px solid #bbc1d5;border-radius:4px;background:white;color:#363897;min-height:44px;padding:8px 12px;margin:8px 0}.dnd-place-button:disabled{opacity:.5}.dnd-status{font-size:13px;min-height:24px;color:#4d5872}.h5p-dnd-container{margin-top:12px}.h5p-draggable{min-height:44px}.sample-banner{height:50px;padding:0 24px;display:flex;align-items:center;justify-content:space-between;gap:15px;background:#fff;border-bottom:1px solid #dce0e9;font-size:12px;color:#5b6274}.sample-banner a,.sample-banner button{display:inline-flex;align-items:center;min-height:44px;color:#363897;font:inherit;background:none;border:0;cursor:pointer;text-decoration:underline;text-underline-offset:3px}.sample-banner .sample-banner-actions{display:flex;gap:24px}body.has-sample-banner .h5p-container{height:calc(100dvh - 50px);min-height:0}.nav-btn{min-height:44px}.sidebar .nav-item{min-height:44px}.h5p-hotspot-popup{max-width:min(340px,90%)}:is(button,a,[tabindex],input,summary):focus-visible{outline:3px solid #a76316;outline-offset:3px}
@media(max-width:700px){.sample-banner{padding:0 14px;font-size:11px}.sample-banner .sample-banner-actions{gap:14px}.module-header h1{font-size:15px}.h5p-text-content table{font-size:12px}.h5p-text-content th,.h5p-text-content td{padding:9px}.h5p-text-with-image{gap:18px!important}.h5p-text-image{width:100%}.h5p-hotspot-marker{min-width:44px;min-height:44px}.h5p-hotspot-popup{font-size:12px}.h5p-dnd-zones{grid-template-columns:1fr}.h5p-text-content h3{font-size:18px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

.skip-link{min-height:44px;padding:12px 18px}.sidebar-close{min-width:44px;min-height:44px}

.header-left{min-width:0;flex:1}.header-right{flex-shrink:0}.module-header h1{min-width:0}.module-header{gap:16px}@media(max-width:700px){.module-header h1{flex:1;max-width:none}.header-left{gap:10px}.header-right{gap:8px}.progress-container{width:50px}.progress-text{font-size:11px}}

.hotspot-description{margin-top:18px;padding:18px 20px;background:#f3f5fa;border-left:3px solid #757bb5;color:#3d465f;font-size:15px;line-height:1.65;border-radius:0 5px 5px 0}.hotspot-description[hidden]{display:none}.hotspot-description p{margin:8px 0 0}.h5p-hotspot-marker[aria-expanded=true]{background:#363897;color:#fff;border-color:#363897}@media(max-width:700px){.hotspot-description{font-size:14px;padding:16px}}

.module-header h1{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
