:root {
            /* Enhanced dark theme color palette */
            --primary: #4f9cfb;
            --secondary: #00ffcc;
            --dark: #1a1a2e;
            --darker: #121220;
            --light: #e2e2e2;
            --accent: #e74c3c;
            --success: #2ecc71;
            --warning: #f39c12;
            --text-primary: #f8f8f8;
            --text-secondary: #b0b0b0;
            --card-bg: #23233a;
            --gradient-start: #4f9cfb;
            --gradient-end: #2e33cc;
            --code-bg: #2d2d44;
            --memory-cell: #3a3a5c;
            --pointer-color: #ff6b6b;
        }

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

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, var(--dark), var(--darker));
            color: var(--text-primary);
            line-height: 1.6;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }

        .header {
            text-align: center;
            padding: 40px 0;
            background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
            border-radius: 20px;
            margin-bottom: 30px;
            box-shadow: 0 10px 30px rgba(79, 156, 251, 0.3);
        }

        .header h1 {
            font-size: 3rem;
            margin-bottom: 10px;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
        }

        .nav {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin-bottom: 30px;
            flex-wrap: wrap;
        }

        .nav-btn {
            background: var(--card-bg);
            color: var(--text-primary);
            border: 2px solid var(--primary);
            padding: 12px 24px;
            border-radius: 25px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 600;
        }

        .nav-btn:hover, .nav-btn.active {
            background: var(--primary);
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(79, 156, 251, 0.4);
        }

        .section {
            display: none;
            background: var(--card-bg);
            border-radius: 15px;
            padding: 30px;
            margin-bottom: 30px;
            box-shadow: 0 5px 20px rgba(0,0,0,0.2);
            border: 1px solid rgba(79, 156, 251, 0.2);
        }

        .section.active {
            display: block;
            animation: fadeIn 0.5s ease;
        }

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

        .section h2 {
            color: var(--primary);
            font-size: 2.2rem;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .concept-box {
            background: var(--code-bg);
            border-left: 4px solid var(--secondary);
            padding: 20px;
            margin: 20px 0;
            border-radius: 8px;
        }

        .code-block {
            background: var(--code-bg);
            border: 1px solid var(--primary);
            border-radius: 10px;
            padding: 20px;
            margin: 20px 0;
            font-family: 'Courier New', monospace;
            overflow-x: auto;
            position: relative;
        }

        .code-block::before {
            content: "C++";
            position: absolute;
            top: 10px;
            right: 15px;
            background: var(--primary);
            color: white;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 0.8rem;
        }

        .memory-visualization {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            justify-content: center;
            margin: 20px 0;
            padding: 20px;
            background: var(--darker);
            border-radius: 10px;
        }

        .memory-cell {
            width: 80px;
            height: 60px;
            background: var(--memory-cell);
            border: 2px solid var(--primary);
            border-radius: 8px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .memory-cell:hover {
            transform: scale(1.05);
            box-shadow: 0 5px 15px rgba(79, 156, 251, 0.3);
        }

        .memory-address {
            font-size: 0.7rem;
            color: var(--text-secondary);
        }

        .memory-value {
            font-size: 1rem;
            color: var(--text-primary);
            font-weight: bold;
        }

        .pointer-arrow {
            width: 0;
            height: 0;
            border-left: 10px solid transparent;
            border-right: 10px solid transparent;
            border-bottom: 15px solid var(--pointer-color);
            margin: 10px auto;
            animation: bounce 2s infinite;
        }

        @keyframes bounce {
            0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
            40% { transform: translateY(-10px); }
            60% { transform: translateY(-5px); }
        }

        .interactive-demo {
            background: var(--darker);
            border-radius: 10px;
            padding: 20px;
            margin: 20px 0;
        }

        .demo-controls {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .btn {
            background: var(--primary);
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 25px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 600;
        }

        .btn:hover {
            background: var(--gradient-end);
            transform: translateY(-2px);
        }

        .btn:disabled {
            background: var(--text-secondary);
            cursor: not-allowed;
            transform: none;
        }

        .highlight {
            background: rgba(79, 156, 251, 0.2);
            padding: 2px 4px;
            border-radius: 4px;
            color: var(--secondary);
        }

        .step-by-step {
            background: var(--code-bg);
            border-radius: 10px;
            padding: 20px;
            margin: 20px 0;
        }

        .step {
            display: none;
            padding: 15px;
            border-left: 3px solid var(--secondary);
            margin: 10px 0;
        }

        .step.active {
            display: block;
            animation: slideIn 0.5s ease;
        }

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

        .progress-bar {
            width: 100%;
            height: 6px;
            background: var(--card-bg);
            border-radius: 3px;
            margin: 20px 0;
            overflow: hidden;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--primary), var(--secondary));
            border-radius: 3px;
            transition: width 0.3s ease;
        }

        .quiz-section {
            background: var(--code-bg);
            border-radius: 10px;
            padding: 20px;
            margin: 20px 0;
        }

        .question {
            margin-bottom: 15px;
        }

        .options {
            display: grid;
            gap: 10px;
        }

        .option {
            background: var(--card-bg);
            border: 2px solid transparent;
            padding: 12px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .option:hover {
            border-color: var(--primary);
        }

        .option.correct {
            background: rgba(46, 204, 113, 0.2);
            border-color: var(--success);
        }

        .option.incorrect {
            background: rgba(231, 76, 60, 0.2);
            border-color: var(--accent);
        }

        .array-visualization {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 5px;
            margin: 20px 0;
            padding: 20px;
            background: var(--darker);
            border-radius: 10px;
        }

        .array-element {
            width: 60px;
            height: 50px;
            background: var(--memory-cell);
            border: 2px solid var(--primary);
            border-radius: 6px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }

        .array-element.highlighted {
            background: var(--primary);
            transform: scale(1.1);
            box-shadow: 0 5px 15px rgba(79, 156, 251, 0.5);
        }

        .array-index {
            font-size: 0.7rem;
            color: var(--text-secondary);
            margin-bottom: 2px;
        }

        .array-value {
            font-size: 0.9rem;
            color: var(--text-primary);
            font-weight: bold;
        }

        @media (max-width: 768px) {
            .header h1 {
                font-size: 2rem;
            }
            
            .nav {
                gap: 10px;
            }
            
            .nav-btn {
                padding: 8px 16px;
                font-size: 0.9rem;
            }
            
            .section {
                padding: 20px;
            }
            
            .memory-visualization {
                gap: 5px;
            }
            
            .memory-cell {
                width: 60px;
                height: 50px;
            }
        }