/* Page */
body {
  background: #050505;
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  max-width: 80%;
  margin: auto;
}

.hidden {
  display: none;
}

#error_box {
  color: red;
  visibility: hidden;
}

#error_box::before {
  content: "Error: ";
}

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  margin-top: 36px;
  padding-bottom: 16px;
  border-bottom: 2px solid #3c3d3f;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #f8f7f7;
  font-size: 32px;
  font-weight: bold;
  text-decoration: none;
}

.logo_img {
  height: 48px;
  width: auto;
}

.header_actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons
   Hover transitions adapted from
   https://www.w3schools.com/css/css3_transitions.asp */
.btn {
  border: 2px solid #3c3d3f;
  border-radius: 8px;
  padding: 10px 16px;
  background: #ffffff;
  color: #3c3d3f;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover:not(:disabled) {
  background: rgb(240, 130, 222);
  color: #ffffff;
  border-color: rgb(240, 130, 222);
}

.btn:disabled {
  opacity: 0.45;
  cursor: default;
}

/* Gallery */
#gallery_content {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}

.gallery_list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 480px;
}

.gallery_link {
  text-align: left;
}

.empty_gallery {
  margin: 0;
  color: #f8f7f7;
}

.image_card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 480px;
  min-width: 0;
  padding: 16px;
  background: #000000;
  border: 10px solid #3c3d3f;
  border-radius: 12px;
  /* Keyframe animations adapted from
     https://www.w3schools.com/css/css3_animations.asp */
  animation-name: cardSlideIn;
  animation-duration: 0.35s;
  animation-timing-function: ease;
}

@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.image_header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.image_author {
  min-width: 0;
  font-size: 18px;
  font-weight: bold;
  overflow-wrap: break-word;
}

.image_counter {
  flex-shrink: 0;
  white-space: nowrap;
}

.image_title {
  color: #e199e2;
  font-size: 25px;
  font-weight: bold;
  overflow-wrap: break-word;
}

.image_container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.05);
}

.gallery_image {
  display: block;
  max-width: 100%;
  max-height: 500px;
  object-fit: contain;
}

.nav_btn {
  padding: 8px 12px;
  color: #df6bbe;
  font-size: 14px;
}

.image_actions {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 8px;
  border-top: 1px solid #3c3d3f;
}

.icon {
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: center / contain no-repeat;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.icon:hover {
  transform: scale(1.15);
}

.upvote-icon {
  margin-left: auto;
  background-image: url("../media/like.png");
}

.downvote-icon {
  background-image: url("../media/dislike.png");
}

.delete-icon {
  background-image: url("../media/trash.png");
}

.vote-count {
  margin-left: 28px;
  font-size: 14px;
  font-weight: bold;
}

/* Footer */
footer {
  margin: 40px 0 20px;
  color: #888888;
  text-align: center;
}
