/* SZMC Geriatrics Presentation Maker - Mobile Styles */

/* ============================================================================
   MOBILE NAVIGATION & LAYOUT
   ============================================================================ */

@media (max-width: 768px) {
    /* Header */
    .header {
        padding: 8px 12px;
    }

    .header-title {
        font-size: 1rem;
    }

    /* Landing page */
    .landing-header {
        padding: 20px 16px;
    }

    .landing-main {
        padding: 16px;
    }

    .landing-main h1 {
        font-size: 1.5rem;
    }

    .landing-main .subtitle {
        font-size: 0.9rem;
    }

    .template-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .template-card {
        padding: 20px;
    }

    .template-card h3 {
        font-size: 1.1rem;
    }

    /* Hide desktop elements */
    .desktop-only {
        display: none !important;
    }
}

/* ============================================================================
   MOBILE EDITOR LAYOUT
   ============================================================================ */

@media (max-width: 768px) {
    /* Editor header */
    .editor-header {
        flex-wrap: wrap;
        gap: 8px;
        padding: 8px;
    }
    
    .header-left .logo-small span {
        display: none;
    }
    
    .header-center {
        order: 3;
        width: 100%;
    }
    
    .header-right {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .header-right .dropdown {
        display: none;
    }
    
    .header-right .btn-icon,
    .header-right .btn-secondary,
    .header-right .btn-primary {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .header-right .toolbar-divider {
        display: none;
    }
    
    .autosave-indicator span {
        display: none;
    }

    /* Editor container - single column */
    .editor-container {
        display: flex;
        flex-direction: column;
        height: 100%;
        overflow: hidden;
    }

    /* Top toolbar */
    .editor-toolbar {
        padding: 8px 12px;
        gap: 8px;
        flex-wrap: wrap;
    }

    .editor-toolbar .btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    /* Presentation title */
    #presentation-title {
        font-size: 1rem;
        padding: 8px 12px;
        min-height: 44px;
    }

    /* Slide Navigator - horizontal scrolling */
    .slide-navigator {
        position: fixed;
        bottom: 60px;
        left: 0;
        right: 0;
        background: var(--gray-100, #f1f5f9);
        border-top: 1px solid var(--gray-200, #e2e8f0);
        padding: 8px;
        z-index: 100;
        display: none; /* Hidden by default, shown via JS */
    }

    .slide-navigator.visible {
        display: block;
    }

    .thumbnails-container {
        display: flex;
        flex-direction: row;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 8px;
        scroll-snap-type: x mandatory;
    }

    .slide-thumbnail {
        flex-shrink: 0;
        width: 100px;
        height: 56px;
        scroll-snap-align: start;
    }

    /* Slide Editor Area */
    .slide-editor {
        flex: 1;
        padding: 8px;
        overflow: auto;
        min-height: 250px;
    }

    #current-slide.slide-canvas {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }

    /* Properties Panel - hidden on mobile */
    .properties-panel {
        display: none;
    }
}

/* ============================================================================
   MOBILE BOTTOM TOOLBAR
   ============================================================================ */

@media (max-width: 768px) {
    .mobile-toolbar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, #ffffff 100%);
        border-top: 1px solid rgba(0, 0, 0, 0.06);
        display: flex;
        justify-content: space-around;
        padding: 6px 8px;
        padding-bottom: calc(6px + env(safe-area-inset-bottom));
        z-index: 1000;
        backdrop-filter: blur(10px);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
    }

    .mobile-toolbar button {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        padding: 10px 14px;
        background: transparent;
        border: none;
        color: var(--gray-500, #64748b);
        font-size: 0.65rem;
        font-weight: 500;
        transition: all 0.2s;
        border-radius: 12px;
        min-width: 56px;
    }

    .mobile-toolbar button i {
        font-size: 1.3rem;
        transition: transform 0.2s;
    }

    .mobile-toolbar button:active {
        background: rgba(30, 58, 95, 0.1);
        transform: scale(0.95);
    }

    .mobile-toolbar button:active i {
        transform: scale(1.1);
    }

    .mobile-toolbar button.active {
        color: var(--primary, #1e3a5f);
        background: rgba(30, 58, 95, 0.08);
    }

    /* Present button styling */
    .mobile-toolbar .btn-present {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
        color: white !important;
        border-radius: 14px !important;
        padding: 10px 18px !important;
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    }

    .mobile-toolbar .btn-present:active {
        background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
        transform: scale(0.95);
    }
}

/* ============================================================================
   PRESENTATION MODE - MOBILE
   ============================================================================ */

@media (max-width: 768px) {
    /* Full screen presentation mode */
    #presentation-mode {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        z-index: 99999 !important;
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
        display: none;
        flex-direction: column !important;
    }

    #presentation-mode.active {
        display: flex !important;
    }

    /* Presentation container */
    #presentation-container {
        flex: 1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 12px !important;
        width: 100% !important;
        height: calc(100% - 80px) !important;
        overflow: hidden !important;
    }

    /* Slide canvas in presentation mode */
    #presentation-container .slide-canvas {
        width: calc(100vw - 24px) !important;
        max-width: none !important;
        height: auto !important;
        max-height: calc(100vh - 100px) !important;
        max-height: calc(100dvh - 100px) !important;
        aspect-ratio: 16 / 9 !important;
        background: white !important;
        border-radius: 12px !important;
        overflow: hidden !important;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4) !important;
    }

    #presentation-container .slide-canvas.presentation-slide {
        display: flex !important;
        flex-direction: column !important;
    }

    /* Slide content */
    #presentation-container .slide {
        width: 100% !important;
        height: 100% !important;
        padding: 20px !important;
        padding-bottom: 40px !important;
        font-size: 0.75rem !important;
        overflow-y: auto !important;
    }

    #presentation-container .slide h1 {
        font-size: clamp(1.1rem, 5vw, 1.6rem) !important;
    }

    #presentation-container .slide h2 {
        font-size: clamp(0.9rem, 4vw, 1.3rem) !important;
    }

    /* Title slide specific */
    #presentation-container .slide-title {
        padding: 20px !important;
        padding-bottom: 50px !important;
    }

    #presentation-container .slide-title h1 {
        font-size: clamp(1.1rem, 5vw, 1.5rem) !important;
        line-height: 1.3 !important;
    }

    #presentation-container .slide-title .subtitle {
        font-size: clamp(0.75rem, 3vw, 1rem) !important;
    }

    #presentation-container .slide-title .institution-logo {
        bottom: 12px !important;
        font-size: 0.6rem !important;
    }

    /* Presentation controls */
    .presentation-controls {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
        border-radius: 20px 20px 0 0 !important;
        padding: 16px 24px !important;
        padding-bottom: calc(16px + env(safe-area-inset-bottom)) !important;
        justify-content: center !important;
        gap: 20px !important;
        background: rgba(15, 23, 42, 0.98) !important;
        backdrop-filter: blur(10px) !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        z-index: 100000 !important;
    }

    .presentation-controls button {
        width: 52px !important;
        height: 52px !important;
        font-size: 1.25rem !important;
        border-radius: 14px !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        color: white !important;
        transition: all 0.2s !important;
    }

    .presentation-controls button:active {
        background: rgba(255, 255, 255, 0.25) !important;
        transform: scale(0.95) !important;
    }

    #slide-counter {
        font-size: 1rem !important;
        font-weight: 600 !important;
        min-width: 80px !important;
        color: white !important;
        background: rgba(255, 255, 255, 0.1) !important;
        padding: 10px 16px !important;
        border-radius: 10px !important;
    }

    /* Hide mode UI on mobile */
    .mode-ui {
        display: none !important;
    }
}

/* Landscape mobile */
@media (max-width: 896px) and (orientation: landscape) {
    #presentation-container .slide-canvas {
        height: calc(100vh - 80px) !important;
        height: calc(100dvh - 80px) !important;
        width: auto !important;
        max-width: calc(100vw - 16px) !important;
    }

    .presentation-controls {
        padding: 8px 16px !important;
    }

    .presentation-controls button {
        width: 40px !important;
        height: 40px !important;
    }
}

/* ============================================================================
   AI ASSISTANT - MOBILE
   ============================================================================ */

@media (max-width: 768px) {
    .ai-assistant-panel {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 70vh;
        height: auto;
        border-radius: 20px 20px 0 0;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        transform: translateY(100%);
        transition: transform 0.3s ease;
        z-index: 10000;
    }

    .ai-assistant-panel.open {
        transform: translateY(0);
    }

    .ai-panel-header {
        padding: 16px 20px;
        padding-top: 24px;
        position: relative;
    }

    .ai-panel-header::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 2px;
    }

    .ai-panel-content {
        max-height: calc(70vh - 80px);
        overflow-y: auto;
        padding: 16px;
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }

    .analysis-issue {
        padding: 14px;
    }

    .issue-action-btn {
        padding: 12px 16px;
        font-size: 14px;
        min-height: 44px;
    }
}

/* ============================================================================
   MODALS - MOBILE
   ============================================================================ */

@media (max-width: 768px) {
    .modal-content {
        width: calc(100% - 24px);
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
        margin: 12px;
        border-radius: 16px;
        overflow-y: auto;
    }

    .modal-header {
        padding: 16px;
        position: sticky;
        top: 0;
        background: white;
        z-index: 1;
        border-bottom: 1px solid var(--gray-200);
    }
    
    .modal-header h2,
    .modal-header h3 {
        font-size: 1.25rem;
    }

    .modal-body {
        padding: 16px;
        max-height: none;
    }

    .modal-footer {
        padding: 16px;
        position: sticky;
        bottom: 0;
        background: white;
        border-top: 1px solid var(--gray-200);
    }
    
    .modal-footer button {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .modal-footer button:last-child {
        margin-bottom: 0;
    }
    
    /* Generator modal specific */
    .generator-layout {
        flex-direction: column;
    }
    
    .generator-input-section,
    .generator-options-section {
        width: 100%;
    }
    
    /* Presentation options */
    .presentation-mode-grid {
        grid-template-columns: 1fr;
    }
    
    .keyboard-hints {
        display: none;
    }
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}

/* ============================================================================
   VIEW MODE TOGGLE - IMPROVED
   ============================================================================ */

.view-mode-container {
    position: fixed;
    bottom: 16px;
    left: 16px;
    z-index: 9999;
}

.view-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #1e3a5f 0%, #3b82f6 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(30, 58, 95, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(10px);
}

.view-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 58, 95, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.view-toggle-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(30, 58, 95, 0.3);
}

.view-toggle-btn i {
    font-size: 1rem;
    transition: transform 0.3s;
}

.view-toggle-btn:hover i {
    transform: scale(1.1);
}

.view-toggle-btn .btn-text {
    white-space: nowrap;
}

/* Mobile view mode */
@media (max-width: 768px) {
    .view-mode-container {
        bottom: 80px;
        left: 12px;
    }

    .view-toggle-btn {
        padding: 12px 18px;
        font-size: 0.8rem;
        box-shadow: 0 6px 20px rgba(30, 58, 95, 0.4);
    }
}

/* When in forced mobile view */
body.force-mobile-view .view-toggle-btn {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

body.force-mobile-view .view-toggle-btn:hover {
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.45);
}

/* When in forced desktop view */
body.force-desktop-view .view-toggle-btn {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.35);
}

body.force-desktop-view .view-toggle-btn:hover {
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.45);
}

/* ============================================================================
   IMPROVED COLOR PALETTE
   ============================================================================ */

:root {
    /* Primary colors - refined blue */
    --primary: #1e3a5f;
    --primary-light: #3b82f6;
    --primary-dark: #0f172a;

    /* Secondary - teal accents */
    --secondary: #06b6d4;
    --secondary-light: #67e8f9;

    /* Success - vibrant green */
    --success: #10b981;
    --success-light: #34d399;

    /* Warning - warm amber */
    --warning: #f59e0b;
    --warning-light: #fbbf24;

    /* Error - clear red */
    --error: #ef4444;
    --error-light: #f87171;

    /* Info - bright blue */
    --info: #3b82f6;
    --info-light: #60a5fa;

    /* Neutrals */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* AI Assistant colors */
    --ai-primary: #8b5cf6;
    --ai-secondary: #06b6d4;
    --ai-gradient: linear-gradient(135deg, #8b5cf6, #06b6d4);
}

/* ============================================================================
   MOBILE NAVIGATION DRAWER - IMPROVED
   ============================================================================ */

.mobile-nav-drawer {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(180deg, #1e3a5f 0%, #0f172a 100%);
    z-index: 10001;
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.3);
}

.mobile-nav-drawer.active {
    left: 0;
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-header .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.mobile-nav-header .logo i {
    color: #60a5fa;
    font-size: 1.25rem;
}

.mobile-nav-close {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-nav-close:hover,
.mobile-nav-close:active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.mobile-lang-selector {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-lang-btn {
    flex: 1;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-lang-btn.active {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
    color: white;
}

.mobile-nav-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.mobile-slide-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-slide-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    border-radius: 12px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-slide-item:hover,
.mobile-slide-item:active {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

.mobile-slide-item.active {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
}

.mobile-slide-item .slide-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    font-weight: 600;
}

.mobile-slide-item.active .slide-num {
    background: #3b82f6;
    color: white;
}

.mobile-slide-item .slide-type {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Mobile Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================================================
   MOBILE ACTIONS SHEET - IMPROVED
   ============================================================================ */

.mobile-actions-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 20px 20px 0 0;
    padding: 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 10002;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
}

.mobile-actions-sheet.active {
    transform: translateY(0);
}

.mobile-actions-sheet::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
}

.mobile-action-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px;
    background: #f8fafc;
    border: none;
    border-radius: 14px;
    color: #1e293b;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.mobile-action-btn:hover,
.mobile-action-btn:active {
    background: #f1f5f9;
    transform: scale(0.98);
}

.mobile-action-btn i {
    width: 24px;
    text-align: center;
    color: #3b82f6;
    font-size: 1.1rem;
}

.mobile-action-btn.danger {
    color: #ef4444;
}

.mobile-action-btn.danger i {
    color: #ef4444;
}

/* ============================================================================
   MOBILE SLIDE TYPE MODAL - IMPROVED
   ============================================================================ */

.mobile-slide-type-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 85vh;
    background: #ffffff;
    border-radius: 24px 24px 0 0;
    z-index: 10002;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.mobile-slide-type-modal.active {
    transform: translateY(0);
}

.mobile-slide-type-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 16px 16px;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
}

.mobile-slide-type-header::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
}

.mobile-slide-type-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.mobile-slide-type-close {
    width: 36px;
    height: 36px;
    background: #f1f5f9;
    border: none;
    border-radius: 10px;
    color: #64748b;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-slide-type-close:hover,
.mobile-slide-type-close:active {
    background: #e2e8f0;
    color: #334155;
}

.mobile-slide-type-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
}

.mobile-slide-type-group {
    margin-bottom: 20px;
}

.mobile-slide-type-group h4 {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 10px 0;
}

.mobile-slide-type-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.mobile-slide-type-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-slide-type-item:hover,
.mobile-slide-type-item:active {
    background: #f1f5f9;
    border-color: #3b82f6;
    transform: scale(0.97);
}

.mobile-slide-type-item i {
    font-size: 1.25rem;
    color: #3b82f6;
}

.mobile-slide-type-item span {
    font-size: 0.7rem;
    color: #475569;
    text-align: center;
    font-weight: 500;
    line-height: 1.2;
}

/* ============================================================================
   EDITOR HEADER MOBILE - IMPROVED
   ============================================================================ */

@media (max-width: 768px) {
    .editor-header {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 12px;
    }

    .header-left {
        order: 1;
        flex: 0 0 auto;
    }

    .header-center {
        order: 3;
        flex: 1 0 100%;
        margin-top: 4px;
    }

    .header-right {
        order: 2;
        flex: 1;
        justify-content: flex-end;
        gap: 6px;
    }

    .btn-back {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .logo-small {
        display: none;
    }

    #presentation-title {
        font-size: 0.95rem;
        padding: 10px 14px;
        border-radius: 10px;
        width: 100%;
    }

    .autosave-indicator {
        display: none;
    }

    .toolbar-divider {
        display: none;
    }

    .btn-icon {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .btn-secondary {
        padding: 8px 14px;
        font-size: 0.85rem;
        border-radius: 10px;
    }

    .btn-secondary i {
        font-size: 1rem;
    }

    .btn-secondary span {
        display: none;
    }

    .btn-primary {
        padding: 10px 16px;
        border-radius: 10px;
        font-size: 0.9rem;
    }

    .btn-primary span {
        display: none;
    }

    .dropdown-toggle {
        padding: 8px 12px;
    }

    .dropdown-toggle .fa-caret-down {
        display: none;
    }

    .dropdown-menu {
        min-width: 180px;
        right: 0;
        left: auto;
    }

    #collab-users {
        display: none;
    }

    /* Present button prominent */
    .header-right .btn-primary {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        color: white;
        padding: 10px 18px;
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    }

    .header-right .btn-primary:active {
        transform: scale(0.95);
    }
}
