/* bookeditor.css */
body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #fdfdfd;
  margin: 0;
  color: #333;
}

header {
  background-color: #2f2f2f;
  color: white;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 4px solid #ce7e00;
}

nav {
  display: flex;
  gap: 1rem;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

.nav-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-buttons a {
  background-color: #f3f6f4;
  color: #000;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-buttons a:hover {
  background-color: #5cc057;
  color: #fff;
}

.nav-buttons a.active {
  background-color: #5cc057;
  color: #fff;
}

.book-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 2rem;
  justify-content: center;
}

.book-box {
  position: relative;
  box-sizing: border-box;
  width: 180px;
  height: 270px;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.book-box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.3s ease;
}

.book-box:hover img {
  filter: blur(3px);
}

.overlay {
  box-sizing: border-box;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.8rem;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
  align-items: center;
  text-align: center;
}

.book-box:hover .overlay {
  opacity: 1;
}

.overlay h2 {
  font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
  font-size: 1.2rem;
  word-wrap: break-word;
  margin: 0;
  margin-bottom: 0.5rem;
  text-align: center;
}

/* New CSS for button group */
.overlay-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  width: 100%;
  margin-top: auto;
}

.overlay button {
  width: 100%;
  max-width: 120px;
  border: none;
  padding: 0.9rem 0.8rem;
  border-radius: 6px;
  margin: 0;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.overlay button:nth-of-type(1) {
  background-color: #ddd3d3;
  color: #000;
}

.overlay button:nth-of-type(2) {
  background-color: #7ec8ff;
  color: #000;
}

.overlay button:nth-of-type(1):hover {
  background-color: #c4bcbc;
}

.overlay button:nth-of-type(2):hover {
  background-color: #66b4ed;
}

.dual-action {
  width: 180px;
  height: 270px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  border-radius: 8px;
  border: 2px solid #3f1467;
  padding: 0.5rem;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  background-color: #999999;
  box-sizing: border-box;
}

.action.create {
  background-color: #8eceff;
  color: #000;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

.action.import {
  background-color: #fedf7e;
  color: #000;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

.action {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid #ccc;
  margin: 0.4rem 0;
  background-color: #fff;
  border-radius: 6px;
  padding: 0.5rem 0.4rem;
  box-sizing: border-box;
}

.action span {
  font-size: 1.5rem;
  line-height: 1;
  margin-bottom: 0.3rem;
}

.action p {
  font-size: 0.9rem;
  margin: 0;
  font-weight: bold;
  text-align: center;
}
