* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f6fb;
  color: #172033;
}

.app {
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 40px 0;
}

.hero {
  text-align: center;
  margin-bottom: 28px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  margin: 0 0 12px;
}

.hero p {
  max-width: 700px;
  margin: 0 auto;
  color: #566071;
  font-size: 1.05rem;
  line-height: 1.6;
}

.upload-card {
  background: white;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 16px 40px rgba(23, 32, 51, 0.08);
  margin-bottom: 34px;
}

.drop-zone {
  min-height: 220px;
  border: 2px dashed #b9c2d3;
  border-radius: 20px;
  display: grid;
  place-items: center;
  text-align: center;
  cursor: pointer;
  padding: 30px;
  transition: 0.2s ease;
}

.drop-zone:hover,
.drop-zone.dragover {
  background: #eef3ff;
  border-color: #5877ff;
}

.upload-icon {
  display: block;
  font-size: 3rem;
  margin-bottom: 10px;
}

.drop-zone strong {
  display: block;
  font-size: 1.25rem;
}

.drop-zone small {
  display: block;
  margin-top: 8px;
  color: #657087;
}

.actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
}

.danger {
  background: #ffe9e9;
  color: #9d1c1c;
}

.danger:hover {
  background: #ffd5d5;
}

h2 {
  margin-top: 0;
}

.empty-state {
  background: white;
  color: #657087;
  padding: 28px;
  text-align: center;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(23, 32, 51, 0.06);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.image-card {
  background: white;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(23, 32, 51, 0.08);
}

.image-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.image-info {
  padding: 14px;
}

.image-info p {
  margin: 0 0 10px;
  color: #566071;
  font-size: 0.9rem;
  word-break: break-word;
}

.delete-btn {
  width: 100%;
  background: #172033;
  color: white;
}

.delete-btn:hover {
  background: #2b3855;
}

dialog {
  border: 0;
  padding: 0;
  border-radius: 20px;
  max-width: 92vw;
  max-height: 90vh;
  background: transparent;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

#previewImage {
  max-width: 92vw;
  max-height: 86vh;
  border-radius: 20px;
  display: block;
}

.close-btn {
  position: fixed;
  top: 22px;
  right: 22px;
  font-size: 2rem;
  line-height: 1;
  background: white;
  color: #172033;
  width: 48px;
  height: 48px;
  border-radius: 50%;
}
