body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f2f4f7;
}

header {
  background: #111;
  color: white;
  padding: 20px;
  text-align: center;
}

.tools {
  max-width: 1200px;
  margin: auto;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.tool-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
}

.tool-card i {
  font-size: 34px;
  margin-bottom: 10px;
}

button {
  margin-top: 15px;
  padding: 10px 24px;
  background: #4caf50;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

button:hover {
  background: #43a047;
}

footer {
  background: #eee;
  text-align: center;
  padding: 15px;
}

.hidden {
  display: none;
}

/* ===== MERGE DRAG UI ===== */
.merge-list {
  list-style: none;
  padding: 0;
  margin-top: 10px;
}

.merge-item {
  background: #e3f2fd;
  border: 1px solid #2196f3;
  padding: 8px;
  margin-bottom: 6px;
  cursor: grab;
}

/* ===== DELETE THUMBNAILS ===== */
.pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.page-thumb {
  position: relative;
  border: 3px solid #4caf50;
  border-radius: 8px;
  padding: 5px;
  cursor: pointer;
  background: #e8f5e9;
  transition: 0.2s;
}

.page-thumb.deselect {
  border-color: #f44336;
  background: #ffebee;
  opacity: 0.6;
}

.page-number {
  position: absolute;
  top: 5px;
  right: 6px;
  background: black;
  color: white;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
}

/* ===== MOBILE ===== */
@media (max-width: 600px) {
  .tools {
    grid-template-columns: 1fr;
  }
}
