*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  min-height: 100vh;
}

/* Für Desktop: fixiertes, vollständig abdeckendes Bild */
body {
  font-family: Arial, sans-serif;
  background: url('images/background.jpeg') no-repeat center center fixed;
  background-size: cover;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* Für Smartphones: „contain“ verwenden */
@media (max-width: 600px) {
  body {
    background-attachment: scroll;
    background-size: contain;
    background-position: center top;
  }
}

/* Hintergrundanpassung für Tablets */
@media (max-width: 1024px) {
  body {
    background-size: contain; /* Oder 'contain', je nach Bedarf */
    background-position: center top; /* Bild zentrieren */
    background-attachment: scroll; /* Falls du das Bild auf Tablets nicht fixiert haben möchtest */
  }
}

/* Ein main-Element soll den verfügbaren Raum einnehmen */
main {
  flex: 1;
}

/* Header & Navigation */
header {
  width: 100%;
  background-color: #15768e;
  color: #fff;
  padding: 1rem;
  text-align: center;
  border-bottom: 4px solid #0a4c5c;
  margin-bottom: 1rem;
  border-radius: 10px; /* hier wird's rund */
  position: relative;
}

/* Logo ganz links am Viewport‑Rand */
.avatar-logo {
  position: absolute;
  top: 50%;
  left: 1rem;                /* Abstand vom linken Rand */
  transform: translateY(-50%);
  width: 180px;               /* gewünschte Breite */
  height: 180px;              /* gewünschte Höhe */
  object-fit: cover;
  border-radius: 50%;
  /* optional: border: 2px solid #fff; */
}

/* Der zentrierte Block bekommt seitlichen Padding, damit er nicht übers Logo läuft */
.header-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 3rem;          /* Abstand links/rechts vom Viewport‑Rand */
  text-align: center;
  position: relative;  /* Erlaubt, dass absolute Kindelemente darüber liegen */
  z-index: 10; 
}

header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
}
nav a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  padding: 0.5rem 1rem;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}
nav a:hover {
  background-color: rgba(255, 255, 255, 0.4);
}

.welcome p {
  margin: 0.3rem 0;
  font-size: 1rem;
}

/* Hauptinhaltscontainer */
.container {
  width: 100%;
  max-width: 600px; /* Angepasst für das Profilformular */
  background-color: #f9f9f9; /* Angepasst für das Profilformular */
  padding: 2rem; /* Angepasst für das Profilformular */
  border-radius: 12px; /* Angepasst für das Profilformular */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  margin: 0 auto 1rem;
}

/* Footer */
footer {
  width: 100%;
  background-color: #15768e;
  color: #fff;
  text-align: center;
  padding: 0.8rem;
  border-bottom: 4px solid #0a4c5c;
  /* margin-bottom entfernen oder optional lassen */
  /* margin-bottom: 3rem; */
  border-radius: 10px;
  /* Wichtig: automatisch oben platzieren, wenn Platz übrig ist */
  margin-top: auto;
}

footer p {
  margin: 0;
  font-size: 0.9rem;
}

footer a {
  color: #fff;
  text-decoration: underline; /* optional, je nach gewünschtem Stil */
}

footer a:hover {
  color: #e0e0e0; /* heller beim Hover, optional */
}

/* Formulare */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left; /* Für die Profilseite angepasst, da Labels links sind */
}
label {
  display: block; /* Aus dem Inline-Stil übernommen */
  margin-top: 1rem; /* Aus dem Inline-Stil übernommen */
}
input[type="text"],
input[type="password"],
input[type="file"],
input[type="email"], /* Hinzugefügt für E-Mail-Felder */
input[type="date"], /* Hinzugefügt für Datumsfelder */
textarea,
select {
  width: 100%;
  padding: 0.6rem; /* Angepasst aus dem Inline-Stil */
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-top: 0.3rem; /* Aus dem Inline-Stil übernommen */
  box-sizing: border-box; /* Sicherstellen, dass Padding und Border in die Breite einbezogen werden */
}
input[type="file"] {
  margin-top: 0.5rem; /* Aus dem Inline-Stil übernommen */
}
button {
  padding: 0.7rem 1.5rem; /* Angepasst aus dem Inline-Stil */
  font-size: 1rem;
  color: #fff;
  background-color: #007bff; /* Angepasst aus dem Inline-Stil */
  border: none;
  border-radius: 8px; /* Angepasst aus dem Inline-Stil */
  cursor: pointer;
  margin-top: 1.5rem; /* Angepasst aus dem Inline-Stil */
}
button:hover {
  background-color: #0056b3;
}

/* Nachrichten */
.error {
  color: #fff;
  background-color: #e74c3c;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 1rem;
}
.success {
  color: #fff;
  background-color: #2ecc71;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 1rem;
}

/* Rezeptkarten */
.rezept-card {
  background: #fff;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  text-align: center;
  width: 100%;
  max-width: 800px;
  position: relative;
  padding-top: 3rem; /* sorgt Platz oben für den Button */
}
.rezept-card h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}
.rezept-card p {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}
.rezept-card .thumbnail {
  max-width: 120px;
  height: auto;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.rezept-card .thumbnail:hover {
  transform: scale(1.05);
}

/* Standardverhalten für Desktop */
.actions {
  display: flex;  /* Macht die Links nebeneinander */
  justify-content: center;  /* Zentriert sie horizontal */
  margin-top: 0.5rem;
}

.actions a {
  color: #007bff;
  text-decoration: none;
  margin-right: 1rem;  /* Abstand nach rechts */
}

.actions a:hover {
  text-decoration: underline;
}

/* Für kleinere Geräte (max-width: 768px) */
@media (max-width: 768px) {
  .actions {
    display: block;  /* Macht die Links untereinander auf kleinen Bildschirmen */
    text-align: center;  /* Zentriert sie auf kleinen Bildschirmen */
  }

  .actions a {
    display: block;  /* Stellt sicher, dass Links untereinander sind */
    margin-right: 0;  /* Entfernt den Abstand nach rechts */
    margin-bottom: 0.5rem;  /* Fügt unten Abstand hinzu */
  }
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
}
.modal img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 10px;
}
.modal .close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 30px;
  color: #fff;
  cursor: pointer;
}

/* Responsive Anpassungen */
@media (max-width: 600px) {
  .container {
    padding: 1.5rem;
    max-width: 100%;
  }
  input[type="text"],
  input[type="password"],
  input[type="file"],
  textarea,
  select,
  button {
    font-size: 1.1rem;
    padding: 12px;
  }
  .error, .success {
    font-size: 1.1rem;
  }
}

/* Einheitliches Design für alle Input-Felder */
input[type="text"], input[type="email"], input[type="password"] {
  width: 100%;
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin: 0.5rem 0;
}

/* Button-Design (wiederholt) */
/* Entfernt, da bereits weiter oben definiert */

.filter-select {
  width: auto;
  max-width: 300px;
  padding: 5px;
  font-size: 1em;
}

/* Zusätzliche Styles für die Kommentarfunktion */
.form-container {
  text-align: center;
  margin-bottom: 20px;
}
.filter-select {
  display: block;
  width: auto;
  margin: 0 auto;
  padding: 5px;
  font-size: 1em;
}
.toggle-btn {
  background-color: #15768e;
  color: #fff;
  border: none;
  padding: 6px 10px;
  cursor: pointer;
  margin-top: 10px;
  font-weight: bold;
  border-radius: 5px;
}
.toggle-btn:hover {
  background-color: #0a4c5c;
}

.search-btn {
  background-color: #15768e;
  color: #fff;
  border: none;
  padding: 6px 10px;
  cursor: pointer;
  margin-top: 10px;
  font-weight: bold;
  border-radius: 5px;
}

.search-btn:hover {
  background-color: #0a4c5c;
}

.kommentarbereich {
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px solid #ccc;
}
.kommentar-container {
  margin-top: 10px;
  padding: 10px;
  border-top: 1px solid #ccc;
  background-color: #fafafa;
  border-radius: 6px;
}
.kommentar {
  background-color: #bddee6;
  padding: 5px;
  margin: 5px 0;
  border-radius: 4px;
}
.kommentar-form textarea {
  width: 250px;
  max-width: 400px;
}
.kommentar-form button {
  margin-top: 5px;
}

/* Responsive Navigation für Smartphones */
@media (max-width: 600px) {
  nav {
    flex-wrap: wrap;
    justify-content: center;
  }
  nav a {
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
    margin: 0.3rem 0;
  }
}

  .profile-form {
    max-width: 100%; /* Volle Breite auf Smartphones */
    padding: 1.5rem; /* Etwas weniger Padding für kleinere Bildschirme */
    margin: 1rem auto; /* Oben und unten etwas Abstand */
  }

  .profile-form label {
    margin-top: 0.8rem; /* Etwas weniger Abstand zwischen den Labels */
  }

  .profile-form input[type="text"],
  .profile-form input[type="email"],
  .profile-form input[type="date"],
  .profile-form textarea {
    padding: 0.8rem; /* Etwas mehr Padding für bessere Touch-Bedienung */
    font-size: 1rem; /* Angepasste Schriftgröße */
    margin-top: 0.2rem;
  }

  .profile-form img.avatar {
    width: 100px; /* Kleinere Avatar-Größe für Smartphones */
    height: 100px;
    margin-bottom: 0.8rem;
  }

  .profile-form button.expand-btn,
  .profile-form a.expand-btn { /* Falls du den Button auch die Klasse expand-btn gibst */
    padding: 0.8rem 1.2rem;
    font-size: 1rem;
    margin-top: 1rem;
    display: block; /* Buttons und Links untereinander anzeigen */
    width: 100%; /* Volle Breite für bessere Bedienbarkeit */
    text-align: center; /* Text im Button zentrieren */
    box-sizing: border-box; /* Padding und Border in die Breite einbeziehen */
  }

  .profile-form a.change-password {
    margin-top: 0.8rem; /* Weniger Abstand zum vorherigen Element */
  }
}

  .change-password-form {
    max-width: 100%;
    padding: 1.5rem;
    margin: 1rem auto;
  }

  .change-password-form label {
    margin-bottom: 0.3rem;
    font-size: 1rem;
  }

  .change-password-form input[type="password"] {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 0.8rem;
    font-size: 1rem;
  }

  .change-password-form button {
    width: 100%;
    padding: 0.9rem 1.5rem;
    font-size: 1.1rem;
    margin-top: 1rem;
  }

  .back-link {
    display: block; /* Macht den Link zu einem Block-Element, um Breite zuzuweisen */
    width: 100%; /* Nimmt die volle Breite ein */
    padding: 0.9rem 1.5rem; /* Gleiches Padding wie der Button */
    font-size: 1.1rem; /* Gleiche Schriftgröße wie der Button */
    margin-top: 1rem; /* Gleicher Abstand wie der Button */
    text-align: center; /* Text zentrieren */
    background-color: #15768e; /* Hintergrundfarbe des Headers (oder eine andere passende Farbe) */
    color: #fff; /* Textfarbe wie der Button */
    border: none; /* Entfernt die Standard-Unterstreichung */
    border-radius: 8px; /* Gleiche BorderRadius wie der Button */
    text-decoration: none; /* Entfernt die Standard-Unterstreichung */
    box-sizing: border-box; /* Stellt sicher, dass Padding und Border in die Breite einbezogen werden */
  }

  .back-link:hover {
    background-color: #fff; /* Dunklere Hover-Farbe wie beim Button */
    text-decoration: none; /* Keine Unterstreichung beim Hover */
  }
}

/* Erweiterte Typografie */
.container h2 {
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  line-height: 1.3;
}
.container p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.6;
}
.like-bereich {
  margin-top: 10px;
}
.like-button {
  background: none;
  color: #000;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.like-button img {
  margin-right: 5px;
  width: 24px;
  height: 24px;
}

/* Breitere Darstellung auf größeren Bildschirmen */
@media (min-width: 768px) {
  .container,
  .rezept-card {
    max-width: 1000px;
  }
}

/* Zentriert das Vorschaubild */
.thumbnail {
  max-width: 200px;
  display: block;
  margin: 10px auto;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.rezept-card {
  margin-bottom: 30px;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 12px;
}

/* Statistiken in der Vorschau */
.preview-stats p {
  margin: 5px 0;
  font-size: 0.9em;
  text-align: center;
}
.preview-stats span {
  margin-right: 10px;
}
.rezept-details {
  margin-top: 10px;
  border-top: 1px solid #ccc;
  padding-top: 10px;
  display: none;
}
.expand-btn {
  margin-top: 10px;
  display: inline-block;
  cursor: pointer;
  background: #15768e;
  color: #fff;
  padding: 5px 10px;
  border: none;
  border-radius: 4px;
}

.expand-btn:hover {
  background-color: #0a4c5c;
}

.form-container form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}
.search-input {
  width: 300px !important;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  display: block;
  font-size: 1rem;
  text-align: center;
}

/* Falls in deiner style.css nicht schon enthalten */
table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 10px;
  text-align: left;
}

/* Für kleinere Bildschirme: Schrift und Padding anpassen */
@media (max-width: 600px) {
  th, td {
    padding: 5px;
    font-size: 0.9em;
  }
}

/* Optionale Anpassung: Entferne ggf. das maximale Breitenlimit */
.table-container {
  max-width: 100%;
  overflow-x: auto;
}

/* --- Responsive Tabellen-Umwandlung in Kartenformat --- */
@media (max-width: 600px) {

  /* Für Admin-Tabelle (7 Spalten) */
  table.admin-table, table.admin-table thead, table.admin-table tbody,
  table.admin-table th, table.admin-table td, table.admin-table tr {
    display: block;
  }
  table.admin-table thead tr {
    display: none;
  }
  table.admin-table tr {
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
  }
  table.admin-table td {
    position: relative;
    padding-left: 50%;
    border: none;
    border-bottom: 1px solid #ddd;
    text-align: left;
  }
  table.admin-table td:last-child {
    border-bottom: 0;
  }
  table.admin-table td:before {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 40%;
    padding-right: 10px;
    white-space: nowrap;
    font-weight: bold;
  }
  /* Labels für Admin-Tabelle (7 Spalten) */
  table.admin-table td:nth-of-type(1):before { content: "ID"; }
  table.admin-table td:nth-of-type(2):before { content: "Benutzername"; }
  table.admin-table td:nth-of-type(3):before { content: "E-Mail"; }
  table.admin-table td:nth-of-type(4):before { content: "Registriert am"; }
  table.admin-table td:nth-of-type(5):before { content: "Aktiviert"; }
  table.admin-table td:nth-of-type(6):before { content: "Admin-Status"; }
  table.admin-table td:nth-of-type(7):before { content: "Aktion"; }
  table.admin-table td:nth-of-type(8):before { content: "Letzte Aktivität"; } /* Neue 7. Spalte */
  /* Für Admin-Tabelle: Inhalt in Spalte 6, 7 und 8 zentrieren */
  table.admin-table td:nth-of-type(6),
  table.admin-table td:nth-of-type(7),
  table.admin-table td:nth-of-type(8) {
    text-align: center;
    padding-left: 10px;
  }

  /* Für Kommentare-Tabelle (6 Spalten) */
  table.comments-table, table.comments-table thead, table.comments-table tbody,
  table.comments-table th, table.comments-table td, table.comments-table tr {
    display: block;
  }
  table.comments-table thead tr {
    display: none;
  }
  table.comments-table tr {
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
  }
  table.comments-table td {
    position: relative;
    padding-left: 50%;
    border: none;
    border-bottom: 1px solid #ddd;
    text-align: left;
  }
  table.comments-table td:last-child {
    border-bottom: 0;
  }
  table.comments-table td:before {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 40%;
    padding-right: 10px;
    white-space: nowrap;
    font-weight: bold;
  }
  /* Labels für Kommentare-Tabelle (5 Spalten) */
  table.comments-table td:nth-of-type(1):before { content: "ID"; }
  table.comments-table td:nth-of-type(2):before { content: "Benutzer"; }
  table.comments-table td:nth-of-type(3):before { content: "E-Mail"; }
  table.comments-table td:nth-of-type(4):before { content: "Kommentar"; }
  table.comments-table td:nth-of-type(5):before { content: "Erstellt am"; }
  table.comments-table td:nth-of-type(6):before { content: "Aktion"; }
  /* Für Kommentare-Tabelle: Inhalt in Spalte 5 zentrieren */
  table.comments-table td:nth-of-type(6) {
    text-align: center;
    padding-left: 10px;
  }
}

/* --- Tabellen-Button-Ausrichtung auf Desktop zentrieren --- */
@media (min-width: 601px) {
  /* Admin-Tabelle Spalte 5 (Admin-Status), 6 (Aktion) und 7 (Letzte Aktivität) */
  table.admin-table td:nth-of-type(6),
  table.admin-table td:nth-of-type(7),
  table.admin-table td:nth-of-type(8) {
    text-align: center;
    vertical-align: middle;
  }

  /* Kommentare-Tabelle Spalte 5 (Aktion) */
  table.comments-table td:nth-of-type(5) {
    text-align: center;
    vertical-align: middle;
  }
}

/* Login-Formular zentriert und in angenehmer Breite */
main.container form {
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

main.container input[type="text"],
main.container input[type="password"],
main.container button {
  padding: 0.5rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  width: 100%;
  box-sizing: border-box;
}

main.container button {
  background-color: #15768e;
  color: #fff;
  border: none;
  cursor: pointer;
}

main.container button:hover {
  background-color: #0f5c6f;
}

.recipe-author {
    font-size: 0.9em;
    color: #777;
    margin-bottom: 5px;
}

.profile-form {
    max-width: 600px;
    margin: auto;
    padding: 2rem;
    background: #f9f9f9;
    border-radius: 12px;
}

.profile-form label {
    display: block;
    margin-top: 1rem;
}

.profile-form input[type="text"],
.profile-form input[type="email"],
.profile-form input[type="date"],
.profile-form textarea {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-top: 0.3rem;
}

.profile-form input[type="file"] {
    margin-top: 0.5rem;
}

.profile-form img.avatar {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    margin-bottom: 1rem;
}

.profile-form a.change-password {
    display: inline-block;
    margin-top: 1rem;
    color: #007bff;
    text-decoration: none;
}

.change-password-form {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.change-password-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.change-password-form input[type="password"] {
    width: 100%;
    padding: 0.6rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
}

.error-message {
    color: red;
    margin-bottom: 1rem;
}

.success-message {
    color: green;
    margin-bottom: 1rem;
}

  .back-link {
    display: block; /* Macht den Link zu einem Block-Element, um Breite zuzuweisen */
    width: 100%; /* Nimmt die volle Breite ein */
    padding: 0.9rem 1.5rem; /* Gleiches Padding wie der Button */
    font-size: 1.1rem; /* Gleiche Schriftgröße wie der Button */
    margin-top: 1rem; /* Gleicher Abstand wie der Button */
    text-align: center; /* Text zentrieren */
    background-color: #15768e; /* Hintergrundfarbe des Headers (oder eine andere passende Farbe) */
    color: #fff; /* Textfarbe wie der Button */
    border: none; /* Entfernt die Standard-Unterstreichung */
    border-radius: 8px; /* Gleiche BorderRadius wie der Button */
    text-decoration: none; /* Entfernt die Standard-Unterstreichung */
    box-sizing: border-box; /* Stellt sicher, dass Padding und Border in die Breite einbezogen werden */
  }

  .back-link:hover {
    background-color: #0a4c5c; /* Dunklere Hover-Farbe wie beim Button */
    text-decoration: none; /* Keine Unterstreichung beim Hover */
}

@media (max-width: 600px) {
  /* ... andere Styles für Smartphones ... */

  .profile-form {
    max-width: 100%; /* Volle Breite auf Smartphones */
    padding: 1.5rem; /* Etwas weniger Padding für kleinere Bildschirme */
    margin: 1rem auto; /* Oben und unten etwas Abstand */
  }

  .profile-form label {
    margin-top: 0.8rem; /* Etwas weniger Abstand zwischen den Labels */
  }

  .profile-form input[type="text"],
  .profile-form input[type="email"],
  .profile-form input[type="date"],
  .profile-form textarea {
    padding: 0.8rem; /* Etwas mehr Padding für bessere Touch-Bedienung */
    font-size: 1rem; /* Angepasste Schriftgröße */
    margin-top: 0.2rem;
  }

  .profile-form img.avatar {
    width: 100px; /* Kleinere Avatar-Größe für Smartphones */
    height: 100px;
    margin-bottom: 0.8rem;
  }

  .profile-form button.expand-btn,
  .profile-form a.expand-btn { /* Falls du den Button auch die Klasse expand-btn gibst */
    padding: 0.8rem 1.2rem;
    font-size: 1rem;
    margin-top: 1rem;
    display: block; /* Buttons und Links untereinander anzeigen */
    width: 100%; /* Volle Breite für bessere Bedienbarkeit */
    text-align: center; /* Text im Button zentrieren */
    box-sizing: border-box; /* Padding und Border in die Breite einbeziehen */
  }

  .profile-form a.change-password {
    margin-top: 0.8rem; /* Weniger Abstand zum vorherigen Element */
  }
  
  .view-profile {
    max-width: 100%; /* Volle Breite auf Smartphones */
    padding: 1.5rem; /* Etwas weniger Padding für kleinere Bildschirme */
    margin: 1rem auto; /* Oben und unten etwas Abstand */
  }

  .view-profile h2 {
    font-size: 1.8rem; /* Kleinere Schriftgröße für den Titel */
    margin-bottom: 1rem;
  }

  .view-profile img.avatar {
    width: 100px; /* Kleinere Avatar-Größe */
    height: 100px;
    margin: 0.8rem auto; /* Oben und unten etwas Abstand, horizontal zentriert */
  }

  .view-profile p {
    font-size: 1rem; /* Angepasste Schriftgröße für Text */
    margin-bottom: 0.8rem;
    line-height: 1.5;
  }

  .view-profile h3 {
    font-size: 1.2rem; /* Kleinere Schriftgröße für Überschriften */
    margin-top: 1.2rem;
    margin-bottom: 0.3rem;
  }

  .view-profile .contact-info {
    margin-top: 0.8rem;
  }

  .view-profile .contact-info p {
    font-size: 1rem; /* Angepasste Schriftgröße für Kontaktinfos */
    margin-bottom: 0.3rem;
  }

  .view-profile .contact-info a {
    color: #007bff;
    text-decoration: none;
  }

  .view-profile .contact-info a:hover {
    text-decoration: underline;
  }

  .view-profile .back-link {
    display: block;
    width: 100%; /* Volle Breite für den Zurück-Link */
    padding: 0.9rem 1.5rem; /* Ähnliches Padding wie Buttons */
    font-size: 1.1rem; /* Ähnliche Schriftgröße wie Buttons */
    margin-top: 1.5rem;
    text-align: center;
    background-color: #15768e; /* Hintergrundfarbe des Headers (oder eine andere passende Farbe) */
    color: #fff;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    box-sizing: border-box;
  }

  .view-profile .back-link:hover {
    background-color: #0a4c5c;
    text-decoration: none;
  }
}

  .view-profile {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .view-profile h2 {
    text-align: center;
    margin-bottom: 1.5rem;
  }

  .view-profile img.avatar {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    margin: 1rem auto;
  }

  .view-profile p {
    margin-bottom: 1rem;
    line-height: 1.6;
  }

  .view-profile h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
  }

  .view-profile .contact-info {
    margin-top: 1rem;
  }

  .view-profile .contact-info p {
    margin-bottom: 0.5rem;
  }
  
.print-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  margin-right: 0.5rem;
}
.print-btn:hover {
  color: #007BFF;
}

/* Auf Smartphones Avatar anders platzieren */
@media (max-width: 600px) {
  .header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* Avatar statisch im Flow, kleiner und mit etwas Abstand */
  .avatar-logo {
    position: static;
    transform: none;
    margin: 0 0 0.5rem 0;
    width: 80px;
    height: 80px;
  }

  .header-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  /* Navigation unter das Logo/den Titel */
  nav {
    margin-top: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 1024px) {
  /* Avatar auf Mobilgeräten und Tablets komplett ausblenden */
  .avatar-logo {
    display: none;
  }
}

.pagination a, .pagination strong {
  font-size: 1.2rem;
  margin: 0 5px;
  padding: 6px 12px;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.2s;
}

/* Verlinkte Seiten */
.pagination a {
  color: #333;
  background-color: #f0f0f0;
  border: 1px solid #ccc;
}

.pagination a:hover {
  background-color: #d8d8d8;
}

/* Aktuelle Seite fett + farbig */
.pagination strong {
  color: white;
  background-color: #15768e;
  border: 1px solid #000;
  font-weight: bold;
}

/* Favoriten-Button oben rechts */
.favorite-btn {
  position: absolute;
  top: 8px; /* Weniger Abstand vom oberen Rand */
  right: 10px;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #ccc;
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  color: #000; /* Textfarbe schwarz */
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  transition: background 0.2s ease;
}

.favorite-btn:hover {
  background: #fff;
}

.favorite-btn .heart {
  font-size: 1.2rem;
  margin-right: 0.4rem;
}

.favorite-btn .fav-text {
  font-weight: bold;
  margin-right: 0.4rem;
  color: #000; /* Textfarbe auch hier sicher schwarz */
}

.favorite-btn .fav-count {
  font-size: 0.8rem;
  color: #333; /* Etwas helleres Schwarz */
}

/* Mehr Abstand nach oben für kleine Screens */
@media (max-width: 768px) {
  .rezept-card {
    padding-top: 4rem; /* mehr Platz, damit Herz nicht überlappt */
  }

  .favorite-btn {
    top: 4px;
    right: 8px;
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
  }

  .favorite-btn .heart {
    font-size: 1rem;
  }

  .favorite-btn .fav-text {
    font-size: 0.75rem;
  }

  .favorite-btn .fav-count {
    font-size: 0.7rem;
  }
}

/* Social Share Widgets */
.social-share {
  position: fixed;
  top: 300px;       /* Abstand oben */
  left: 10px;      /* Abstand links */
  display: flex;
  flex-direction: column;  /* von oben nach unten */
  gap: 1rem;
  z-index: 1000;
}

.social-share a {
  display: block;
  width: 40px;
  height: 40px;
  background-color: #15768e;
  color: #fff;
  border-radius: 50%;
  text-align: center;
  line-height: 40px;
  transition: background-color 0.3s ease;
  text-decoration: none;
}

.social-share a:hover {
  background-color: #0a4c5c;
}

.social-share i {
  font-size: 1.2rem;
}

@media only screen and (max-width: 600px) {
  .social-share {
    display: none;
  }
}

@media only screen and (max-width: 1024px) {
  .social-share {
    display: none;
  }
}

/* Hamburger-Icon (standard versteckt) */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.hamburger span {
  display: block;
  height: 3px;
  background: #fff;
  border-radius: 2px;
}

/* ------------------------------ *
 *  -- Mobile / Tablet (<768px) -- *
 * ------------------------------ */
@media (max-width: 768px) {
  /* Menü ausblenden */
  nav {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;           /* oder feste Breite z.B. 200px */
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: none;
    flex-direction: column;
  }
  /* Hamburger zeigen */
  .hamburger {
    display: flex;
  }
  /* Menü einblenden, wenn .open auf .header-content */
  .header-content.open nav {
    display: flex;
  }
  /* Link-Styling für Touch */
  nav a {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    text-align: center;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #eee;
  }
  nav a:last-child {
    border-bottom: none;
  }
}

/* --- Stelle sicher, dass dein Header und .header-content positioniert sind --- */
header,
.header-content {
  position: relative;  /* Erlaubt, dass absolute Kindelemente darüber liegen */
  z-index: 10;         /* Grund‑Z‑Index, damit der Header selbst immer oben bleibt */
}

/* --- Mobile / Tablet Menü als Overlay über allen Inhalten --- */
@media (max-width: 768px) {
.header-content nav {
  position: absolute;
  top: 100%;
  left: 50%;             /* Startet bei der Mitte */
  transform: translateX(-50%); /* Verschiebt es zurück, um es zu zentrieren */
  width: max-content;    /* Optional: Breite je nach Inhalt */
  min-width: 200px;      /* Oder feste Mindestbreite */
  display: none;
  flex-direction: column;
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 999;
}

  .header-content.open nav {
    display: flex;         /* Sichtbar, wenn .open gesetzt ist */
  }

  /* (Optional) alle <a> im Menu ordentlich anordnen */
  .header-content nav a {
    padding: 0.75rem 1rem;
    text-align: center;
    width: 100%;
    display: block;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #eee;
  }
  .header-content nav a:last-child {
    border-bottom: none;
  }
}
