html,
body {
  background: black;
  color: white;
}

h1 {
  text-align: center;
}

img {
  border-radius: 10px;
}

#images {
  margin: 40px 0 80px 0;
  display: flex;
  flex-direction: column;
  /* stapla på höjden */
  align-items: flex-start;
  /* vänsterjustera */
  gap: 20px;
  /* avstånd mellan bilderna */
  max-width: 100%;
  /* låt sektionen fylla bredden */
}

.info-part {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  max-width: 360px;
  margin: 0 auto;
}

#images .card {
  display: block;
  width: auto;
  margin: 0 auto;
}

#images img {
  display: block;
  max-width: 100%;
  /* skala ner om bilden är bredare än containern */
  height: auto;
  /* behåll proportionerna */
}

form {
  display: flex;
  justify-content: center;
  margin: 0 auto;
  max-width: 360px;
  align-items: center;
  gap: 10px;
}

footer {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  height: 100px;
  align-items: center;
  border-top: solid 1px #ffffff;
}

.form-input {
  width: 100%;
  padding: 10px 20px;

  font-size: 1rem;
  border: 1px solid #d1d5db;
  /* ljusgrå kant */
  border-radius: 0.5rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: #3b82f6;
  /* blå vid fokus */
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  /* mjuk highlight */
}

.submit-btn {
  background: linear-gradient(135deg, #4f46e5, #3b82f6);
  /* snygg gradient */
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  padding: 10px 20px;
  border: none;
  border-radius: 0.5rem;
  /* rundade hörn */
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.submit-btn:hover {
  transform: translateY(-2px);
  /* lyfter knappen lite */
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
  background: linear-gradient(135deg, #4338ca, #2563eb);
  /* mörkare vid hover */
}

.submit-btn:active {
  transform: translateY(0);
  /* trycks ner */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* --- selectable images --- */
.image-card {
  position: relative;
}

.select-wrap {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.image-select {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check-ui {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  display: inline-block;
  position: relative;
}

.image-card.selected img {
  outline: 3px solid rgba(59, 130, 246, 0.9);
  outline-offset: 3px;
}

.image-card.selected .check-ui {
  border-color: rgba(59, 130, 246, 1);
}

.image-card.selected .check-ui::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 12px;
  border: solid rgba(59, 130, 246, 1);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

/* --- bottom bar --- */
.bulkbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px;
  background: rgba(0, 0, 0, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(6px);
  z-index: 1000;
}

.bulkbar-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.bulkbar-actions {
  display: flex;
  gap: 10px;
}

.bulkbar-btn.secondary,
.submit-btn.secondary {
  background: #1f2937;
}

.bulkbar-btn.danger,
.submit-btn.danger {
  background: linear-gradient(135deg, #dc2626, #ef4444);
}

.bulkbar-btn.danger:hover,
.submit-btn.danger:hover {
  background: linear-gradient(135deg, #b91c1c, #dc2626);
}

/* --- modal --- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.modal-card {
  position: relative;
  max-width: 520px;
  margin: 12vh auto 0;
  background: #0b0b0b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-actions {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

@media (max-width: 520px) {
  .bulkbar-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .modal-actions {
    flex-direction: column;
  }
}