body {
  font-family: Arial, sans-serif;
  background: LightSteelBlue;
  margin: 0;
  padding: 20px;
}

h1 {
  text-align: center;
}

header {
  padding: 1em;
  border-bottom: 1px solid #ccc;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

header .login-form input,
header .login-form button {
  margin-left: .5em;
}

header .admin-panel {
  margin-top: .5em;
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.gallery-item {
  position: relative;
  width: 160px;
  height: 120px;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: transform 0.3s;
}

.gallery-item:hover {
  transform: scale(1.2);
  z-index: 10;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Header & login */
.site-header {
  padding: 1em;
  border-bottom: 1px solid #ccc;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.login-form__form input {
  margin-left: .5em;
}
.login-form__logout {
  margin-left: 1em;
}
.admin-panel__button {
  margin-top: .5em;
  padding: .5em 1em;
  background: #007BFF;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
}

/* Page title */
.gallery-title {
  text-align: center;
  margin: 1em 0;
}

/* Tag filter */
.tag-filter {
  text-align: center;
  margin-bottom: 2em;
}
.tag-filter__chip {
  display: inline-block;     /* allows wrapping */
  margin: 0 .25em .5em;
  padding: .5em 1em;
  background: #1e81b0;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
}
.tag-filter__chip.is-active {
  background: #285e61;
}

/* Limit selector */
.limit-selector {
  text-align: center;
  margin-bottom: 2em;
}
.limit-selector__link {
  margin: 0 .5em;
  text-decoration: none;
}
.limit-selector__link.is-active {
  font-weight: bold;
  text-decoration: underline;
}

/* Gallery grid */
.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
}
.gallery-item {
  display: block;
  width: 160px;
  height: 120px;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: transform 0.3s;
}
.gallery-item:hover {
  transform: scale(1.1);
  z-index: 1;
}
.gallery-item__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery__empty {
  width: 100%;
  text-align: center;
  font-style: italic;
}

/* Pagination */
.pagination {
  text-align: center;
  margin: 2em 0;
}
.pagination a,
.pagination span {
  margin: 0 .25em;
  text-decoration: none;
}
.pagination__current {
  font-weight: bold;
}
.pagination__ellipsis {
  margin: 0 .5em;
}

/* Popup full‐size overlay */
.popup {
  display: none;           /* keep hidden until clicked */
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.8);
  text-align: center;
  cursor: pointer;
}

.popup img {
  max-height: 90%;
  margin-top: 5%;
}

/* Upload button at bottom of admin page */
.upload-button {
  text-align: margin-left;
  margin: 2em 0;
}
.button {
  display: inline-block;
  padding: 0.75em 1.5em;
  background: #28a745;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
}
.button:hover {
  background: #218838;
}
.thumbnail {
  max-width: 300px;
  width: auto;
  cursor: pointer;
}


/* BulkUpload.php */
.dropzone {
  border: 2px dashed #666;
  border-radius: 8px;
  padding: 2em;
  text-align: center;
  color: #666;
  font-size: 1.2em;
  margin-bottom: 1em;
}
.dropzone.hover {
  background: #f0f0f0;
}


/* UploadImage.php */
.upload-form {
  max-width: 500px;
  margin: 2em auto;
}

.upload-form label {
  display: block;
  margin-bottom: 1em;
}

.upload-form input[type="text"],
.upload-form input[type="number"],
.upload-form textarea {
  width: 100%;
  box-sizing: border-box;
}

.errors {
  color: #c00;
}
