/***************************************************************************
 * 1) RESET & BASE VARIABLES
 ***************************************************************************/
 *, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --dark: #111111;
    --light: #ffffff;
    --accent: #1a73e8;
    --text-dark: #333;
    --text-light: #fff;
    /* Zusätzliche Farben für Toggle-Switch usw. */
    --sun: #1a73e8;
    --moon: #dddddd;
    --cloud: #ffffff;
}

/***************************************************************************
 * 2) BODY & DARK MODE
 ***************************************************************************/
body {
    font-family: Arial, sans-serif;
    background: #f2f2f2;  /* Hellgrau */
    color: #000;          /* Standard Schriftfarbe im Light-Mode */
}
body.darkmode {
    background: #121212;  /* Sehr dunkles Grau */
    color: #fff;          /* Helle Schrift im Dark-Mode */
}

/***************************************************************************
 * 3) HEADER & NAVIGATION
 ***************************************************************************/
/* Grundstruktur des Headers */
.site-header {
    background: var(--light);
    color: var(--text-dark);
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: background 0.3s, color 0.3s;
}
body.darkmode .site-header {
    background: var(--dark);
    color: var(--text-light);
}

/* Header-Container (max. Breite, zentriert) */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
}

/* Linke Sektion: Logo + Navigation */
.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Logo */
.site-logo a {
    font-size: 30px;
    font-weight: bold;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.4s;
}
body.darkmode .site-logo a {
    color: var(--light);
}

/* Navigationsliste */
.site-nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
}
.site-nav li {
    position: relative;
}
.site-nav a {
    text-decoration: none;
    color: var(--text-dark);
    padding: 10px 15px;
    border-radius: 5px;
    transition: background 0.3s, color 0.3s;
}
.site-nav a:hover,
.site-nav a.active {
    background: var(--accent);
    color: var(--text-light);
}
body.darkmode .site-nav a {
    color: var(--text-light);
}
body.darkmode .site-nav a:hover,
body.darkmode .site-nav a.active {
    background: var(--light);
    color: var(--dark);
}

/* Rechte Sektion: Hamburger-Menü, Icons, etc. */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/***************************************************************************
 * 3.1) HAMBURGER-MENÜ
 ***************************************************************************/
.menu-toggle {
    display: none; /* Nur im Mobile-Viewport sichtbar */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1100; /* Überlagerung, falls nötig */
}
.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}
body.darkmode .menu-toggle span {
    background: var(--text-light);
}
/* Offen-Status (Kreuz statt Hamburger) */
.menu-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
}
.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
}

/***************************************************************************
 * 3.2) ICONS (LOGIN, KORB, ETC.)
 ***************************************************************************/
.header-icons {
    display: flex;
    align-items: center;
    gap: 15px;
}
.icon-link {
    font-size: 24px;
    color: var(--text-dark);
    cursor: pointer;
    transition: color 0.3s;
}
.icon-link:hover {
    color: var(--accent);
}
body.darkmode .icon-link {
    color: var(--text-light);
}
body.darkmode .icon-link:hover {
    color: var(--accent);
}

/***************************************************************************
 * 3.3) DARK MODE TOGGLE-SWITCH
 ***************************************************************************/
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 24px;
}
.toggle-switch .toggle-input {
    display: none;
}
.toggle-switch .toggle-label {
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 24px;
    background-color: #2196F3;
    border-radius: 34px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.toggle-switch .toggle-label::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    background-color: #fff;
    box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s;
}
.toggle-switch .toggle-input:checked + .toggle-label {
    background-color: #4CAF50;
}
.toggle-switch .toggle-input:checked + .toggle-label::before {
    transform: translateX(16px);
}

/***************************************************************************
 * 3.4) SELL/KAUF ICONS-SICHTBARKEIT
 ***************************************************************************/
/* Verkaufskorb nur auf Sell-Seiten sichtbar */
.euro-icon {
    display: none;
}
body.sell-page .cart-icon {
    display: none;
}
body.sell-page .euro-icon {
    display: inline-block;
}

/***************************************************************************
 * 4) RESPONSIVE ANPASSUNGEN (MOBILE)
 ***************************************************************************/
@media (max-width: 768px) {
    /* Header-Container: Spaltenlayout */
    .header-container {
        flex-direction: column;
        align-items: center;
    }

    /* Logo zentriert */
    .header-left {
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }

    /* Rechte Sektion: Hamburger + Icons in einer Zeile */
    .header-right {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Hamburger-Menü sichtbar (anstelle der Desktop-Navi) */
    .menu-toggle {
        display: flex;
    }

    /* Navigation wird zum Dropdown */
    .site-nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;  /* Passend zum Header-Abstand */
        right: 20px;/* Ausrichtung nach rechts */
        background: var(--light);
        padding: 15px;
        gap: 10px;
        border-radius: 10px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        z-index: 1000;
    }
    .site-nav ul.open {
        display: flex;
    }
    body.darkmode .site-nav ul {
        background: var(--dark);
        box-shadow: 0 4px 10px rgba(255, 255, 255, 0.1);
    }

    /* Icons anpassen */
    .header-icons {
        gap: 10px;
    }
    .header-icons .icon-link {
        margin-right: 10px;
        font-size: 20px;
    }
}

/***************************************************************************
 * 5) LOGIN POPUP (MODAL)
 ***************************************************************************/
/* Modal Overlay */
.modal {
    display: none;                 /* Standardmäßig ausgeblendet */
    position: fixed;
    z-index: 2000;                /* Über dem Header (z-index: 1000) */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;               /* Bei Bedarf scrollen */
    background-color: rgba(0, 0, 0, 0.5); /* Dunkler Overlay */
}

/* Modal-Inhalt (Popup-Fenster) */
.modal-content {
    background-color: #fefefe;    /* Hell im Light-Mode */
    color: #333;                  /* Dunkle Schrift im Light-Mode */
    margin: 10% auto;            /* Zentriert (vertikal) mit 10% Abstand */
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;            /* maximale Breite */
    border-radius: 10px;
    position: relative;
    transition: background 0.3s, color 0.3s;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
body.darkmode .modal-content {
    background-color: #333;       /* Dunkler Hintergrund im Dark-Mode */
    color: #e0e0e0;              /* Helle Schrift */
    border: 1px solid #555;
}

/* X-Button zum Schließen */
.close-button {
    color: #aaa;
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.close-button:hover,
.close-button:focus {
    color: black;
}

/* Formular im Modal */
#loginForm {
    display: flex;
    flex-direction: column;
}
#loginForm label {
    margin-top: 15px;
    font-weight: bold;
    color: inherit;               /* Erbt color (#333 oder #e0e0e0) */
}
#loginForm input {
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    transition: background 0.3s, color 0.3s, border 0.3s;
}
body.darkmode #loginForm input {
    background-color: #555;
    color: #e0e0e0;
    border: 1px solid #777;
}
#loginForm button {
    margin-top: 20px;
    padding: 10px;
    background-color: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}
#loginForm button:hover {
    background-color: #1669c1;
}
body.darkmode #loginForm button {
    background-color: #1a73e8;
}
body.darkmode #loginForm button:hover {
    background-color: #1669c1;
}

/* Registrierungslink im Modal */
.register-link {
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
    color: inherit;  /* passt sich an (#333 oder #e0e0e0) an */
}
.register-link a {
    color: #1a73e8;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}
.register-link a:hover {
    text-decoration: underline;
}
body.darkmode .register-link a {
    color: #1a73e8; /* Gleiche Akzentfarbe im Darkmode (kannst du ändern) */
}
/***************************************************************************
 * 1) RESET & BASE VARIABLES
 ***************************************************************************/
 *, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --dark: #111111;
    --light: #ffffff;
    --accent: #1a73e8;
    --text-dark: #333;
    --text-light: #fff;
    /* Zusätzliche Farben für Toggle-Switch usw. */
    --sun: #1a73e8;
    --moon: #dddddd;
    --cloud: #ffffff;
}

/***************************************************************************
 * 2) BODY & DARK MODE
 ***************************************************************************/
body {
    font-family: Arial, sans-serif;
    background: #f2f2f2;  /* Hellgrau */
    color: #000;          /* Standard Schriftfarbe im Light-Mode */
}
body.darkmode {
    background: #121212;  /* Sehr dunkles Grau */
    color: #fff;          /* Helle Schrift im Dark-Mode */
}

/***************************************************************************
 * 3) HEADER & NAVIGATION
 ***************************************************************************/
/* Grundstruktur des Headers */
.site-header {
    background: var(--light);
    color: var(--text-dark);
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: background 0.3s, color 0.3s;
}
body.darkmode .site-header {
    background: var(--dark);
    color: var(--text-light);
}

/* Header-Container (max. Breite, zentriert) */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
}

/* Linke Sektion: Logo + Navigation */
.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Logo */
.site-logo a {
    font-size: 30px;
    font-weight: bold;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.4s;
}
body.darkmode .site-logo a {
    color: var(--light);
}

/* Navigationsliste */
.site-nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
}
.site-nav li {
    position: relative;
}
.site-nav a {
    text-decoration: none;
    color: var(--text-dark);
    padding: 10px 15px;
    border-radius: 5px;
    transition: background 0.3s, color 0.3s;
}
.site-nav a:hover,
.site-nav a.active {
    background: var(--accent);
    color: var(--text-light);
}
body.darkmode .site-nav a {
    color: var(--text-light);
}
body.darkmode .site-nav a:hover,
body.darkmode .site-nav a.active {
    background: var(--light);
    color: var(--dark);
}

/* Rechte Sektion: Hamburger-Menü, Icons, etc. */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/***************************************************************************
 * 3.1) HAMBURGER-MENÜ
 ***************************************************************************/
.menu-toggle {
    display: none; /* Nur im Mobile-Viewport sichtbar */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1100; /* Überlagerung, falls nötig */
}
.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}
body.darkmode .menu-toggle span {
    background: var(--text-light);
}
/* Offen-Status (Kreuz statt Hamburger) */
.menu-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
}
.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
}

/***************************************************************************
 * 3.2) ICONS (LOGIN, KORB, ETC.)
 ***************************************************************************/
.header-icons {
    display: flex;
    align-items: center;
    gap: 15px;
}
.icon-link {
    font-size: 24px;
    color: var(--text-dark);
    cursor: pointer;
    transition: color 0.3s;
}
.icon-link:hover {
    color: var(--accent);
}
body.darkmode .icon-link {
    color: var(--text-light);
}
body.darkmode .icon-link:hover {
    color: var(--accent);
}

/***************************************************************************
 * 3.3) DARK MODE TOGGLE-SWITCH
 ***************************************************************************/
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 24px;
}
.toggle-switch .toggle-input {
    display: none;
}
.toggle-switch .toggle-label {
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 24px;
    background-color: #2196F3;
    border-radius: 34px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.toggle-switch .toggle-label::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    background-color: #fff;
    box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s;
}
.toggle-switch .toggle-input:checked + .toggle-label {
    background-color: #4CAF50;
}
.toggle-switch .toggle-input:checked + .toggle-label::before {
    transform: translateX(16px);
}

/***************************************************************************
 * 3.4) SELL/KAUF ICONS-SICHTBARKEIT
 ***************************************************************************/
/* Verkaufskorb nur auf Sell-Seiten sichtbar */
.euro-icon {
    display: none;
}
body.sell-page .cart-icon {
    display: none;
}
body.sell-page .euro-icon {
    display: inline-block;
}

/***************************************************************************
 * 4) RESPONSIVE ANPASSUNGEN (MOBILE)
 ***************************************************************************/
@media (max-width: 768px) {
    /* Header-Container: Spaltenlayout */
    .header-container {
        flex-direction: column;
        align-items: center;
    }

    /* Logo zentriert */
    .header-left {
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }

    /* Rechte Sektion: Hamburger + Icons in einer Zeile */
    .header-right {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Hamburger-Menü sichtbar (anstelle der Desktop-Navi) */
    .menu-toggle {
        display: flex;
    }

    /* Navigation wird zum Dropdown */
    .site-nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;  /* Passend zum Header-Abstand */
        right: 20px;/* Ausrichtung nach rechts */
        background: var(--light);
        padding: 15px;
        gap: 10px;
        border-radius: 10px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        z-index: 1000;
    }
    .site-nav ul.open {
        display: flex;
    }
    body.darkmode .site-nav ul {
        background: var(--dark);
        box-shadow: 0 4px 10px rgba(255, 255, 255, 0.1);
    }

    /* Icons anpassen */
    .header-icons {
        gap: 10px;
    }
    .header-icons .icon-link {
        margin-right: 10px;
        font-size: 20px;
    }
}

/***************************************************************************
 * 5) LOGIN POPUP (MODAL)
 ***************************************************************************/
/* Modal Overlay */
.modal {
    display: none;                 /* Standardmäßig ausgeblendet */
    position: fixed;
    z-index: 2000;                /* Über dem Header (z-index: 1000) */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;               /* Bei Bedarf scrollen */
    background-color: rgba(0, 0, 0, 0.5); /* Dunkler Overlay */
}

/* Modal-Inhalt (Popup-Fenster) */
.modal-content {
    background-color: #fefefe;    /* Hell im Light-Mode */
    color: #333;                  /* Dunkle Schrift im Light-Mode */
    margin: 10% auto;            /* Zentriert (vertikal) mit 10% Abstand */
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;            /* maximale Breite */
    border-radius: 10px;
    position: relative;
    transition: background 0.3s, color 0.3s;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
body.darkmode .modal-content {
    background-color: #333;       /* Dunkler Hintergrund im Dark-Mode */
    color: #e0e0e0;              /* Helle Schrift */
    border: 1px solid #555;
}

/* X-Button zum Schließen */
.close-button {
    color: #aaa;
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.close-button:hover,
.close-button:focus {
    color: black;
}

/* Formular im Modal */
#loginForm {
    display: flex;
    flex-direction: column;
}
#loginForm label {
    margin-top: 15px;
    font-weight: bold;
    color: inherit;               /* Erbt color (#333 oder #e0e0e0) */
}
#loginForm input {
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    transition: background 0.3s, color 0.3s, border 0.3s;
}
body.darkmode #loginForm input {
    background-color: #555;
    color: #e0e0e0;
    border: 1px solid #777;
}
#loginForm button {
    margin-top: 20px;
    padding: 10px;
    background-color: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}
#loginForm button:hover {
    background-color: #1669c1;
}
body.darkmode #loginForm button {
    background-color: #1a73e8;
}
body.darkmode #loginForm button:hover {
    background-color: #1669c1;
}

/* Registrierungslink im Modal */
.register-link {
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
    color: inherit;  /* passt sich an (#333 oder #e0e0e0) an */
}
.register-link a {
    color: #1a73e8;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}
.register-link a:hover {
    text-decoration: underline;
}
body.darkmode .register-link a {
    color: #1a73e8; /* Gleiche Akzentfarbe im Darkmode (kannst du ändern) */
}
/* Zusätzlicher Abstand zwischen Formularfeldern */
#loginForm {
    display: flex;
    flex-direction: column;
    /* Erzeugt Abstand zwischen allen direkten Kindern (Labels, Inputs, Button) */
    gap: 5px; 
    /* Falls du unten mehr Platz möchtest, z.B. vor der Trennlinie/Google-Bereich: */
    margin-bottom: 15px; 
  }
  
  /* Optional: Die <hr> im Modal stylen und Abstände setzen */
  .modal-content hr {
    margin: 20px 0;       /* 20px oben/unten */
    border: none;         /* Standard-Rahmen weg */
    border-top: 1px solid #ccc; /* Dünne, graue Linie */
  }
  
  /* Falls du den Absatz "Oder mit Google anmelden" u.ä. separat stylen willst */
  .modal-content p {
    margin: 10px 0; /* z.B. 10px oben/unten */
  }
  
  /* Google-Button-Container (falls er eine eigene ID oder Klasse hat) */
  #googleSignInDiv {
    display: flex;
    justify-content: center;  /* Button in der Mitte */
    margin-top: 10px;         /* Etwas Abstand nach oben */
    margin-bottom: 10px;      /* Etwas Abstand nach unten */
  }
  
  /* Wenn du den Text "Oder mit Google anmelden:" in <p> hast, 
     kannst du ebenfalls gezielt dort margin hinzufügen. 
     Beispiel:
  .modal-content .google-intro {
    margin: 10px 0;
  }
  */
  
  /* Registrierungslink blockweise vom Google-Button trennen (falls erwünscht) */
  .register-link {
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
    color: inherit;
  }
  