/* --dark-bg: #333;
    --darker-bg: #1e1e1e;
    --dark-red-bg: #422f2fb0; */

:root {
    --dark-bg: #333;
    --darker-bg: #1e1e1e;
    
    --light-red-bg: #ff555581;
    --dark-red-bg: #aa222296;
    --darker-red-bg: #422f2fb0;

    --light-animated-bg: #071b31; 
    --dark-animated-bg: #1c3344;

}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--dark-bg); /* Dunkler Hintergrund */
    color: white; /* Helle Schrift */
    background: linear-gradient(to bottom,
        var(--darker-bg) 0%,       
        var(--darker-red-bg) 300%) fixed;
    background-size: cover; /* Den Hintergrund auf die volle Größe des Viewports abdecken */
    min-height: 100vh;
}

.navbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background-color: #ffffff;
    transition: all 0.5s ease-in-out;
  }
  
  .navbar.open {
    left: 50%;
  }
  

@keyframes colorChange {
    from { background-color: var(--dark-animated-bg); }
    to { background-color: var(--light-animated-bg); }
}
@keyframes colorChange2 {
    from { background-color: var(--light-animated-bg); }
    to { background-color: var(--dark-animated-bg); }
}

@keyframes rainbow {
    0% {
        color: red;
    }
    25% {
        color: orange;
    }
    50% {
        color: yellow;
    }
    75% {
        color: green;
    }
    100% {
        color: blue;
    }
}

header, nav, section, footer {
    margin: 20px;
}

header, nav, footer {
    box-shadow: 0 2px 5px rgb(204, 147, 147);
    border-radius: 8px;
}

header {
    color: white;
    padding: 10px;
    text-align: center;
    /* background: linear-gradient(to right, #071b31, #1c3344)*/
    animation: colorChange 2s infinite alternate;
}

.invisible {
    display: none; /*dont show navbar if reloading page*/
}
nav {
    background-color: #ECF0F1;
    padding: 0.01rem;
    /*background: linear-gradient(to left, #495b70, #1d5c8b);*/
    animation: colorChange2 2s infinite alternate;
    position: sticky;
    top: 4px;
}

nav ul {
    margin: 0.25rem;
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

nav li {
    margin: 0.7rem 0.4rem 0.7rem 0.4rem;
}

nav a {
    text-decoration: none;
    color: #e1ebf7;
    font-weight: bold;
    padding: 8px 16px; /* Innerer Abstand oben/unten 8px, seitlich 16px */
    /*background-color: #1f73b3;*/ /* Hintergrundfarbe */
    border-radius: 5px;
    animation: colorChange 2s infinite alternate;
    /* transition: background-color 0.3s ease; Animiere die Hintergrundfarbe beim Überfahren */
}
nav a:hover {
    /*color: #441111; /* Ändere dies zu einer Akzentfarbe deiner Wahl */
    animation: rainbow 5s infinite alternate-reverse;
}

.visible {
    display: flex;
    justify-content: end;
    background-color: inherit;
    border: 0.5 solid rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    font-family: inherit;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    animation: colorChange 2s infinite alternate;
}
#toggle-nav {
    text-align: center;
    border-radius: 50%;
    border: solid 0.5px white;
    margin: 4px;
    padding: 4px 8px;
    font-size: 15px;
    background-color: #5d2a2aff;
    color: white;
    cursor: pointer;
}


section {
    /* background-color: #505052d9; */
    margin-top: 40px;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.75); /* Anpassen, um die Intensität zu ändern */
    padding: 20px;
    border: solid 1px rgba(255, 255, 255, 0.378);
    border-radius: 32px;
    background: linear-gradient(to top,
        var(--dark-red-bg) 0%,
        var(--darker-red-bg) 100%);
}

.link {
    color: #519dd8;
    text-decoration: none;
}
.link:visited {
    color: rgb(255, 0, 255);
}
.link:hover {
    color: rgb(4, 247, 4);
}

.button {
    padding: 0.8rem 1.6rem;
    border-radius: 1rem;
    border: none;
    color:var(--dark-bg);
    margin-right: 0.8rem;
    margin-top: 0.8rem;
    font-size: 1.3rem;
    font-family: sans-serif;
}

.button:hover{
    background-color: #1c3344;
    color: white;
    cursor: pointer;
    animation: colorChange 1s infinite alternate;
}

footer {
    margin-top: 40px;
    /*background-color: #2C3E50;*/
    color: white;
    padding: 10px;
    text-align: center;
    /*background: linear-gradient(to right, #071b31, #1c3344);*/
    animation: colorChange 2s infinite alternate;
}

#fun:hover {
    animation: rainbow 0.1s infinite alternate-reverse;
}