/* === Reset dan dasar umum === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  padding: 2rem;
  background-color: #f5f7fa;
  color: #333;
}

h1,
h2 {
  text-align: center;
  margin-bottom: 1rem;
}

/* === Navigasi Button === */
.button-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.button-container button {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 10px;
  background-color: #2d89ef;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.button-container button:hover {
  background-color: #1b66c9;
  transform: translateY(-2px);
}

.button-container button a {
  text-decoration: none;
  color: white;
}

/* === Form Tambah Buku === */
form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

form input {
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  min-width: 220px;
}

form button {
  padding: 0.6rem 1.5rem;
  background-color: #28a745;
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

form button:hover {
  background-color: #1e7c35;
  transform: scale(1.03);
}

/* === Pencarian dan Filter === */
#searchColumn,
#searchInput,
#searchButton {
  padding: 0.6rem;
  margin: 0.5rem;
  border-radius: 8px;
  border: 1px solid #ccc;
}

#searchButton {
  background-color: #ff9800;
  color: white;
  font-weight: bold;
  cursor: pointer;
  border: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

#searchButton:hover {
  background-color: #e68900;
  transform: scale(1.03);
}

/* === Tabel === */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background-color: white;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}

thead {
  background-color: #2d89ef;
  color: white;
}

th,
td {
  padding: 0.8rem;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

tbody tr:hover {
  background-color: #f1f1f1;
}

/* === Highlight hasil pencarian === */
.highlight {
  background-color: yellow;
  font-weight: bold;
}

/* === Tombol Back to Top === */
#backToTop {
  margin-top: 2rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
  padding: 0.6rem 1.5rem;
  background-color: #607d8b;
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

#backToTop:hover {
  background-color: #455a64;
  transform: scale(1.05);
}

/* === Responsif === */
@media (max-width: 768px) {
  form input {
    min-width: 100%;
  }

  .button-container {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 576px) {
  table,
  thead,
  tbody,
  th,
  td,
  tr {
    font-size: 0.9rem;
  }

  #searchColumn,
  #searchInput,
  #searchButton {
    width: 100%;
    margin: 0.4rem 0;
  }
}
