html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Arial, sans-serif;
}

body {
  display: flex;
  align-items: center;
  flex-direction: column;
  background: radial-gradient(circle at top left, #222, #000);
  color: #fff;
}

header {
  background-color: #444;
  width: 100%;
  text-align: center;
}

header h1 {
  margin: 10px 0;
}

main {
  flex: 1;
  margin-top: 30px;
}

.carousel {
  outline: #444 solid 1px;
  overflow: hidden;
}

#carousel-content {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin: 5px;
  width: 60vw;
  overflow: hidden;
  position: relative;
}

.carousel-item {
  flex: 0 0 50%;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 0.5s ease-in-out;
}

@keyframes slideLeft {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes slideRight {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

.animate-left {
  animation: slideLeft 0.5s forwards;
}
.animate-right {
  animation: slideRight 0.5s forwards;
}

.carousel-item.left,
.carousel-item.center,
.carousel-item.right,
.carousel-item.outside-left,
.carousel-item.outside-right {
  display: flex;
}

.carousel-item.outside-left {
  order: 0;
}

.carousel-item.left {
  order: 1;
  opacity: 0.5;
}

.carousel-item.center {
  order: 2;
}

.carousel-item.right {
  order: 3;
  opacity: 0.5;
}

.carousel-item.outside-right {
  order: 4;
}

.carousel-item img {
  width: 80%;
  height: auto;
  object-fit: contain;
}

.controls {
  outline: #444 solid 1px;
  width: 100%;
  padding: 10px 20px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

button {
  background-color: #ff4b1f;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: scale(1.1);
  box-shadow: 0 0 5px #ff4b1f, 0 0 10px #ff4b1f;
}

.carousel-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#indicators {
  font-size: 1.5rem;
}

.sound-controls {
  padding-right: 30px;
}

footer {
  width: 100%;
  padding: 1rem 0;
  background-color: #111;
  text-align: center;
  color: #bbb;
  font-size: 0.9rem;
}

footer a {
  color: #1fddff;
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #ff4b1f;
}

@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
    padding: 1rem;
  }

  main {
    margin-top: 1rem;
    width: 95%;
  }

  #carousel-content {
    width: 95vw;
    max-height: calc(100vh - 120px);
  }

  .carousel-item img {
    width: 100%;
    height: auto;
  }

  .controls {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
  }

  .carousel-controls,
  .sound-controls {
    margin: 0;
    padding: 0;
  }

  button {
    font-size: 1rem;
    padding: 0.4rem 0.8rem;
  }

  footer {
    font-size: 0.8rem;
    padding: 0.5rem 0;
    margin-top: 100px;
    flex-shrink: 0;
  }
}
