/************************************************************
 * 1) Globale Variablen, Grundstruktur und Schriftarten
 ************************************************************/
 :root {
  --primary-color: #4267B2;
  --primary-hover: #1d4ed8;
  --bg-color: #f9fafb;
  --text-color: #111827;
  --text-secondary: #6b7280;
  --border-color: #e5e7eb;
  --hover-bg: #f3f4f6;
  --box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/************************************************************
 * 2) Allgemeine Reset-/Basis-Styles
 ************************************************************/
html {
  margin-right: calc(-1 * (100vw - 100%));
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Open Sans', Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
  width: 100vw;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

main {
  flex: 1;
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* Bei offenen Modals soll Body nicht scrollen */
body.modal-open {
  overflow: hidden;
}

/************************************************************
 * 3) Header, Navbar, Suche
 ************************************************************/
header {
  background-color: #4267B2;
  padding: 10px 20px;
  color: #fff;
  height: 60px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 10;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
}

.navbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: 60px;
  width: 100%;
  margin: 0 auto;
  padding: 0 10px;
  box-sizing: border-box;
  min-width: auto;
  gap: 10px;
  align-items: center;
  align-content: center;
  align-self: center;
}

.nav-left {
  padding-left: 0;
  min-width: auto;
  white-space: nowrap;
  align-self: center;
  align-items: center;
}

.nav-middle {
  justify-self: center;
  width: 100%;
  max-width: 800px;
  align-self: center;
  align-items: center;
}

.nav-right {
  justify-self: end;
  margin-right: 10px;
  min-width: auto;
  white-space: nowrap;
  align-self: center;
  align-items: center;
}

.nav-middle ul,
.nav-right ul {
  list-style: none;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  gap: 20px;
}

/* Logo-Bereich links */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.2rem;
  font-weight: bold;
  text-decoration: none;
  color: white;
  justify-self: start;
  margin-left: 0;
}

.logo img {
  height: 84px;
  margin-top: 24px;
  width: auto;
  transition: all 0.3s ease;
}

.logo-text {
  color: white;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  margin-left: 8px;
  margin-top: -6px;
  font-family: 'Segoe UI', Arial, sans-serif;
  transition: all 0.3s ease;
}

/* Hover-Effekt für den Text */
.logo:hover .logo-text {
  transform: scale(1.05);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Haupt-Navigation in der Mitte */
nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  justify-content: center; /* Zentriert die Navigation */
}

/* Auth-Buttons rechts */
.auth-buttons {
  justify-self: end;
  display: flex;
  gap: 10px;
}

/* Gemeinsame Basis-Styles für alle Navigations-Links */
nav ul li a,
.nav-right ul li a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.8); /* Noch etwas transparenter im Grundzustand */
  text-decoration: none !important;
  font-size: 0.9rem;
  padding: 8px 16px;
  transition: color 0.2s ease;
  white-space: nowrap;
  width: 100%;
}

/* Icons in der Navigation */
.nav-icon {
  height: 22px;
  min-height: 22px;
  object-fit: contain;
  opacity: 0.8; /* Matching mit der Textfarbe */
  transition: opacity 0.2s ease;
}

/* Hover Effekt für alle Navigations-Links */
nav ul li a:hover,
.nav-right ul li a:hover {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  background-color: transparent !important;
}

nav ul li a:hover .nav-icon,
.nav-right ul li a:hover .nav-icon {
  opacity: 1;
  filter: brightness(1.2);
}

/* Active State */
nav ul li a.active,
.nav-right ul li a.active {
  color: #ffffff;
  font-weight: 500;
  background-color: transparent;
}

nav ul li a.active .nav-icon,
nav ul li a.active .fas,
.nav-right ul li a.active .fas {
  opacity: 1;
  filter: brightness(1.2);
}

/* Rechte Navigation (Auth-Buttons) */
.nav-right ul li a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  text-decoration: none !important;
  font-size: 0.9rem;
  padding: 8px 16px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.nav-right ul li a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  text-decoration: none !important;
}

/* Basis-Styling für die Suche */
.search-container {
  position: relative;
  width: 300px;
  margin-right: 20px;
}

.search-icon-mobile,
.close-search {
  display: none; /* Standardmäßig immer ausgeblendet */
}

.search-form {
  width: 100%;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 4px 12px;
  transition: background-color 0.2s ease;
}

.search-form:hover,
.search-form:focus-within {
  background: rgba(255, 255, 255, 0.2);
}

.search-input {
  width: 100%;
  min-width: 200px;
  border: none;
  background: none;
  padding: 6px 8px;
  font-size: 0.9rem;
  color: white;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
  outline: none;
}

.search-icon {
  height: 16px;
  opacity: 0.7;
  cursor: pointer;
}

/************************************************************
 * 4) Buttons (allgemein), rote Buttons
 ************************************************************/
/* Einheitliche Button-Styles */
.modern-button, 
button[type="submit"],
input[type="submit"] {
  padding: 8px 16px;
  border: none;
  border-radius: 20px;
  background: #4267B2; /* Blau wie "Profil bearbeiten" */
  color: white;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;
  text-decoration: none;
}

.modern-button:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
  background: #3071ff;
}

/* Rote Buttons (z.B. "Gruppe löschen") - jetzt etwas dunkler */
.modern-button.delete,
button.delete,
button[style*="background:#cc0000"] {
  background: #be1616; /* war #ef4444, jetzt etwas dunkler */
}

.modern-button.delete:hover,
button.delete:hover,
button[style*="background:#cc0000"]:hover {
  background: #860909; /* noch dunkler beim Hover */
}

/************************************************************
 * 5) Cards, Posts, Post-Actions
 ************************************************************/
.post {
  background: white;
  border-radius: 1rem;
  padding: 1rem;
  margin-bottom: 1.2rem;
  box-shadow: var(--box-shadow);
  width: 100%;
  max-width: 800px; /* Maximale Breite für Desktop */
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.post-content {
  margin-bottom: 6px;
}

/* Neue Regeln für Bilder in Posts */
.post-image {
  margin: 0.75rem 0;
  border-radius: 0.5rem;
  overflow: hidden;
  max-height: 400px; /* Etwas kleiner für bessere Übersicht */
}

.post-image img {
  width: 100%;
  height: 400px;
  object-fit: contain; /* Zeigt das ganze Bild ohne Abschneiden */
  border-radius: 0.5rem;
  cursor: pointer;
  background: #f8f9fa; /* Heller Hintergrund für Bilder */
}

/* Geteilte Posts */
.shared-post {
  margin: 10px 0;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #f8f9fa;
  cursor: pointer;
  transition: background-color 0.2s;
}

.shared-post .post-image {
  max-height: 300px;
}

.shared-post .post-image img {
  height: 300px;
  object-fit: contain;
}

.share-comment {
  margin: 10px 0;
  padding: 0 0 10px 0;
}

/* Post-Header */
.post-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

/* Post-Actions (Like, Kommentieren etc.) */
.post-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-color);
}

/* Reset für alle Buttons in Post-Actions */
.post-actions button,
.like-button,
.action-button {
  background: none !important;
  border: none !important;
  padding: 4px 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #65676B;
  font-size: 0.9em;
  outline: none !important;
  box-shadow: none !important;
}

/* Hover-Effekte */
.post-actions button:hover,
.like-button:hover,
.action-button:hover {
  background-color: rgba(0, 0, 0, 0.05) !important;
  border-radius: 4px;
}

/* Spezifisch für Like-Button */
.like-button:focus {
  outline: none !important;
  box-shadow: none !important;
  background: none !important;
}

.dark-mode .post-actions,
.dark-mode .like-button,
.dark-mode .action-button {
  color: rgba(255, 255, 255, 0.849); 
}

/* Dark Mode Anpassungen */
.dark-mode .post-actions button:hover,
.dark-mode .like-button:hover,
.dark-mode .action-button:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Post-Options Menü */
.post-options {
  position: relative;
  display: inline-block;
}

.post-options-menu {
  position: absolute;
  right: 0;
  top: 100%;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  z-index: 1000;
  min-width: 120px;
  display: none;
}

.post-options-menu button {
  width: 100%;
  text-align: left;
  padding: 8px 12px;
}

.post-options-menu button img {
  width: 18px;
  height: 18px;
  opacity: 0.7;
}

/* Icons in den Action-Buttons */
.post-actions .action-button img {
  height: 22px;
  width: 22px;
}

/* Spezifische Größe für das Herz-Icon */
.like-button img {
  height: 20px;
  width: 20px;
  vertical-align: middle;
}

.post-actions .action-button img[src$="more.svg"] {
  width: 20px;
  height: 20px;
  opacity: 0.6;
}

.like-button:hover {
  color: #ff4b4b !important;
}

.post-input-container {
  margin-bottom: 16px;
}

/************************************************************
 * 6) Gruppen – Banner, Content, Buttons
 ************************************************************/
.group-banner-container {
  width: 100%;
  max-width: 1024px;
  min-width: auto;
  position: relative;
  padding-bottom: 46.875%; /* (480/1024)*100 */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
}

.group-banner {
  width: 100%;
  position: relative;
  padding-bottom: 46.875%;
  overflow: hidden;
  border-radius: 8px;
  top: 0;
  left: 0;
  object-fit: cover;
}

.group-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
  width: 800px;
  word-break: break-word;
}

/* Gruppen-Header und Aktionen */
.group-header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1rem 0;
}

/* Text mit Unterstreichung entfernen (z.B. Gruppen-Buttons) */
.group-buttons a,
.group-buttons a:hover,
.group-buttons button,
.group-buttons button:hover {
  text-decoration: none;
}

.banner-edit-btn {
  position: absolute;
  right: 4px;
  top: 4px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.24);
  border: none;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 0.9rem;
  transition: background-color 0.2s;
}

.banner-edit-btn:hover {
  background: rgba(255, 255, 255, 1);
}

.banner-edit-options {
  position: absolute;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 1000;
  padding: 10px;
  width: 200px;
  top: 100%;
  transform: translateY(5px);
  max-width: calc(100vw - 20px); /* Verhindert Überlauf auf mobilen Geräten */
}

.edit-options-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-btn {
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: none;
  text-align: left;
  font: 0.8em sans-serif;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s;
  color: var(--text-color);

}

.option-btn:hover {
  background-color: var(--hover-bg);
}

.option-btn input[type="file"] {
  display: none;
}

.group-meta {
  font-size:0.9em;
  color:#666;
  margin-top: 20px;
  margin-bottom: 30px;
  font-weight: 500;
}

.group-card {
  max-width: 800px;
  width: min(800px, 98%);
  margin: 0 auto; /* Zentriert die Card */
  padding: 0 1rem; /* Innerer Abstand */
  box-sizing: border-box; /* Verhindert, dass padding die Gesamtbreite vergrößert */
}

.upload-icon {
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
}

.upload-icon:hover {
  opacity: 0.8;
}
/************************************************************
 * 7) Profile
 ************************************************************/
.profile-image {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 22px; 
  border: 2px solid #ccc;
}

.profile-edit-button {
  display: inline-block;
  background: #4267B2;
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
  margin: 10px 0;
}

.profile-edit-button:hover {
  background: #3e7df3;
}

/* versteckt erst bei Klick */
.profile-edit-section {
  display: none;
  margin-top: 20px;
}

.profile_comments {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.profile-pic-small {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  margin-right: 10px;
  object-fit: cover;
}

.comment-profile-pic {
  height:38px; 
  width:38px; 
  border-radius:50%; 
  object-fit:cover;
  margin-right: 6px;
}

/************************************************************
 * 8) Kommentare, Kommentar-Popup
 ************************************************************/

 .user-link {
  text-decoration: none;  
  font-weight: bold;
  color: black;
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.user-link .profile-image-small {
  margin-right: 2px;
}

 .comment-time {
  font-size: 0.8rem;
  color: var(--text-secondary);
  align-items: center;
  margin-bottom: 8px;
 }

 .comment-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
  align-items: center;
  margin-bottom: 8px;
 }

.comment-container {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: var(--box-shadow);
}

.comment-item {
  border-bottom: 1px solid var(--border-color);
  padding: 10px 0;
  margin-bottom: 10px;
}

.comment-item:last-child {
  border-bottom: none;
}

/* Kommentar-Formular am unteren Rand */
.comment-form {
  padding: 15px 15px 10px 15px; /* Mehr Padding unten */
  background: white;
  border-top: 1px solid #ddd;
  grid-row: 3;
  position: relative;
  bottom: 0;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

/* Kommentar Textarea */
.comment-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 10px;
  resize: none;
}

/* Kommentar Button */
.comment-form button {
  margin-bottom: 5px; /* Abstand zum unteren Rand */
  z-index: 1600;
}

.comment-submit {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
}

.comment-submit:hover {
  background: var(--primary-hover);
}

.original-post {
  width: 60%;
  height: 60%;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 12px;
  padding: 10px 60px;
  margin-bottom: 20px;
  font-size: 0.8em;
  box-shadow: var(--box-shadow);
  border: 2px dashed #ddd;
}

.original-post img:not(.comment-profile-pic) {
  display: block;
  width: 60%;
  height: auto;
  margin: 0px auto 0 auto; /* Negativer margin-top */
  padding: 0;
  object-fit: contain;
}

/* Kommentar-Styling */
.comment {
  position: relative;
  padding: 15px;
  margin: 10px 0;
  border-radius: 8px;
  background: var(--bg-color);
  box-shadow: var(--box-shadow);
  border-bottom: 2px solid var(--border-color);
  
  /* Verbesserte Text- und Rendering-Qualität */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.comment-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.comment-header-right {
  margin-left: auto;
}

.post-options {
  position: relative;
}

.post-options-menu {
  position: absolute;
  right: 0;
  top: 100%;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--box-shadow);
  z-index: 1000;
  min-width: 120px;
}

.post-options-menu button {
  display: block;
  width: 100%;
  padding: 8px 12px;
  text-align: left;
  border: none;
  background: none;
  cursor: pointer;
}

.post-options-menu button:hover {
  background: var(--hover-bg);
}

.options-button {
  background: none;
  border: none;
  cursor: pointer;
}

.more-icon {
  width: 16px;
  height: 16px;
  border: none;
  background: none;
}

/* Kommentar-Aktionen */
.comment-actions {
  margin-top: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--border-color);
}

.comment-actions .like-button,
.comment-actions .action-button {
  padding: 4px 8px;
  font-size: 0.9em;
}

.comment-actions .post-options-menu {
  right: 0;
  top: 100%;
}
/* Kommentar-Antworten Styling */
.comment-reply {
  margin-left: 50px; /* Mehr Abstand nach links */
  padding-left: 16px; /* Abstand vom Kommentar zur Linie */
  background: none !important;
  border-radius: 0 !important;
  position: relative;
}

/* Verbindungslinie zwischen Kommentar und Antwort */
.comment-reply::before {
  content: "";
  position: absolute;
  left: -18px; /* Weiter nach links */
  top: -4px; /* Verlängert die Linie nach oben */
  bottom: -4px; /* Verlängert die Linie nach unten */
  width: 2px; /* Dicke der Linie */
  background: repeating-linear-gradient(
    to bottom,
    #ddd,
    #ddd 4px,
    transparent 4px,
    transparent 8px
  );
}

/* Horizontale Verbindungslinie */
.comment-reply::after {
  content: "";
  position: absolute;
  left: -18px; /* Gleiche Position wie ::before */
  bottom: 51px; /* Setzt die Linie auf Höhe des Kommentars */
  width: 32px; /* Länge der horizontalen Linie */
  height: 2px;
  background: repeating-linear-gradient(
    to right,
    #ddd,
    #ddd 4px,
    transparent 4px,
    transparent 8px
  );
}

.reply-form {
  margin-top: 10px;
  padding: 10px;
}

.reply-textarea {
  width: 100%;
  min-height: 60px;
  margin-bottom: 6px;
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.submit-reply {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 5px 15px;
  border-radius: 4px;
  cursor: pointer;
}

.submit-reply:hover {
  background-color: var(--primary-hover);
}

.reply-button {
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  padding: 5px 10px;
  margin-top: 5px;
  max-height: 22px;
}

.reply-button:hover {
  text-decoration: underline;
}

.reply-button img {
  max-height: 22px;
  margin-right: 4px;
}

.submit-button {
  background: #4267B2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/************************************************************
 * 9) Overlays, Modals, Popups
 ************************************************************/
/* Einheitliche Modal-/Overlay-Definition */
.modal-overlay, .popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  padding: 20px;
  box-sizing: border-box;
}

.modal-box, .popup-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 8px;
  max-width: 700px;
  width: 90%;
  max-height: 80vh;
  z-index: 1001;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden; /* Wichtig für die Abrundungen */
}

.modal-box-klein {  
  display: none; /* Standardmäßig ausgeblendet */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 8px;
  max-width: 300px;
  width: auto;
  min-width: 200px;
  max-height: auto;
  padding: 20px;
  z-index: 1011;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

.modal-close, .popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1002;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 5px;
  border-top-right-radius: 8px; /* Abrundung oben rechts */
}

.modal-close:hover, .popup-close:hover {
  color: #333;
}

/* <-- Angepasst: Größere Breite / max-height für den Kommentar-Modal */
#comment-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  background: white;
  border-radius: 8px;
  z-index: 1001;
  display: grid;
  grid-template-rows: auto 1fr auto;
  
  /* Verbesserte Rendering-Performance */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translate(-50%, -50%) translateZ(0);
  -webkit-transform: translate(-50%, -50%) translateZ(0);
  will-change: transform;
  
  /* Schärferes Text-Rendering */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container für die Kommentare */
.comments-container {
  overflow-y: auto;
  padding: 20px;
  max-height: calc(90vh - 200px);
  grid-row: 2;
  word-break: break-word;
  
  /* Verbesserte Rendering-Performance */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform;
  
  /* Schärferes Text-Rendering */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Kommentar-Formular am unteren Rand fixieren */
.modal-comment-form {
  position: sticky;
  bottom: 0;
  background: var(--bg-color);
  padding: 15px;
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 8px 8px;
  grid-row: 3;
  z-index: 2;
}

/* Dark Mode Anpassungen */
.dark-mode .modal-comment-form {
  background: #242526;
  border-color: #3A3B3C;
}

/* Scrollbar Styling */
.comments-container::-webkit-scrollbar {
  width: 8px;
}

.comments-container::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.comments-container::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.comments-container::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/************************************************************
 * 10) Bilder, Bild-Uploads, Image-Modal
 ************************************************************/
#image-preview {
  margin-top: 10px;
  text-align: center;
}

#image-preview img {
  max-width: 100%;
  border-radius: 4px;
  cursor: pointer;
}

#image-modal {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 1001 !important;
  background: rgba(0, 0, 0, 0.5) !important;  /* Schwarz mit 50% Transparenz */
  border-radius: 8px !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
  display: none;
  max-width: 98vw;
  max-height: 98vh;
  overflow: auto;
  padding: 0 !important;
}

.image-modal, .modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.image-modal img,
.modal img {
  max-width: 98vw;
  max-height: 98vh;
  object-fit: contain;
}

.image-modal .close,
.modal .close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

/************************************************************
 * 11) Footer
 ************************************************************/
.site-footer {
  margin-top: auto;
  width: 100%;
  background: white;
  padding: 1rem 0;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-footer a {
  color: var(--primary-color);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/************************************************************
 * 12) Media Queries - Tablet & Mobile
 ************************************************************/

 @media (max-aspect-ratio: 5/3) {
  .logo img {
    height: 73px;
    width: 60px;
    min-width: 60px;
    min-height: 73px;
    margin-left: 10px;
    padding-left: 10px;
    margin-top: 12px;
  }

  .logo-text {
    font-size: 90%;
  }

  .search-container {
    max-width: 160px;
    margin-right: 2px;
    margin-left: 4px;
    max-height: 28px;
    padding: 0px;
  }

  .search-form {
    max-width: 160px;
    padding-left: 2px;
    min-height: 26px;
    max-height: 28px;
    box-sizing: border-box;
  }

  .search-input {
    max-width: 160px;
    padding: 0;
    min-height: 28px;
    margin-left: 2px;
  }

  .search-icon {
   margin-left: 2px;
   margin-right: 2px;
  }
  
 }

/* Medienabfrage für Aspect Ratio */
@media (max-aspect-ratio: 4/3) {
  .logo img {
    height: 73px;
    width: 60px;
    min-width: 60px;
    min-height: 73px;
    margin-left: 10px;
    padding-left: 10px;
  }

  .logo-text {
    display: none;
  }

  /* Navigation Grundstruktur */
  .navbar {
    grid-template-columns: auto auto 1fr auto; /* Angepasstes Grid */
    gap: 2px;
    padding: 0;
    margin-left: -10px;
  }

  nav ul {
    margin-left: 0; /* Reset des negativen Margins */
    align-items: center;
    justify-content: center;
  }
}

@media (max-aspect-ratio: 1/1) {
  .search-container {
    max-width: 30px;
  }
  
  .search-form {
    display: none;
  }

  .search-input {
    display: none;
  }

  .search-icon-mobile {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    height: 26px;
    width: 26px;
    margin: 0;
    opacity: 0.8;
    cursor: pointer;
    padding: 0;
  }

  .search-icon-mobile:hover {
    opacity: 1;
  }
}

/* Medienabfrage für mobile Geräte */
@media (max-width: 840px) {
  .group-card {
    width: 98%;  /* Noch breitere Cards */
    min-width: 98%;
    max-width: 98%;
    margin-left: 2px;
    margin-right: 2px;
    padding: 8px;
    box-sizing: border-box;
    border-radius: 8px;
  }

  .groups-container {
    width: 100%; /* Statt 100vw */
    margin: 0 auto; /* Zentrierung */
    padding: 0 4px; /* Seitlicher Abstand */
    box-sizing: border-box;
    overflow: hidden;
  }

  .group-content {
    width: 98%;
    min-width: 98%;
    margin: 0 auto;
    padding: 2px;
    align-self: center;
    box-sizing: border-box;
  }

  .group-banner-container {
    width: 100%;
    max-width: 1024px;
    min-width: auto;
    position: relative;
    padding-bottom: 46.875%; /* (480/1024)*100 */
    height: 0;
    margin-left: -5px;
    padding-left: 0;
    overflow: hidden;
    border-radius: 8px;
  }
  
  .group-banner {
    width: 100%;
    position: relative;
    padding-bottom: 46.875%;
    overflow: hidden;
    border-radius: 8px;
  }

  .friend-request-item {
      padding: 4px 2px;
      margin-bottom: 8px;
      border-radius: 8px;
      gap: 4px;
      margin-left: -10px;
      margin-right: 2px;
      min-width: 98%;
    }

    .profile-image-small {
      width: 30px;
      height: 30px;
      flex-shrink: 0;
      object-fit: cover;
    }
    
    .friend-request-actions {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }


    .friend-request-actions button {
        padding: 6px 12px;
        font-size: 0.9em;
    }

    .friend-info {
        gap: 4px;
        word-wrap: break-word
    }

    .friends-container {
      width: 98%;
      max-width: 98%;
      min-width: 98%;
      padding: 0;
      margin-left: -20px;
    }

    .logo img {
      height: 73px;
      width: 60px;
      max-width: 60px;
      margin-left: 2px;
    }

    .video-header {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      padding: 15px;
      color: white;
      z-index: 10;
    } 

    .video-description {
      position: absolute;
      bottom: 80px; /* Erhöht, damit genügend Platz für Kategorie und Aktionen besteht */
      left: 0;
      right: 0;
      padding: 15px;
      color: white;
      font-size: 0.9rem;
      z-index: 10;
    }
    
    .video-category {
      position: absolute;
      bottom: 60px; /* Direkt über dem Post-Actions-Block, mit kleinem Abstand */
      left: 0;
      right: 0;
      padding: 15px;
      color: white;
      font-size: 0.8rem;
      opacity: 0.8;
      z-index: 10;
    }

    .post-actionsvideo {
      position: absolute;
      top: 62%;
      transform: translateY(-50%);
      right: -2px !important;
      display: flex;
      flex-direction: column;
      gap: 20px;
      padding: 8px 2px;
      align-items: center;
      z-index: 10;
    }

    .post-actionsvideo img {
      background-color: rgba(255, 255, 255, 0.4); /* Weiß mit 50% Transparenz */
      border-radius: 22px;
      min-width: 22px;
      gap: 16px;
      padding: 10px 4px;
    }

    .post-actionsvideo button.action-button {
      display: flex;
      flex-direction: column; /* Ordnet Icon und Count vertikal an */
      align-items: center;
    }

    .post-actionsvideo button.like-button {
      display: flex;
      flex-direction: column; /* Ordnet Icon und Count vertikal an */
      align-items: center;
    }

    .dropdown-menu {
      width: 120px;
      list-style: none;
      padding: 0;
      margin: 0;
    }
  
    .dropdown-menu li {
      display: flex;
      align-items: center; 
      justify-content: flex-start;
    }
  
    .dropdown-menu li a {
      display: flex;
      align-items: center;
      text-decoration: none;
      color: inherit;
      width: 100%;
    }
  
    .dropdown-menu li img.nav-icon {
      align-self: flex-start;
      width: 20px;
      height: auto;
      margin-right: 10px;
    }

    main {
    margin-left: 2px;
    margin-right: 2px;
    padding: 2px;
    }

    .video-item {
    align-items: center;
    align-content: center;
    align-self: center;
    }

    .clipbox-container {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      max-width: 600px;
      width: 100%;
      padding: 0 2px;
    }

    .clipbox-container h1, 
    .clipbox-container button { 
      width: auto;
      text-align: center;
      margin-top: 2px;
    }

    .clipbox-upload {
    box-sizing: border-box;
    }

    .form-container {
    padding: 0 16px
    }
}

/* Tablet & Mobile (max-width: 768px) */
@media (max-width: 768px) {

  .video-content {
    width: 100%;
    max-width: calc(100vw) !important;
    height: auto;
    aspect-ratio: 9/16;
    object-fit: contain;
    margin: 0 auto;
    margin-right: 2px;
    box-sizing: border-box;
    padding: 0;
  }
  
  .video-content video {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 9/16;
    object-fit: contain;
    margin-left: 0px;
    box-sizing: border-box;
  }

  .video-list {
  height: auto;
  padding-right: 2px !important;
  padding-left: 0px;
  margin-right: 0px;
  margin-left: 0px;
  box-sizing: border-box;
  }

  .clipbox-container {
    margin-top: -10px !important;
  }

  .clipbox-container h1 { 
    font-size: 0.9rem;
  }

  .post {
    max-width: 100%;
    margin-left: 0px;
    margin-right: 0px;
  }
  
  .post-image {
    max-height: 300px;
  }
  
  .post-image img {
    height: 300px;
  }
  
  .shared-post .post-image {
    max-height: 250px;
  }
  
  .shared-post .post-image img {
    height: 250px;
  }

  .amigotalk-container {
    padding: 0;
    margin-left: -20px;
  }

  /* Navigation Grundstruktur */
  .navbar {
    grid-template-columns: auto 1fr auto;
    gap: 2px;
    padding: 0;
    margin-left: -10px;
  }

  /* Navigation Links */
  .nav-left {
    padding-left: 0;
    margin-left: 0;
  }

  nav ul {
    padding-left: 0;
    margin-left: 0;
    gap: 1px;
    align-items: center;
    justify-content: center;
  }

  nav ul li {
    margin: 0;
    display: flex;
    align-items: center;
  }

  nav ul li a {
    padding: 8px 4px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Icons */
  .nav-icon {
    min-height: 26px;
    min-width: 26px;
  }

  /* Suche */
  .search-container {
    width: auto;
    margin: 0 5px;
    display: flex;
    align-items: center;
  }

  .search-form {
    padding: 4px 8px;
  }

  /* Mobile Suche */
  .search-container .desktop-search {
    display: none !important;
  }

  .search-icon-mobile {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    height: 26px;
    width: 26px;
    margin: 0;
    opacity: 0.8;
    cursor: pointer;
    padding: 0;
  }

  .search-icon-mobile:hover {
    opacity: 1;
  }

  /* Such-Popup */
  .search-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #4267B2;
    padding: 15px;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  }

  .search-popup.active {
    display: block;
  }

  .search-popup .search-form {
    display: flex !important;
    width: 100%;
    position: relative;
  }

  .search-popup .search-input {
    width: 100%;
    padding: 8px 30px 8px 8px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    border-radius: 4px;
  }

  .search-popup .close-search {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    padding: 5px;
    cursor: pointer;
    display: none;
  }

  .search-popup.active .close-search {
    display: block;
  }

  /* Suche */
  .search-container .search-form {
    display: none !important; /* Ursprüngliche Suchleiste ausblenden */
  }

  /* Dark Mode - nur im mobilen Modus und wenn aktiv anzeigen */
  .dark-mode .search-popup.active {
    display: block !important;
  }

  /* Rechte Navigation (Logout) */
  .nav-right {
    margin-right: 4px; /* Reduzierter Abstand */
    margin-left: 6px;
  }

  .nav-right ul li a {
    padding: 4px 2px; /* Angepasstes Padding */
  }

  /* Logo ausblenden */
  .nav-left img {
    height: 60px;
  }

  .logo-text {
    display: none;
  }

   /* Icons in der rechten Navigation (Logout) auch größer */
  .nav-right ul li a i {
    font-size: 26px; /* Icon größer machen */
  }

  /* Abstände für die größeren Icons anpassen */
  nav ul li a,
  .nav-right ul li a {
    padding: 4px 2px; /* Mehr Platz für größere Icons */
  }

  .modern-select {
      padding: 12px 36px 12px 12px; /* Größere Touch-Fläche */
      font-size: 16px; /* Bessere Lesbarkeit auf Mobile */
  }

/* Sicherstellen, dass die Search-Popup nur im mobilen Modus UND nur wenn aktiv angezeigt wird */
.search-popup {
display: none !important;
  }

/* Nur wenn beide Klassen vorhanden sind UND im mobilen Modus */
.search-popup.active {
  display: block !important;
  }

  .nav-icon-wrapper {
    display: flex !important;  /* Important um andere display:none zu überschreiben */
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin-top: 3px;
    position: relative;  /* Wichtig für Badge-Positionierung */ 
}

.unread-badge-header {
    display: flex !important;  /* Badge immer anzeigen */
    top: -5px;
    right: -5px;
    font-size: 8px; /* Kleinere Schrift */
    min-width: 14px;
    height: 14px;
    padding: 1px 4px;
    z-index: 1;  /* Sicherstellen, dass Badge über Icon liegt */
}

/* Nur die Nav-Labels ausblenden, nicht die Badges */
.nav-label {
    display: none !important;
}

}

/* Smartphone (max-width: 640px) */
@media (max-width: 640px) {
  .nav-links {
    justify-content: flex-start;
    gap: 2px;
  }
  
  .search-container {
    display: block;
    margin-left: auto;
  }

  .navbar {
    padding: 0 2px; /* Noch weniger Padding */
  }
  
  nav ul {
    gap: 3px; /* Noch engerer Abstand */
  }
} 

@media (max-width: 430px) {
  .logo {
    display: none;
  }

  .clipbox-container {
    margin: 0 auto;
    padding: 2px;
  }

} 
/************************************************************
 * 13) Formulare, Inputs, Textareas, Labels
 ************************************************************/
/* Labels */
.modern-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-color);
  font-weight: 500;
  font-size: 0.95rem;
}

/* Textareas */
.modern-textarea,
textarea {
  width: 100%;
  padding: 12px;
  min-height: 120px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: white;
  color: var(--text-color);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  box-sizing: border-box;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.modern-textarea:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

/* Textareas */
.modern-textarea-klein {
  width: 100%;
  padding: 12px;
  min-height: 80px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: white;
  color: var(--text-color);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  box-sizing: border-box;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.modern-textarea-klein:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

/* Inputs */
.modern-input,
input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: white;
  color: var(--text-color);
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.modern-input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

/************************************************************
 * 14) Dark Mode (alle .dark-mode-Regeln gesammelt am Ende)
 ************************************************************/
/* Dark Mode Variablen */
.dark-mode {
  --bg-color: #18191A;
  --text-color: #E4E6EB;
  --border-color: #3A3B3C;
}

.dark-mode .post-content img {
  background-color: #131313;
}

.dark-mode .shared-post {
  background-color: #202020;
}

.dark-mode .shared-post img {
  background-color: #131313;
}

.dark-mode .search-form {
  background: #4d6074;
}
.dark-mode .search-input {
  color: #E4E6EB;
}
.dark-mode .search-input::placeholder {
  color: #B0B3B8;
}

/* Dark Mode Posts */
.dark-mode .post {
  background: #3A3B3C;
  border-color: #555;
  color: #E4E6EB;
}

/* Dark Mode Profile-Edit-Section */
.dark-mode .profile-edit-section {
  color: #E4E6EB;
}

/* Dark Mode Kommentare Textarea */
.dark-mode .comment-form textarea {
  background: #3A3B3C;
  color: #E4E6EB;
  border-color: #3A3B3C;
}

.dark-mode .comment-form {
  background: #111a24;
}

/* Dark Mode Modals & Popups */
.dark-mode .modal-box,
.dark-mode .popup-content {
  background: #242526;
  color: #E4E6EB;
}

.dark-mode #comment-modal,
.dark-mode #image-modal,
.dark-mode #share-modal {
  background: #242526 !important;
  color: #E4E6EB !important;
}

.dark-mode .modal-comment-form {
  background: #242526;
}

/* Dark Mode Bild-Vorschau */
.dark-mode #image-preview {
  background: #242526;
}

/* Dark Mode Footer */
.dark-mode .site-footer {
  background: #3A3B3C;
  border-color: #555;
}

.dark-mode header {
  background: #3A3B3C;
  border-color: #555;
}   

/* Dark Mode Textarea (allgemein) */
.dark-mode .modern-textarea,
.dark-mode .modern-textarea-klein,
.dark-mode textarea {
  background: #3A3B3C;
  border-color: #4E4F50;
  color: #E4E6EB;
}

/*Dark Mode Input Felder*/
.dark-mode .modern-input {
  background: #3A3B3C;
  border-color: #4E4F50;
  color: #E4E6EB;
}

/* Dark Mode */
.dark-mode nav ul li a:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.dark-mode .original-post {
  background: #2d2d2d;
}

.home-container,
.profile-container,
.group-container {
  max-width: 800px !important;
  margin: 0 auto !important;
  padding: 20px !important;
  word-wrap: break-word !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

/* Dark Mode Anpassung */
.dark-mode .post-options-menu {
    background: #242526;
    border-color: #3A3B3C;
}

.post-options-menu button {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    color: inherit;
}

.post-options-menu button:hover {
    background-color: #f5f5f5;
}

.dark-mode .post-options-menu button:hover {
    background-color: #3A3B3C;
}

.edit-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.edit-buttons button {
    padding: 5px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.cancel-button {
    background-color: #f44336;
    color: white;
    border-radius: 8px;
}

.edit-textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    font-family: inherit;
}

.edit-image-preview {
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
}

.edit-image-preview img {
    max-width: 200px;
    height: auto;
    display: block;
}

/* Container für die Kommentare */
.comments-container {
  overflow-y: auto;
  padding: 20px;
  max-height: calc(80vh - 180px); /* Mehr Platz für das Formular */
  grid-row: 2;
  word-break: break-word;
}
/* Scrollbar Styling */
.comments-container::-webkit-scrollbar {
    width: 8px;
}

.comments-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.comments-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.comments-container::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Offline Styles */
.offline {
  filter: grayscale(0.5);
}

.notification {
  position: fixed;
  left: 50%;
  top: 60%;  /* Leicht unterhalb der Mitte */
  transform: translate(-50%, -50%);  /* Zentriert horizontal und vertikal */
  background-color: transparent;
  padding: 12px 24px;
  border-radius: 8px;
  z-index: 1000;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translate(-50%, 100%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

.modern-select {
    appearance: none;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 36px 8px 12px;
    font-size: 1rem;
    color: var(--text-color);
    width: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
    /* Custom Pfeil mit Unicode */
    background-image: linear-gradient(45deg, transparent 50%, #666 50%),
                     linear-gradient(135deg, #666 50%, transparent 50%);
    background-position: 
        calc(100% - 20px) calc(50% + 2px),
        calc(100% - 15px) calc(50% + 2px);
    background-size: 
        5px 5px,
        5px 5px;
    background-repeat: no-repeat;
}

.modern-select:hover {
    border-color: var(--primary-color);
}

.modern-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Dark Mode Anpassungen */
.dark-mode .modern-select {
    background-color: #3A3B3C;
    border-color: #4E4F50;
    color: #E4E6EB;
    /* Pfeil in weiß für Dark Mode */
    background-image: linear-gradient(45deg, transparent 50%, #E4E6EB 50%),
                     linear-gradient(135deg, #E4E6EB 50%, transparent 50%);
}

/* Dark Mode - explizit die Suchleiste ausblenden */
.dark-mode .search-popup {
  display: none !important;
}

/* Banner Repositioning Styles */
#banner-preview {
    position: relative;
    height: 300px;
    overflow: hidden;
    background: #f0f0f0;
    border-radius: 8px;
    cursor: move;
}

#repositionable-banner {
    position: relative;
    width: 100%;
    height: auto;
    cursor: move;
    user-select: none;
    transition: none; /* Entfernt Übergangseffekte während des Ziehens */
}

/* Dark Mode */
.dark-mode #banner-preview {
    background: #2d2d2d;
}

/* SVG Icons in der Navigation weiß färben */
.nav-icon[src$=".svg"] {
  opacity: 0.8;  /* Leichte Transparenz für bessere Optik */
  transition: all 0.2s ease;
}

.nav-icon[src$=".svg"]:hover {
  opacity: 1;
}

.unread-badge-header {
  position: absolute;
  top: -8px;
  right: -12px;
  background-color: #ff4444;
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 10px;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.nav-icon-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Einheitliches Styling für Benachrichtigungszähler */
.unread-badge {
  background-color: #ff4444;
  color: white;
  border-radius: 50%;  /* Macht es komplett rund */
  padding: 1px 6px;
  font-size: 0.75rem;
  font-weight: bold;
  min-width: 16px;  /* Minimale Breite für einstellige Zahlen */
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* Freunde-Container Styling */
.friends-container {
    max-width: 800px !important;
    margin: 0 auto !important;
    padding: 20px !important;
    word-wrap: break-word !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

/* Freundesliste Styling */
.friend-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 0;
    list-style: none;
}

.friend-item {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: var(--box-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.friend-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.friend-item a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
}

.friend-item a:hover {
    color: var(--primary-color);
}

/* Freundschaftsanfragen Styling */
.friend-request-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    width: 100%;  /* Geändert von calc(100% + 30px) */
}

.friend-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.friend-requests {
    list-style: none;
    padding: 0;
    margin: 0;
}

.friend-request-actions {
    display: flex;
    gap: 10px;
}

.friend-request-actions button {
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.friend-request-actions button[value="accept"] {
    background: var(--primary-color);
    color: white;
}

.friend-request-actions button[value="accept"]:hover {
    background: var(--primary-hover);
}

.friend-request-actions button[value="decline"] {
    background: #ef4444;
    color: white;
}

.friend-request-actions button[value="decline"]:hover {
    background: #dc2626;
}

/* Dark Mode Anpassungen */
.dark-mode .friend-item,
.dark-mode .friend-request-item {
    background: #3A3B3C;
    color: #E4E6EB;
}

.dark-mode .friend-item a {
    color: #E4E6EB;
}

.dark-mode .friend-item:hover {
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

/* Dark Mode Anpassungen */
.dark-mode .like-button:hover,
.dark-mode .post-actions .action-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Dark Mode Anpassungen */
.dark-mode .comment-actions {
    border-top-color: #4E4F50;
}

/* Dark Mode Anpassung */
.dark-mode .comment-reply {
    border-left-color: #4E4F50;
}

.banner-preview-container {
    width: 100%;
    height: 300px; /* Gleiche Höhe wie group-banner-container */
    overflow: hidden;
    position: relative;
    margin: 1rem 0;
    background: #f5f5f5;
}

.repositionable-banner {
    width: 100%;
    position: absolute;
    cursor: grab;
    user-select: none;
    object-fit: cover;
}

.repositionable-banner:active {
    cursor: grabbing;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.save-button {
    background: #4267B2;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.save-button:hover {
    background: #365899;
}

.cancel-button:hover {
    background: #e5e5e5;
}

/* Optimierung für den gesamten Modal-Content */
.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* //////////////////////Mitglieder-Modal Styling ////////////////////// */
.member-list-modal {
  max-width: 600px;
  padding: 0;
}

.member-list-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}

.member-list-content {
  max-height: 60vh;
  overflow-y: auto;
  padding: 0 20px;
  text-decoration: none;
  font-weight: 500;
}

.member-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
  
}

.member-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.member-role {
  font-size: 0.85rem;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 500;
}

.role-admin {
  background: #4267B2;
  color: white;
}

.role-moderator {
  background: #6389d4;
  color: white;
}

.member-actions {
  display: flex;
  gap: 8px;
}

.member-action-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.promote-btn {
  background: #4267B2;
  color: white;
}

.promote-btn:hover {
  background: #365899;
}

.remove-btn {
  background: #dc2626;
  color: white;
}

.remove-btn:hover {
  background: #b91c1c;
}

/* Dark Mode Anpassungen */
.dark-mode .member-list-header {
  border-color: #3A3B3C;
}

.dark-mode .member-item {
  border-color: #3A3B3C;
}

/* //////////////////////Gruppen-Styling ENDE ////////////////////// */

/* Post Lösch-Button */
.delete-post-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.delete-post-btn:hover {
    opacity: 1;
}

.delete-icon {
    width: 20px;
    height: 20px;
}

/* Dark Mode */
.dark-mode .delete-post-btn {
    filter: invert(1);
}

/* Mobile Suche */
.mobile-search-form {
    display: block;
    width: 100%;
    padding: 10px;
    background: var(--primary-color);
    position: fixed;
    top: 60px;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mobile-search-container {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 4px;
    padding: 5px 10px;
}

.mobile-search-input {
    flex: 1;
    border: none;
    padding: 8px;
    font-size: 16px;
    outline: none;
    background: transparent;
}

.mobile-search-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    padding: 0 8px;
    cursor: pointer;
}

/* Dark Mode Anpassungen */
.dark-mode .mobile-search-container {
    background: var(--bg-color);
}

.dark-mode .mobile-search-input {
    color: var(--text-color);
}

/* /////////////// Link-Vorschau /////////////// */

.link-preview {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin: 10px 0;
    overflow: hidden;
    background: var(--bg-color);
    transition: all 0.2s ease;
}

.link-preview:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.link-preview-content {
    padding: 12px;
    display: flex;
    gap: 15px;
    text-decoration: none;
    color: inherit;
}

.link-preview-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
}

.link-preview-text {
    flex: 1;
    min-width: 0;
}

.link-preview-domain {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 4px;
}

.link-preview-title {
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    max-height: 2.4em; /* ca. 2 Zeilen */
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-preview-description {
    color: var(--text-secondary);
    font-size: 0.95em;
    display: flex;
    max-height: 3.6em; /* ca. 3 Zeilen */
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dark Mode Anpassungen */
.dark-mode .link-preview {
    border-color: var(--dark-border);
    background: var(--dark-bg-secondary);
}

/* Styles für Beitrittsanfragen */
.request-item {
    background: #fff;
    transition: background-color 0.2s;
}

.request-item:hover {
    background: var(--hover-bg);
}

.button-group {
    display: flex;
    gap: 10px;
}

/* Spezifische Buttons für Anfragen */
.modern-button.accept {
    background: #4CAF50 !important;
    color: white !important;
}

.modern-button.reject {
    background: #f44336 !important;
    color: white !important;
}

/* Badge für Anzahl der Anfragen */
.request-badge {
    background: #ff4444;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.8em;
    margin-left: 5px;
}

/* Dark Mode Anpassungen */
.dark-mode .request-item {
    background: var(--bg-color);
}

.dark-mode .request-item:hover {
    background: var(--hover-bg);
}


/* Container, relativ positioniert, damit das Dropdown absolut dazu positioniert werden kann */
.dropdown-menu-wrapper {
  position: relative;
}

/* Popup-Dropdown als absolut positioniertes Element */
.dropdown-menu {
  display: none; /* Anfangs versteckt */
  position: absolute;
  top: 100%; /* Unterhalb des Auslösers */
  right: 0;
  background-color: var(--primary-color);
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 1000; /* Stelle sicher, dass das Dropdown oben liegt */
  width: 200px; /* Feste Breite, kann angepasst werden */
}

/* Klasse, die das Dropdown anzeigt */
.dropdown-menu.show {
  display: block;
}

/*////////////////////// AmigoTalk Styling //////////////////////////////*/

.amigotalk-container {
    max-width: 1200px;
    min-width: 96%;
    width: 96%;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 20px); /* Header-Höhe abziehen */
    background: #ffffff;
    color: #1a1a1a;
}

/* Raumerstellung */
.create-room-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.create-room-header {
    text-align: center;
    margin-bottom: 30px;
}

.create-room-header h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.create-room-header p {
    color: #666;
    font-size: 1.1rem;
}

.create-room-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: #374151;
}

.form-group input,
.form-group select {
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 103, 178, 0.1);
}

.create-room-btn {
    background: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.create-room-btn:hover {
    background: var(--primary-hover);
}

/* Verfügbare Räume */
.available-rooms-section {
    margin-top: 40px;
}

.available-rooms-section h2 {
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.category-section {
    margin-bottom: 30px;
}

.category-section h3 {
    font-size: 1.2rem;
    color: #4b5563;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 4px solid var(--primary-color);
}

.room-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.room-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.room-info {
    flex: 1;
}

.room-info h4 {
    font-size: 1.1rem;
    color: #1f2937;
    margin-bottom: 5px;
}

.host-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.host-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.host-name {
    color: #6b7280;
    font-size: 0.9rem;
}

.room-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #9ca3af;
    font-size: 0.8rem;
}

.join-room-btn {
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.join-room-btn:hover {
    background: var(--primary-hover);
    text-decoration: none;
}

/* Dark Mode */
.dark-mode .create-room-container,
.dark-mode .room-card {
    background: #242526;
    border-color: #3a3b3c;
}

.dark-mode .create-room-header h1 {
    color: #e4e6eb;
}

.dark-mode .create-room-header p,
.dark-mode .room-info h4 {
    color: #b0b3b8;
}

.dark-mode .form-group label {
    color: #e4e6eb;
}

.dark-mode .amigotalk-container {
    background: #314457;
    border-radius: 8px;
}

.dark-mode .controls {
  background: #4267B2;
}

.dark-mode .form-group input,
.dark-mode .form-group select {
    background: #3a3b3c;
    border-color: #4a4b4c;
    color: #e4e6eb;
}

.dark-mode .category-section h3 {
    color: #e4e6eb;
}

.dark-mode .host-name {
    color: #b0b3b8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .create-room-container {
        padding: 10px;
        margin: 4px;
    }

    .room-card {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .join-room-btn {
        width: 100%;
    }

    .room-header {
      flex-direction: column;
      align-items: flex-start;
      gap: 16px;
    }
  
    .participants-container {
      grid-template-columns: 1fr;
    }
    .control-button .button-text {
    display: none;
    }

    .control-button {
    padding: 8px;
    }

   .amigotalk-room-container {
    width: calc(100% - 8px); /* Nur 4px Abstand auf jeder Seite */
    max-width: 100%;
    min-width: 96%;
    margin: 0 4px; /* Minimaler seitlicher Abstand */
    padding: 8px; /* Noch etwas reduziertes Padding */
    border-radius: 4px;
  }
}

.host-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6b7280;
}

.host-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* Raumansicht - Modern & Schlicht */
.room-view {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.room-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.room-title h1 {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.room-meta {
    font-size: 14px;
    color: #64748b;
}

/* Teilnehmer-Grid */
.participants-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.participant-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.participant-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.participant-info {
    flex: 1;
}

.participant-name {
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
}

.participant-role {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Steuerelemente */
.controls-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    margin-top: 24px;
}

.control-btn {
    padding: 12px 20px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.control-btn.primary {
    background: #0f172a;
    color: white;
}

.control-btn.primary:hover {
    background: #1e293b;
}

/* Stil für den Raum-Header */
.room-header {
    display: flex;
    align-items: center; /* Vertikal zentrieren */
    justify-content: space-between; /* Titel links, Button rechts */
    margin-bottom: 10px; /* Etwas Abstand zum Inhalt */
    font-size: 1.2rem;
    font-weight: 600;
}


.share-button {
    background: none; /* Wichtig: Hintergrund entfernen */
    border: none;
    cursor: pointer;
    padding: 5px; /* Etwas Padding für bessere Klickbarkeit */
    display: inline-flex; /*  Inline-Flex-Container */
    align-items: center; /*  Vertikal zentrieren */
    justify-content: center; /*  Horizontal zentrieren */
}

.share-button img {
    width: 24px; /* Größe des Icons anpassen */
    height: 24px;
    display: block; /*  Als Block-Element anzeigen */
}

.close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 20px;
    cursor: pointer;
}
#room_share_link{
    width: 100%;
    margin-bottom: 15px;
}

/*Styling für die Buttons im Allgemeinen*/
.controls button, .share-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/*Styling für die Bilder in den Buttons*/
.controls button img, .share-button img {
    width: 24px;
    height: 24px;
    display: block;
}

/*Spezifisches Styling für toggle-audio*/
#toggle-audio {
    background: none; /*Hintergrund entfernen, falls gesetzt*/
}

#toggle-audio img {
    width: 24px;
    height: 24px;
}

/*Spezifisches Styling für delete-room*/
#delete-room {
    background: none; /*Hintergrund entfernen, falls gesetzt*/
}

#delete-room img {
    width: 24px;
    height: 24px;
}

/* Steuerelemente */
.controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    margin-top: 24px;
}

.control-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.control-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.control-button img {
    width: 24px;
    height: 24px;
    display: block;
}

.control-button .button-text {
    font-size: 14px;
    color: #64748b;
}

/* Dark Mode Anpassungen */
.dark-mode .control-button {
    color: #e4e6eb;
}

.dark-mode .control-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .control-button .button-text {
    color: #b0b3b8;
}

.amigotalk-share {
    background-color: #f0f7ff;
    padding: 14px 18px;
    border-radius: 8px;
    border: 2px dashed #3b82f6;
    width: 60%;
    margin: 10px 0;
}


.amigotalk-room-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.amigotalk-room-link:hover {
    text-decoration: underline;
}

/* Dark Mode */
.dark-mode .amigotalk-share {
    background-color: #1e293b;
    border-left-color: #60a5fa;
}

.dark-mode .amigotalk-room-link {
    color: #60a5fa;
}

.amigotalk-room-container {
    width: 100%;
    min-width: 80%;
    max-width: 1200px; /* Maximale Breite im Desktop-Modus */
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 60px);
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    box-sizing: border-box; /* Wichtig: Padding wird in Breite eingerechnet */
}

.participants-list ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.participants-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 4px;
}

.mic-status {
    margin-left: auto; /* Schiebt das Icon nach rechts */
}

.mic-icon {
    width: 16px;
    height: 16px;
}

.participant-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: auto;
}

.promote-speaker-btn,
.request-speaker-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-left: 8px;
}

.promote-speaker-btn:hover,
.request-speaker-btn:hover {
    background-color: var(--hover-color);
}

.promote-speaker-btn img,
.request-speaker-btn img {
    width: 20px;
    height: 20px;
}

.speaker-request-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.speaker-request-notification button {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.speaker-request-notification button:first-of-type {
    background: var(--primary-color);
    color: white;
}

.speaker-request-notification button:last-of-type {
    background: var(--error-color);
    color: white;
}

.speaker-badge {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    margin-left: 8px;
    display: inline-block;
}

.error-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    text-align: center;
}

.error-message button {
    margin-top: 10px;
    padding: 5px 15px;
    border: none;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
    cursor: pointer;
}

/* //////// ClipBox Styles ////////*/

.video-list {
  display: flex;
  flex-direction: column;
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  height: 100vh;
  padding-right: 60px;
  border-top: 2px solid var(--border-color);
}

.video-item {
  scroll-snap-align: start;
  /* Weitere Styles, z. B. Padding, Margin, etc. */
}

.clipbox-upload {
  display: none;
  margin-top: 20px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 8px;
  border: 2px dashed #3b82f6;
  padding: 20px;
}

.video-content {
  position: relative;
  width: 400px;
  max-width: 100%;
  aspect-ratio: 9/16;
  overflow: hidden; 
  border-radius: 10px;
  background: #000;
  box-sizing: border-box;
}

.video-content video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-actionsvideo {
  position: absolute;
  top: 62%;
  transform: translateY(-50%);
  right: -44px;          /* Von right: 0 zu left: 100% geändert */
  margin-left: 4px;   /* Abstand zum Video hinzugefügt */
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  z-index: 10;
}

.post-actionsvideo img {
  display: flex;
  flex-direction: column; /* Ordnet Icon und Count vertikal an */
  align-items: center;
  width: 100%;
  height: 100%;
  min-width: 24px;
  gap: 18px;
  padding: 8px 2px;
}

.post-actionsvideo button.action-button {
  display: flex;
  flex-direction: column; /* Ordnet Icon und Count vertikal an */
  align-items: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 14px;
  padding: 4px;
  min-width: 44px;
  gap: 2px;
}

.post-actionsvideo button.action-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.post-actionsvideo button.like-button {
  display: flex;
  flex-direction: column; /* Ordnet Icon und Count vertikal an */
  align-items: center;
}

.video-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 10px;
  color: white;
  z-index: 10;
} 

.video-description {
  position: absolute;
  bottom: 80px; /* Erhöht, damit genügend Platz für Kategorie und Aktionen besteht */
  left: 0;
  right: 0;
  padding: 15px;
  color: white;
  font-size: 0.9rem;
  z-index: 10;
}

.video-category {
  position: absolute;
  bottom: 60px; /* Direkt über dem Post-Actions-Block, mit kleinem Abstand */
  left: 0;
  right: 0;
  padding: 15px;
  color: white;
  font-size: 0.8rem;
  opacity: 0.8;
  z-index: 10;
}

/* Profile Video Styles */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.video-item-profile {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.video-item-profile:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.video-content-profile {
  position: relative;
  width: 100%;
  aspect-ratio: 9/16;
  background: #000;
  overflow: hidden;
}

.video-content-profile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-info-profile {
  padding: 12px;
}

.video-actions-profile {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-top: 10px;
}

.video-actions-profile button {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #666;
  font-size: 14px;
  transition: color 0.2s ease;
}

.video-actions-profile button:hover {
  color: #3b82f6;
}

.video-actions-profile .like-button-profile.liked {
  color: #e74c3c;
}

/* Mobile Responsive für Video-Grid */
@media (max-width: 768px) {
  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
  }
  
  .video-item-profile {
    margin: 0 5px;
  }
}

@media (max-width: 480px) {
  .video-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .video-actions-profile {
    gap: 10px;
  }
  
  .video-actions-profile button {
    font-size: 12px;
  }
}