html {
    overflow-y: scroll;
}

/* Theme sofort beim Laden anwenden – kein Flackern */
html.theme-hell,
html.theme-hell body {
    background-color: white !important;
}
html.theme-hell h2,
html.theme-hell .pb10p,
html.theme-hell .black {
    color: black !important;
}
html.theme-hell footer {
    background-color: #333 !important;
}
html.theme-hell .zurueck-link {
    color: #333 !important;
}

 .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            overflow: auto;
            background-color: rgba(0,0,0,0.5);
        }
        .modal-content {
            background-color: #fefefe;
            margin: 5% auto;
            padding: 20px;
            border: 1px solid #888;
            width: 90%;
            max-width: 600px;
            max-height: 85vh;
            overflow-y: auto;
            border-radius: 8px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }
        .close-btn {
            color: #aaa;
            float: right;
            font-size: 28px;
            font-weight: bold;
            cursor: pointer;
        }
        .close-btn:hover {
            color: black;
        }
        
/* Info-Icon und Popup */
.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #444;
    color: #FFCC00;
    cursor: pointer;
    margin-right: 10px;
    font-size: 26px;
    font-weight: bold;
    transition: all 0.2s ease;
    margin-bottom:13px;
}

.light-theme .info-icon {
    background-color: #e0e0e0;
    color: #333;
}

.info-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 0 5px rgba(255, 204, 0, 0.5);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.aktiv {
    opacity: 1;
    pointer-events: auto;
}

.modal-inhalt {
    width: 90%;
    max-width: 600px;
    background-color: #333;
    color: #FFCC00;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay.aktiv .modal-inhalt {
    transform: translateY(0);
}

.light-theme .modal-inhalt {
    background-color: #f8f9fa;
    color: #333;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.modal-titel {
    font-size: 1.5rem;
    margin-bottom: 15px;
    border-bottom: 1px solid #FFCC00;
    padding-bottom: 10px;
}

.light-theme .modal-titel {
    border-bottom: 1px solid #333;
}

.modal-schliessen {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 41px;
    height: 41px;
    border-radius: 50%;
    background-color: #222;
    color: #FFCC00;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 49px;
    padding-bottom: 3px;
    transition: all 0.2s ease;
}

.light-theme .modal-schliessen {
    background-color: #e0e0e0;
    color: #333;
}

.modal-schliessen:hover {
    transform: scale(1.1);
    background-color: #FFCC00;
    color: #333;
}

.light-theme .modal-schliessen:hover {
    background-color: #333;
    color: #FFCC00;
}

.such-tipp {
    margin-bottom: 15px;
    padding: 10px;
    border-left: 3px solid #FFCC00;
    background-color: rgba(255, 204, 0, 0.1);
}

.light-theme .such-tipp {
    border-left: 3px solid #333;
    background-color: rgba(51, 51, 51, 0.05);
}
 
 
     /* Moderne Meldungsbox */
    .meldung-container {
        position: fixed;
        top: 20px;
        right: 20px;
        max-width: 300px;
        background-color: #333;
        color: #FFCC00;
        border-left: 4px solid #FFCC00;
        padding: 15px;
        border-radius: 4px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 9999;
        font-size: 14px;
        opacity: 0;
        transform: translateX(30px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
    
    .meldung-container.anzeigen {
        opacity: 1;
        transform: translateX(0);
    }
    
    .light-theme .meldung-container {
        background-color: #f8f9fa;
        color: #333;
        border-left: 4px solid #333;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
 
    /* Suchergebnis-Hervorhebung */
    .such-hervorhebung {
      animation: hervorhebung-verblassen 2s;
    }
    
    .such-treffer {
      background-color: #FFCC00;
      color: black;
      font-weight: bold;
      padding: 0 2px;
    }
    
    @keyframes hervorhebung-verblassen {
      0% { background-color: rgba(255, 204, 0, 0.3); }
      100% { background-color: transparent; }
    }
    #suchClear:hover {
        color: #374151 !important;
    }

    .suchbutton{
        width: 100%;
        margin-bottom: 0.5rem;
        padding: 0.75rem 2.5rem 0.75rem 1rem;
        color: #1f2937;
        background-color: #ffffff;
        border: 1px solid #d1d5db;
        border-radius: 0.5rem;
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    }
    
    .suchbutton:focus {
      outline: none;
      --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
      --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
      box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
      --tw-ring-color: rgba(59, 130, 246, 0.5);
    }
     
    @media (min-width: 768px) {
      .suchbutton {
        margin-bottom: 0;
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
        border-top-left-radius: 0.5rem;
        border-bottom-left-radius: 0.5rem;
      }
    }   
        
        
        
    /* Einbettung der Schriftart Fira Mono */
    @font-face {
        font-family: 'FiraMono';
        src: url('fonts/FiraMono-Regular.woff2') format('woff2'),
                url('fonts/FiraMono-Regular.woff') format('woff');
        font-weight: normal;
        font-style: normal;
    }
    @font-face {
        font-family: 'FiraMono';
        src: url('fonts/FiraMono-Bold.woff2') format('woff2'),
                url('fonts/FiraMono-Bold.woff') format('woff');
        font-weight: bold;
        font-style: normal;
    }
    
    /* Allgemeine Stile */
    body {
        font-family: 'FiraMono', monospace;
        margin: 0;
        padding: 0;
        background-color: black;
    }
    header {
        background-color: #333;
        color: #fff;
        padding: 10px 0;
        text-align: center;
    }
    nav ul {
        list-style-type: none;
        padding: 0;
        text-align: center;
    }
    nav ul li {
        display: inline;
        margin: 0 15px;
    }
    nav ul li a {
        color: #FFCC00;
        text-decoration: none;
        font-weight: bold;
    }
    main {
        padding: 20px;
        
    }
    #contact, #home, #about{
            color: #FFCC00;
    }
    section {
        margin-bottom: 20px;
    }
    footer {
        background-color: #333;
        color: #fff;
        text-align: center;
        padding: 10px 0;
        position: fixed;
        width: 100%;
        bottom: 0;
    }
    footer a {
        color: #FFCC00;
        text-decoration: none;
    }
    footer a:hover {
        text-decoration: underline;
    }
    footer p {
        margin: 0;
        padding: 0 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
    }
    p{
        color: #FFCC00;
    }
    .text-slate-400 {
        color: var(--color-slate-400)!important;
    }
    .pb10p{
        padding-bottom:10px;
        font-size:15px;
    }
    .fl{float:left}
    .ml10p{margin-left:10px;}
    .cb{clear:both}
    .w70pr{width:70%}
    .w90pr{width:90%}
    .mb20p{margin-bottom:20px;}
    .mt11p{margin-top:11px;}
    .mt20p{margin-top:20px;}
    .pt13p{padding-top:13px;}
    .pb30p{padding-bottom:30px;}
    .tac{text-align:center;}
    .bbg{background-color:#333;}
    .fwb{font-weight:bold;}
    
    /* Basis-Stile für Farbübergänge */
    body {
        transition: background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    h2, .pb10p, .black, a, p, nav ul li a, #bgfarbe, .such-treffer, .info-icon, .modal-schliessen, .modal-titel, .such-tipp {
        transition: color 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                    background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                    border-color 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .modal-inhalt, .suchbutton, #suchButton, footer, header, .info-icon, .modal-schliessen {
        transition: background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                    box-shadow 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    }
        
    /* Dummy-Klassen für den Modus-Wechsel */
    body.dark-theme {
    background-color: black !important;
    }
    
    body.light-theme {
    background-color: white !important;
    }
    
    .dark-text {
    color: #FFCC00 !important;
    }
    
    .light-text {
    color: black !important;
    }
    
    .fs45p{
        font-size:45px;
    }
    
    /* Animierte Übergänge für Artikel */
@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

.artikel-container {
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
  text-align: justify;
}

/* Verzögerung für sequentielles Einblenden */
.artikel-container:nth-child(1) { animation-delay: 0.1s; }
.artikel-container:nth-child(2) { animation-delay: 0.2s; }
.artikel-container:nth-child(3) { animation-delay: 0.3s; }
.artikel-container:nth-child(4) { animation-delay: 0.4s; }
.artikel-container:nth-child(5) { animation-delay: 0.5s; }
.artikel-container:nth-child(6) { animation-delay: 0.6s; }
/* Weitere Artikel werden auch animiert, aber ohne weitere Verzögerung */

/* Kategorie-Navigation mit Dropdown */
.kategorie-navigation {
    display: flex;
    padding: 15px 0;
    margin-top: 10px;
}

.select-container {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    padding: 0 15px;
}

.select-container label {
    font-weight: bold;
    color: #FFCC00;
    white-space: nowrap;
}

.light-theme .select-container label {
    color: #333;
}

.kategorie-select {
    padding: 10px 15px;
    border-radius: 6px;
    font-family: 'FiraMono', monospace;
    background-color: #444;
    color: #FFCC00;
    border: 1px solid #555;
    appearance: none;
    position: relative;
    width: 100%;
    max-width: 400px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23FFCC00' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 35px;
    white-space: pre; /* Wichtig für die Beibehaltung der Leerzeichen */
}

.kategorie-select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 204, 0, 0.3);
    border-color: #FFCC00;
}

.light-theme .kategorie-select {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23333333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.light-theme .kategorie-select:focus {
    box-shadow: 0 0 0 2px rgba(51, 51, 51, 0.2);
    border-color: #333;
}

/* Dropdown Optionen stylen */
.kategorie-select option {
    background-color: #333;
    color: #FFCC00;
    padding: 8px;
}

.light-theme .kategorie-select option {
    background-color: #fff;
    color: #333;
}
/* Verbesserte Option-Darstellung für das Dropdown */
.kategorie-select {
    font-family: 'FiraMono', monospace; /* Monospace für bessere Ausrichtung */
}

/* Falls wir ein Custom-Dropdown benötigen */
.custom-dropdown-container {
    position: absolute;
    background-color: #333;
    border: 1px solid #555;
    border-radius: 6px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.light-theme .custom-dropdown-container {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.custom-dropdown-option {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.custom-dropdown-option:hover {
    background-color: #444;
}

.light-theme .custom-dropdown-option:hover {
    background-color: #e0e0e0;
}

.custom-dropdown-option.selected {
    background-color: rgba(255, 204, 0, 0.2);
}

.light-theme .custom-dropdown-option.selected {
    background-color: rgba(51, 51, 51, 0.1);
}

.custom-dropdown-option .prefix {
    min-width: 50px;
    font-weight: bold;
    color: #FFCC00;
    margin-right: 10px;
}

.light-theme .custom-dropdown-option .prefix {
    color: #333;
}

.custom-dropdown-option .text {
    color: #FFCC00;
}

.light-theme .custom-dropdown-option .text {
    color: #333;
}

/* Artikel-Überschriften als Links */
.artikel-link {
    color: inherit;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-color: #FFCC00;
    text-underline-offset: 5px;
}
.artikel-link::after {
    content: ' →';
    font-size: 0.75em;
    opacity: 0.55;
    transition: opacity 0.2s;
}
.artikel-link:hover {
    text-decoration-style: solid;
}
.artikel-link:hover::after {
    opacity: 1;
}
.light-theme .artikel-link {
    text-decoration-color: #333;
}

/* Zurück-Link auf Detailseiten */
.zurueck-link {
    color: #FFCC00;
    text-decoration: none;
    font-size: 15px;
    font-weight: bold;
}
.zurueck-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}
.light-theme .zurueck-link {
    color: #333;
}