body {
    font-family: 'Helvetica', 'Arial', 'Verdana', sans-serif;
    color: black;
    background-color: white;
    margin: 0px;
    margin-top: 40px;
}


nav {
    background-color: #555; 
    color: #fff; 
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: 75px;
    display: flex;
    align-items: center;
    padding: 0 25px;
    overflow-x: auto;
    white-space: nowrap;
    border-radius: 6px; 
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 2.5rem;
    font-weight: bold;
    color: #fff; 
    margin-right: 20px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
}

.logo:hover {
    color: #ff7e0b;
    cursor: pointer;
}

.navbar-nav {
    list-style-type: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
    overflow-y: auto;
}

.nav-item {
    flex: 0 0 auto;
    margin-right: 20px;
    margin: 15px;
}

.navbar-nav a {
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    color: #fff; 
    font-weight: 600;
    white-space: nowrap;
}

.navbar-nav a:hover {
    background-color: #777; 
}

.navbar-nav a.active {
    background-color: #777; 
}

.headerbox {
    text-align: left;
    border-radius: 10px;
    padding: 20px;
    max-width: 98%;
    margin-top: 80px;
    margin-bottom: 10px;
    background-color: #555; 
    
}

.headerbox .title { 
    font-size: 160%;
    color: white;

}

.headerbox .headersubtitle {
    font-size: 100%;
    color: white;
}

.textlink {
    text-decoration: none;
    color: #000000; 
}

.content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 40px;
    max-width: 95%;
    margin-top: 40px;
}

.Box {
    background-color: #555; 
    border-radius: 7px;
    margin-bottom: 3px;
    padding: 25px;
    margin-left: 0.5%;
    color: white; 
    max-width: 98%;
}

.title {
    margin: 0 0 10px 0;
    font-size: 1.5em;
    font-weight: 600;
    color: white;
}

.subtitle {
    margin: 0;
    font-size: 1em;
    color: white;
}

.button {
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
}


footer {
    bottom: 0;
    max-width: 100%;
    height: 50px;
    color: black;
    text-align: center;
    line-height: 50px;
    text-decoration: none;
    margin: 0 10px;
    margin-bottom: 10%;

}

footer a {
    color: black; 
    text-decoration: none;
    margin: 0 10px;
   
}

footer a:hover {
    text-decoration: underline;
}


#display {
    width: 95%;
    height: 50px;
    background-color: lightgray; 
    color: black; 
    border: none;
    text-align: right;
    font-size: 2em;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
    margin-top: 10px;
    border: 20px;
}

.calculator {
    background-color: #333; 
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.2);
    padding-left: 10%;
    padding-right: 10%;
}

.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 10px;
}

button {
    background-color: #666; 
    color: #fff;
    font-size: 1.5em;
    border: none;
    border-radius: 5px;
    padding: 20px;
    cursor: pointer;
}

button:hover {
    background-color: #555;
}

button.zero {
    grid-column: span 2;
}

button.delete {
    background-color: #FF7E0B;
}

button.clear {
    background-color: #3498db;
}


button:active {
    background-color: #444;
}



@media (prefers-color-scheme: dark) {
    body {
        background-color: black;
        color: white;
    }

   
    nav {
        background-color: #1a1a1a; 
        color: #f0f0f0; 
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    }

    .logo {
        color: #f0f0f0;
    }

    .navbar-nav a {
        color: #e0e0e0;
    }

    .navbar-nav a:hover,
    .navbar-nav a.active {
        background-color: #555;
    }

    .headerbox .title {
        color: #ffffff;
    }

    .headerbox .headersubtitle {
        color: #cccccc;
    }

    .textlink {
        color: #87ceeb;
    }

   
    .Box {
        background-color: #555; 
        color: #f0f0f0;
    }

    .title {
        color: #ffffff;
    }

    .subtitle {
        color: #e0e0e0;
    }

    footer {
        color: #f0f0f0;
    }

    footer a {
        color: #e0e0e0;
       
    }

   
    #display {
        background-color: #444;
        color: #f0f0f0;
    }

    .calculator {
        background-color: #222;
        box-shadow: 0px 0px 15px rgba(255, 255, 255, 0.1);
    }

    button {
        background-color: #555;
        color: #fff;
    }

    button:hover {
        background-color: #666;
    }

    button.delete {
        background-color: #b35900;
    }

    button.clear {
        background-color: #2874a6;
    }

    button:active {
        background-color: #333;
    }
}

/* Dark Mode erzwingen: exakt wie @media (prefers-color-scheme: dark) */
[data-theme="dark"] body {
    background-color: black !important;
    color: white !important;
}
[data-theme="dark"] nav {
    background-color: #1a1a1a !important;
    color: #f0f0f0 !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5) !important;
}
[data-theme="dark"] .logo {
    color: #f0f0f0 !important;
}
[data-theme="dark"] .navbar-nav a {
    color: #e0e0e0 !important;
}
[data-theme="dark"] .navbar-nav a:hover,
[data-theme="dark"] .navbar-nav a.active {
    background-color: #555 !important;
}
[data-theme="dark"] .headerbox {
    background-color: #555 !important;
}
[data-theme="dark"] .headerbox .title {
    color: #ffffff !important;
}
[data-theme="dark"] .headerbox .headersubtitle {
    color: #cccccc !important;
}
[data-theme="dark"] .textlink {
    color: #87ceeb !important;
}
[data-theme="dark"] .Box {
    background-color: #555 !important;
    color: #f0f0f0 !important;
}
[data-theme="dark"] .title {
    color: #ffffff !important;
}
[data-theme="dark"] .subtitle {
    color: #e0e0e0 !important;
}
[data-theme="dark"] footer {
    color: #f0f0f0 !important;
}
[data-theme="dark"] footer a {
    color: #e0e0e0 !important;
}
[data-theme="dark"] #display {
    background-color: #444 !important;
    color: #f0f0f0 !important;
}
[data-theme="dark"] .calculator {
    background-color: #222 !important;
    box-shadow: 0px 0px 15px rgba(255, 255, 255, 0.1) !important;
}
[data-theme="dark"] button {
    background-color: #555 !important;
    color: #fff !important;
}
[data-theme="dark"] button:hover {
    background-color: #666 !important;
}
[data-theme="dark"] button.delete {
    background-color: #b35900 !important;
}
[data-theme="dark"] button.clear {
    background-color: #2874a6 !important;
}
[data-theme="dark"] button:active {
    background-color: #333 !important;
}

/* Light Mode erzwingen: exakt wie Standard */
[data-theme="light"] body {
    background-color: white !important;
    color: black !important;
}
[data-theme="light"] nav {
    background-color: #555 !important;
    color: #fff !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) !important;
}
[data-theme="light"] .logo {
    color: #fff !important;
}
[data-theme="light"] .navbar-nav a {
    color: #fff !important;
}
[data-theme="light"] .navbar-nav a:hover,
[data-theme="light"] .navbar-nav a.active {
    background-color: #777 !important;
}
[data-theme="light"] .headerbox {
    background-color: #555 !important;
}
[data-theme="light"] .headerbox .title {
    color: white !important;
}
[data-theme="light"] .headerbox .headersubtitle {
    color: white !important;
}
[data-theme="light"] .textlink {
    color: #000000 !important;
}
[data-theme="light"] .Box {
    background-color: #555 !important;
    color: white !important;
}
[data-theme="light"] .title {
    color: white !important;
}
[data-theme="light"] .subtitle {
    color: white !important;
}
[data-theme="light"] footer {
    color: black !important;
}
[data-theme="light"] footer a {
    color: black !important;
}
[data-theme="light"] #display {
    background-color: lightgray !important;
    color: black !important;
}
[data-theme="light"] .calculator {
    background-color: #333 !important;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.2) !important;
}
