<!DOCTYPE html>
<html lang="kk">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Бизнес құрылымдары - QR Нұсқа</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        /* QR Сканеру экраны */
        .qr-screen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: white;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            padding: 20px;
            transition: opacity 0.5s;
        }

        .qr-screen.hidden {
            opacity: 0;
            pointer-events: none;
        }

        .qr-container {
            background: white;
            padding: 30px;
            border-radius: 20px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.1);
            text-align: center;
            max-width: 400px;
            width: 100%;
        }

        .qr-code {
            width: 250px;
            height: 250px;
            margin: 20px auto;
            background: white;
            padding: 10px;
            border-radius: 10px;
            border: 2px dashed #667eea;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            color: #666;
        }

        /* QR кодты CSS арқылы генерациялау */
        .qr-pattern {
            width: 200px;
            height: 200px;
            background-image:
                repeating-linear-gradient(0deg, #000 0px, #000 4px, transparent 4px, transparent 8px),
                repeating-linear-gradient(90deg, #000 0px, #000 4px, transparent 4px, transparent 8px);
            background-size: 8px 8px;
            background-position: center;
            position: relative;
        }

        .qr-pattern::before,
        .qr-pattern::after {
            content: '';
            position: absolute;
            width: 40px;
            height: 40px;
            border: 8px solid #000;
            background: white;
        }

        .qr-pattern::before {
            top: 10px;
            left: 10px;
        }

        .qr-pattern::after {
            bottom: 10px;
            right: 10px;
        }

        .qr-title {
            font-size: 1.5em;
            color: #2d3748;
            margin-bottom: 10px;
            font-weight: 600;
        }

        .qr-subtitle {
            color: #718096;
            margin-bottom: 20px;
            font-size: 0.95em;
        }

        .url-display {
            background: #f7fafc;
            padding: 12px;
            border-radius: 8px;
            font-family: monospace;
            font-size: 0.85em;
            color: #667eea;
            word-break: break-all;
            margin-top: 15px;
            border: 1px solid #e2e8f0;
        }

        .start-btn {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            padding: 15px 40px;
            border-radius: 30px;
            font-size: 1.1em;
            cursor: pointer;
            margin-top: 20px;
            transition: transform 0.2s;
        }

        .start-btn:hover {
            transform: scale(1.05);
        }

        /* Негізгі презентация */
        .presentation {
            flex: 1;
            display: none;
            flex-direction: column;
            background: white;
        }

        .presentation.active {
            display: flex;
        }

        .slide {
            flex: 1;
            display: none;
            flex-direction: column;
            padding: 30px 20px;
            overflow-y: auto;
            animation: slideIn 0.4s ease;
        }

        .slide.active {
            display: flex;
        }

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

        /* Мобильді оңтайландыру */
        .term-card {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 25px;
            border-radius: 20px;
            margin-bottom: 20px;
            position: relative;
            overflow: hidden;
        }

        .term-card::before {
            content: '';
            position: absolute;
            top: -50%;
            right: -50%;
            width: 100%;
            height: 100%;
            background: rgba(255,255,255,0.1);
            border-radius: 50%;
        }

        .term-type {
            display: inline-block;
            background: rgba(255,255,255,0.2);
            padding: 4px 12px;
            border-radius: 15px;
            font-size: 0.75em;
            margin-bottom: 12px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .term-title {
            font-size: 1.8em;
            font-weight: 700;
            margin-bottom: 12px;
            position: relative;
            z-index: 1;
        }

        .definition {
            font-size: 1em;
            line-height: 1.5;
            position: relative;
            z-index: 1;
        }

        .features {
            display: grid;
            gap: 12px;
            margin-top: 15px;
        }

        .feature {
            background: #f7fafc;
            padding: 15px;
            border-radius: 12px;
            border-left: 4px solid #667eea;
        }

        .feature-label {
            font-size: 0.75em;
            color: #718096;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 4px;
        }

        .feature-value {
            font-size: 0.95em;
            color: #2d3748;
            font-weight: 600;
        }

        /* Навигация */
        .mobile-nav {
            background: white;
            border-top: 1px solid #e2e8f0;
            padding: 15px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            bottom: 0;
            box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
        }

        .nav-btn {
            background: #667eea;
            color: white;
            border: none;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2em;
            cursor: pointer;
            transition: all 0.2s;
        }

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

        .nav-btn:active {
            transform: scale(0.95);
        }

        .slide-info {
            text-align: center;
            color: #718096;
            font-size: 0.9em;
        }

        .progress-dots {
            display: flex;
            gap: 6px;
            justify-content: center;
            margin-top: 5px;
        }

        .dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: #cbd5e0;
            transition: all 0.3s;
        }

        .dot.active {
            background: #667eea;
            width: 20px;
            border-radius: 3px;
        }

        /* Интро слайд */
        .intro-slide {
            text-align: center;
            justify-content: center;
            align-items: center;
        }

        .intro-icon {
            font-size: 4em;
            margin-bottom: 20px;
        }

        .intro-title {
            font-size: 1.8em;
            color: #2d3748;
            margin-bottom: 10px;
            font-weight: 700;
        }

        .intro-text {
            color: #718096;
            line-height: 1.6;
            max-width: 300px;
        }

        /* Салыстыру кестесі - мобильді */
        .comparison-list {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .comparison-item {
            background: white;
            border-radius: 15px;
            padding: 20px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
            border: 1px solid #e2e8f0;
        }

        .comp-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 2px solid #667eea;
        }

        .comp-title {
            font-size: 1.3em;
            font-weight: 700;
            color: #2d3748;
        }

        .comp-badge {
            background: #667eea;
            color: white;
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 0.7em;
        }

        .comp-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            font-size: 0.85em;
        }

        .comp-cell {
            background: #f7fafc;
            padding: 8px;
            border-radius: 8px;
        }

        .comp-label {
            color: #718096;
            font-size: 0.8em;
            margin-bottom: 2px;
        }

        .comp-value {
            color: #2d3748;
            font-weight: 600;
        }

        /* Сканерлеу нұсқаулығы */
        .scan-instruction {
            margin-top: 20px;
            padding: 15px;
            background: #f0fff4;
            border-radius: 10px;
            border-left: 4px solid #48bb78;
            text-align: left;
        }

        .scan-instruction h3 {
            color: #22543d;
            font-size: 0.9em;
            margin-bottom: 8px;
        }

        .scan-instruction ol {
            color: #276749;
            font-size: 0.85em;
            padding-left: 18px;
            line-height: 1.6;
        }

        .scan-instruction li {
            margin-bottom: 4px;
        }

        /* Жүктелу индикаторы */
        .loading {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 3px solid rgba(255,255,255,.3);
            border-radius: 50%;
            border-top-color: white;
            animation: spin 1s ease-in-out infinite;
        }

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

        /* Толық экран батырмасы */
        .fullscreen-hint {
            position: fixed;
            top: 10px;
            right: 10px;
            background: rgba(0,0,0,0.7);
            color: white;
            padding: 8px 12px;
            border-radius: 20px;
            font-size: 0.75em;
            z-index: 100;
            display: none;
        }

        @media (max-width: 600px) {
            .fullscreen-hint {
                display: block;
            }
        }
    </style>
</head>
<body>

    <!-- QR Код экраны -->
    <div class="qr-screen" id="qrScreen">
        <div class="qr-container">
            <div class="qr-title">📱 Бизнес құрылымдары</div>
            <div class="qr-subtitle">Презентацияға қосылу үшін QR кодты сканерлеңіз</div>
           
            <!-- QR код орны (нақты QR код генераторы қажет) -->
            <div class="qr-code">
                <div style="text-align: center;">
                    <div style="font-size: 3em; margin-bottom: 10px;">📲</div>
                    <div style="background: #000; color: white; padding: 20px; border-radius: 10px; font-family: monospace;">
                        █▀▀▀▀▀█ ▄▄▄ ▄▄▄ █▀▀▀▀▀█<br>
                        █ ███ █ ██▄ ▄██ █ ███ █<br>
                        █ ▀▀▀ █ ▄██ ▄██ █ ▀▀▀ █<br>
                        ▀▀▀▀▀▀▀ ▀▄█▄▀▄█ ▀▀▀▀▀▀▀<br>
                        ▀▄▀▄▄▀▄▀▀▄▀ ▀▄▀ ▄▀▄▀▄▀▄<br>
                        ▀▄▀ ▀▄▀▄▄▀▄▀▄▀ ▀▄▀ ▀▄▀<br>
                        █▀▀▀▀▀█ ▀▄▀▄▀▄▀ █▀▀▀▀▀█<br>
                        █ ███ █ ▄▀▄▀▄▀▄ █ ███ █<br>
                        █ ▀▀▀ █ ▀▄▀▄▀▄▀ █ ▀▀▀ █<br>
                        ▀▀▀▀▀▀▀ ▀▀ ▀ ▀▀ ▀▀▀▀▀▀▀
                    </div>
                </div>
            </div>

            <div class="url-display">
                business-structures-presentation.web.app
            </div>

            <div class="scan-instruction">
                <h3>📋 Қалай қосылуға болады:</h3>
                <ol>
                    <li>Телефон камерасын қосыңыз</li>
                    <li>QR кодты кадрға салыңыз</li>
                    <li>Пайда болған сілтемеге басыңыз</li>
                    <li>Презентация автоматты түрде ашылады</li>
                </ol>
            </div>

            <button class="start-btn" onclick="startPresentation()">
                Мен оқытушымын →
            </button>
        </div>
    </div>

    <!-- Негізгі презентация -->
    <div class="presentation" id="presentation">
        <div class="fullscreen-hint" onclick="toggleFullscreen()">
            ⛶ Толық экран
        </div>

        <!-- Слайд 1: Intro -->
        <div class="slide intro-slide active" data-slide="0">
            <div class="intro-icon">🏢</div>
            <div class="intro-title">Бизнес құрылымдары</div>
            <div class="intro-text">
                Заңды тұлғалардың негізгі типтері: Холдинг, Корпорация, Концерн, Ассоциация, Синдикат, Трест, Картель
            </div>
        </div>

        <!-- Слайд 2: Холдинг -->
        <div class="slide" data-slide="1">
            <div class="term-card">
                <div class="term-type">Финансылық интеграция</div>
                <div class="term-title">Холдинг</div>
                <div class="definition">
                    Бір компанияның (холдингтік компанияның) басқа компаниялардың акцияларының бақылау пакетін иеленуі арқылы басқаратын компаниялар тобы.
                </div>
            </div>
            <div class="features">
                <div class="feature">
                    <div class="feature-label">Басқару</div>
                    <div class="feature-value">Стратегиялық шешімдер</div>
                </div>
                <div class="feature">
                    <div class="feature-label">Мақсат</div>
                    <div class="feature-value">Инвестициялық бақылау</div>
                </div>
                <div class="feature">
                    <div class="feature-label">Тәуелсіздік</div>
                    <div class="feature-value">Еншілес компаниялар сақталады</div>
                </div>
            </div>
        </div>

        <!-- Слайд 3: Корпорация -->
        <div class="slide" data-slide="2">
            <div class="term-card" style="background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);">
                <div class="term-type">Заңды тұлға</div>
                <div class="term-title">Корпорация</div>
                <div class="definition">
                    Акционерлердің бірлескен капиталы негізінде құрылған, өз мүлкіне ие, азаматтық айналымға субъект болып табылатын ұйым.
                </div>
            </div>
            <div class="features">
                <div class="feature">
                    <div class="feature-label">Құқықтық мәртебе</div>
                    <div class="feature-value">Жеке тұлға ретінде</div>
                </div>
                <div class="feature">
                    <div class="feature-label">Жауапкершілік</div>
                    <div class="feature-value">Шектеулі (активтермен)</div>
                </div>
                <div class="feature">
                    <div class="feature-label">Меншік</div>