/* ============================================= */
/* Modernes & Dynamisches Design mit Templates   */
/* ============================================= */

/* --- Grundlayout (gilt für beide Templates) --- */

html::before {
  content: ''; /* Erforderlich für Pseudo-Elemente */
  display: block;
  background-position: center;
  background-size: cover; /* Passt das Bild an die Größe des Viewports an */
  height: 100vh; /* 100% der Viewport-Höhe */
  width: 100vw; /* 100% der Viewport-Breite */
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  position: fixed; /* Fixiert das Element an der viewport */
  z-index: -10; /* Stellt sicher, dass der Inhalt darüber liegt */
}

body {
    background-color: var(--bg-color); 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1c1e21;
    margin: 0;
    padding: 20px;
    transition: background-color 0.3s;
    background-size: cover;
    background-position: center center;
    background-attachment: fixed; /* Sorgt dafür, dass das Bild beim Scrollen stehen bleibt */
}

.container { 
    max-width: 680px; 
    margin: 0 auto; 
}

.header { 
    text-align: center; 
    margin-bottom: 10px; 
}

.logo { 
    max-width: 280px; 
    height: auto; 
/*   border-radius: 4%;    */
/*   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);   */
    margin-bottom: 10px; 
}


  a {
  text-decoration: none !important;
  }
  a:link
  {
  color: white; // Farbe eines normalen Links
  text-decoration: none; // Nicht unterstrichen
  }
  a:visited
  {
  color: ##E95701; // Farbe eines besuchten Links
  text-decoration: none;
  }
  a:hover
  {
  color: #E95701; // Farbe bei Mousover des Links
  text-decoration: none;
  }

.title {
    font-size: 1.8em;
    font-weight: 700;
    color: #FFFFFF;
 /*   color: #1c1e21; */
    margin: 0;
    padding-top: 30px;
text-shadow: 1px 1px 2px #003b63;
}

/* Die Überschrift selbst hat keine feste Farbe mehr */
.category-header {
    font-size: 1em;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 15px;
    margin-bottom: 15px;
}

/* Wende die Listen-Farbe an, NUR wenn das Listen-Template aktiv ist */
.template-list .category-header {
    color: var(--category-header-color-list);
}

/* Wende die Kachel-Farbe an, NUR wenn das Kachel-Template aktiv ist */
.template-tiles .category-header {
    color: var(--category-header-color-tiles);
}

.category-header:first-of-type { 
    margin-top: 0; 
}

.button-icon { 
    width: 34px; 
    height: 34px; 
}


/* ============================================= */
/* --- Template 1: Listen-Layout (Standard) --- */
/* ============================================= */
.template-list #button-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.template-list .link-button {
    /* --- Grundlegende Layout-Stile --- */
    display: flex;
    align-items: center;
    padding: 15px;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 500;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;

    /* --- Saubere Glas-Effekt-Regeln --- */
    /* 1. Nutzt die transparente Hintergrundfarbe aus den Einstellungen */
    background: var(--button-bg-color);

    /* 2. Nutzt den Blur-Wert aus den Einstellungen (doppelte Einträge entfernt) */
    backdrop-filter: blur(var(--button-blur));
    -webkit-backdrop-filter: blur(var(--button-blur));

    /* 3. Nutzt die korrekte Schriftfarbe für die Liste */
    color: var(--button-text-color-list);
    
    /* 4. Aufgeräumte Rahmen- & Schatten-Stile */
    border-radius: 12px; /* Einheitlich mit den Kacheln */
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Hover-Effekt für Konsistenz hinzufügen */
.template-list .link-button:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}
.template-list .link-button:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}
.template-list .button-icon {
    margin-right: 15px;
}


/* ============================================= */
/* --- Template 2: Kachel-Layout (Metro-Style) --- */
/* ============================================= */

.template-tiles .category-header {
    /* Sagt der Überschrift: "Nimm die gesamte Breite ein!" */
    grid-column: 1 / -1;
}


.template-tiles #button-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
}

.template-tiles .link-button {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px 10px;
    backdrop-filter: blur(var(--button-blur));
    -webkit-backdrop-filter: blur(var(--button-blur));
    border-radius: 16px;
    text-decoration: none !important;
    font-size: 0.9em;
    font-weight: 600;
    aspect-ratio: 1 / 1;
    word-break: break-word;
    transition: all 0.3s ease;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);

    /* ================================================= */
    /* --- KORREKTUR: Saubere Glas-Effekt-Regeln --- */
    /* ================================================= */

    /* 1. Nutzt die transparente Hintergrundfarbe aus den Einstellungen */
    background: var(--button-bg-color);

    /* 2. Nutzt den Blur-Wert aus den Einstellungen */
    backdrop-filter: blur(var(--button-blur));
    -webkit-backdrop-filter: blur(var(--button-blur));
    
    /* 3. Nutzt die Schriftfarbe für Kacheln aus den Einstellungen */
    color: var(--button-text-color-tiles);
}
.template-tiles .link-button a {
    text-decoration: none !important;
}


.template-tiles .link-button:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.2);
}

.template-tiles .button-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
    text-decoration: none;

}

.template-tiles .link-button:hover .button-icon {
    transform: scale(1.2);
}
/* ============================================= */
/* ---  Stile für die Template-Auswahl --- */
/* ============================================= */

.template-switcher {
    max-width: 680px; 
    margin: 0 auto; 
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px dotted #e0e0e0;
}

.template-switcher button {
    background-color: #e9ecef;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 1.5em; /* Macht die Symbole größer */
    color: #6c757d;
    cursor: pointer;
    width: 50px;
    height: 50px;
    transition: all 0.2s ease;
}

.template-switcher button:hover {
    background-color: #ced4da;
}

/* Stil für den aktiven Button */
.template-switcher button.active {
    background-color: var(--button-text-color, #333); /* Nutzt die Admin-Farbe */
    color: var(--button-bg-color, #fff);
    border-color: rgba(0,0,0,0.2);
}

/* Stile für den neuen Logout-Symbol-Button */
.logout-button {
    background-color: #dc3545; /* Rot für Logout */
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    
    /* KORREKTUR: Macht den Button quadratisch und zentriert das Symbol */
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    font-size: 1.5em; /* Passt die Symbolgröße an */
}

.logout-button:hover {
    background-color: #c82333;
}