/* Base reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
  }
  
  /* Navigation */
  nav {
    width: 100%;
    background: #222;
    color: #fff;
    padding: 15px 20px;
    text-align: right;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  }
  
  .logout {
    cursor: pointer;
    font-weight: 500;
    transition: color 0.3s;
  }
  
  .logout:hover {
    color: #ff6b6b;
  }
  
  /* Container */
  .container {
    display: flex;
    min-height: 100vh;
    background: #f9f9f9;
  }
  
  /* Main section */
  .main-section {
    flex: 2;
    padding: 30px;
  }
  
  /* Tabs */
  .tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
  }
  
  .tabs button {
    padding: 10px 20px;
    border: none;
    background: #007bff;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
  }
  
  .tabs button:hover {
    background: #0056b3;
  }
  
  /* Books container */
  .books-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
  }
  
  /* Book card */
  .book-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
  }
  
  .book-card:hover {
    transform: translateY(-5px);
  }
  
  .book-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    margin-bottom: 15px;
    border-radius: 8px;
  }
  
  .book-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
  }
  
  .book-card p {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
  }
  
  /* Borrow button */
  .borrow-btn {
    padding: 10px;
    border: none;
    background: #ffc107;
    color: #333;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
  }
  
  .borrow-btn:hover {
    background: #e0a800;
  }
  
  /* Right section */
  .right-section {
    flex: 1;
    background: #ff6b6b;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 30px;
    min-width: 300px;
  }
  
  .right-section h1 {
    font-size: 36px;
    margin-bottom: 15px;
  }
  
  .right-section p {
    font-size: 18px;
    line-height: 1.5;
  }
  
  /* Responsive */
  @media screen and (max-width: 1024px) {
    .container {
      flex-direction: column;
    }
    .main-section {
      text-align: center;
    }
    .tabs {
      justify-content: center;
    }
  }

  /* Modal overlay: semi-transparent dark background covering entire screen */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

/* Borrow container: centered modal box with modern styling */
.borrow-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    width: 300px;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 1001;
    text-align: center;
}

/* Styling for elements within the borrow container */
.borrow-container p {
    margin-bottom: 10px;
    font-weight: 500;
    color: #333;
}

.borrow-container label {
    display: block;
    margin-bottom: 5px;
    color: #555;
}

.borrow-container input[type="date"] {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.borrow-container button {
    padding: 10px 15px;
    border: none;
    background: #007bff;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.borrow-container button:hover {
    background: #0056b3;
}

/* Container for toasts */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
}

/* Toast box style */
.toast {
    background: #28a745;
    color: #fff;
    padding: 10px 20px;
    margin-bottom: 10px;
    border-radius: 5px;
    opacity: 1;
    transition: opacity 0.5s ease-out;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Alternate style for errors */
.toast.error {
    background: #dc3545;
}

/* Fade-out effect */
.toast.fade-out {
    opacity: 0;
}