/* Interaction-Seite: Handgezeichnetes Thema */
@import url('https://fonts.googleapis.com/css2?family=Architects+Daughter&family=Indie+Flower&display=swap');

:root {
  --primary: #ff6b6b;
  --secondary: #4ecdc4;
  --accent: #ffd166;
  --text-primary: #2b2d42;
  --text-secondary: #495057;
  --bg-primary: #f8f9fa;
  --bg-secondary: #e5e5e5;
  --bg-tertiary: #ffffff;
  --border-color: #adb5bd;
  --code-bg: #fff5e6;
  --code-text: #5d5d5d;
  --code-border: #ffc6c6;
}

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

body {
  font-family: 'Architects Daughter', cursive;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ececec' fill-opacity='0.4' fill-rule='evenodd'/%3E%3C/svg%3E");
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  font-size: 1.1rem;
}

/* Header-Bereich */
header {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  padding: 30px 20px;
  text-align: center;
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 5px 5px 0px var(--primary);
  border: 2px solid var(--text-primary);
  position: relative;
  transform: rotate(-1deg);
}

header h1 {
  font-family: 'Indie Flower', cursive;
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--primary);
  transform: rotate(1deg);
  text-decoration: underline wavy var(--accent);
}

header .subtitle {
  font-size: 1.3rem;
  color: var(--text-secondary);
  font-style: italic;
  transform: rotate(-1deg);
}

/* Navigation */
nav {
  background-color: var(--bg-tertiary);
  border-radius: 10px;
  margin-bottom: 30px;
  position: sticky;
  top: 10px;
  z-index: 100;
  box-shadow: 5px 5px 0px var(--secondary);
  border: 2px solid var(--text-primary);
  transform: rotate(0.5deg);
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 10px;
}

nav li {
  margin: 5px 10px;
  position: relative;
}

nav a {
  color: var(--text-primary);
  text-decoration: none;
  padding: 8px 12px;
  transition: all 0.3s;
  font-size: 1.1em;
  position: relative;
  display: inline-block;
  z-index: 1;
}

nav a::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 10px;
  background-color: var(--accent);
  z-index: -1;
  transform: rotate(-2deg);
  transition: height 0.3s;
}

nav a:hover::before {
  height: 100%;
}

nav a:hover {
  transform: translateY(-3px);
}

/* Hauptinhaltsbereich */
main {
  background-color: var(--bg-tertiary);
  border-radius: 10px;
  box-shadow: 8px 8px 0px var(--text-primary);
  padding: 40px;
  margin-bottom: 30px;
  position: relative;
  z-index: 1;
  border: 2px solid var(--text-primary);
}

main::before {
  content: "";
  position: absolute;
  top: -10px;
  left: -10px;
  width: calc(100% + 20px);
  height: calc(100% + 20px);
  border: 2px dashed var(--accent);
  border-radius: 15px;
  z-index: -1;
  pointer-events: none;
}

section {
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 2px dotted var(--border-color);
  position: relative;
}

section:nth-child(odd) {
  transform: rotate(-0.5deg);
}

section:nth-child(even) {
  transform: rotate(0.5deg);
}

section:last-child {
  border-bottom: none;
}

h2 {
  font-family: 'Indie Flower', cursive;
  color: var(--primary);
  padding-bottom: 15px;
  margin-bottom: 20px;
  font-weight: 700;
  font-size: 2.2rem;
  position: relative;
  display: inline-block;
}

h2::after {
  content: "";
  position: absolute;
  bottom: 10px;
  left: 0;
  width: 100%;
  height: 10px;
  background-color: var(--accent);
  z-index: -1;
  transform: rotate(-1deg);
}

h3 {
  font-family: 'Indie Flower', cursive;
  color: var(--secondary);
  margin: 25px 0 15px;
  font-weight: 600;
  font-size: 1.6rem;
  position: relative;
  display: inline-block;
}

h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background-color: var(--accent);
  z-index: -1;
  transform: rotate(-1deg);
}

/* Inhaltsboxen */
.content-box {
  background-color: var(--bg-secondary);
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 20px;
  position: relative;
  box-shadow: 4px 4px 0 var(--text-primary);
  border: 2px solid var(--text-primary);
}

.content-box::before {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  background-color: var(--accent);
  border-radius: 50%;
  opacity: 0.5;
}

.content-box p {
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
}

.content-box ul, .content-box ol {
  margin-left: 30px;
  margin-bottom: 15px;
}

.content-box li {
  margin-bottom: 10px;
  position: relative;
}

.content-box li::marker {
  color: var(--primary);
  font-size: 1.2em;
}

/* Code-Beispiele */
.code-example {
  background-color: var(--code-bg);
  border-radius: 10px;
  padding: 20px;
  margin: 20px 0;
  overflow-x: auto;
  border: 2px solid var(--text-primary);
  position: relative;
  box-shadow: 4px 4px 0 var(--primary);
  transform: rotate(-0.5deg);
}

.code-example::before {
  content: "{ code }";
  position: absolute;
  top: -12px;
  left: 20px;
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  padding: 0 10px;
  font-family: 'Indie Flower', cursive;
  font-weight: bold;
  border: 2px solid var(--text-primary);
  border-radius: 20px;
}

.code-example pre {
  margin: 0;
}

.code-example code {
  color: var(--code-text);
  font-family: 'Architects Daughter', cursive;
  font-size: 0.95rem;
  white-space: pre;
  line-height: 1.5;
}

/* Erklärungsliste */
.explanation {
  list-style-type: none;
  margin: 15px 0;
}

.explanation li {
  margin-bottom: 15px;
  display: flex;
  align-items: baseline;
  position: relative;
}

.explanation li::before {
  content: "✎";
  margin-right: 10px;
  color: var(--primary);
  font-size: 1.2em;
}

.explanation code {
  background-color: var(--code-bg);
  padding: 2px 8px;
  border-radius: 5px;
  margin-right: 8px;
  font-family: 'Architects Daughter', cursive;
  color: var(--text-primary);
  border: 1px solid var(--code-border);
  position: relative;
}

.explanation code::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--accent);
  z-index: -1;
  transform: rotate(-1deg);
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
  border-radius: 10px;
  font-size: 0.9rem;
  box-shadow: 5px 5px 0px var(--secondary);
  border: 2px solid var(--text-primary);
  transform: rotate(1deg);
  position: relative;
}

footer::before {
  content: "✂";
  position: absolute;
  top: -15px;
  left: 20px;
  font-size: 1.5em;
  color: var(--primary);
}

footer::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 40px;
  width: calc(100% - 60px);
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    var(--text-primary),
    var(--text-primary) 10px,
    transparent 10px,
    transparent 15px
  );
}

footer p {
  margin-bottom: 10px;
  font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
  main {
    padding: 20px;
  }
  
  header h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 600px) {
  body {
    padding: 10px;
  }
  
  header {
    transform: rotate(0);
  }
  
  nav {
    transform: rotate(0);
  }
  
  nav ul {
    flex-direction: column;
    align-items: center;
  }
  
  nav li {
    margin: 5px 0;
  }
  
  section:nth-child(odd),
  section:nth-child(even) {
    transform: rotate(0);
  }
}