/* ============================================
   GLOBALE EINSTELLUNGEN
   ============================================ */
@font-face {
    font-family: "Roboto condensed normal";
    src:
        url(../fonts/RobotoCondensed-VariableFont_wght.woff2) format("woff2"),
        url(../fonts/RobotoCondensed-VariableFont_wght.woff) format("woff");
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --body-color: #2e3349;
    --sidebar-color: #1f2230ff;
    --sidebar-active: #2e3349;
    --sidebar-highlight: #ffffff11;
    --sidebar-header: #0a0b10aa;

    /* Sizes */
    --header-height: 40px;
    --sidebar-width: 180px;
    --sidebar-collapsed-width: 60px;
}

body {
    font-family: "Roboto condensed normal";
    background-color: var(--body-color);
    color: #fff;
    overflow-x: hidden;

}

/* ============================================
   TOP-LEISTE
   ============================================ */

.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: var(--sidebar-color);
    color: white;
    display: flex;
    align-items: center;
    padding: 0 10px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    /*border: 1px solid red;*/
}

.hamburger-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 8px 11px;
    margin-right: 15px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.hamburger-btn:hover {
    background-color: var(--sidebar-highlight);
}
.hamburger-icon {
    display: inline-block;
    font-size: 16px;
    line-height: 1;
}

.app.title {
    font-size: 16px;
    font-weight: 600;
}

.app.developer{
    font-size:8px;
    font-weight: 200;

}

.app {
    display: flex;
    justify-content: center;
}

/* ============================================
   HAUPTCONTAINER
   ============================================ */

.main-container {
    display: flex;
    margin-top: var(--header-height); /* Platz für die fixierte Top-Leiste */
    height: calc(100vh - var(--header-height));
}

/* ============================================
   SEITLICHE NAVIGATION
   ============================================ */

.sidebar {
    position: fixed;
    left: 0;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    background-color: var(--sidebar-color);
    transition: width 0.3s ease;
    width: var(--sidebar-collapsed-width); /* Eingeklappte Breite (nur Icons) */
    overflow: hidden;
    z-index: 900;
    /*border: 1px solid green;*/
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.navlist .bottom {
    background: white;
}

/* Ausgeklappter Zustand */
.sidebar.expanded {
    width: var(--sidebar-width);
}

.nav-list {
    list-style: none;
    padding: 0px 0;
    /*border: 1px solid blue;*/
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 15px 15px;
    color: #ecf0f1;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
    height: 60px;
}

.nav-item:hover {
    background-color: var(--sidebar-highlight);
}

/* Aktiver Navigationseintrag */
.nav-item.active {
    background-color: var(--sidebar-active);
}

.nav-icon {
    font-size: 20px;
    width: 36px;
    text-align: center;
    display: inline-block;
}

.nav-text {
    margin-left: 15px;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.3s;
}

/* Text sichtbar machen wenn Navigation ausgeklappt */
.sidebar.expanded .nav-text {
    opacity: 1;
}

/* ============================================
   HAUPTINHALTSBEREICH
   ============================================ */

.content-area {
    flex: 1;
    padding: 30px;
    margin-left: var(
        --sidebar-collapsed-width
    ); /* Platz für eingeklappte Navigation */
    transition: margin-left 0.3s ease;
    overflow-y: auto;
    background-color: var(--body-color);
    /*border: 1px solid orange;*/
}

/* Content-Bereich verschieben wenn Navigation ausgeklappt */
.content-area.shifted {
    margin-left: var(--sidebar-width);
}

/* Willkommensbildschirm */
.welcome-screen {
    text-align: center;
    padding: 50px 20px;
}

.welcome-screen h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 28px;
}

.welcome-screen p {
    color: #7f8c8d;
    font-size: 16px;
}

/* ============================================
   Sprachenschalter
   ============================================ */
.switch-language {
    display: flex;
    align-items: center;
  
}

.label-switch {
    font-size: 12px;
    margin: 5px;
}

.switch {
    --toggle-size: 5px;
    appearance: none;
    width: 6.25em;
    height: 3.125em;
    background: -webkit-gradient(
            linear,
            left top,
            right top,
            color-stop(50%, #efefef),
            color-stop(50%, #2a2a2a)
        )
        no-repeat;
    background: -o-linear-gradient(left, #efefef 50%, #efefef 50%) no-repeat;
    background: linear-gradient(to right, #efefef 50%, #efefef 50%) no-repeat;
    background-size: 205%;
    background-position: 0;
    position: relative;
    cursor: pointer;
    transition: 0.4s;
    border-radius: 100em;
    font-size: var(--toggle-size);
    border: 1px solid white;
}

.switch::before {
    content: "";
    width: 2.25em;
    height: 2.25em;
    position: absolute;
    top: 0.438em;
    left: 0.438em;
    background: -webkit-gradient(
            linear,
            left top,
            right top,
            color-stop(50%, #efefef),
            color-stop(50%, #2a2a2a)
        )
        no-repeat;
    background: -o-linear-gradient(left, #2a2a2a 50%, #2a2a2a 50%) no-repeat;
    background: linear-gradient(to right, #2a2a2a 50%, #2a2a2a 50%) no-repeat;
    background-size: 205%;
    background-position: 100%;
    border-radius: 50%;
    transition: 0.4s;
}

.switch:checked::before {
    left: calc(100% - 2.25em - 0.438em);
    background-position: 0;
}

.switch:checked {
    background-position: 100%;
}

/* ============================================
   RESPONSIVE DESIGN - SMARTPHONE
   ============================================ */

@media screen and (max-width: 768px) {
    /* Navigation auf Smartphone: Komplett ausgeblendet wenn eingeklappt */
    .sidebar {
        width: 0;
        transform: translateX(-100%);
    }

    .sidebar.expanded {
        width: var(--sidebar-width);
        transform: translateX(0);
    }

    /* Content-Bereich immer volle Breite auf Smartphone */
    .content-area {
        margin-left: 0;
    }

    .content-area.shifted {
        margin-left: 0;
    }

    /* Overlay über Content wenn Navigation auf Smartphone geöffnet */
    .sidebar.expanded + .content-area::before {
        content: "";
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background-color: var(--body-color);
        z-index: 800;
    }

    .app-title {
        font-size: 14px;
    }

    .content-area {
        padding: 20px;
        /*border: 1px solid red;*/
    }
}

/* ============================================
   HILFKLASSEN
   ============================================ */

/* Fade-In Animation für Content-Wechsel */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
