  @import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.1/font/bootstrap-icons.min.css");

  body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: #0e1f28;
    color: white;
  }
  
  .container {
    padding: 30px;
  }
  
  h2 {
    color: #aefaff;
  }
  
  /* ========== Flipbook Card Styles ========== */
  
  .flipbook-card {
    background: #13232f;
    padding: 18px 20px;
    border-radius: 16px;
    box-shadow: 0 0 18px rgba(0, 255, 255, 0.15);
    margin-bottom: 20px;
    transition: 0.3s ease;
    position: relative;
  }
  
  .flipbook-card:hover {
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.35);
    transform: translateY(-2px);
  }
  
  /* Title */
  .flipbook-title {
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 15px;
    color: #aefaff;
  }
  
  /* Grid Layout */
  .grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
  }
  
  /* Link Left */
  .flipbook-link {
    flex: 1 1 60%;
    color: #00e1e1;
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    word-break: break-word;
    line-height: 1.5;
  }
  
  .flipbook-link:hover {
    text-decoration: underline;
    color: #00ffff;
  }
  
  /* Buttons on Right */
  .btn-group {
    display: flex;
    flex: 1 1 35%;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    position: relative;
  }
  
  /* QR Button */
  .qr-btn {
    background-color: #00e1e1;
    padding: 6px 14px;
    border-radius: 10px;
    border: none;
    color: #0e1f28;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
    box-shadow: 0 4px 6px rgba(0, 255, 255, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
  }
  
  .qr-btn:hover {
    background-color: #00ffff;
    box-shadow: 0 4px 10px rgba(0, 255, 255, 0.3);
    transform: translateY(-1px);
  }
  
  /* More Menu Wrapper */
  .more-menu-wrapper {
    position: relative;
  }
  
  /* 3-dots Button */
  .more-btn {
    background: transparent;
    border: none;
    color: #00e1e1;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: background 0.2s ease;
  }
  
  .more-btn:hover {
    background-color: rgba(0, 225, 225, 0.1);
  }
  
  /* Pop-up Menu */
  .popup-menu {
    display: none;
    position: absolute;
    top: 35px;
    right: 0;
    background: #102028;
    border-radius: 10px;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0, 255, 255, 0.25);
    z-index: 999;
    min-width: 120px;
  }
  
  .popup-menu button {
    background: #ff4d4d;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background 0.3s;
  }
  
  .popup-menu button:hover {
    background: #e03131;
  }
  
  /* Profile Popup */
  #profilePopup {
    position: absolute;
    top: 60px;
    right: 20px;
    border-radius: 12px;
    padding: 16px;
    width: 220px;
    display: none;
    z-index: 999;
  }
  
  .profile-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid grey;
  }
  
  /* Responsive Tweaks */
  @media (max-width: 600px) {
    .grid {
      flex-direction: column;
      align-items: flex-start;
    }
    
    .btn-group {
      justify-content: space-between;
      width: 100%;
    }
    
    .flipbook-link {
      flex: 1 1 100%;
      font-size: 0.88rem;
    }
    
    .qr-btn {
      padding: 6px 10px;
      font-size: 0.85rem;
    }
    
    .more-btn {
      font-size: 1.1rem;
    }
  }
  
  .empty-msg {
    margin-top: 40px;
    font-size: 1.2rem;
    color: #ccc;
    text-align: center;
  }
  
  .main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    
    background: white;
    color: #000;
    padding: 12px 20px;
    font-size: 1.4rem;
    font-weight: bold;
    
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 999;
  }
  
  .logo-section {
    display: flex;
    align-items: center;
  }
  
  .logo {
    width: 70px;
    height: 70px;
    margin-right: 10px;
  }
  
  .brand-name {
    display: flex;
    align-items: center;
    height: 70px;
    /* match logo height */
  }
  
  .nav-icons {
    display: flex;
    align-items: center;
    gap: 15px;
  }
  
  .hamburger {
    font-size: 1.6rem;
    background: none;
    border: none;
    cursor: pointer;
    display: none;
  }
  
  .profile-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
  }
  
  .profile-popup {
    display: none;
    position: fixed;
    top: 60px;
    right: 20px;
    z-index: 9999;
    color: black;
  }
  
  .popup-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    min-width: 220px;
    animation: fadeIn 0.3s ease;
  }
  
  .popup-pic {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 10px;
  }
  
  .popup-btn {
    display: block;
    margin-top: 12px;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background: #00f7ff;
    color: #000;
    font-weight: bold;
    text-decoration: none;
  }
  
  .popup-btn.logout {
    background: #ff4040;
    color: white;
  }
  
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .profile-popup i {
    color: white;
    margin-right: 5px;
    font-size: 20px;
  }
  
  #profile {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
  }
  
  #qrOverlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
  }
  
  #qrBox {
    background: #ffffff;
    padding: 20px 30px;
    border-radius: 16px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.4);
    text-align: center;
    animation: zoomIn 0.3s ease;
  }
  
  #qrBox canvas {
    margin-bottom: 12px;
  }
  
  #qrBox button {
    padding: 8px 16px;
    background: #00c3ff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: 0.2s ease;
  }
  
  #qrBox button:hover {
    background: #009fc4;
  }
  
  #loader-container {
    display: none;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
    background: transparent;
    position: fixed;
    top: 0;
  }
  
  .loader {
    width: 48px;
    height: 48px;
    border: 3px solid #FFF;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
  }
  
  .loader::after {
    content: '';
    box-sizing: border-box;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid;
    border-color: #FF3D00 transparent;
  }
  
  @keyframes rotation {
    0% {
      transform: rotate(0deg);
    }
    
    100% {
      transform: rotate(360deg);
    }
  }