.cookie-banner {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 500px;
  background: rgba(14, 14, 14, 0.874);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 5px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  z-index: 9999;
  color: #fff;
  text-align: center;
  font-size: 0.95rem;
  animation: slide-up 0.4s ease-out;
}

@media (max-width: 768px) {
  .cookie-banner {
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    transform: none;
    border-radius: 5px 5px 0 0;
    border: 0px solid rgba(255, 255, 255, 0.3);
    animation: slide-up-mobile 0.4s ease-out;
    box-sizing: border-box;
    padding-left: 1rem;
    padding-right: 1rem;
    max-height: 100vh;
    overflow-y: auto;
  }

  .cookie-banner::-webkit-scrollbar {
    width: 8px;
  }

  .cookie-banner::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
  }

  .cookie-banner::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
  }

  .cookie-banner::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
  }

  .cookie-buttons {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  .cookie-btn {
    width: 100%;
    padding: 0.8rem 1rem;
  }

  @keyframes slide-up-mobile {
    from {
      transform: translateY(100%);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
}

@media (max-height: 600px) {
  .cookie-banner {
    max-height: 100vh;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
  
  .cookie-banner h3 {
    margin-top: 0;
    margin-bottom: 0.3rem;
  }
  
  .cookie-banner p {
    margin-bottom: 0.7rem;
  }
  
  .cookie-setting-item {
    margin-bottom: 0.5rem;
    padding: 0.4rem;
  }
}

.cookie-banner h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.cookie-banner p {
  margin-bottom: 1rem;
  line-height: 1.5;
  opacity: 0.9;
}

.cookie-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.cookie-btn {
  padding: 0.7rem 1.5rem;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.cookie-btn-accept {
  background: rgba(76, 175, 80, 0.8);
  color: white;
}

.cookie-btn-accept:hover {
  background: rgba(76, 175, 80, 1);
}

.cookie-btn-reject {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.cookie-btn-reject:hover {
  background: rgba(255, 255, 255, 0.3);
}

.cookie-btn-settings {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.cookie-btn-settings:hover {
  background: rgba(255, 255, 255, 0.25);
}

.cookie-settings {
  margin-top: 1rem;
  display: none;
  text-align: left;
}

.cookie-settings.active {
  display: block;
  animation: fade-in 0.3s ease-out;
}

.cookie-setting-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start; 
  margin-bottom: 0.7rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
}

.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 45px;
  height: 24px;
  flex-shrink: 0; 
  margin-left: 10px; 
  margin-top: 2px;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: .4s;
  border-radius: 34px;
}

.cookie-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .cookie-toggle-slider {
  background-color: rgba(76, 175, 80, 0.8);
}

input:checked + .cookie-toggle-slider:before {
  transform: translateX(21px);
}

.cookie-info {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: 0.5rem;
  max-width: calc(100% - 55px);
}

@media (max-width: 768px) {
  .cookie-setting-item {
    padding: 0.7rem;
  }
  
  .cookie-toggle {
    margin-top: 0;
  }
  
  .cookie-info {
    max-width: calc(100% - 65px);
  }
}

.hidden {
  display: none;
}

#open-cookie-settings {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

#open-cookie-settings:hover {
  opacity: 0.8;
}

@keyframes slide-up {
  from {
    transform: translate(-50%, 100%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Cookie-Einstellungs-Toggle */
.cookie-settings-toggler {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(26, 26, 26, 0.8);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 990;
  color: white;
  transition: all 0.3s ease;
  padding: 8px;
  opacity: 1;
}

.cookie-settings-toggler:hover {
  transform: scale(1.05);
  background: rgba(26, 26, 26, 0.9);
  border-color: rgba(255, 255, 255, 0.3);
}

.cookie-settings-toggler svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.5;
}

@media (max-width: 768px) {
  .cookie-settings-toggler {
    bottom: 70px;
    right: 15px;
    width: 36px;
    height: 36px;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
  }
  
  .cookie-settings-toggler.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
}
