/* Grundlegende Styles */
body {
    margin: 0 auto;
    background-color: black;
    font-family: Arial, sans-serif;
    color: white;
    text-align: center;
    padding: 40px 20px;
}

.construction {
    color: red;
    border-color: red;
    border-style: solid;
    border-radius: 50px;
}

h1, h2 {
    color: #61dafb;
    text-shadow: 0 0 8px #61dafb;
}
h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
}
h2 {
    margin-top: 2rem;
    /*border-bottom: 2px solid #61dafb;*/
    padding-bottom: 0.3rem;
}

/* Neuer moderner Stil für Hauptinhalt */
main {
    max-width: 900px;
    margin: 2rem auto 4rem;
    padding: 1rem 2rem;
    background: #1e1e2f;
    color: #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.6);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: left; /* Text linksbündig im main */
}

main h1, main h2 {
    color: #61dafb;
    text-shadow: 0 0 8px #61dafb;
}

main h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

main h2 {
    margin-top: 2rem;
    border-bottom: 2px solid #61dafb;
    padding-bottom: 0.3rem;
}

main ol, main ul {
    margin-left: 1.5rem;
    line-height: 1.6;
}

main a {
    color: #82cfff;
    text-decoration: none;
    font-weight: 600;
}

main a:hover {
    text-decoration: underline;
}

main pre {
    background: #0d1117;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    box-shadow: inset 0 0 10px #0d1117;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    color: #c6c6c6;
}

main section {
    margin-bottom: 2rem;
}

main section .screenshot {
    width: 100%;
}

/* Hinweisbox für Kontakt-Hinweis */
.contact-note {
    margin-top: 2rem;
    padding: 1rem;
    background: #282c34;
    border-left: 5px solid #61dafb;
    font-style: italic;
    font-size: 1rem;
    color: #a0cfff;
    border-radius: 8px;
}

/* Footer bleibt unverändert */
footer {
    margin-top: 60px;
    font-size: 14px;
    color: #888;
}

/* Linkfarbe im Footer und Body */
a {
    color: white;
}

/* Box-Sizing für alle Elemente */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Navigation Grundstil */
.navbar {
    position: relative;
    background-color: black;
    text-align: center;
}

/* Menü-Liste */
.menu {
    list-style: none;
    padding: 0 10px; /* Innenabstand links und rechts */
    margin: 0 auto 40px;
    display: flex;
    justify-content: center;
    gap: 30px;
}

/* Menüpunkt */
.menu > li {
    position: relative; /* wichtig für Dropdown-Positionierung */
}

/* Links im Menü */
.menu li a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    padding: 8px 15px;
    border: 2px solid white;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
    display: inline-block;
    white-space: nowrap; /* Verhindert Zeilenumbruch */
}

/* Hover- und Fokus-Effekt */
.menu li a:hover,
.menu li a:focus {
    background-color: white;
    color: black;
}

/* Dropdown-Menü */
.menu .dropdown {
    display: none; /* standardmäßig versteckt */
    position: absolute;
    top: 100%; /* direkt unter dem Eltern-LI */
    left: -8%;   /* linksbündig zum Eltern-LI */
    background-color: transparent;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    list-style: none;
    padding: 0;
    margin: 0;
    min-width: 160px; /* Breite des Dropdowns */
    z-index: 1000;
    border-radius: 5px;
}

/* Dropdown-Links - Stil wie Hauptbuttons */
.menu .dropdown li a {
    padding: 8px 15px;
    color: white;
    background-color: black;
    border: 2px solid white;
    border-radius: 5px;
    display: inline-block;
    font-size: 18px;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
    white-space: nowrap;
    margin: 5px 10px; /* Optional: Abstand zwischen Dropdown-Buttons */
}

/* Hover-Effekt Dropdown-Links wie Hauptbuttons */
.menu .dropdown li a:hover,
.menu .dropdown li a:focus {
    background-color: white;
    color: black;
}

/* Dropdown anzeigen bei Hover auf Eltern-LI */
.menu li:hover > .dropdown {
    display: block;
}

/* Hamburger-Button verstecken */
.menu-toggle {
    display: none;
}

/* Hamburger Icon */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    margin: 10px auto;
}

.hamburger span {
    display: block;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Grid-Bereiche (bleiben unverändert) */
.headerX {
    /*padding: 24px;*/
    grid-area: headerX;
}

.sidebar {
    background-color: lightcoral;
    padding: 24px;
    grid-area: sidebar;
}

.main {
    padding: 24px;
    height: 460px;
    grid-area: main;
}

.aside {
    background-color: bisque;
    padding: 24px;
    grid-area: aside;
}

.footerX {
    padding: 24px;
    grid-area: footerX;
}

.grid-container {
    display: grid;
    grid-template-areas:
            'headerX headerX headerX headerX headerX headerX'
            'sidebar main main main main aside'
            'footerX footerX footerX footerX footerX footerX'
;
}

/* Responsive Styles */
@media (max-width: 768px) {
    /* Menü als vertikale Liste verstecken */
    .menu {
        flex-direction: column;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        gap: 0; /* Abstand entfernen für vertikale Liste */
    }

    /* Dropdown in mobile Ansicht als normale Liste anzeigen */
    .menu .dropdown {
        position: static;
        box-shadow: none;
        background-color: transparent;
        min-width: auto;
        padding-left: 20px;
        display: none; /* standardmäßig versteckt */
    }

    /* Dropdown anzeigen, wenn Eltern-LI aktiv (Hover funktioniert auf Touch nicht gut, daher Klick-Handling per JS empfohlen) */
    .menu li:hover > .dropdown,
    .menu li:focus-within > .dropdown {
        display: block;
    }

    /* Hamburger anzeigen */
    .hamburger {
        display: flex;
    }

    /* Menü anzeigen, wenn Checkbox aktiviert */
    .menu-toggle:checked + .hamburger + .menu {
        max-height: 500px; /* groß genug für alle Links */
    }

    /* Hamburger Icon Animation */
    .menu-toggle:checked + .hamburger span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle:checked + .hamburger span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle:checked + .hamburger span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Dropdown im mobilen Menü standardmäßig verstecken */
    .menu .dropdown {
        display: none;
        position: static; /* kein absolute, damit es in der Liste bleibt */
        box-shadow: none;
        background-color: transparent;
        padding-left: 20px; /* Einrückung */
        margin-top: 5px;
        border: none;
    }

    /* Dropdown sichtbar, wenn Eltern-LI die Klasse 'open' hat */
    .menu li.open > .dropdown {
        display: block !important;
    }

    /* Optional: Pfeil anzeigen, der anzeigt, dass es ein Dropdown gibt */
    .menu li.has-dropdown > a::after {
        content: " ▼";
        font-size: 12px;
        margin-left: 5px;
    }

    /* Optional: Cursor-pointer für Eltern-LI mit Dropdown */
    .menu li.has-dropdown > a {
        cursor: pointer;
    }

    .grid-container {
        grid-template-areas:
        'headerX headerX headerX headerX headerX headerX'
        'sidebar main main main main main'
        'aside aside aside aside aside aside'
        'footerX footerX footerX footerX footerX footerX';
    }
}

/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {
    .grid-container {
        grid-template-areas:
    'headerX headerX headerX headerX headerX headerX'
    'sidebar sidebar sidebar sidebar sidebar sidebar'
    'main main main main main main'
    'aside aside aside aside aside aside'
    'footerX footerX footerX footerX footerX footerX';
    }
}

/* Cursor Trail Styles (bleibt unverändert) */
#cursor-trail {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none; /* damit es keine Klicks blockiert */
    overflow: visible;
    z-index: 1000;
}

.star {
    position: absolute;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 8px 2px white;
    opacity: 1;
    animation: fadeOut 0.8s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.5);
    }
}
