@import url('https://fonts.googleapis.com/css2?family=Cardo:wght@400;700&display=swap');

:root {
  --bg-light: #f6f1e7;
  --bg-dark: #1e1a16;
  --text-light: #222;
  --text-dark: #e6decf;
  --accent: #a97428;
  --highlight: #d9b56c;
  --parchment: rgba(251, 241, 221, 0.7);
  --marble-dark: rgba(60, 48, 35, 0.6);
}

body {
  font-family: 'Cardo', serif;
  margin: 0;
  color: var(--text-light);
  background: var(--bg-light) url("Assets/Background/parchment.jpg") no-repeat center center fixed;
  background-size: cover;
  transition: background 0.4s ease, color 0.3s ease;
}

body.dark-mode {
  background: var(--bg-dark) url("Assets/Background/marble.jpg") no-repeat center center fixed;
  background-size: cover;
  color: var(--text-dark);
}

.main-content {
  align-self: center;
  margin-left: 33px;
  margin-right: 0px;
  width: 2600px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(5px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
}

header {
  text-align: center;
  margin-bottom: 20px;

}

header h1 {
  margin-bottom: 10px;
  font-size: 2.8rem;
  color: var(--primary);
  text-shadow: 2px 2px 6px rgba(0,0,0,0.4);
  letter-spacing: 1px;
  font-weight: bold;
}

header input {
  width: 50%;
  padding: 10px;
  margin-bottom: 20px;
  border-radius: 8px;
  border: 1px solid var(--primary);
  background: rgba(217, 181, 108, 0.08);
  color: inherit;
  font-family: 'Cardo', serif;
  transition: background 0.3s, border 0.3s;
}

header input::placeholder {
  color: #777;
}

header input:focus {
  outline: none;
  border-color: var(--highlight);
  background: rgba(217, 181, 108, 0.15);
}

.categories {
  text-align: center;
  margin-bottom: 20px;
}

.categories .category {
  margin: 5px;
  padding: 8px 15px;
  border: 2px solid var(--accent);
  border-radius: 20px;
  background: rgba(217, 181, 108, 0.15);
  color: inherit;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s, color 0.3s;
  font-family: 'Cardo', serif;
}

.categories .category.active {
  background: var(--accent);
  color: #fff;
}

.categories .category:hover {
  background: var(--highlight);
  transform: scale(1.05);
}

.card-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  list-style: none;
  padding: 0;
}

.book-card {
  background: var(--parchment);
  border-radius: 10px;
  padding: 12px;
  width: 140px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  transition: transform 0.2s, box-shadow 0.2s;
  color: inherit;
  backdrop-filter: blur(3px);
  border: 1px solid rgba(138, 105, 55, 0.3);
  position: relative;
}

body.dark-mode .book-card {
  background: var(--marble-dark);
  border-color: rgba(217, 181, 108, 0.25);
}

.book-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  border: 2px double rgba(217, 181, 108, 0.6);
  pointer-events: none;
}

.book-card img {
  width: 100%;
  border-radius: 4px;
  border: 2px solid rgba(138, 105, 55, 0.4);
}

.book-card:hover {
  box-shadow: 0 4px 15px rgba(217, 181, 108, 0.8);
  transform: translateY(-4px);
}

.book-card a {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%; 
}

/* Optional: Dark mode toggle button */
#dark-toggle {
  position: fixed;
  top: 15px;
  right: 15px;
  padding: 8px 10px;
  border: none;
  background: var(--accent);
  color: white;
  border-radius: 6px;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 1000;
  transition: background 0.3s;
}

#dark-toggle:hover {
  background: var(--highlight);
}
