/* Class Wizard - Dark Theme Styles */

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e8f0fe;
    --bg-card: #ffffff;
    --bg-input: #f0f0f0;
    --bg-hover: #e8e8e8;
    --bg-dropdown: #ffffff;

    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #6b7280;
    --text-accent: #1a73e8;

    --border-color: #d0d0d0;
    --border-light: #e0e0e0;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.2);
}

/* Dark Theme (default) */
:root,
[data-theme="dark"] {
    /* Dark theme colors */
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-tertiary: #0f3460;
    --bg-card: #1f2937;
    --bg-input: #374151;
    --bg-hover: #2d3a4f;

    /* Text colors */
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --text-accent: #60a5fa;

    /* Accent colors */
    --accent-primary: #3b82f6;
    --accent-secondary: #8b5cf6;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;

    /* Border colors */
    --border-color: #374151;
    --border-light: #4b5563;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);

    /* Spacing */
    --panel-width: 280px;
    --header-height: 56px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;

    /* Menubar */
    --menubar-height: 32px;
    --bg-dropdown: #1f2937;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    overflow: hidden;
}

/* App Container */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Menu Bar */
.menubar {
    height: var(--menubar-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 8px;
    user-select: none;
    flex-shrink: 0;
}

.menubar-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2px;
}

.menubar-item {
    position: relative;
}

.menubar-button {
    background: transparent;
    border: none;
    padding: 4px 12px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    border-radius: 4px;
    transition: background-color var(--transition-fast);
}

.menubar-button:hover,
.menubar-item.active .menubar-button {
    background: var(--bg-hover);
}

.menubar-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-dropdown);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    padding: 4px 0;
    z-index: 1000;
    list-style: none;
    margin: 0;
}

.menubar-dropdown.show {
    display: block;
}

.menubar-dropdown li {
    margin: 0;
}

.menubar-dropdown button {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    text-align: left;
    gap: 10px;
    transition: background-color var(--transition-fast);
}

.menubar-dropdown button:hover {
    background: var(--bg-hover);
}

.menubar-dropdown button i {
    width: 16px;
    text-align: center;
    color: var(--text-muted);
}

.menubar-dropdown .shortcut {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 11px;
}

.menubar-dropdown .divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 8px;
}

/* Submenu */
.menubar-dropdown .submenu-item {
    position: relative;
}

.menubar-dropdown .submenu-item > button {
    justify-content: space-between;
}

.menubar-dropdown .submenu-arrow {
    font-size: 10px;
}

.menubar-dropdown .submenu {
    display: none;
    position: absolute;
    left: 100%;
    top: -4px;
    background: var(--bg-dropdown);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    padding: 4px 0;
    list-style: none;
    margin: 0;
}

.menubar-dropdown .submenu-item:hover > .submenu {
    display: block;
}

.menubar-status {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 12px;
}

.workflow-name {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 4px 12px;
    background: var(--bg-tertiary);
    border-radius: 4px;
}

/* Main Content */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Panels */
.left-panel,
.right-panel {
    width: var(--panel-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.right-panel {
    border-right: none;
    border-left: 1px solid var(--border-color);
    overflow-y: auto;
}

.panel-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.concept-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Search Box */
.search-box {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.search-box input {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* Concepts List */
.concepts-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.concept-item {
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 4px;
    transition: background var(--transition-fast);
}

.concept-item:hover {
    background: var(--bg-hover);
}

.concept-item.active {
    background: var(--bg-tertiary);
    border-left: 3px solid var(--accent-primary);
}

.concept-item-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.concept-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.concept-item-badge {
    padding: 2px 6px;
    background: var(--accent-success);
    color: white;
    border-radius: 4px;
    font-size: 0.625rem;
    font-weight: 600;
}

/* Center Panel */
.center-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    overflow: hidden;
}

.canvas-header {
    height: 48px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    flex-shrink: 0;
}

.slide-navigation {
    display: flex;
    align-items: center;
    gap: 12px;
}

.slide-indicator {
    font-size: 0.875rem;
    color: var(--text-secondary);
    min-width: 100px;
    text-align: center;
}

.canvas-actions {
    display: flex;
    gap: 8px;
}

/* Slide Canvas */
.slide-canvas {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: auto;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 0.875rem;
}

/* Slide Content */
.slide-content {
    width: 100%;
    max-width: 900px;
    background: var(--bg-card);
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    min-height: 500px;
}

.slide-title-input {
    width: 100%;
    font-size: 2rem;
    font-weight: 700;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-primary);
    padding: 8px 0;
    margin-bottom: 32px;
    transition: border-color var(--transition-fast);
}

.slide-title-input:focus {
    outline: none;
    border-bottom-color: var(--accent-primary);
}

.slide-title-input::placeholder {
    color: var(--text-muted);
}

.bullets-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bullet-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.bullet-marker {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    margin-top: 10px;
    flex-shrink: 0;
}

.bullet-input {
    flex: 1;
    font-size: 1.125rem;
    background: transparent;
    border: none;
    border-bottom: 1px solid transparent;
    color: var(--text-primary);
    padding: 4px 0;
    transition: border-color var(--transition-fast);
}

.bullet-input:focus {
    outline: none;
    border-bottom-color: var(--border-light);
}

.bullet-input::placeholder {
    color: var(--text-muted);
}

.bullet-delete {
    opacity: 0;
    background: none;
    border: none;
    color: var(--accent-danger);
    cursor: pointer;
    padding: 4px;
    font-size: 1.25rem;
    transition: opacity var(--transition-fast);
}

.bullet-item:hover .bullet-delete {
    opacity: 1;
}

.add-bullet-btn {
    margin-top: 16px;
}

/* Filmstrip */
.filmstrip {
    height: 100px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 12px;
    gap: 12px;
    overflow-x: auto;
    flex-shrink: 0;
}

.filmstrip-item {
    width: 120px;
    height: 76px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
    padding: 8px;
    transition: all var(--transition-fast);
    overflow: hidden;
}

.filmstrip-item:hover {
    border-color: var(--border-light);
}

.filmstrip-item.active {
    border-color: var(--accent-primary);
}

.filmstrip-title {
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.filmstrip-bullets {
    font-size: 0.5rem;
    color: var(--text-muted);
}

.filmstrip-bullet {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Settings Sections */
.settings-section {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.settings-section h3 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.setting-item {
    margin-bottom: 12px;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-item label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.setting-select {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
}

.setting-select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* Concept Info */
.concept-info {
    font-size: 0.875rem;
}

.info-label {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-bottom: 4px;
}

.info-value {
    color: var(--text-primary);
    margin-bottom: 12px;
}

/* Lesson Info */
.lesson-info {
    font-size: 0.875rem;
}

.lesson-info .info-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}

.lesson-info .info-label {
    color: var(--text-muted);
    font-size: 0.75rem;
    flex-shrink: 0;
    width: 80px;
}

.lesson-info .info-value {
    color: var(--text-primary);
    margin-bottom: 0;
    flex: 1;
}

/* Concept Lesson Move */
.concept-lesson-move {
    margin-top: 4px;
}

.concept-lesson-move select {
    width: 100%;
}

/* Narration Preview */
.narration-preview {
    font-size: 0.875rem;
    color: var(--text-secondary);
    max-height: 200px;
    overflow-y: auto;
}

.narration-item {
    padding: 8px;
    background: var(--bg-input);
    border-radius: 4px;
    margin-bottom: 8px;
}

.narration-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.narration-vocal {
    font-style: italic;
    color: var(--text-secondary);
}

/* Concept Text Preview */
.concept-text-preview {
    max-height: 300px;
    overflow-y: auto;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

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

.btn-primary {
    background: var(--accent-primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #2563eb;
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-hover);
}

.btn-danger {
    background: var(--accent-danger);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
}

.btn-success {
    background: var(--accent-success);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #059669;
}

/* SVG Container */
.svg-container {
    width: 100%;
    min-height: 400px;
    background: #000;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

.svg-container svg {
    max-width: 100%;
    max-height: 600px;
    width: auto;
    height: auto;
}

/* Editable SVG Text */
.editable-svg-text {
    cursor: pointer;
    transition: fill 0.15s ease, opacity 0.15s ease;
}

.editable-svg-text:hover {
    opacity: 0.8;
    filter: brightness(1.2);
}

.svg-text-editor {
    position: absolute;
    z-index: 100;
    padding: 4px 8px;
    border: 2px solid var(--accent-primary);
    border-radius: 4px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: inherit;
    outline: none;
    box-shadow: var(--shadow-md);
    min-width: 80px;
}

.svg-text-editor:focus {
    border-color: var(--accent-secondary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.svg-edit-hint {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.svg-container:hover .svg-edit-hint {
    opacity: 1;
}

/* Visualization Status */
.visualization-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    margin-top: 8px;
}

.visualization-status.has-svg {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-success);
}

.visualization-status.no-svg {
    background: rgba(107, 114, 128, 0.1);
    color: var(--text-muted);
}

.visualization-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.btn-link {
    background: none;
    color: var(--text-accent);
    padding: 4px 0;
}

.btn-link:hover:not(:disabled) {
    color: var(--accent-primary);
}

.btn-icon {
    padding: 6px 12px;
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-icon:hover:not(:disabled) {
    background: var(--bg-hover);
}

.btn-full {
    width: 100%;
    margin-bottom: 8px;
}

.btn-full:last-child {
    margin-bottom: 0;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    margin-top: 16px;
    font-size: 1rem;
    color: var(--text-primary);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 20px;
    background: var(--bg-card);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left: 4px solid var(--accent-success);
}

.toast.error {
    border-left: 4px solid var(--accent-danger);
}

.toast.info {
    border-left: 4px solid var(--accent-primary);
}

/* Presentation Player */
.presentation-player {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0a0a0f;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.presentation-slide {
    width: 90%;
    max-width: 1200px;
    padding: 60px;
    color: #ffffff;
    animation: fadeIn 0.3s ease;
}

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

.presentation-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 40px;
    color: #ffffff;
    border-bottom: 3px solid var(--accent-primary);
    padding-bottom: 20px;
}

.presentation-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
}

.presentation-bullets li {
    font-size: 1.5rem;
    line-height: 1.8;
    margin-bottom: 24px;
    padding-left: 40px;
    position: relative;
    color: #e0e0e0;
    opacity: 0;
    animation: bulletIn 0.4s ease forwards;
}

.presentation-bullets li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 12px;
    height: 12px;
    background: var(--accent-primary);
    border-radius: 50%;
}

.presentation-bullets li:nth-child(1) { animation-delay: 0.1s; }
.presentation-bullets li:nth-child(2) { animation-delay: 0.2s; }
.presentation-bullets li:nth-child(3) { animation-delay: 0.3s; }
.presentation-bullets li:nth-child(4) { animation-delay: 0.4s; }
.presentation-bullets li:nth-child(5) { animation-delay: 0.5s; }
.presentation-bullets li:nth-child(6) { animation-delay: 0.6s; }

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

/* Presentation SVG Container */
.pres-svg-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-height: 70vh;
    margin-top: 20px;
}

.pres-svg-container svg {
    max-width: 100%;
    max-height: 65vh;
    width: auto;
    height: auto;
}

.presentation-controls {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 24px;
    background: rgba(30, 30, 40, 0.9);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.presentation-player:hover .presentation-controls {
    opacity: 1;
}

.pres-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.pres-btn:hover {
    background: var(--accent-primary);
    transform: scale(1.1);
}

.pres-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.pres-progress {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    min-width: 60px;
    text-align: center;
}

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

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .left-panel,
    .right-panel {
        width: 240px;
    }
}

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

/* Narration Editor Styles */
.narration-editor {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.narration-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.narration-field label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.setting-input {
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
}

.setting-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.setting-textarea {
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.setting-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.narration-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-small i {
    margin-right: 4px;
}

.audio-status {
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.audio-status.has-audio {
    color: var(--accent-success);
}

.audio-status.no-audio {
    color: var(--text-muted);
}

.audio-status.outdated {
    color: var(--accent-warning);
    background: rgba(245, 158, 11, 0.1);
}

.audio-status i {
    font-size: 14px;
}

.audio-status .btn-link {
    padding: 2px 8px;
    font-size: 11px;
    margin-left: auto;
}

/* Slide Settings Section */
.slide-number-badge {
    background: var(--accent-primary);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

.slide-info-compact {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
}

.slide-info-compact .info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.slide-info-compact .info-row:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    margin-bottom: 4px;
}

.slide-info-compact .info-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.slide-info-compact .info-value {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.subsection-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 16px 0 8px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
}

.subsection-header i {
    font-size: 11px;
    color: var(--accent-primary);
}

.no-narration-message {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

.no-narration-message i {
    color: var(--accent-warning);
}

.no-narration-message .btn-link {
    margin-left: auto;
}

.settings-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-section h3 i {
    font-size: 14px;
    color: var(--accent-primary);
}

/* Lessons List Styles */
.lessons-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    overflow-y: auto;
    flex: 1;
}

.lesson-group {
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.lesson-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    cursor: pointer;
    background: var(--bg-tertiary);
    border-bottom: 1px solid transparent;
    transition: background 0.2s, border-color 0.2s;
    user-select: none;
}

.lesson-header:hover {
    background: var(--bg-hover);
}

.lesson-header.expanded {
    border-bottom-color: var(--border-color);
}

.lesson-header.selected {
    background: var(--accent-primary);
}

.lesson-header.selected .lesson-title {
    color: white;
}

.lesson-header.selected .lesson-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.lesson-header.selected .lesson-toggle {
    color: white;
}

.lesson-title {
    cursor: pointer;
}

.lesson-toggle {
    cursor: pointer;
}

.lesson-toggle {
    font-size: 10px;
    color: var(--text-muted);
    transition: transform 0.2s;
    width: 16px;
    text-align: center;
}

.lesson-header.expanded .lesson-toggle {
    transform: rotate(90deg);
}

.lesson-title {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lesson-count {
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-input);
    padding: 2px 6px;
    border-radius: 10px;
}

.lesson-concepts {
    display: none;
    flex-direction: column;
}

.lesson-concepts.expanded {
    display: flex;
}

.concept-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px 8px 28px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.15s;
}

.concept-item:last-child {
    border-bottom: none;
}

.concept-item:hover {
    background: var(--bg-hover);
}

.concept-item.active {
    background: var(--accent-primary);
    color: white;
}

.concept-item.active .concept-title {
    color: white;
}

.concept-item.active .concept-status {
    color: rgba(255, 255, 255, 0.8);
}

.concept-bullet {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
}

.concept-item.active .concept-bullet {
    background: white;
}

.concept-item.has-slides .concept-bullet {
    background: var(--accent-success);
}

.concept-title {
    flex: 1;
    font-size: 12px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.concept-status {
    font-size: 10px;
    color: var(--text-muted);
}

.concept-status i {
    margin-right: 2px;
}

/* ============================================================
   Course Picker Overlay
   ============================================================ */

.course-picker-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 2rem;
}

.course-picker-container {
    width: 100%;
    max-width: 720px;
}

.course-picker-header {
    text-align: center;
    margin-bottom: 2rem;
}

.course-picker-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.course-picker-header h1 i {
    color: var(--accent-primary);
    margin-right: 0.5rem;
}

.course-picker-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

.course-picker-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1rem;
}

.course-picker-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.course-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transition: border-color 0.15s;
}

.course-card:hover {
    border-color: var(--accent-primary);
}

.course-card.active-course {
    border-color: var(--accent-primary);
    background: var(--bg-tertiary);
}

.course-card-info {
    flex: 1;
    min-width: 0;
}

.course-card-name {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.course-card-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.course-card-summary {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.course-picker-empty {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-muted);
}

.course-picker-empty .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* ============================================================
   Modal
   ============================================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.modal-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header h2 i {
    color: var(--accent-primary);
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1rem;
    border-radius: 4px;
    transition: color 0.15s;
}

.modal-close-btn:hover {
    color: var(--text-primary);
}

.modal-step {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* ============================================================
   Workflow Progress
   ============================================================ */

.workflow-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.workflow-status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.status-running {
    background: var(--accent-primary);
    animation: pulse-dot 1.2s ease-in-out infinite;
}

.status-dot.status-completed {
    background: #22c55e;
}

.status-dot.status-error {
    background: var(--danger-color, #ef4444);
}

.status-dot.status-stopped {
    background: var(--text-muted);
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.workflow-log {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem;
    height: 280px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.workflow-log-entry {
    padding: 0.15rem 0;
    line-height: 1.5;
    word-break: break-all;
}

.workflow-log-entry.level-error {
    color: #f87171;
}

.workflow-log-entry.level-warning {
    color: #fbbf24;
}

.workflow-log-entry.level-info {
    color: var(--text-secondary);
}

.workflow-log-entry .log-ts {
    color: var(--text-muted);
    margin-right: 0.4rem;
    font-size: 0.7rem;
}
