body {
  font-family: "Gentium Book Plus", serif;
  margin: 0;
  padding: 0;
  background-color: floralwhite;
}

.container {
  padding: 10px;
}

/* Tab Styles */
.tab-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tabs {
  display: flex;
  justify-content: center;
  margin: 20px 0;
  border-bottom: 2px solid #ccc;
}

.tabs label {
  padding: 10px 30px;
  cursor: pointer;
  font-size: 1.1em;
  color: #666;
  border-bottom: 3px solid transparent;
  transition: all 0.3s;
}

.tabs label:hover {
  color: #000;
}

#tab-bookshelf:checked~.tabs label[for="tab-bookshelf"],
#tab-wishlist:checked~.tabs label[for="tab-wishlist"] {
  color: #000;
  border-bottom: 3px solid #000;
  font-weight: bold;
}

.tab-content {
  display: none;
}

#tab-bookshelf:checked~.tabs-container #content-bookshelf,
#tab-wishlist:checked~.tabs-container #content-wishlist {
  display: block;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

th,
td {
  border: 1px solid #ccc;
  padding: 10px;
  text-align: center;
  vertical-align: top;
}

th {
  background-color: #f0f0f0;
}

th:first-child,
td:first-child {
  width: 100px;
  padding: 6px;
}

.book {
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
  background-color: floralwhite;
  box-shadow: 3px 3px;
}

.recommended {
  background-color: #ffe4b2;
}

.book img {
  width: 100%;
  height: auto;
  border-radius: 5px;
  margin-bottom: 5px;
}

.book h3 {
  margin: 5px 0;
}

th.header {
  font-size: x-medium;
}

h1 {
  text-align: center;
  font-size: 2em;
  margin: 20px 0;
}

p {
  text-align: center;
  font-size: 1em;
  margin: 10px 0;
}

/* Wishlist Styles */
.wishlist-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.wishlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.wishlist-item {
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 15px;
  background-color: floralwhite;
  box-shadow: 3px 3px;
}

.wishlist-item h3 {
  margin: 0 0 10px 0;
  font-size: 1.2em;
}

.wishlist-item .author {
  color: #666;
  font-style: italic;
  margin: 5px 0;
  font-size: medium;
}

.wishlist-item .genre {
  display: inline-block;
  background-color: #f0f0f0;
  padding: 3px 10px;
  border-radius: 5px;
  font-size: 0.85em;
  margin-top: 10px;
}

/* Genre Summary Styles */
.genre-summary {
  max-width: 600px;
  margin: 20px auto;
  padding: 15px;
  background-color: #f9f9f9;
  border: 1px solid #ccc;
  border-radius: 10px;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}

.genre-summary h3 {
  margin-top: 0;
  text-align: center;
  font-size: 1.2em;
}

.genre-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.genre-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background-color: floralwhite;
  border: 1px solid #ddd;
  border-radius: 5px;
}

.genre-item .genre-name {
  font-weight: bold;
}

.genre-item .genre-count {
  color: #666;
}

/* Genre Filter Styles */
.genre-filter {
  max-width: 1200px;
  margin: 20px auto;
  padding: 15px;
  background-color: #f9f9f9;
  border: 1px solid #ccc;
  border-radius: 10px;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.genre-filter label {
  font-weight: bold;
  font-size: 1em;
}

.genre-select {
  padding: 8px 16px;
  background-color: floralwhite;
  border: 2px solid #ccc;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9em;
  font-family: "Gentium Book Plus", serif;
  min-width: 200px;
  transition: all 0.3s;
}

.genre-select:hover {
  border-color: #999;
}

.genre-select:focus {
  outline: none;
  border-color: #000;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.wishlist-item.hidden {
  display: none;
}

/* Table row hiding for genre filter */
tr[data-genre].hidden {
  display: none;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background: floralwhite;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgb(0 0 0 / 54%);
  text-align: center;
  width: 300px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  right: 10px;
  top: 5px;
}

.close:hover,
.close:focus {
  color: black;
}

.thoughts-btn {
  background-color: floralwhite;
  color: black;
  padding: 5px 10px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: xx-small;
  margin: 4px 2px;
  cursor: pointer;
  border-radius: 4px;
}

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -10px;
  padding: 0 10px;
}

/* Media Queries for Responsive Design */
@media (max-width: 768px) {
  th:first-child,
  td:first-child {
    width: auto;
    min-width: 60px;
    font-size: 0.85em;
  }

  .table-wrapper {
    margin: 0;
  }

  table {
    min-width: 100%;
    font-size: 0.9em;
  }

  th,
  td {
    padding: 8px 5px;
  }

  .book {
    padding: 8px;
    margin-bottom: 8px;
  }

  .book p {
    font-size: 0.9em;
    margin: 3px 0;
  }

  h1 {
    font-size: 1.5em;
  }

  p {
    font-size: 0.9em;
  }

  .modal-content {
    max-width: 90%;
  }

  .tabs label {
    padding: 10px 20px;
    font-size: 1em;
  }

  .wishlist-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .genre-list {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

@media (max-width: 480px) {
  th:first-child,
  td:first-child {
    min-width: 50px;
    font-size: 0.75em;
    padding: 6px 3px;
  }

  table {
    font-size: 0.85em;
  }

  th,
  td {
    padding: 6px 3px;
  }

  th.header {
    font-size: small;
  }

  .book {
    padding: 5px;
  }

  .book h3 {
    font-size: medium;
  }

  .book p {
    font-size: 0.85em;
    margin: 2px 0;
  }

  .book p strong {
    font-size: 0.9em;
  }

  .thoughts-btn {
    font-size: 0.7em;
    padding: 3px 6px;
  }

  h1 {
    font-size: 1.2em;
  }

  p {
    font-size: 0.8em;
  }

  .tabs label {
    padding: 8px 15px;
    font-size: 0.9em;
  }

  .wishlist-grid {
    grid-template-columns: 1fr;
  }

  .genre-list {
    grid-template-columns: 1fr;
  }
}
