* {
  font-family: Arial, Helvetica, sans-serif;
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  border: 0;
  padding: 0;
  background-color: #f5f7fa;
  color: #333;
}

main {
  margin: auto;
  width: 50%;
  padding: 20px;
  max-width: 800px;
}

main>h1 {
  text-align: center;
  font-size: 3em;
  color: #2c3e50;
  margin-bottom: 10px;
}

.app-description {
  text-align: center;
  font-size: 1.2em;
  color: #7f8c8d;
  margin-top: 0;
  margin-bottom: 30px;
}

/* Image Upload Styles */
.upload-container {
  margin: 30px auto;
  text-align: center;
  padding: 20px;
  border-radius: 10px;
  background-color: #f9f9f9;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.button-container {
  margin: 20px 0;
}

.upload-button {
  display: inline-block;
  padding: 12px 24px;
  background-color: #4285f4;
  color: white;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s;
}

.upload-button:hover {
  background-color: #3367d6;
}

.action-button {
  padding: 10px 20px;
  background-color: #34a853;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  margin-top: 15px;
  transition: background-color 0.3s;
}

.action-button:hover {
  background-color: #2d9248;
}

#image-preview-container {
  margin-top: 20px;
}

#image-preview {
  max-width: 100%;
  max-height: 300px;
  margin: 15px 0;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.hidden {
  display: none;
}

/* Progress bar styles */
.progress-container {
  margin: 15px 0;
  background-color: #f1f1f1;
  border-radius: 5px;
  padding: 3px;
  position: relative;
  height: 25px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.progress-bar {
  height: 100%;
  background-color: #4CAF50;
  border-radius: 3px;
  transition: width 0.3s ease-in-out;
  width: 0%;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #333;
  font-weight: bold;
  text-shadow: 0 0 2px white;
}

.success-message {
  margin: 10px 0;
  padding: 10px;
  background-color: #dff0d8;
  color: #3c763d;
  border-radius: 5px;
  border-left: 5px solid #5cb85c;
  animation: fadeIn 0.5s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Slideshow styles */
html.slideshow, body.slideshow {
  background-color: black;
  color: white;
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

#image-container {
  position: relative;
  flex: 1;


  /* Fixed height for better transitions */
  border: 1px solid #222;
  border-radius: 4px;
  background-color: black;
  overflow: hidden;
}

.crossfade-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* object-fit: cover; */
  object-fit: scale-down;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.crossfade-image.active {
  opacity: 1;
}


/* Footer styles */
footer {
  margin-top: 40px;
  text-align: center;
  font-size: 0.9em;
  color: #95a5a6;
  padding: 20px 0;
  border-top: 1px solid #ecf0f1;
}

/* Media queries for responsive design */
@media (max-width: 768px) {
  main {
    width: 90%;
    padding: 15px;
  }

  main>h1 {
    font-size: 2.5em;
  }

  .app-description {
    font-size: 1em;
  }

  .upload-container {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  main>h1 {
    font-size: 2em;
  }

  .upload-button {
    padding: 10px 20px;
  }
}