/* Allgemeines Styling */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background: #f4f4f9;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
  }
  
  /* Popup Styling */
  .popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
  }
  
  .popup-content {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease;
  }
  
  .popup-content h2 {
    margin-bottom: 15px;
  }
  
  #username {
    width: 80%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    margin-bottom: 10px;
  }
  
  #enter-chat {
    padding: 10px 20px;
    background-color: #4caf50;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  #enter-chat:hover {
    background-color: #45a049;
  }
  
  /* Chat Container Styling */
  #chat-container {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    animation: fadeIn 0.5s ease;
    position: relative; /* Relativen Kontext für den Header */
  }
  
  /* Chat Header Styling */
  #chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.8); /* Hintergrunfarbe für den Header */
    border-bottom: 1px solid #ccc;
    z-index: 1; /* Sicherstellen, dass der Header über dem Hintergrundbild bleibt */
  }
  
  #chat-header h2 {
    margin: 0;
  }
  
  #change-name {
    padding: 5px 10px;
    background-color: #008cba;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  #change-name:hover {
    background-color: #007bb5;
  }
  
  /* Hintergrundbild im Chat Container */
  #chat-box {
    height: 400px;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-image: url('https://home-produktionen-chat.web.app/backrounds/Designer10.jpeg'); /* Hier die URL deines Hintergrundbildes */
    background-size: cover; /* Bild so skalieren, dass es den gesamten Container abdeckt */
    background-position: center; /* Bild zentrieren */
    background-repeat: no-repeat;
    border-radius: 0 0 10px 10px; /* Ecken nur unten abgerundet */
    height: 100%;
  }
  
  .message {
    padding: 10px;
    border-radius: 20px;
    max-width: 70%;
    display: inline-block;
    position: relative;
    color: white;
    line-height: 1.4;
    word-wrap: break-word;
    animation: slideIn 0.4s ease;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
  }
  
  .message.other {
    background-color: rgba(28, 155, 172, 0.8); /* Andere Nachrichten: Türkis */
    align-self: flex-start;
  }
  
  .message.self {
    background-color: rgba(187, 33, 106, 0.8); /* Eigene Nachrichten: Pink */
    align-self: flex-end;
  }
  
  #chat-input {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background-color: #f4f4f9;
    border-top: 1px solid #ccc;
  }
  
  #message {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    outline: none;
    transition: border-color 0.3s ease;
  }
  
  #message:focus {
    border-color: #1c9bac;
  }
  
  #send-message {
    padding: 10px 20px;
    background-color: #008cba;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 10px;
    transition: background-color 0.3s ease;
  }
  
  #send-message:hover {
    background-color: #007bb5;
  }
  
  /* Scrollbar Styling */
  #chat-box::-webkit-scrollbar {
    width: 8px;
  }
  
  #chat-box::-webkit-scrollbar-thumb {
    background-color: rgba(28, 155, 172, 0.6);
    border-radius: 10px;
  }
  
  /* Das neue Hidden-Style */
  .hidden {
    display: none;
  }
  
  /* Chat Header Button Styling */
  #auth-button {
    padding: 5px 10px;
    background-color: #1c9bac;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  #auth-button:hover {
    background-color: #169b99;
  }
  
  #change-name {
    padding: 5px 10px;
    background-color: #008cba;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  #change-name:hover {
    background-color: #007bb5;
  }
  