body {
  font-family: sans-serif;
  background-color: #fdf6ec;
  text-align: center;
  padding: 20px;
  color: #333;
}

h2 {
  text-align: center;
  padding-top: 30px;
  font-size: 28px;
  color: #bf360c;
}

.drag-drop-layout {
  max-width: 1000px;
  margin: auto;
  padding: 40px 20px;
}

.dropzones {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.drop-zone {
  width: 240px;
  height: auto;
  border: 3px dashed #a1887f;
  border-radius: 14px;
  background-color: #fffde7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: start;
  padding-bottom: 12px;
  transition: 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  position: relative;
}

.drop-zone img {
  width: 220px;
  height: 160px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
  margin-bottom: 10px;
}

.drop-zone img:hover {
  transform: scale(1.05);
}

.label-container {
  min-height: 40px;
  width: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.label-container .drag-item {
  width: 100%;
  text-align: center;
}

.draggables {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.drag-item {
  padding: 12px 20px;
  background-color: #ffcc80;
  border: 2px solid #ffb74d;
  border-radius: 12px;
  cursor: grab;
  font-weight: bold;
  font-size: 16px;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
  transition: background 0.3s;
  user-select: none;
  -webkit-user-drag: element;
}

.drag-item:hover {
  background-color: #ffd54f;
}

.drag-item:active {
  cursor: grabbing;
  opacity: 0.6;
  transform: scale(1.05);
}

.drop-zone.dragover {
  border-color: #4caf50;
  background-color: #f1f8e9;
}

#buttonWrapper {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 10px;
  flex-wrap: wrap;
}

#checkBtn, #nextBtn {
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 8px;
  border: none;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

#checkBtn {
  background-color: #4caf50;
}

#checkBtn:hover {
  background-color: #45a049;
}

#nextBtn {
  background-color: #2196f3;
}

#nextBtn:hover {
  background-color: #1976d2;
}

#dragResult {
  margin-top: 20px;
  font-size: 16px;
  font-weight: 500;
}

/* Responsive for mobile */
@media (max-width: 600px) {
  .drag-drop-layout {
    padding: 20px 10px;
  }

  .dropzones {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    justify-content: center;
  }

  .drop-zone:nth-child(3) {
    grid-column: span 2;
    margin: 0 auto;
  }

  .drop-zone {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }

  .drop-zone img {
    width: 100%;
    height: auto;
  }

  .label-container {
    width: 100%;
  }

  .draggables {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
  }

  .drag-item {
    width: 90%;
    max-width: 250px;
    font-size: 14px;
    padding: 10px 16px;
  }

  #checkBtn, #nextBtn {
    width: 80%;
    font-size: 14px;
  }

  #dragResult {
    font-size: 14px;
  }

  #buttonWrapper {
    flex-direction: column;
    align-items: center;
  }
}
.end-message {
  text-align: center;
  padding: 30px;
}

.end-message h2 {
  color: #e65100;
  font-size: 24px;
  margin-bottom: 10px;
}

.end-message button {
  background-color: #1976d2;
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.end-message button:hover {
  background-color: #1565c0;
}
