:root {
  --bg-color: #0f172a;
  --bg-card: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --accent-color: #fbbf24;
  --accent-hover: #f59e0b;
  --border-color: #334155;
  --font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-heading: 'Cinzel', 'Playfair Display', serif;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-family);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-hover);
}

/* Header & Nav */
.site-header {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  background: #ffffff;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.02);
}

.logo img {
  height: 45px;
  width: auto;
  display: block;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.main-nav a {
  color: var(--text-main);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.9rem;
}

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

/* Hero Section */
.hero {
  text-align: center;
  padding: 8rem 2rem;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.7) 0%, rgba(15, 23, 42, 1) 100%), 
              url('https://images.unsplash.com/photo-1516979187457-637abb4f9353?auto=format&fit=crop&q=80&w=2000') center/cover no-repeat;
  border-bottom: 1px solid var(--border-color);
}

.hero h4 {
  font-size: 1.2rem;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1rem;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 4rem;
  margin-bottom: 1rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.btn {
  display: inline-block;
  background-color: var(--accent-color);
  color: #000;
  padding: 0.8rem 2rem;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.btn:hover {
  background-color: var(--accent-hover);
  color: #000;
  transform: translateY(-2px);
}

/* Section Title */
.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-title p {
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto;
}

/* Book Grid */
.book-section {
  max-width: 1200px;
  margin: 5rem auto;
  padding: 0 2rem;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.book-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.book-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  border-color: var(--accent-color);
}

.book-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-color);
}

.book-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.book-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.book-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.book-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--accent-color);
  font-weight: 600;
}

/* Footer */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 4rem 2rem 2rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
}

.footer-column h3 {
  font-family: var(--font-heading);
  color: var(--accent-color);
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

.social-links {
  list-style: none;
}

.social-links li {
  margin-bottom: 0.8rem;
}

.social-links a {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-links a:hover {
  color: var(--text-main);
}

.footer-bottom {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  .main-nav {
    display: none; /* Add mobile menu JS later */
  }
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  max-width: 900px;
  width: 100%;
  border-radius: 16px;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2.5rem;
  color: #fff;
  cursor: pointer;
  z-index: 10;
  text-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.modal-close:hover {
  color: var(--accent-color);
}

.modal-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 400px;
}

.modal-info {
  padding: 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal-info h2 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--accent-color);
  line-height: 1.2;
}

.modal-info p {
  color: var(--text-muted);
  font-size: 1.15rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .modal-content {
    grid-template-columns: 1fr;
    max-height: 90vh;
    overflow-y: auto;
  }
  .modal-image {
    height: 300px;
  }
  .modal-info {
    padding: 2rem;
  }
}
