body {
  background: #ffffff;
  font-size: 14px;
  text-align: left;
  margin: auto;
}

header {
  margin: 8px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

header .title {
  display: flex;
  color: black;
  text-decoration: none;
  width: 100%;
  font-size: 48px;
  justify-content: center;
  margin-top: 20px;
}

.auth-btn,
my-gallery-btn {
  height: 80%;
  width: auto;
  margin: 0px 4px;
}

.gallery {
  display: flex;
  margin: 16px 60px;
}

.gallery .images-bar {
  display: flex;
  flex-direction: column;
  width: 100%;
  align-items: center;
}

.images-bar .images {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.gallery .side-bar {
  position: sticky;
  top: 16px;
  align-self: flex-start;
  height: auto;
  width: 100%;
  margin: 0px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.images .image-component {
  display: flex;
  flex-direction: column;
  height: auto;
  max-height: 500px;
  width: 60%;
  border: solid 1px;
  border-radius: 8px;
  align-items: center;
}

.btn {
  background-color: transparent;
  border: solid 1px;
  border-radius: 8px;
  padding: 4px;
  cursor: pointer;
}

.side-bar .add-image-btn {
  width: 100%;
  background-color: #3cb371;
  color: white;
}

.side-bar .back-to-galleries-btn {
  width: 100%;
}

.side-bar .cancel-add-image-btn {
  margin: 12px 0px;
  width: 100%;
  color: black;
}

.side-bar .image-count {
  margin-top: 8px;
}

.image-component .image-header {
  display: flex;
  width: 100%;
  padding: 8px;
  border-bottom: solid 1px;
  align-items: center;
}

.image-header .image-info {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 4px;
}

.image-info p {
  margin: 0px;
}

.image-component .image {
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: black;
  width: 100%;
  min-height: 0;
}

img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.image-operation {
  display: flex;
  justify-content: space-between;
  padding: 8px;
  width: 100%;
}

.more-btn,
.delete-image-btn,
.add-comment-btn {
  width: auto;
}

.more-btn {
  border: none;
  color: blue;
}

.icon {
  background-repeat: no-repeat;
  background-position: center;
  background-size: 75%;
  width: 20px;
  height: 20px;
  border: none;
  background-color: transparent;
  cursor: pointer;
}

.delete-comment-btn {
  background-image: url("../assets/delete.png");
}

.delete-image-btn {
  background-image: url("../assets/close_r.png");
  width: 12px;
  height: 12px;
}

.add-comment-btn {
  background-image: url("../assets/comment.png");
}

.exit-full-comments-btn,
.exit-signin-btn {
  background-image: url("../assets/close_r.png");
}

.cancel-comment-btn {
  width: 100%;
}

.hidden {
  display: none !important;
}

.full-comments-overlay,
.signin-overlay {
  position: fixed;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  top: 0;
  left: 0;
}

.image-updates-overlay,
.gallery-updates-overlay {
  position: fixed;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 8%;
  color: white;
  background-color: rgba(0, 0, 0, 0.75);
  top: 0;
  font-size: 20px;
  cursor: pointer;
}

.image-updates-overlay:hover,
.gallery-updates-overlay:hover {
  background-color: rgba(73, 73, 73, 0.75);
}

.full-comments-card {
  display: flex;
  flex-direction: column;
  width: 90%;
  height: 90%;
  background-color: white;
  border-radius: 8px;
}

.signin-card {
  display: flex;
  flex-direction: column;
  width: 60%;
  height: auto;
  background-color: white;
  border-radius: 8px;
  justify-content: center;
}

.exit-full-comments,
.exit-signin {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  height: auto;
  padding: 8px;
  border-bottom: solid 1px;
}

.full-image-and-comments {
  display: flex;
  width: 100%;
  flex: 1;
  min-height: 0;
}

.full-image {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background-color: black;
  justify-content: center;
  align-items: center;
}

.full-comments-section {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: space-between;
}

.full-comments {
  width: 100%;
  overflow: scroll;
}

.comments-pagination,
.galleries-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 8px 0px;
}

.pagination-btn {
  border: none;
}

.image-loader {
  margin-top: 12px;
}

.api-loader,
.comments-loader {
  margin-top: 8px;
}

.error {
  color: red;
  font-size: 12px;
  text-align: center;
  margin: 0px;
  padding-top: 20px;
}

.error-box::before {
  content: "Error: ";
}

footer {
  border-top: solid 1px;
  text-align: center;
  width: 100%;
  padding: 8px 0px;
}

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

.btn:hover {
  background-color: lightslategray;
  color: #ffffff;
}

.image-component:hover {
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
  body {
    font-size: 8px;
  }

  header .title {
    font-size: 32px;
  }

  .gallery {
    margin: 16px 20px;
  }

  .icon {
    width: 12px;
    height: 12px;
  }

  button {
    font-size: 8px;
  }

  .full-comments-card .signin-card {
    width: 70%;
    height: 70%;
  }
}

.galleries {
  display: grid;
  gap: 24px;
  padding: 24px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.gallery-card {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  padding: 16px;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

.gallery-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-4px);
}

.gallery-card .username {
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  color: #333;
}

.gallery-card .view-gallery-btn {
  width: 100%;
  background-color: #3cb371;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
}

.gallery-card .view-gallery-btn:hover {
  background-color: #2d9955;
}

@media (max-width: 768px) {
  .galleries {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    padding: 16px;
  }

  .gallery-card {
    padding: 12px;
    gap: 10px;
  }
}

@media (max-width: 576px) {
  .galleries {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
  }

  .gallery-card {
    padding: 12px;
  }
}

@media (max-width: 320px) {
  .gallery {
    margin: 16px 12px;
  }
}
