* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  text-align: center;
  margin: 0;
}

/* Header styles */
header {
  width: 100%;
  position: relative;
  left: 0;
  right: 0;
  background: linear-gradient(to right, #ff7e5f, #feb47b);
  color: rgb(0, 0, 52);
  padding: 1rem;
  text-align: center;
}

h1 {
  text-align: center;
  margin: 20px 0;
  color: #333;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
}

nav a {
  color: rgb(0, 0, 0);
  text-decoration: none;
}

nav a:hover {
  color: #ddd;
}

/* Main content styles */
main {
  flex: 1;
  padding: 2rem;
}

.container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1rem;
}

.box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #e9ecef;
  padding: 2rem;
  border-radius: 5px;
  width: 200px;
  text-align: center;
  transition: transform 0.2s;
  margin: 1rem;
}

.box:hover {
  transform: scale(1.05);
}

.box img {
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 5px;
}

/* Footer styles */
footer {
  background-color: #333;
  color: white;
  text-align: center;
  padding: 1rem;
  margin-top: auto;
}

/* Additional styles for book details display */
.book-details {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  display: flex;
}

.book-details .modal-content {
  background-color: white;
  padding: 20px;
  border-radius: 5px;
  max-width: 400px;
  text-align: left;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  position: relative;
}

.book-details h2 {
  margin: 0 0 10px;
}

.book-details p {
  margin: 10px 0;
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 10px;
  background-color: #333;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.close-modal:hover {
  background-color: #555;
}

#clear-filters {
  margin-left: 10px;
  padding: 5px 10px;
  cursor: pointer;
}

/* Progress bar styles */
.progress-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.progress-wrapper {
  width: 70%;
  margin: 20px auto;
  position: relative;
}

#progressbar {
  height: 30px !important;
  background: #e9ecef !important;
  position: relative;
}

#progressbar.ui-progressbar .ui-progressbar-value {
  background: #4caf50 !important;
  border: none;
  margin: 0;
  height: 100%;
}

.progress-value {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-weight: bold;
  z-index: 1;
}

.progress-controls {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

#increment-progress,
#decrement-progress {
  padding: 8px 16px;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
  font-size: 18px;
  font-weight: bold;
  min-width: 44px;
}

#increment-progress:hover,
#decrement-progress:hover {
  background-color: #45a049;
}

#decrement-progress {
  background-color: #f44336;
}

#decrement-progress:hover {
  background-color: #d32f2f;
}

/* Override jQuery UI styles */
.ui-widget-header {
  background: #4caf50 !important;
  border: none !important;
}

.ui-corner-all {
  border-radius: 4px;
}

.ui-widget.ui-widget-content {
  border: 1px solid #ddd !important;
}

.tabs-container {
  margin-top: 2rem;
  width: 80%;
  margin-left: auto;
  margin-right: auto;
}

.tabs-container .ui-tabs-nav {
  background: none;
  border: none;
  border-bottom: 1px solid #ddd;
  border-radius: 0;
  padding: 0;
}

.tabs-container .ui-tabs-nav li {
  background: #f8f9fa;
  border: 1px solid #ddd;
  border-bottom: none;
  margin-right: 5px;
}

.tabs-container .ui-tabs-nav li.ui-tabs-active {
  background: white;
  margin-bottom: -1px;
  padding-bottom: 1px;
}

.tabs-container .ui-tabs-nav li a {
  color: #333;
  padding: 10px 15px;
}

.tabs-container .ui-tabs-panel {
  background: white;
  border: 1px solid #ddd;
  border-top: none;
  padding: 1rem;
}

.tabs-container h4 {
  color: #333;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.tabs-container p {
  line-height: 1.6;
  color: #666;
}

.reading-list {
  max-height: 400px;
  overflow-y: auto;
  padding: 10px;
}

.book-item {
  display: flex;
  align-items: center;
  padding: 15px;
  border: 1px solid #ddd;
  margin-bottom: 10px;
  border-radius: 4px;
  background-color: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
}

.book-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.book-item .book-title {
  font-weight: bold;
  margin-right: 10px;
  flex: 2;
}

.book-item .book-author {
  color: #666;
  flex: 1;
}

.book-item .mark-read {
  padding: 8px 16px;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-left: auto;
}

.book-item .mark-read:hover {
  background-color: #45a049;
}

.book-item.read {
  background-color: #f8fff8;
  border-color: #4caf50;
}

.book-item.read .mark-read {
  background-color: #666;
}

.book-item.read .mark-read:hover {
  background-color: #555;
}

.book-actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.mark-read,
.add-favorite {
  padding: 8px 16px;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.mark-read {
  background-color: #4caf50;
}

.mark-read:hover {
  background-color: #45a049;
}

.add-favorite {
  background-color: #2196f3;
}

.add-favorite:hover {
  background-color: #1976d2;
}

.book-item.favorite .add-favorite {
  background-color: #ffc107;
}

.book-item.favorite .add-favorite:hover {
  background-color: #ffa000;
}

.favorites-list {
  max-height: 400px;
  overflow-y: auto;
  padding: 10px;
}

.no-favorites {
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 20px;
}

.remove-favorite {
  background-color: #f44336;
  padding: 8px 16px;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.remove-favorite:hover {
  background-color: #d32f2f;
}
