body {
  background: #f3f3f3;
  font-family: "Inter", Arial, sans-serif;
  color: #222;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/*********** HEADER ***********/

header {
  display: flex;
  margin-top: 36px;
  height: 64px;
  justify-content: flex-end;
  width: 50%
}

header #title {
  color: black;
  text-decoration: none;
  margin: 0px;
  width: 100%;
  font-size: 48px;
}

.header_btn {
  text-decoration: none;
  font-size: 16px;
  margin-left: 5px;
  margin-right: 5px;
}

#signout_button {
  border: 2px solid #3c3d3f;
  border-radius: 8px;
  background: white;
  color: #3c3d3f;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#signout_button:hover {
  background: #3c3d3f;
  color: #fff;
}

.alert {
  color: red;
}

.hidden {
  visibility: hidden;
}

#error_box {
  color: red;
}

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


.btn {
  border-radius: 8px;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  color: #3c3d3f;
  background: #fff;
  border: 2px solid #3c3d3f;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn:hover {
  background: #3c3d3f;
  color: #fff;
}

#signin-warning {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-top: 10vh;
  font-size: 18px;
  color: #333;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 20px 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}


#page {
    margin-top: 10px;
    width: 100%;
    flex-direction: column;
}


/******* ADD IMAGE FORM *******/

.add-image-section {
  margin: auto;
  width: 100%;
  max-width: 480px;
  border-radius: 12px;
  border: 1px solid #ccc;
  padding: 32px 24px;
  background: #fafafa;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.image-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  border-radius: 8px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.form-group label {
  font-size: 14px;
  font-weight: 500;
}

.image-form input[type="text"],
.image-form input[type="file"] {
  padding: 10px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fff;
}

#submit-image {
  align-self: flex-end;
  background-color: #2c7be5;
  margin-top: 10px;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
}

#submit-image:hover {
  background-color: #1b6bd8;
}

#add-image-btn {
  color: #2f2f2f;
  padding: 8px 14px;
  border: 2px solid #3c3d3f;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

#add-image-btn:hover {
  background-color: #3c3d3f;
  color: #fff;
}

/******* GALLERY *******/

#gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
    background: #fafafa;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

#back-to-browsing {
    align-self: flex-start;
    margin-bottom: 10px;
}

#browsing-title {
    font-size: 1.8rem;
    margin: 10px 0;
    color: #333;
}

#current-image {
    width: 100%;
    max-width: 800px;
    max-height: 40vh;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#image-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

#image-info h1 {
    font-size: 1.4rem;
    margin: 0;
    color: #222;
}

#image-info h3 {
    margin: 0;
    font-weight: 400;
    color: #666;
}

#image-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

#gallery button {
    padding: 10px 18px;
    font-size: 15px;
    cursor: pointer;
    border: none;
    border-radius: 6px;
    transition: background 0.2s, transform 0.1s;
}

#gallery button:hover {
    transform: scale(1.02);
}

#delete-btn {
    background-color: #c0392b;
    color: #fff;
}

#delete-btn:hover {
    background-color: #a93226;
}

/******* COMMENTS *******/

#comments {
    margin: 30px auto 0;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.comment-form {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#comment-contents-input {
    flex: 1;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
}

#submit-comment {
    background-color: #2c7be5;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    cursor: pointer;
}

#submit-comment:hover {
    background-color: #1b6bd8;
}

#comments-pagination {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

#comments-pagination button {
    background-color: #e0e0e0;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    cursor: pointer;
}

#comments-pagination button:hover {
    background-color: #d5d5d5;
}

#comments-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/******** User Galleries Section ********/

#user-galleries {
    padding: 1rem;
    border-top: 1px solid #ccc;
}

#user-galleries h2 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    text-align: center;
    color: #333;
}

#gallery-list {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 400px;
}

#gallery-list li {
    padding: 0.5rem 1rem;
    margin: 0.25rem 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    background-color: white;
    transition: background-color 0.2s ease, color 0.2s ease;
}

#gallery-list li:hover {
    background-color: #f0f0f0;
    color: #0077cc;
}

#pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
    gap: 1rem;
}

#pagination-controls button {
    background-color: #0077cc;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#pagination-controls button:disabled {
  background-color: #e0e0e0;
  color: #888;
  cursor: not-allowed;
  pointer-events: none;
}

#pagination-controls button:hover {
    background-color: #005fa3;
}

#page-info {
    font-weight: bold;
    color: #333;
}

