body {
  margin:0;
  font-family: 'Segoe UI';
  background:#0f0f0f;
  color:white;
}

.header {
  display:flex;
  justify-content:space-between;
  padding:20px;
  background:#000;
}

nav a {
  color:white;
  margin:10px;
  text-decoration:none;
}

.hero {
  height:90vh;
  background:url('../images/banner.jpg') center/cover;
  position:relative;
}

.overlay {
  background:rgba(0,0,0,0.6);
  height:100%;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
}

.books-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
  gap:20px;
  padding:40px;
}

.card {
  background:#1a1a1a;
  padding:15px;
  border-radius:10px;
  transition:0.3s;
}

.card:hover {
  transform:scale(1.05);
}

/* ==========================================
   MOBILE RESPONSIVE STYLES
   ========================================== */

/* Tablet styles (max-width: 768px) */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    padding: 15px;
    text-align: center;
  }
  
  .header h1 {
    font-size: 1.5rem;
    margin-bottom: 10px;
  }
  
  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  
  nav a {
    margin: 5px;
    font-size: 14px;
  }
  
  .hero {
    height: 70vh;
  }
  
  .overlay h1 {
    font-size: 2rem;
    text-align: center;
    padding: 0 20px;
  }
  
  .overlay p {
    font-size: 1rem;
    text-align: center;
    padding: 0 20px;
  }
  
  .books-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px;
  }
  
  .card {
    padding: 10px;
  }
  
  .card img {
    width: 100%;
    height: auto;
  }
  
  .card h3 {
    font-size: 1rem;
  }
  
  .card p {
    font-size: 0.9rem;
  }
}

/* Mobile styles (max-width: 480px) */
@media (max-width: 480px) {
  .header {
    padding: 10px;
  }
  
  .header h1 {
    font-size: 1.2rem;
  }
  
  nav {
    flex-direction: column;
    gap: 5px;
  }
  
  nav a {
    font-size: 12px;
    padding: 5px 10px;
  }
  
  .hero {
    height: 50vh;
  }
  
  .overlay h1 {
    font-size: 1.5rem;
  }
  
  .overlay p {
    font-size: 0.9rem;
  }
  
  .books-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 15px;
  }
  
  .card {
    margin: 0 auto;
    max-width: 300px;
  }
  
  .admin-edit-btn {
    top: 10px;
    right: 10px;
    padding: 8px 15px;
    font-size: 12px;
  }
}

/* Fix image scaling on mobile */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Fix table scrolling on mobile */
table {
  display: block;
  overflow-x: auto;
  white-space: nowrap;
}

/* Better touch targets on mobile */
button, 
nav a,
.card {
  min-height: 44px;
  min-width: 44px;
}

/* Prevent horizontal scroll */
body {
  overflow-x: hidden;
}

/* Fix form elements on mobile */
input, 
textarea, 
select {
  font-size: 16px;
  max-width: 100%;
}