/* === Giao diện tổng thể === */
body {
  font-family: Arial, sans-serif;
  background-color: #f9f9f9;
  margin: 0;
  padding: 0;
  color: #333;
}

header {
  background-color: #fff;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 999;
}

h1 {
  margin: 0 0 10px;
  font-size: 24px;
  text-align: center;
}

.user-address {
  font-size: 14px;
  margin-bottom: 10px;
  text-align: center;
}

.copy-msg {
  display: none;
  color: green;
  margin-left: 10px;
  font-size: 13px;
}

.search-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 10px auto;
  max-width: 600px;
}

#searchInput {
  flex: 1;
  min-width: 200px;
  padding: 6px 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

#searchBtn {
  padding: 6px 12px;
  font-size: 14px;
  background: #222;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#searchBtn:hover {
  background-color: #444;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  table-layout: fixed;
  min-width: 850px;
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0px; /* giảm khoảng cách giữa ô */
  margin-top: 10px;
  background-color: #fff;
}

th, td {
  padding: 10px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: monospace;
  font-size: 14px;
  border-bottom: 1px solid #ddd;
}

th {
  background-color: #fafafa;
  font-weight: bold;
}

tbody tr:hover {
  background-color: #f1f1f1;
}

/* Căn cột cụ thể — CHO 8 CỘT (Transaction, Method, From, To, Amount, Block, Fee, Age) */
th:nth-child(1), td:nth-child(1) { width: 14%; text-align: center; padding-right: 8px; } /* Transaction (hash) */
th:nth-child(2), td:nth-child(2) { width: 6%;  text-align: center; padding-right: 8px; } /* Method */
th:nth-child(3), td:nth-child(3) { width: 22%; text-align: left; padding-right: 10px; } /* From */
th:nth-child(4), td:nth-child(4) { width: 22%; text-align: left; padding-right: 10px; } /* To */
th:nth-child(5), td:nth-child(5) { width: 10%; text-align: center; padding-right: 8px; } /* Amount */
th:nth-child(6), td:nth-child(6) { width: 6%;  text-align: center; padding-right: 8px; } /* Block */
th:nth-child(7), td:nth-child(7) { width: 6%;  text-align: center; padding-right: 8px; } /* Fee */
th:nth-child(8), td:nth-child(8) { width: 14%; text-align: center; padding-right: 8px; } /* Age */



.copy-btn {
  font-size: 12px;
  padding: 2px 6px;
  white-space: nowrap;
  margin-left: 8px;
  cursor: pointer;
}

.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px auto;
  font-size: 14px;
  padding: 8px 12px;
  border-top: 1px solid #ccc;
  background-color: #fafafa;
  max-width: 1000px;
  flex-wrap: wrap;
}

.pagination-left select {
  margin: 0 5px;
  padding: 3px 6px;
}

.pagination-controls button {
  margin: 0 3px;
  padding: 5px 8px;
  font-size: 13px;
  border: 1px solid #ccc;
  background-color: #f5f5f5;
  border-radius: 3px;
  cursor: pointer;
}

.pagination-controls button:hover {
  background-color: #ddd;
}

footer {
  text-align: center;
  font-size: 13px;
  color: #777;
  padding: 20px;
  background: #f1f1f1;
}

@media screen and (max-width: 768px) {
  th, td {
    font-size: 12px;
  }
  .copy-btn {
    font-size: 10px;
  }
}