-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpseudocode.html
More file actions
1010 lines (950 loc) · 56.1 KB
/
Copy pathpseudocode.html
File metadata and controls
1010 lines (950 loc) · 56.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html lang="de" class="dark">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Pseudocode-Labor & Algorithmen | AP1 Tracker</title>
<link rel="canonical" href="https://ap1.cwillam.de/pseudocode.html" />
<link rel="icon" type="image/svg+xml" href="favicon.svg" />
<!-- PWA Meta Tags -->
<link rel="manifest" href="manifest.json" />
<link rel="apple-touch-icon" href="favicon.svg" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="theme-color" content="#09090b" />
<!-- Preload Local Typography -->
<link rel="preload" href="assets/fonts/Inter-Regular.woff2" as="font" type="font/woff2" crossorigin />
<link rel="preload" href="assets/fonts/Inter-SemiBold.woff2" as="font" type="font/woff2" crossorigin />
<link rel="preload" href="assets/fonts/Inter-Bold.woff2" as="font" type="font/woff2" crossorigin />
<!-- Tailwind 3 Engine (Local, Zero-CDN) -->
<script src="assets/js/tailwind.js?v=3.0.0"></script>
<script>
tailwind.config = {
darkMode: "class",
theme: {
extend: {
fontFamily: {
sans: [
"Inter",
"system-ui",
"-apple-system",
"BlinkMacSystemFont",
"Segoe UI",
"Roboto",
"sans-serif",
],
mono: [
"ui-monospace",
"SFMono-Regular",
"JetBrains Mono",
"Menlo",
"Monaco",
"Consolas",
"monospace",
],
},
colors: {
dark: {
bg: "#09090b", // Pure obsidian / Zinc 950
card: "#121215", // Dense workbench surface
"card-hover": "#18181d",
border: "#23232a", // Hairline border
"border-subtle": "#191920",
text: "#f4f4f5", // High-contrast Zinc 100
muted: "#a1a1aa", // Zinc 400
dim: "#71717a", // Zinc 500
accent: "#3b82f6", // Electric Cobalt
"accent-dim": "rgba(59, 130, 246, 0.12)",
success: "#10b981", // Crisp Emerald
warning: "#f59e0b", // Amber
danger: "#ef4444", // Crimson
},
},
},
},
};
</script>
<!-- Custom High-Craft CSS Tokens & Keycaps -->
<link href="assets/css/style.css?v=3.0.0" rel="stylesheet" />
<style>
/* Smooth bar transitions */
.algo-bar {
transition: height 0.22s cubic-bezier(0.4, 0, 0.2, 1),
background-color 0.2s ease,
opacity 0.2s ease,
transform 0.2s ease;
}
/* Code line highlight */
.code-line {
transition: background-color 0.15s ease, border-color 0.15s ease;
}
.code-line.active {
background-color: rgba(59, 130, 246, 0.12);
border-left: 3px solid #3b82f6;
color: #93c5fd;
}
/* Custom scrollbars */
.custom-scroll::-webkit-scrollbar {
height: 6px;
width: 6px;
}
.custom-scroll::-webkit-scrollbar-track {
background: #09090b;
}
.custom-scroll::-webkit-scrollbar-thumb {
background: #23232a;
border-radius: 4px;
}
.custom-scroll::-webkit-scrollbar-thumb:hover {
background: #3f3f46;
}
/* Table input states */
.trace-input {
font-size: 14px;
touch-action: manipulation;
}
.trace-input.correct {
background-color: rgba(16, 185, 129, 0.18) !important;
border-color: #10b981 !important;
color: #34d399 !important;
}
.trace-input.wrong {
background-color: rgba(239, 68, 68, 0.18) !important;
border-color: #ef4444 !important;
color: #f87171 !important;
}
/* Puzzle item animation */
.puzzle-line {
user-select: none;
transition: transform 0.15s ease, box-shadow 0.15s ease;
}
button, a {
-webkit-tap-highlight-color: transparent;
}
</style>
</head>
<body
class="flex flex-col min-h-screen bg-dark-bg text-dark-text antialiased selection:bg-blue-600 selection:text-white"
>
<!-- ============================================================
TOP COMMAND BAR (Sticky Hairline Header)
============================================================ -->
<header class="sticky top-0 z-50 w-full border-b border-dark-border bg-dark-bg/90 backdrop-blur-md">
<div class="max-w-6xl mx-auto px-4 sm:px-6 h-16 flex items-center justify-between gap-4">
<!-- Left: Back to Dashboard & Title -->
<a href="index.html" class="flex items-center gap-2.5 sm:gap-3 group focus:outline-none shrink-0">
<div class="w-8 h-8 rounded-lg border border-dark-border bg-dark-card group-hover:border-dark-strong flex items-center justify-center text-dark-muted group-hover:text-white transition-all">
<i data-lucide="arrow-left" class="w-4 h-4 transition-transform group-hover:-translate-x-0.5"></i>
</div>
<div class="flex items-center gap-2">
<span class="kbd-cap bg-blue-600/15 border-blue-500/40 text-blue-400 font-bold px-2 py-0.5 text-xs">AP1</span>
<div class="flex flex-col">
<span class="font-bold text-sm tracking-tight text-white group-hover:text-blue-400 transition-colors">
Pseudocode-Labor
</span>
<span class="text-[10px] font-mono text-dark-dim leading-none hidden sm:block">Algorithmen & Schreibtischtests</span>
</div>
</div>
</a>
<!-- Right: Tools, Telemetry Badges & Discord -->
<div class="flex items-center gap-2 sm:gap-3">
<!-- Quick Tools Switcher -->
<div class="hidden lg:flex items-center gap-1.5 border-r border-dark-border pr-3 mr-1">
<a href="index.html" class="px-2.5 py-1.5 rounded-lg text-xs font-mono text-dark-muted hover:text-white hover:bg-dark-card transition-colors flex items-center gap-1.5" title="Dashboard">
<i data-lucide="layout-dashboard" class="w-3.5 h-3.5 text-blue-400"></i>
<span>Dashboard</span>
</a>
<a href="subnet.html" class="px-2.5 py-1.5 rounded-lg text-xs font-mono text-dark-muted hover:text-white hover:bg-dark-card transition-colors flex items-center gap-1.5" title="Subnetz-Trainer">
<i data-lucide="network" class="w-3.5 h-3.5 text-blue-400"></i>
<span>Subnetz</span>
</a>
<a href="sql.html" class="px-2.5 py-1.5 rounded-lg text-xs font-mono text-dark-muted hover:text-white hover:bg-dark-card transition-colors flex items-center gap-1.5" title="SQL-Labor">
<i data-lucide="database" class="w-3.5 h-3.5 text-blue-400"></i>
<span>SQL</span>
</a>
<a href="glossar.html" class="px-2.5 py-1.5 rounded-lg text-xs font-mono text-dark-muted hover:text-white hover:bg-dark-card transition-colors flex items-center gap-1.5" title="Fach-Glossar">
<i data-lucide="book-open" class="w-3.5 h-3.5 text-amber-400"></i>
<span>Glossar</span>
</a>
<a href="help.html" class="px-2.5 py-1.5 rounded-lg text-xs font-mono text-dark-muted hover:text-white hover:bg-dark-card transition-colors flex items-center gap-1.5" title="Hilfe & FAQ">
<i data-lucide="help-circle" class="w-3.5 h-3.5 text-sky-400"></i>
<span>Hilfe</span>
</a>
</div>
<!-- Streak Badge -->
<div
id="streakBadge"
class="font-mono text-xs font-bold text-dark-muted flex items-center gap-1.5 px-2.5 py-1 rounded-md border border-dark-border bg-dark-card"
title="Erfolgreich gelöste Aufgaben"
>
<i data-lucide="flame" class="w-3.5 h-3.5 text-amber-400"></i>
<span id="streakCount" class="text-white">0</span>
<span class="hidden sm:inline text-dark-dim text-[11px]">gelöst</span>
</div>
<!-- Offline indicator -->
<div class="hidden sm:flex items-center gap-1.5 px-2.5 py-1 rounded-md border border-dark-border bg-dark-card text-dark-muted font-mono text-xs">
<i data-lucide="shield-check" class="w-3.5 h-3.5 text-emerald-400"></i>
<span class="text-[11px]">100% Offline</span>
</div>
<!-- Support Button -->
<button
type="button"
onclick="openSupportModal()"
class="px-2.5 py-1.5 rounded-lg border border-dark-border hover:border-[#FFDD00]/40 bg-dark-card hover:bg-[#FFDD00]/10 text-dark-muted hover:text-[#FFDD00] transition-all text-xs flex items-center gap-1.5 shrink-0"
title="Support / Projekt unterstützen"
>
<i data-lucide="coffee" class="w-4 h-4 text-[#FFDD00]"></i>
<span class="hidden sm:inline font-mono text-[11px] font-medium">Support</span>
</button>
<!-- Discord -->
<a
href="https://discord.gg/5BM5YJadDs"
target="_blank"
rel="noopener"
class="px-2.5 py-1.5 rounded-lg border border-dark-border hover:border-[#5865F2]/50 bg-dark-card hover:bg-[#5865F2]/10 text-dark-muted hover:text-white transition-all text-xs flex items-center gap-1.5 shrink-0"
title="Discord: Lerngruppen & Fragen"
>
<i data-lucide="message-square" class="w-4 h-4 text-[#5865F2]"></i>
<span class="hidden sm:inline font-mono text-[11px]">Discord</span>
</a>
</div>
</div>
</header>
<!-- ============================================================
3-MODULE NAVIGATOR (High-Visibility Sticky Dock)
============================================================ -->
<div class="border-b border-dark-border bg-dark-bg/95 backdrop-blur-md sticky top-16 z-40 shadow-md">
<div class="max-w-6xl mx-auto px-3 sm:px-4 py-2 sm:py-2.5">
<!-- Tab Bar Header / Kicker -->
<div class="flex items-center justify-between text-[11px] font-mono mb-1.5 px-0.5">
<div class="flex items-center gap-1.5 font-bold uppercase tracking-wider text-slate-200">
<i data-lucide="layers" class="w-3.5 h-3.5 text-blue-400"></i>
<span>3 Labor-Module:</span>
</div>
<span class="text-[10px] text-dark-muted font-mono flex items-center gap-1">
<span class="inline-block w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse"></span>
Klicke zum Wechseln
</span>
</div>
<!-- Segmented Tab Dock -->
<nav class="grid grid-cols-3 gap-1.5 sm:gap-2.5 p-1 sm:p-1.5 bg-dark-card/90 rounded-2xl border border-dark-border shadow-inner" aria-label="Hauptnavigation Module">
<!-- Tab 1 -->
<button
type="button"
id="tabBtn-guide"
onclick="switchTab('guide')"
class="tab-btn active flex flex-col sm:flex-row items-center justify-center sm:justify-start gap-1 sm:gap-2.5 p-2 sm:px-3.5 sm:py-2.5 rounded-xl text-center sm:text-left transition-all bg-gradient-to-r from-blue-600 to-indigo-600 text-white shadow-md shadow-blue-500/25 border border-blue-300/40 cursor-pointer"
>
<div class="tab-icon w-7 h-7 sm:w-8 sm:h-8 rounded-lg bg-white/20 flex items-center justify-center shrink-0 transition-colors">
<i data-lucide="book-open" class="w-4 h-4 text-white"></i>
</div>
<div class="min-w-0 flex-1">
<div class="flex items-center justify-center sm:justify-between gap-1">
<span class="tab-title text-[11px] sm:text-xs font-bold leading-tight truncate text-white">1. Grundlagen</span>
<span class="tab-badge text-[9px] font-mono px-1.5 py-0.5 rounded bg-white/20 text-white font-semibold hidden sm:inline-block">● Aktiv</span>
</div>
<div class="tab-sub text-[9px] sm:text-[10px] text-blue-100 hidden sm:block truncate opacity-95">Spickzettel & Algos</div>
</div>
</button>
<!-- Tab 2 -->
<button
type="button"
id="tabBtn-visualizer"
onclick="switchTab('visualizer')"
class="tab-btn flex flex-col sm:flex-row items-center justify-center sm:justify-start gap-1 sm:gap-2.5 p-2 sm:px-3.5 sm:py-2.5 rounded-xl text-center sm:text-left transition-all bg-dark-bg/70 hover:bg-dark-bg border border-dark-border/80 hover:border-blue-500/40 text-slate-300 hover:text-white cursor-pointer group"
>
<div class="tab-icon w-7 h-7 sm:w-8 sm:h-8 rounded-lg bg-amber-500/15 border border-amber-500/30 flex items-center justify-center shrink-0 transition-colors">
<i data-lucide="play-circle" class="w-4 h-4 text-amber-400"></i>
</div>
<div class="min-w-0 flex-1">
<div class="flex items-center justify-center sm:justify-between gap-1">
<span class="tab-title text-[11px] sm:text-xs font-bold leading-tight truncate text-slate-300 group-hover:text-white">2. Visualizer</span>
<span class="tab-badge text-[9px] font-mono px-1.5 py-0.5 rounded bg-dark-card border border-dark-border text-dark-muted group-hover:text-white hidden sm:inline-block">Simulator</span>
</div>
<div class="tab-sub text-[9px] sm:text-[10px] text-slate-500 hidden sm:block truncate">Schritt-für-Schritt</div>
</div>
</button>
<!-- Tab 3 -->
<button
type="button"
id="tabBtn-exercises"
onclick="switchTab('exercises')"
class="tab-btn flex flex-col sm:flex-row items-center justify-center sm:justify-start gap-1 sm:gap-2.5 p-2 sm:px-3.5 sm:py-2.5 rounded-xl text-center sm:text-left transition-all bg-dark-bg/70 hover:bg-dark-bg border border-dark-border/80 hover:border-blue-500/40 text-slate-300 hover:text-white cursor-pointer group"
>
<div class="tab-icon w-7 h-7 sm:w-8 sm:h-8 rounded-lg bg-cyan-500/15 border border-cyan-500/30 flex items-center justify-center shrink-0 transition-colors">
<i data-lucide="check-square" class="w-4 h-4 text-cyan-400"></i>
</div>
<div class="min-w-0 flex-1">
<div class="flex items-center justify-center sm:justify-between gap-1">
<span class="tab-title text-[11px] sm:text-xs font-bold leading-tight truncate text-slate-300 group-hover:text-white">3. Üben & Test</span>
<span class="tab-badge text-[9px] font-mono px-1.5 py-0.5 rounded bg-dark-card border border-dark-border text-dark-muted group-hover:text-white hidden sm:inline-block">12 Aufgaben</span>
</div>
<div class="tab-sub text-[9px] sm:text-[10px] text-slate-500 hidden sm:block truncate">Schreibtischtests</div>
</div>
</button>
</nav>
</div>
</div>
<!-- Main Container -->
<main class="max-w-6xl mx-auto px-4 sm:px-6 py-5 sm:py-6 flex-1 w-full">
<!-- ============================================================
TAB 1: GRUNDLAGEN & SPICKZETTEL
============================================================ -->
<section id="tabContent-guide" class="space-y-6">
<!-- Hero Card -->
<div class="bg-dark-card border border-dark-border rounded-xl p-5 sm:p-6">
<div class="flex flex-col md:flex-row md:items-center justify-between gap-5">
<div>
<div class="flex items-center gap-2 text-blue-400 text-xs font-mono mb-2 uppercase tracking-wider">
<span class="kbd-cap bg-blue-600/15 border-blue-500/30 text-blue-400 px-2 py-0.5 text-[10px]">AP1 STANDARDI SIERT</span>
<span>Prüfungsstandard für alle IT-Fachrichtungen</span>
</div>
<h1 class="text-xl sm:text-2xl font-bold text-white tracking-tight">
Pseudocode verstehen – Logik & Schreibtischtests
</h1>
<p class="text-dark-muted text-xs sm:text-sm mt-2 max-w-2xl leading-relaxed">
In der IHK-Abschlussprüfung Teil 1 geht es nicht um Programmiersprachen-Syntax,
sondern um <strong>Ablauflogik, Datenstrukturen und deterministische Schreibtischtests</strong>.
Hier findest du alle prüfungsrelevanten Kernkonzepte auf den Punkt gebracht.
</p>
</div>
<div class="flex flex-wrap gap-2.5 shrink-0">
<button
type="button"
onclick="switchTab('visualizer')"
class="w-full sm:w-auto px-4 py-2.5 bg-blue-600 hover:bg-blue-500 text-white rounded-lg text-xs sm:text-sm font-semibold flex items-center justify-center gap-2 transition-all shadow-sm active:scale-95"
>
<span>Zum Live-Visualizer</span>
<i data-lucide="arrow-right" class="w-4 h-4"></i>
</button>
</div>
</div>
</div>
<!-- Definition Card -->
<div class="bg-dark-card border border-dark-border rounded-xl p-5 sm:p-6">
<div class="flex items-start gap-3.5">
<div class="w-8 h-8 rounded-lg bg-blue-500/10 border border-blue-500/20 flex items-center justify-center text-blue-400 shrink-0 mt-0.5">
<i data-lucide="help-circle" class="w-4 h-4"></i>
</div>
<div>
<h2 class="text-sm sm:text-base font-bold text-white">Was ist eigentlich Pseudocode & ein Algorithmus?</h2>
<p class="text-xs sm:text-sm text-dark-muted mt-1 leading-relaxed">
Ein <strong>Algorithmus</strong> ist eine eindeutige, endliche Schritt-für-Schritt-Vorschrift zur Lösung eines Problems.
<strong>Pseudocode</strong> ist eine abstrahierte Notation aus natürlicher Sprache und standardisierten Steuerstrukturen. Er ist unabhängig von konkreten Sprachen (weder reines Python, Java noch C#),
damit der Prüfling den logischen Ablauf ohne syntaktische Sprachhürden modellieren und nachvollziehen kann.
</p>
</div>
</div>
</div>
<!-- 4 Core Foundations -->
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 sm:gap-6">
<!-- Card 1: Variablen & Zuweisung -->
<div class="bg-dark-card border border-dark-border rounded-xl p-5 sm:p-6 flex flex-col justify-between">
<div>
<div class="flex items-center gap-2.5 text-white font-bold text-sm sm:text-base mb-2">
<span class="w-6 h-6 rounded-md bg-blue-500/15 border border-blue-500/30 flex items-center justify-center text-blue-400 text-xs font-mono font-bold">1</span>
<h3>Variablen, Zuweisung & Datentypen</h3>
</div>
<p class="text-xs sm:text-sm text-dark-muted leading-relaxed mb-3">
Eine Variable reserviert Speicherplatz für einen Wert. Mit <code class="text-blue-400 bg-dark-bg px-1.5 py-0.5 rounded border border-dark-border">=</code> oder <code class="text-blue-400 bg-dark-bg px-1.5 py-0.5 rounded border border-dark-border">←</code> erfolgt die Zuweisung.
</p>
<div class="bg-dark-bg border border-dark-border rounded-lg p-3.5 font-mono text-xs text-dark-text space-y-1.5 leading-relaxed">
<div class="text-dark-dim">// Die 4 wichtigsten Datentypen in Prüfungen:</div>
<div><span class="text-blue-400 font-bold">GANZZAHL</span> alter = 21 <span class="text-dark-dim">// Ganzzahl (Integer)</span></div>
<div><span class="text-blue-400 font-bold">KOMMAZAHL</span> preis = 19.99 <span class="text-dark-dim">// Fließkomma (Float/Double)</span></div>
<div><span class="text-blue-400 font-bold">TEXT</span> status = "In Prüfung" <span class="text-dark-dim">// Zeichenkette (String)</span></div>
<div><span class="text-blue-400 font-bold">BOOLEAN</span> istGueltig = WAHR <span class="text-dark-dim">// Wahrheitswert (WAHR / FALSCH)</span></div>
</div>
</div>
<div class="mt-4 pt-3 border-t border-dark-border text-[11px] text-dark-muted flex items-center gap-2">
<i data-lucide="alert-circle" class="w-4 h-4 text-amber-400 shrink-0"></i>
<span>Vorsicht in Klausuren: <code>=</code> weist zu, <code>==</code> vergleicht zwei Werte!</span>
</div>
</div>
<!-- Card 2: Verzweigungen -->
<div class="bg-dark-card border border-dark-border rounded-xl p-5 sm:p-6 flex flex-col justify-between">
<div>
<div class="flex items-center gap-2.5 text-white font-bold text-sm sm:text-base mb-2">
<span class="w-6 h-6 rounded-md bg-blue-500/15 border border-blue-500/30 flex items-center justify-center text-blue-400 text-xs font-mono font-bold">2</span>
<h3>Bedingungen & Verzweigungen (WENN / DANN)</h3>
</div>
<p class="text-xs sm:text-sm text-dark-muted leading-relaxed mb-3">
Verzweigungen steuern den Kontrollfluss. Ein Block wird nur ausgeführt, wenn der logische Ausdruck zu <code>WAHR</code> evaluiert.
</p>
<div class="bg-dark-bg border border-dark-border rounded-lg p-3.5 font-mono text-xs text-dark-text space-y-1 leading-relaxed">
<div><span class="text-purple-400 font-bold">WENN</span> punkte >= 50 <span class="text-purple-400 font-bold">DANN</span></div>
<div class="pl-4 text-emerald-400">ergebnis = "Bestanden"</div>
<div><span class="text-purple-400 font-bold">SONST WENN</span> punkte >= 30 <span class="text-purple-400 font-bold">DANN</span></div>
<div class="pl-4 text-amber-400">ergebnis = "Mündliche Ergänzungsprüfung"</div>
<div><span class="text-purple-400 font-bold">SONST</span></div>
<div class="pl-4 text-rose-400">ergebnis = "Nicht bestanden"</div>
<div><span class="text-purple-400 font-bold">ENDE WENN</span></div>
</div>
</div>
<div class="mt-4 pt-3 border-t border-dark-border text-[11px] text-dark-muted flex items-center gap-2">
<i data-lucide="info" class="w-4 h-4 text-blue-400 shrink-0"></i>
<span>Boolesche Operatoren: <code>UND</code>, <code>ODER</code>, <code>NICHT</code>.</span>
</div>
</div>
</div>
<!-- Loop Comparison: In-Depth Exam Hero -->
<div class="bg-dark-card border border-dark-border rounded-xl p-5 sm:p-6">
<div class="flex flex-col sm:flex-row sm:items-center justify-between gap-2 mb-5">
<div class="flex items-center gap-2.5">
<span class="w-7 h-7 rounded-lg bg-emerald-500/10 border border-emerald-500/20 flex items-center justify-center text-emerald-400 text-xs font-mono font-bold">3</span>
<div>
<h3 class="font-bold text-sm sm:text-base text-white">Die 3 Schleifenarten im direkten Vergleich</h3>
<p class="text-xs text-dark-dim">Klassische IHK-Prüfungsfrage: „Welche Schleifenart ist hier die richtige?“</p>
</div>
</div>
<span class="self-start sm:self-auto text-[11px] text-emerald-400 font-mono bg-emerald-500/10 px-2.5 py-1 rounded-md border border-emerald-500/20">
100% Prüfungsrelevant
</span>
</div>
<div class="grid grid-cols-1 lg:grid-cols-3 gap-4 sm:gap-5">
<!-- 1. For Loop -->
<div class="bg-dark-bg border border-dark-border rounded-xl p-4 sm:p-5 flex flex-col justify-between">
<div>
<div class="flex items-center justify-between mb-2">
<span class="font-bold text-sm text-white">Zählschleife (FÜR)</span>
<span class="text-[10px] text-blue-400 font-mono px-2 py-0.5 rounded bg-blue-500/10 border border-blue-500/20">Feste Anzahl</span>
</div>
<p class="text-xs text-dark-muted mb-3 leading-relaxed">
Verwenden, wenn die <strong>Anzahl der Durchläufe vorab exakt bekannt</strong> ist (z. B. Iteration über Array-Indizes).
</p>
<div class="bg-dark-card border border-dark-border rounded-lg p-3 font-mono text-xs text-dark-text space-y-1">
<div><span class="text-blue-400 font-bold">FÜR</span> i = 0 <span class="text-blue-400 font-bold">BIS</span> 4 <span class="text-blue-400 font-bold">SCHRITT</span> 1</div>
<div class="pl-4 text-dark-muted">drucke(i)</div>
<div><span class="text-blue-400 font-bold">ENDE FÜR</span></div>
</div>
</div>
<div class="mt-4 pt-3 border-t border-dark-border text-[11px] text-dark-dim">
<strong class="text-white">Laufzeiten:</strong> Genau 5-mal (i durchläuft 0, 1, 2, 3, 4).
</div>
</div>
<!-- 2. While Loop -->
<div class="bg-dark-bg border border-dark-border rounded-xl p-4 sm:p-5 flex flex-col justify-between">
<div>
<div class="flex items-center justify-between mb-2">
<span class="font-bold text-sm text-white">Kopfgesteuert (SOLANGE)</span>
<span class="text-[10px] text-amber-400 font-mono px-2 py-0.5 rounded bg-amber-500/10 border border-amber-500/20">0 bis n mal</span>
</div>
<p class="text-xs text-dark-muted mb-3 leading-relaxed">
Prüfung erfolgt <strong>VOR</strong> dem Betreten. Ist die Bedingung anfangs unwahr, läuft die Schleife <strong>0-mal</strong> (abweisend).
</p>
<div class="bg-dark-card border border-dark-border rounded-lg p-3 font-mono text-xs text-dark-text space-y-1">
<div><span class="text-amber-400 font-bold">SOLANGE</span> energie > 0 <span class="text-amber-400 font-bold">TUE</span></div>
<div class="pl-4 text-dark-muted">energie = energie - 10</div>
<div><span class="text-amber-400 font-bold">ENDE SOLANGE</span></div>
</div>
</div>
<div class="mt-4 pt-3 border-t border-dark-border text-[11px] text-dark-dim">
<strong class="text-white">Merke:</strong> Bricht ab, sobald die Bedingung <code>FALSCH</code> wird.
</div>
</div>
<!-- 3. Do-While Loop -->
<div class="bg-dark-bg border border-dark-border rounded-xl p-4 sm:p-5 flex flex-col justify-between">
<div>
<div class="flex items-center justify-between mb-2">
<span class="font-bold text-sm text-white">Fußgesteuert (WIEDERHOLE)</span>
<span class="text-[10px] text-purple-400 font-mono px-2 py-0.5 rounded bg-purple-500/10 border border-purple-500/20">Mindestens 1-mal</span>
</div>
<p class="text-xs text-dark-muted mb-3 leading-relaxed">
Prüfung erfolgt <strong>am Ende</strong>. Der Rumpf wird <strong>garantiert mindestens 1-mal</strong> ausgeführt (z. B. Benutzereingabe validieren).
</p>
<div class="bg-dark-card border border-dark-border rounded-lg p-3 font-mono text-xs text-dark-text space-y-1">
<div><span class="text-purple-400 font-bold">WIEDERHOLE</span></div>
<div class="pl-4 text-dark-muted">pin = liesEingabe()</div>
<div><span class="text-purple-400 font-bold">BIS</span> pin == 1234</div>
</div>
</div>
<div class="mt-4 pt-3 border-t border-dark-border text-[11px] text-dark-dim">
<strong class="text-white">Achtung:</strong> Bei <code>BIS</code> bricht die Schleife ab, sobald Bedingung <code>WAHR</code> ist.
</div>
</div>
</div>
</div>
<!-- Detail: Die 3 wichtigsten AP1-Algorithmen im Klartext -->
<div class="bg-dark-card border border-dark-border rounded-xl p-5 sm:p-6">
<div class="flex items-center gap-2.5 mb-4">
<span class="w-7 h-7 rounded-lg bg-blue-500/10 border border-blue-500/20 flex items-center justify-center text-blue-400 text-xs font-mono font-bold">4</span>
<div>
<h3 class="font-bold text-sm sm:text-base text-white">Die 3 Standard-Algorithmen der AP1</h3>
<p class="text-xs text-dark-dim">Kernmuster für Sortierung und Suche in den Abschlussprüfungen</p>
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 sm:gap-5">
<!-- 1. Lineare Suche -->
<div class="bg-dark-bg border border-dark-border rounded-xl p-4 sm:p-5 flex flex-col justify-between">
<div>
<div class="font-bold text-sm text-blue-400 mb-1">1. Lineare Suche</div>
<div class="text-[10px] text-dark-dim font-mono mb-2">Element in unsortiertem Array finden</div>
<p class="text-xs text-dark-muted leading-relaxed mb-3">
Iteriert von Index 0 bis Ende. Bei Treffer sofortige Rückgabe des Index <code>i</code>. Wenn Schleife ohne Treffer durchläuft: <code>-1</code>.
</p>
<div class="bg-dark-card p-3 rounded-lg border border-dark-border font-mono text-[11px] text-dark-text space-y-1">
<div><span class="text-blue-400 font-bold">FÜR</span> i = 0 <span class="text-blue-400 font-bold">BIS</span> länge - 1</div>
<div class="pl-3"><span class="text-purple-400 font-bold">WENN</span> arr[i] == ziel <span class="text-purple-400 font-bold">DANN</span></div>
<div class="pl-6 text-emerald-400">RÜCKGABE i</div>
<div>RÜCKGABE -1</div>
</div>
</div>
</div>
<!-- 2. Minimum finden -->
<div class="bg-dark-bg border border-dark-border rounded-xl p-4 sm:p-5 flex flex-col justify-between">
<div>
<div class="font-bold text-sm text-amber-400 mb-1">2. Minimum & Index finden</div>
<div class="text-[10px] text-dark-dim font-mono mb-2">Kleinsten Wert im Feld ermitteln</div>
<p class="text-xs text-dark-muted leading-relaxed mb-3">
Setze erstes Element als vorläufiges Minimum. Prüfe alle Folgeelemente. Ist ein Element kleiner, aktualisiere Minimum und Index.
</p>
<div class="bg-dark-card p-3 rounded-lg border border-dark-border font-mono text-[11px] text-dark-text space-y-1">
<div>minWert = arr[0], minIdx = 0</div>
<div><span class="text-blue-400 font-bold">FÜR</span> i = 1 <span class="text-blue-400 font-bold">BIS</span> länge - 1</div>
<div class="pl-3"><span class="text-purple-400 font-bold">WENN</span> arr[i] < minWert <span class="text-purple-400 font-bold">DANN</span></div>
<div class="pl-6 text-amber-400">minWert = arr[i], minIdx = i</div>
<div>RÜCKGABE minIdx</div>
</div>
</div>
</div>
<!-- 3. Bubble Sort -->
<div class="bg-dark-bg border border-dark-border rounded-xl p-4 sm:p-5 flex flex-col justify-between">
<div>
<div class="font-bold text-sm text-purple-400 mb-1">3. Bubble Sort</div>
<div class="text-[10px] text-dark-dim font-mono mb-2">Benachbarte Elemente vertauschen</div>
<p class="text-xs text-dark-muted leading-relaxed mb-3">
Vergleicht Nachbar-Paare <code>arr[j]</code> und <code>arr[j+1]</code>. Ist das linke größer, wird über Hilfsvariable getauscht (Swap).
</p>
<div class="bg-dark-card p-3 rounded-lg border border-dark-border font-mono text-[11px] text-dark-text space-y-1">
<div><span class="text-purple-400 font-bold">WENN</span> arr[j] > arr[j + 1] <span class="text-purple-400 font-bold">DANN</span></div>
<div class="pl-3 text-rose-400">temp = arr[j]</div>
<div class="pl-3 text-rose-400">arr[j] = arr[j + 1]</div>
<div class="pl-3 text-rose-400">arr[j + 1] = temp</div>
</div>
</div>
</div>
</div>
</div>
<!-- How to ace a Schreibtischtest -->
<div class="bg-dark-card border border-dark-border rounded-xl p-5 sm:p-6">
<div class="flex items-start gap-3.5">
<div class="w-8 h-8 rounded-lg bg-emerald-500/10 border border-emerald-500/20 flex items-center justify-center text-emerald-400 shrink-0 mt-0.5">
<i data-lucide="check-circle" class="w-4 h-4"></i>
</div>
<div>
<h3 class="text-sm sm:text-base font-bold text-white">Die 5 goldenen Regeln für fehlerfreie Schreibtischtests</h3>
<div class="grid grid-cols-1 sm:grid-cols-2 gap-3 mt-3 text-xs text-dark-muted leading-relaxed">
<div class="bg-dark-bg border border-dark-border rounded-lg p-3">
<span class="font-bold text-white block mb-1">1. Sei die CPU</span>
Denke niemals voraus! Führe strikt nur die Zeile aus, auf der der Zeiger aktuell steht.
</div>
<div class="bg-dark-bg border border-dark-border rounded-lg p-3">
<span class="font-bold text-white block mb-1">2. Startzustand protokollieren</span>
Schreibe vor Eintritt in die erste Schleife alle Initialwerte der Variablen auf.
</div>
<div class="bg-dark-bg border border-dark-border rounded-lg p-3">
<span class="font-bold text-white block mb-1">3. Array-Indizes bei 0 starten</span>
Der häufigste Flüchtigkeitsfehler in Prüfungen ist der Beginn bei Index 1.
</div>
<div class="bg-dark-bg border border-dark-border rounded-lg p-3">
<span class="font-bold text-white block mb-1">4. Bedingungen protokollieren</span>
Halte Schleifen- und Verzweigungsbedingungen als WAHR / FALSCH schriftlich fest.
</div>
<div class="bg-dark-bg border border-dark-border rounded-lg p-3 sm:col-span-2">
<span class="font-bold text-white block mb-1">5. Inkrementierung am Schleifenende beachten</span>
Zähler werden typischerweise am Ende des Schleifendurchlaufs inkrementiert, unmittelbar vor der nächsten Bedingungsprüfung!
</div>
</div>
</div>
</div>
</div>
</section>
<!-- ============================================================
TAB 2: CODE- & ALGORITHMEN-VISUALIZER
============================================================ -->
<section id="tabContent-visualizer" class="hidden space-y-5 sm:space-y-6">
<!-- Control Bar -->
<div class="bg-dark-card border border-dark-border rounded-xl p-4 sm:p-5 space-y-4">
<!-- Top Row: Algo Selector & Presets -->
<div class="flex flex-col lg:flex-row lg:items-center justify-between gap-4">
<div class="flex flex-wrap items-center gap-2 sm:gap-3">
<label for="algoSelect" class="text-xs font-mono text-dark-dim uppercase tracking-wider shrink-0">Algorithmus:</label>
<select
id="algoSelect"
onchange="onAlgorithmChange()"
class="bg-dark-bg border border-dark-border rounded-lg px-3 py-2 text-xs sm:text-sm text-white font-medium focus:border-blue-500 focus:outline-none w-full sm:w-auto sm:min-w-[220px]"
>
<option value="linear_search">1. Lineare Suche (Linear Search)</option>
<option value="find_min">2. Minimum & Index finden</option>
<option value="bubble_sort">3. Bubble Sort (Tausch-Sortierung)</option>
</select>
<!-- Presets Dropdown -->
<div class="flex items-center gap-1.5">
<select
id="presetSelect"
onchange="applyArrayPreset(this.value)"
class="bg-dark-bg border border-dark-border rounded-lg px-3 py-2 text-xs font-mono text-dark-muted focus:border-blue-500 focus:outline-none"
>
<option value="random">Datensatz: Zufall</option>
<option value="nearly_sorted">Fast sortiert</option>
<option value="reverse">Umgekehrt (Worst-Case)</option>
<option value="small_numbers">Kleine Werte (1 bis 20)</option>
<option value="duplicates">Mit Duplikaten</option>
</select>
<button
type="button"
onclick="generateNewArray()"
class="p-2 bg-dark-bg border border-dark-border hover:border-dark-dim rounded-lg text-dark-muted hover:text-white transition-colors shrink-0"
title="Neu mischen"
>
<i data-lucide="shuffle" class="w-4 h-4 text-blue-400"></i>
</button>
</div>
</div>
<!-- Playback Controls -->
<div class="flex items-center justify-between sm:justify-end gap-1.5 sm:gap-2 pt-2 lg:pt-0 border-t lg:border-t-0 border-dark-border">
<button
type="button"
id="btnStepBack"
onclick="stepBackward()"
class="px-3 py-2 bg-dark-bg border border-dark-border hover:border-dark-dim rounded-lg text-xs font-mono text-dark-muted hover:text-white flex items-center gap-1.5 transition-colors active:scale-95"
title="Einen Schritt zurück"
>
<i data-lucide="skip-back" class="w-3.5 h-3.5"></i>
<span class="hidden sm:inline">Schritt</span>
</button>
<button
type="button"
id="btnPlayPause"
onclick="togglePlayPause()"
class="px-4 py-2 bg-blue-600 hover:bg-blue-500 text-white rounded-lg text-xs sm:text-sm font-semibold flex items-center gap-2 transition-all shadow-sm min-w-[90px] justify-center active:scale-95"
>
<i data-lucide="play" id="playIcon" class="w-4 h-4"></i>
<span id="playBtnText">Start</span>
</button>
<button
type="button"
id="btnStepForward"
onclick="stepForward()"
class="px-3 py-2 bg-dark-bg border border-dark-border hover:border-dark-dim rounded-lg text-xs font-mono text-dark-muted hover:text-white flex items-center gap-1.5 transition-colors active:scale-95"
title="Einen Schritt vor"
>
<span class="hidden sm:inline">Schritt</span>
<i data-lucide="skip-forward" class="w-3.5 h-3.5"></i>
</button>
<button
type="button"
id="btnReset"
onclick="resetAlgorithm()"
class="p-2 bg-dark-bg border border-dark-border hover:border-dark-dim rounded-lg text-dark-muted hover:text-white transition-colors ml-1 active:scale-95"
title="Zurück an den Anfang"
>
<i data-lucide="rotate-ccw" class="w-3.5 h-3.5"></i>
</button>
</div>
</div>
<!-- Bottom Row: Sliders & Settings -->
<div class="pt-3 border-t border-dark-border flex flex-wrap items-center justify-between gap-3 text-xs">
<!-- Speed Control -->
<div class="flex items-center gap-2">
<span class="text-dark-dim text-[11px] font-mono">Tempo:</span>
<input
type="range"
id="speedSlider"
min="100"
max="1200"
step="50"
value="600"
onchange="updateSpeed(this.value)"
class="w-24 sm:w-32 accent-blue-500 cursor-pointer"
/>
<span id="speedLabel" class="text-[10px] font-mono text-dark-muted w-14">Normal</span>
</div>
<!-- Size Slider -->
<div class="flex items-center gap-2">
<span class="text-dark-dim text-[11px] font-mono">Elemente:</span>
<input
type="range"
id="sizeSlider"
min="5"
max="10"
step="1"
value="7"
onchange="updateArraySize(this.value)"
class="w-20 sm:w-24 accent-blue-500 cursor-pointer"
/>
<span id="sizeLabel" class="text-[10px] font-mono text-dark-muted">7</span>
</div>
<!-- Search Target Control -->
<div class="flex items-center gap-2 ml-auto">
<div id="targetValueWrapper" class="flex items-center gap-1.5">
<span class="text-dark-dim text-[11px] font-mono">Zielwert:</span>
<input
type="number"
id="targetSearchInput"
value="42"
class="w-16 bg-dark-bg border border-dark-border rounded-md px-2 py-1 text-xs text-white font-mono text-center focus:border-blue-500 focus:outline-none"
onchange="updateSearchTarget(this.value)"
title="Gesuchter Wert (oder direkt auf einen Balken klicken)"
/>
<span class="text-[10px] text-dark-dim font-mono hidden sm:inline">(oder Klick auf Balken)</span>
</div>
</div>
</div>
</div>
<!-- Visual Stage (Array Bars) -->
<div class="bg-dark-card border border-dark-border rounded-xl p-4 sm:p-5">
<div class="flex flex-wrap items-center justify-between gap-2 mb-4">
<h2 class="text-xs sm:text-sm font-bold text-white flex items-center gap-2">
<i data-lucide="bar-chart-2" class="w-4 h-4 text-blue-400"></i>
<span>Speicher-Visualisierung (Array-Zustand)</span>
</h2>
<div class="flex flex-wrap items-center gap-2.5 sm:gap-4 text-[10px] sm:text-[11px] font-mono text-dark-muted">
<span class="flex items-center gap-1"><span class="w-2.5 h-2.5 rounded-sm bg-blue-600 inline-block"></span> Normal</span>
<span class="flex items-center gap-1"><span class="w-2.5 h-2.5 rounded-sm bg-amber-400 inline-block"></span> Vergleich</span>
<span class="flex items-center gap-1"><span class="w-2.5 h-2.5 rounded-sm bg-rose-500 inline-block"></span> Tausch</span>
<span class="flex items-center gap-1"><span class="w-2.5 h-2.5 rounded-sm bg-emerald-500 inline-block"></span> Erledigt / Treffer</span>
</div>
</div>
<!-- Bar Canvas Container -->
<div
id="barContainer"
class="h-48 sm:h-64 flex items-end justify-center gap-2 sm:gap-4 px-2 pb-3 pt-6 border border-dark-border bg-dark-bg rounded-lg relative overflow-x-auto custom-scroll"
>
<!-- Generated dynamically by pseudocode.js -->
</div>
<!-- Step Narration Box (Plain German explanation) -->
<div class="mt-4 p-3 sm:p-4 bg-dark-bg border border-dark-border rounded-lg flex items-start gap-3">
<div class="w-7 h-7 rounded-md bg-blue-500/10 border border-blue-500/20 flex items-center justify-center text-blue-400 shrink-0 mt-0.5">
<i data-lucide="message-square" class="w-3.5 h-3.5"></i>
</div>
<div class="flex-1">
<div class="text-[10px] font-mono uppercase tracking-wider text-dark-dim">
Schritt <span id="currentStepNumber" class="text-blue-400 font-bold">0</span> von <span id="totalStepsNumber" class="text-white font-bold">0</span>
</div>
<p id="stepExplanation" class="text-xs sm:text-sm text-dark-text mt-1 leading-relaxed font-medium">
Klicke auf "Start" oder "Schritt", um den Algorithmus Schritt für Schritt auszuführen.
</p>
</div>
</div>
</div>
<!-- Side-by-Side: Code vs. Variable Inspector -->
<div class="grid grid-cols-1 lg:grid-cols-12 gap-5 sm:gap-6">
<!-- Left: Synchronized Pseudocode -->
<div class="lg:col-span-7 bg-dark-card border border-dark-border rounded-xl p-4 sm:p-5 flex flex-col justify-between">
<div>
<div class="flex items-center justify-between mb-3">
<h3 class="font-bold text-xs sm:text-sm text-white flex items-center gap-2">
<i data-lucide="code" class="w-4 h-4 text-blue-400"></i>
<span>Synchronisierter Pseudocode</span>
</h3>
<span class="text-[10px] font-mono text-dark-dim bg-dark-bg px-2 py-0.5 rounded border border-dark-border">
Aktive Zeile leuchtet
</span>
</div>
<div
id="codeContainer"
class="font-mono text-xs text-dark-text bg-dark-bg border border-dark-border rounded-lg p-3 sm:p-3.5 custom-scroll overflow-x-auto leading-relaxed space-y-0.5"
>
<!-- Generated dynamically -->
</div>
</div>
</div>
<!-- Right: Variable Inspector & Live Schreibtischtest -->
<div class="lg:col-span-5 bg-dark-card border border-dark-border rounded-xl p-4 sm:p-5 flex flex-col justify-between">
<div>
<div class="flex items-center justify-between mb-3">
<h3 class="font-bold text-xs sm:text-sm text-white flex items-center gap-2">
<i data-lucide="cpu" class="w-4 h-4 text-emerald-400"></i>
<span>Live-Variablen (Speicher)</span>
</h3>
<span class="text-[10px] font-mono text-emerald-400">Trace-Monitor</span>
</div>
<p class="text-xs text-dark-muted mb-3 leading-relaxed">
Der aktuelle Zustand aller Zeiger und Variablen im Speicher:
</p>
<div id="variableInspector" class="space-y-2">
<!-- Dynamically populated -->
</div>
</div>
<div class="mt-4 pt-3.5 border-t border-dark-border text-[11px] text-dark-muted flex items-center justify-between">
<span>Status: <strong id="algoStatusText" class="text-blue-400">Bereit</strong></span>
<span id="operationCounter" class="font-mono text-dark-dim">Vergleiche: 0</span>
</div>
</div>
</div>
</section>
<!-- ============================================================
TAB 3: SCHREIBTISCHTEST & INTERAKTIVE ÜBUNGEN
============================================================ -->
<section id="tabContent-exercises" class="hidden space-y-5 sm:space-y-6">
<!-- Exercise Mode Switcher Bar -->
<div class="flex flex-col sm:flex-row sm:items-center justify-between gap-3 bg-dark-card border border-dark-border rounded-xl p-3 sm:p-4">
<div class="flex flex-col sm:flex-row sm:items-center gap-2 w-full sm:w-auto">
<span class="text-xs font-mono text-dark-dim uppercase tracking-wider hidden sm:inline">Modus:</span>
<div class="grid grid-cols-2 sm:inline-flex rounded-lg border border-dark-border bg-dark-bg p-1 text-xs w-full sm:w-auto">
<button
type="button"
id="btnSubMode-trace"
onclick="setExerciseSubMode('trace')"
class="px-2.5 sm:px-3.5 py-1.5 rounded-md font-semibold transition-all bg-blue-600 text-white shadow-sm text-center text-[11px] sm:text-xs"
>
<span class="sm:hidden">Trace-Tabellen</span>
<span class="hidden sm:inline">Trace-Tabellen (Schreibtischtests)</span>
</button>
<button
type="button"
id="btnSubMode-puzzle"
onclick="setExerciseSubMode('puzzle')"
class="px-2.5 sm:px-3.5 py-1.5 rounded-md font-semibold transition-all text-dark-muted hover:text-white text-center text-[11px] sm:text-xs"
>
<span class="sm:hidden">Code-Puzzles</span>
<span class="hidden sm:inline">Code-Puzzles (Zeilen ordnen)</span>
</button>
</div>
</div>
<div class="flex items-center gap-2 w-full sm:w-auto">
<label for="exerciseSelect" class="text-xs font-mono text-dark-dim shrink-0">Aufgabe:</label>
<select
id="exerciseSelect"
onchange="onExerciseChange()"
class="bg-dark-bg border border-dark-border rounded-lg px-3 py-1.5 text-xs sm:text-sm text-white focus:border-blue-500 focus:outline-none w-full sm:w-auto sm:max-w-[280px]"
>
<!-- Filled by JS -->
</select>
</div>
</div>
<div id="exerciseStage" class="bg-dark-card border border-dark-border rounded-xl p-4 sm:p-6 space-y-5">
<!-- Filled dynamically by JS -->
</div>
</section>
</main>
<!-- ============================================================
FOOTER
============================================================ -->
<footer class="border-t border-dark-border mt-auto bg-dark-bg/60 text-xs text-dark-dim font-mono">
<div class="max-w-6xl mx-auto px-4 sm:px-6 py-6 flex flex-col sm:flex-row items-center justify-between gap-4">
<div class="flex items-center gap-2">
<span>cwillam © 2026</span>
<span>·</span>
<span>Open Source & 100% Lokal</span>
</div>
<div class="flex items-center gap-4 flex-wrap justify-center text-dark-muted">
<button onclick="openSupportModal()" class="hover:text-[#FFDD00] transition-colors flex items-center gap-1 font-bold">
<i data-lucide="coffee" class="w-3.5 h-3.5 text-[#FFDD00]"></i> Support
</button>
<a href="index.html" class="hover:text-white transition-colors">Dashboard</a>
<a href="subnet.html" class="hover:text-white transition-colors">Subnetz-Trainer</a>
<a href="sql.html" class="hover:text-white transition-colors">SQL-Labor</a>
<a href="glossar.html" class="hover:text-white transition-colors">Glossar</a>
<a href="help.html" class="hover:text-white transition-colors">Hilfe & FAQ</a>
<a href="https://discord.gg/5BM5YJadDs" target="_blank" rel="noopener" class="hover:text-[#5865F2] transition-colors flex items-center gap-1">
<i data-lucide="message-square" class="w-3.5 h-3.5"></i> Discord
</a>
</div>
</div>
</footer>
<!-- Standardized Support Modal -->
<div
id="supportModal"
class="fixed inset-0 z-50 bg-black/85 backdrop-blur-sm hidden flex items-center justify-center p-4"
onclick="if(event.target === this) closeSupportModal()"
>
<div class="w-full max-w-md bg-dark-card border border-dark-border rounded-2xl p-6 shadow-2xl space-y-4 relative">
<div class="flex items-center justify-between pb-3 border-b border-dark-border">
<div class="flex items-center gap-2.5">
<div class="w-8 h-8 rounded-lg bg-[#FFDD00]/15 border border-[#FFDD00]/30 flex items-center justify-center text-[#FFDD00]">
<i data-lucide="coffee" class="w-4 h-4"></i>
</div>
<div>
<h3 class="font-bold text-base text-white leading-tight">Projekt unterstützen</h3>
<span class="text-[10px] font-mono text-dark-dim leading-none">Freiwillig & 100% werbefrei</span>
</div>
</div>
<button
onclick="closeSupportModal()"
class="w-8 h-8 rounded-lg border border-dark-border hover:border-dark-border/80 bg-dark-bg hover:bg-dark-border/40 text-dark-muted hover:text-white transition-all flex items-center justify-center"
title="Schließen"
aria-label="Modal schließen"
>
<i data-lucide="x" class="w-4 h-4"></i>
</button>
</div>
<p class="text-xs text-dark-muted leading-relaxed">
Die Tracker sind komplett kostenlos, werbefrei und quelloffen. Wenn dir das Tool bei der Prüfungsvorbereitung hilft, freue ich mich riesig über einen Kaffee!
</p>
<div class="flex flex-col gap-3 pt-1">
<!-- PayPal Button -->
<a
href="https://www.paypal.com/paypalme/parablepanorama"
target="_blank"
rel="noopener"
class="flex items-center justify-between p-3.5 rounded-xl bg-[#0070BA]/10 border border-[#0070BA]/30 hover:border-[#0070BA]/60 hover:bg-[#0070BA]/20 transition-all group"
>
<div class="flex items-center gap-3">
<div class="w-9 h-9 rounded-lg bg-[#0070BA]/20 flex items-center justify-center text-[#0079C1] group-hover:scale-105 transition-transform">
<i data-lucide="wallet" class="w-4 h-4"></i>
</div>
<div class="flex flex-col text-left">
<span class="font-bold text-white text-xs">PayPal</span>
<span class="text-[10px] text-dark-muted font-mono">paypal.me/parablepanorama · Schnell & unkompliziert</span>
</div>
</div>
<i data-lucide="chevron-right" class="w-4 h-4 text-dark-muted group-hover:translate-x-0.5 transition-transform"></i>
</a>
<!-- Buy Me A Coffee Button -->
<a
href="https://buymeacoffee.com/cwillam"
target="_blank"
rel="noopener"
class="flex items-center justify-between p-3.5 rounded-xl bg-[#FFDD00]/10 border border-[#FFDD00]/30 hover:border-[#FFDD00]/60 hover:bg-[#FFDD00]/20 transition-all group"
>
<div class="flex items-center gap-3">
<div class="w-9 h-9 rounded-lg bg-[#FFDD00]/20 flex items-center justify-center text-[#FFDD00] group-hover:scale-105 transition-transform">
<i data-lucide="coffee" class="w-4 h-4"></i>
</div>
<div class="flex flex-col text-left">
<span class="font-bold text-white text-xs">Buy Me a Coffee</span>
<span class="text-[10px] text-dark-muted font-mono">buymeacoffee.com/cwillam · Einmalig spenden</span>
</div>
</div>
<i data-lucide="chevron-right" class="w-4 h-4 text-dark-muted group-hover:translate-x-0.5 transition-transform"></i>
</a>
</div>
<div class="pt-2 border-t border-dark-border/60 flex items-center justify-center gap-1.5 text-[11px] font-mono text-dark-dim">
<i data-lucide="shield-check" class="w-3.5 h-3.5 text-emerald-400"></i>
<span>Sichere Weiterleitung · Keine Datenübertragung</span>
</div>
</div>
</div>
<!-- Scripts -->
<script src="assets/js/lucide.min.js?v=3.0.0"></script>
<script src="assets/js/confetti.js?v=3.0.0"></script>
<script src="assets/js/pseudocode.js?v=3.0.1"></script>
<script>
function openSupportModal() {
const modal = document.getElementById("supportModal");
if (modal) {
modal.classList.remove("hidden");
if (window.lucide) lucide.createIcons();
}
}
function closeSupportModal() {
const modal = document.getElementById("supportModal");
if (modal) modal.classList.add("hidden");
}
document.addEventListener("keydown", (e) => {
if (e.key === "Escape") closeSupportModal();
});
if (window.lucide) lucide.createIcons();
</script>