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

:root {
  --bg:      #2a1a2e;
  --surface: rgba(255,255,255,0.07);
  --accent:  #c9a96e;
  --text:    #f0e6d3;
  --muted:   #9e8a7a;
  --card-bg: rgba(255,255,255,0.08);
  --radius:  12px;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Cormorant Garamond', serif;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 10% 60%, rgba(120,60,100,0.3) 0%, transparent 55%),
    radial-gradient(ellipse at 90% 10%, rgba(80,40,90,0.25) 0%, transparent 50%);
}

.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 18px 0;
  background: rgba(30,15,35,0.6);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201,169,110,0.15);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 48px;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.library-main {
  padding: 110px 6% 60px;
  max-width: 1100px;
  margin: 0 auto;
}

/* SEARCH */
.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 40px;
  padding: 12px 24px;
  margin-bottom: 48px;
  max-width: 420px;
}

.search-bar input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  width: 100%;
}

.search-bar input::placeholder {
  color: var(--muted);
}

.search-icon {
  align-content: center;
  justify-self: center;
}

/* BOOK GRID */
.book-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px 28px;
}

.book-card {
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: fadeUp 0.6s ease both;
  transition: transform 0.25s;
}

.book-card:hover {
  transform: translateY(-6px);
}

.book-card img {
  width: 160px;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.08);
}

.book-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  text-align: center;
  line-height: 1.3;
}

.book-card p {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}