
body {
      font-size: 14px;
  font-family: Arial, Helvetica, sans-serif;
  min-height: 100vh;
}
/* Baseline: prevent overflow surprises on mobile */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

.container {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 30px;
    width: 100%;

   
}
#logo {
    scale: 1.2;
    height: 100%;

}
.nav {


    display: flex;
    flex-direction: column;
    text-align: center;
    box-shadow:   0 10px 26px rgba(0,0,0,0.12),
  0 6px 12px rgba(0,0,0,0.08);

}
.logo-img {
    overflow: hidden;
    height: 200px;
}
.side-menu {

    display: flex;
    height: 100%;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px;

}
.others {
    justify-content: end;
}
.nav li {
    display: grid;
    grid-template-columns: 24px 1fr;
    margin-top: 0.7rem;
    gap: 10px;
}

ul, li {
    padding: 0;
    margin: 0;
    width: 100%;
    list-style-type: none;
    justify-content: start;
    align-items: center;
}
ul li img {
    text-align: left;
}

a {
    text-decoration: none;
    color: black;
    text-align: left;
}
.main-content {
    display: flex;
    flex-direction: column;

}
.header {
    display: flex;
    flex: none;
    justify-content: space-between;
    padding: 0px 50px;
    padding-top: 50px;

}
.action {
    display: flex;
    align-items: center;
    gap: 15px;
}
button, #submit, #delete {
    background-color: black;
    color: white;
    height: 3rem;
    border-radius: 30px;
    padding: 15px;
    
}
button:hover {
    cursor: pointer;
}
.display {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: space-evenly;
    padding: 0px 50px;

}
.card {
    display: flex;
     border-bottom: 15px solid rgb(255, 255, 255);
     border-radius: 10px;
     box-shadow:    0 10px 10px rgba(0,0,0,0.12),
  0 20px 12px rgba(0,0,0,0.08);
     gap: 40px;
     padding: 0px 50px;
     height: 150px;
}

.books, .unread, .read {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    gap: 5px;
}
.new-book {
    width: 100px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 190px;
    
}
.new-book p {
    width: 100%;
    padding: 0;
    margin: 0;
    text-align: center;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.book-action {
    display: flex;
    gap: 5px;
    height: 30%;

}

.book-action button {
    display: flex;
    width: 50%;
    height: 10%;
    justify-content: center;
    align-items: center;
    align-self: center;
    background-color: rgb(0, 0, 0);
    border: none;
    padding: 15px;
    font-size: 0.7rem;
    opacity: 70%;
}

dialog {
    width: 40%;
    height: 50%;
    padding: 0px 50px;
    padding-top: 30px;

}
form {
    display: flex;
    flex-direction: column;
    gap: 30px;

}
form .action {
    justify-content: end;
    padding-top: 10px;
}
form h1 {
    padding: 0px;
    margin-bottom: 0;
}
.user-input {
    display: grid;
    grid-template-columns: repeat(2, 1fr);

}

label {
    grid-column: 1;
}
.user-input input, select {
    grid-column: 2;
    width: 60%;
    justify-self: end;
}
#pages {
    width: 15%;
}
option {
    text-align: start;
}
#remove-dialog .action {
    padding-top: 150px;
}
.action >:hover{
    cursor: pointer;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px; 
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
img, svg, video, canvas {
  max-width: 100%;
  height: auto;
}
/* -------------------------
   Responsive layout (mobile)
   ------------------------- */

@media (max-width: 768px) {
  /* Stack sidebar + content */
  .container {
    grid-template-columns: 1fr;
    
  }

  /* Sidebar becomes a normal block so it doesn't squeeze content */
  .nav {
    box-shadow: none;
    
  }

  .logo-img {
    height: 150px;
  }
  .side-menu {
    height: 0;
  }
  /* Reduce horizontal padding that causes overflow */
  .header,
  .display {
    padding-left: 16px;
    padding-right: 16px;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding-top: 16px;
  }

  .action {
    width: 100%;
    flex-wrap: wrap;
    gap: 10px;
  }

  /* Make primary actions fit on small screens */
  button, #submit, #delete {
    height: auto;
    min-height: 44px; /* thumb-friendly */
    padding: 12px 16px;
  }

  /* Cards: remove huge side padding/gaps */
  .card {
    gap: 26px;
    padding: 16px;
    height: auto;
    flex-wrap: wrap;
  }

  /* New-book column shouldn’t force width */
  .new-book {
    width: 90px;
    height: auto;
  }

  .new-book p {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  /* Book action buttons shouldn’t be 10% height */
  .book-action {
    height: auto;
  }

  .book-action button {
    height: auto;
    min-height: 26px;
    width: auto;

  }

  /* Dialogs should fit viewport on mobile */
  dialog {
    width: min(92vw, 520px);
    height: auto;
    padding: 16px;
  }

  .user-input {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  label {
    grid-column: auto;
  }

  .user-input input, select {
    grid-column: auto;
    width: 100%;
    justify-self: stretch;
  }

  #pages {
    width: 100%;
  }

  #remove-dialog .action {
    padding-top: 16px;
  }
}

@media (min-width: 769px) {
  /* Keep your existing desktop spacing, but ensure cards don’t overflow */
  .card {
    max-width: 100%;
  }
}