* {
      margin: 0;
      padding: 0;
      box-sizing: border-box;

  font-family: 'Noto Sans Bengali', sans-serif;

    }
    body {
      background: #f4f7fc;
      color: #1a2639;
      padding-bottom: 0;
      transition: background 0.25s ease, color 0.2s ease;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      
    }
    main {
      flex: 1;
    }
    /* ----- DARK THEME ----- */
    body.dark {
      background: #0f1724;
      color: #e8edf5;
    }
    body.dark .navbar {
      background: rgba(20, 30, 48, 0.75);
      backdrop-filter: blur(16px) saturate(180%);
      border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    body.dark .nav-brand {
      background: linear-gradient(145deg, #c0d4f0, #8ab3e0);
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
    }
    body.dark .nav-links a { color: #b8ccf0; }
    body.dark .nav-links a:hover { color: white; border-bottom-color: #7aa9d9; }
    body.dark .btn-outline-premium {
      border-color: #7a9bc7;
      color: #c8ddf5;
      background: rgba(30,50,80,0.3);
    }
    body.dark .btn-outline-premium:hover {
      background: #2a405e;
      color: white;
    }
    body.dark .btn-solid-premium {
      background: #2a4a6e;
      color: white;
    }
    body.dark .btn-solid-premium:hover { background: #1f3a57; }
    body.dark .lang-toggle {
      background: rgba(60, 90, 130, 0.3);
    }
    body.dark .lang-btn {
      color: #b8ccf0;
    }
    body.dark .lang-btn.active {
      background: #1f334b;
      color: white;
      box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }
    body.dark .search-wrap {
      background: rgba(25, 40, 60, 0.5);
      border-color: rgba(255,255,255,0.06);
      backdrop-filter: blur(8px);
    }
    body.dark .search-wrap input {
      color: #e8edf5;
      background: transparent;
    }
    body.dark .search-wrap input::placeholder { color: #8aa3c0; }
    body.dark .search-wrap button {
      background: #2a4a6e;
    }
    body.dark .search-wrap button:hover { background: #1f3a57; }
    body.dark .filter-tabs span {
      background: rgba(30, 50, 80, 0.3);
      color: #b8ccf0;
      border-color: rgba(255,255,255,0.04);
    }
    body.dark .filter-tabs span:hover {
      background: rgba(60, 100, 160, 0.3);
      color: white;
    }
    body.dark .book-card {
      background: rgba(25, 40, 60, 0.4);
      backdrop-filter: blur(12px);
      border-color: rgba(255,255,255,0.04);
      box-shadow: 0 20px 50px -10px rgba(0,0,0,0.5);
    }
    body.dark .book-card:hover {
      border-color: rgba(255,255,255,0.15);
      box-shadow: 0 40px 70px -12px rgba(0,0,0,0.7);
    }
    body.dark .book-title { color: #e8edf5; }
    body.dark .book-meta span {
      background: rgba(60, 100, 160, 0.1);
      border-color: rgba(255,255,255,0.03);
      color: #b0c8e8;
    }
    body.dark .book-year { color: #90aecf; }
    body.dark .book-actions i { color: #8aaacf; }
    body.dark .book-actions i:hover { color: white; }
    body.dark .pagination-wrap button {
      background: rgba(30, 50, 80, 0.3);
      border-color: rgba(255,255,255,0.04);
      color: #b8ccf0;
    }
    body.dark .pagination-wrap button.active {
      background: #2a4a6e;
      color: white;
      border-color: #2a4a6e;
    }
    body.dark .pagination-wrap button:hover:not(.active) {
      background: rgba(60, 100, 160, 0.2);
    }
    body.dark .modal-box {
      background: rgba(25, 40, 60, 0.8);
      backdrop-filter: blur(40px);
      border-color: rgba(255,255,255,0.06);
    }
    body.dark .modal-box h3 { color: #e8edf5; }
    body.dark .modal-box input {
      background: rgba(10, 20, 35, 0.5);
      border-color: rgba(255,255,255,0.04);
      color: #e8edf5;
    }
    body.dark .modal-box input:focus {
      border-color: #4a7aaa;
      background: rgba(20, 40, 65, 0.6);
    }
    body.dark .modal-box .btn-block { background: #2a4a6e; }
    body.dark .modal-box .btn-block:hover { background: #1f3a57; }
    body.dark .modal-close { color: #8aaacf; }
    body.dark .iframe-modal .modal-content {
      background: rgba(20, 30, 48, 0.85);
      border-color: rgba(255,255,255,0.06);
    }
    body.dark .iframe-modal .modal-header {
      background: rgba(10, 20, 35, 0.3);
      border-bottom: 1px solid rgba(255,255,255,0.04);
    }
    body.dark .iframe-modal .modal-header span { color: #d0e0f5; }
    body.dark .iframe-modal .modal-header .close-modal {
      color: #b0c8e8;
      background: rgba(255,255,255,0.04);
    }
    body.dark .iframe-modal .modal-header .close-modal:hover {
      background: rgba(255,255,255,0.1);
    }
    body.dark .footer {
      background: rgba(15, 23, 36, 0.8);
      backdrop-filter: blur(16px);
      border-top: 1px solid rgba(255,255,255,0.04);
    }
    body.dark .footer a { color: #8aaacf; }
    body.dark .footer a:hover { color: white; }
    body.dark .footer .footer-heading { color: #d0e0f5; }
    body.dark .most-read-section {
      background: rgba(25, 40, 60, 0.3);
      border-color: rgba(255,255,255,0.04);
    }
    body.dark .most-read-section h2 { color: #d0e0f5; }
    body.dark .most-read-item {
      background: rgba(255,255,255,0.03);
      border-color: rgba(255,255,255,0.04);
    }
    body.dark .most-read-item .rank { color: #8aaacf; }
    body.dark .most-read-item .book-title-sm { color: #e8edf5; }
    body.dark .most-read-item .book-meta-sm { color: #8aaacf; }

    /* ----- NAVBAR (glass) ----- */
    .navbar {
      background: rgba(255, 255, 255, 0.7);
      backdrop-filter: blur(16px) saturate(180%);
      -webkit-backdrop-filter: blur(16px) saturate(180%);
      box-shadow: 0 8px 32px rgba(0, 20, 40, 0.08);
      border-bottom: 1px solid rgba(255, 255, 255, 0.5);
      padding: 0.8rem 2.5rem;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      position: sticky;
      top: 0;
      z-index: 50;
      transition: background 0.2s, border-color 0.2s;
    }
    .nav-brand {
      font-weight: 800;
      font-size: 1.8rem;
      letter-spacing: -0.03em;
      background: linear-gradient(145deg, #0b1e33, #2b4b6f);
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
      display: flex;
      align-items: center;
      gap: 0.5rem;
      transition: 0.2s;
    }
    .nav-brand i { color: #2b4b6f; font-size: 1.6rem; }
    body.dark .nav-brand i { color: #8ab3e0; }
    .nav-links {
      display: flex;
      align-items: center;
      gap: 2rem;
      font-weight: 600;
      color: #1e2f44;
    }
    .nav-links a {
      text-decoration: none;
      color: inherit;
      transition: 0.2s;
      font-size: 0.95rem;
      padding: 0.4rem 0.2rem;
      border-bottom: 2px solid transparent;
    }
    .nav-links a:hover { border-bottom-color: #2b4b6f; color: #0f1e2f; }
    .nav-actions {
      display: flex;
      align-items: center;
      gap: 1rem;
      flex-wrap: wrap;
    }
    .btn-outline-premium {
      background: transparent;
      border: 1.5px solid #1e2f44;
      color: #1e2f44;
      padding: 0.5rem 1.2rem;
      border-radius: 40px;
      font-weight: 600;
      font-size: 0.85rem;
      transition: 0.25s;
      cursor: pointer;
      background: rgba(255,255,255,0.3);
      backdrop-filter: blur(4px);
    }
    .btn-outline-premium i { margin-right: 6px; }
    .btn-outline-premium:hover {
      background: #1e2f44;
      color: white;
      box-shadow: 0 10px 20px -8px rgba(20,40,70,0.3);
      transform: scale(1.02);
    }
    .btn-solid-premium {
      background: #1e2f44;
      border: none;
      color: white;
      padding: 0.5rem 1.5rem;
      border-radius: 40px;
      font-weight: 600;
      font-size: 0.85rem;
      transition: 0.25s;
      cursor: pointer;
      box-shadow: 0 6px 14px rgba(20,40,70,0.2);
    }
    .btn-solid-premium i { margin-right: 6px; }
    .btn-solid-premium:hover {
      background: #0f1e2f;
      transform: translateY(-2px);
      box-shadow: 0 14px 24px -6px rgba(0,20,40,0.3);
    }
    .lang-toggle {
      background: rgba(200, 215, 235, 0.4);
      border-radius: 40px;
      padding: 0.2rem;
      display: flex;
      gap: 0.2rem;
      backdrop-filter: blur(4px);
    }
    .lang-btn {
      background: transparent;
      border: none;
      padding: 0.3rem 0.9rem;
      border-radius: 30px;
      font-weight: 700;
      font-size: 0.7rem;
      color: #1e2f44;
      transition: 0.2s;
      cursor: pointer;
    }
    .lang-btn.active {
      background: white;
      box-shadow: 0 4px 8px rgba(0,0,0,0.02);
      color: #0b1e33;
    }
    .theme-toggle {
      background: transparent;
      border: none;
      font-size: 1.2rem;
      color: #1e2f44;
      cursor: pointer;
      padding: 0.3rem 0.6rem;
      border-radius: 40px;
      transition: 0.2s;
    }
    body.dark .theme-toggle { color: #c8ddf5; }
    .theme-toggle:hover { transform: scale(1.1); }
    /* ----- SEARCH + FILTER ----- */
    .search-section {
      max-width: 1400px;
      margin: 2.5rem auto 1rem;
      padding: 0 2rem;
      display: flex;
      flex-wrap: wrap;
      gap: 1.2rem;
      align-items: center;
      justify-content: space-between;
    }
    .search-wrap {
      flex: 1 1 280px;
      display: flex;
      align-items: center;
      background: white;
      border-radius: 60px;
      padding: 0.2rem 0.2rem 0.2rem 1.5rem;
      box-shadow: 0 8px 24px rgba(0, 20, 30, 0.04);
      border: 1px solid rgba(255,255,255,0.6);
      transition: 0.2s;
    }
    .search-wrap:focus-within {
      box-shadow: 0 8px 28px rgba(20, 60, 120, 0.12);
      border-color: #a0bcdb;
    }
    .search-wrap i { color: #4a6a8a; }
    .search-wrap input {
      border: none;
      padding: 1rem 0.8rem;
      width: 100%;
      font-weight: 500;
      background: transparent;
      outline: none;
      font-size: 0.95rem;
    }
    .search-wrap button {
      background: #1e2f44;
      border: none;
      border-radius: 60px;
      padding: 0.8rem 1.8rem;
      color: white;
      font-weight: 600;
      cursor: pointer;
      transition: 0.2s;
      white-space: nowrap;
    }
    .search-wrap button:hover { background: #0f1e2f; }
    .filter-tabs {
      display: flex;
      flex-wrap: wrap;
      gap: 0.8rem;
      align-items: center;
    }
    .filter-tabs span {
      background: rgba(255,255,255,0.5);
      backdrop-filter: blur(8px);
      padding: 0.5rem 1.2rem;
      border-radius: 40px;
      font-size: 0.8rem;
      font-weight: 600;
      color: #1f3a53;
      border: 1px solid rgba(255,255,255,0.4);
      cursor: pointer;
      transition: 0.15s;
    }
    .filter-tabs span i { margin-right: 6px; opacity: 0.7; }
    .filter-tabs span:hover {
      background: white;
      box-shadow: 0 6px 12px rgba(0,0,0,0.02);
      transform: scale(0.97);
    }

    /* ----- MAIN LAYOUT: full width, most read after grid ----- */
    .main-content {
      max-width: 1400px;
      margin: 1.8rem auto 0;
      padding: 0 2rem;
      display: flex;
      flex-direction: column;
      gap: 2.5rem;
    }
    .book-grid-wrapper {
      width: 100%;
    }
    .book-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      gap: 2rem 1.5rem;
    }

    /* ----- BOOK CARD (enhanced shadows) ----- */
    .book-card {
      background: rgba(255, 255, 255, 0.7);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border-radius: 32px;
      box-shadow: 0 20px 50px -12px rgba(0, 20, 40, 0.18), 0 8px 24px -6px rgba(0, 20, 40, 0.06);
      border: 1px solid rgba(255, 255, 255, 0.5);
      overflow: hidden;
      transition: all 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2);
      display: flex;
      flex-direction: column;
      height: 100%;
      opacity: 0;
      transform: translateY(30px) scale(0.96);
      animation: floatIn 0.6s cubic-bezier(0.2, 0.9, 0.4, 1) forwards;
      animation-delay: calc(var(--card-index, 0) * 0.06s);
      position: relative;
    }
    .book-card::before {
      content: '';
      position: absolute;
      inset: -2px;
      border-radius: 34px;
      padding: 2px;
      background: linear-gradient(135deg, rgba(255,255,255,0.3), rgba(200,215,235,0.1));
      -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
      -webkit-mask-composite: xor;
      mask-composite: exclude;
      pointer-events: none;
      opacity: 0;
      transition: opacity 0.4s ease;
    }
    .book-card:hover::before {
      opacity: 1;
    }
    .book-card:hover {
      transform: translateY(-10px) scale(1.02);
      box-shadow: 0 40px 80px -16px rgba(0, 30, 60, 0.3), 0 16px 40px -8px rgba(0, 20, 40, 0.1);
      border-color: rgba(255,255,255,0.9);
    }
    .book-card:nth-child(1) { --card-index: 0; }
    .book-card:nth-child(2) { --card-index: 1; }
    .book-card:nth-child(3) { --card-index: 2; }
    .book-card:nth-child(4) { --card-index: 3; }
    .book-card:nth-child(5) { --card-index: 4; }
    .book-card:nth-child(6) { --card-index: 5; }
    .book-card:nth-child(7) { --card-index: 6; }
    .book-card:nth-child(8) { --card-index: 7; }
    .book-card:nth-child(9) { --card-index: 8; }
    .book-card:nth-child(10) { --card-index: 9; }
    .book-card:nth-child(11) { --card-index: 10; }
    .book-card:nth-child(12) { --card-index: 11; }
    .book-card:nth-child(13) { --card-index: 12; }
    .book-card:nth-child(14) { --card-index: 13; }
    .book-card:nth-child(15) { --card-index: 14; }
    .book-card:nth-child(16) { --card-index: 15; }
    .book-card:nth-child(17) { --card-index: 16; }
    .book-card:nth-child(18) { --card-index: 17; }
    .book-card:nth-child(19) { --card-index: 18; }
    .book-card:nth-child(20) { --card-index: 19; }
    .book-card:nth-child(21) { --card-index: 20; }
    .book-card:nth-child(22) { --card-index: 21; }

    @keyframes floatIn {
      0% { opacity: 0; transform: translateY(30px) scale(0.96); }
      100% { opacity: 1; transform: translateY(0) scale(1); }
    }

    .book-cover {
      width: 100%;
      height: 200px;
      background: #e7edf6;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      overflow: hidden;
      flex-shrink: 0;
    }
    .book-cover img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.2), filter 0.4s ease;
    }
    .book-card:hover .book-cover img {
      transform: scale(1.08);
      filter: brightness(1.02) saturate(1.05);
    }
    .book-cover .link-overlay {
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, 0.2);
      backdrop-filter: blur(6px) saturate(1.2);
      -webkit-backdrop-filter: blur(6px) saturate(1.2);
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      transition: opacity 0.4s ease, transform 0.4s ease;
      cursor: pointer;
      color: white;
      font-size: 2.8rem;
      text-shadow: 0 4px 20px rgba(0,0,0,0.3);
      transform: scale(0.9);
    }
    .book-card:hover .link-overlay {
      opacity: 1;
      transform: scale(1);
    }
    .book-cover .link-overlay i {
      transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2);
    }
    .book-cover .link-overlay:hover i {
      transform: rotate(12deg) scale(1.1);
    }
    .book-cover .no-image {
      color: #9ab3d0;
      font-weight: 600;
      font-size: 0.8rem;
      background: #d5e2f0;
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
    }
    .book-info {
      padding: 1.2rem 1rem 0.6rem;
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 0.2rem;
      position: relative;
    }
    .book-info::after {
      content: '';
      position: absolute;
      top: 0;
      left: 15%;
      width: 70%;
      height: 1px;
      background: linear-gradient(90deg, transparent, rgba(30, 47, 68, 0.08), transparent);
      transition: opacity 0.3s;
    }
    .book-card:hover .book-info::after {
      opacity: 0.6;
    }
    .book-title {
      font-weight: 700;
      font-size: 1.05rem;
      letter-spacing: -0.02em;
      color: #0b1e33;
      line-height: 1.25;
      transition: color 0.2s;
    }
    .book-card:hover .book-title {
      color: #1a3a5a;
    }
    .book-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 0.3rem 0.6rem;
      font-size: 0.65rem;
      font-weight: 600;
      color: #3e5a79;
      margin-top: 0.15rem;
    }
    .book-meta span {
      background: rgba(60, 100, 140, 0.06);
      padding: 0.2rem 0.8rem;
      border-radius: 40px;
      border: 1px solid rgba(60, 100, 140, 0.04);
      transition: all 0.2s ease;
    }
    .book-card:hover .book-meta span {
      background: rgba(60, 100, 140, 0.12);
      border-color: rgba(60, 100, 140, 0.1);
    }
    .book-year {
      margin-top: 0.2rem;
      font-size: 0.65rem;
      font-weight: 500;
      color: #4f6f8f;
      letter-spacing: 0.4px;
      transition: color 0.2s;
    }
    .book-card:hover .book-year {
      color: #2a4a6a;
    }
    .book-actions {
      display: flex;
      justify-content: flex-end;
      padding: 0.4rem 1rem 1rem;
      gap: 0.6rem;
      border-top: 1px solid rgba(0,0,0,0.02);
      transition: border-color 0.3s;
    }
    .book-card:hover .book-actions {
      border-color: rgba(0,0,0,0.05);
    }
    .book-actions i {
      color: #40658a;
      opacity: 0.4;
      transition: all 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
      cursor: pointer;
      font-size: 0.95rem;
    }
    .book-actions i:hover {
      opacity: 1;
      color: #0b1e33;
      transform: scale(1.15);
    }
    .book-actions i.fa-heart:hover {
      color: #e74c6f;
    }
    .book-actions i.fa-bookmark:hover {
      color: #f1c40f;
    }

    /* ----- MOST READ SECTION (after grid, full width) ----- */
    .most-read-section {
      background: rgba(255, 255, 255, 0.4);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border-radius: 28px;
      border: 1px solid rgba(255,255,255,0.5);
      padding: 1.8rem 2rem;
      box-shadow: 0 16px 40px -12px rgba(0, 20, 40, 0.06);
      transition: background 0.2s, border-color 0.2s;
      width: 100%;
    }
    .most-read-section h2 {
      font-size: 1.3rem;
      font-weight: 700;
      color: #0b1e33;
      margin-bottom: 1.5rem;
      display: flex;
      align-items: center;
      gap: 0.8rem;
    }
    .most-read-section h2 i {
      color: #f1c40f;
      font-size: 1.4rem;
    }
    .most-read-list {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
      gap: 1rem;
    }
    .most-read-item {
      display: flex;
      align-items: center;
      gap: 0.8rem;
      padding: 0.6rem 1rem;
      background: rgba(255,255,255,0.3);
      border-radius: 16px;
      border: 1px solid rgba(255,255,255,0.3);
      transition: all 0.25s ease;
      cursor: pointer;
      position: relative;
    }
    .most-read-item:hover {
      background: rgba(255,255,255,0.5);
      transform: translateY(-2px) scale(1.01);
      box-shadow: 0 8px 20px rgba(0,0,0,0.02);
    }
    .most-read-item .rank {
      font-weight: 800;
      font-size: 1rem;
      color: #4f6f8f;
      min-width: 28px;
      text-align: center;
    }
    .most-read-item .rank.gold { color: #f1c40f; }
    .most-read-item .rank.silver { color: #bdc3c7; }
    .most-read-item .rank.bronze { color: #cd7f32; }
    .most-read-item .book-cover-sm {
      width: 44px;
      height: 58px;
      border-radius: 8px;
      object-fit: cover;
      flex-shrink: 0;
      background: #d5e2f0;
    }
    .most-read-item .book-info-sm {
      flex: 1;
      min-width: 0;
    }
    .most-read-item .book-title-sm {
      font-weight: 600;
      font-size: 0.85rem;
      color: #0b1e33;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .most-read-item .book-meta-sm {
      font-size: 0.7rem;
      color: #4f6f8f;
      display: flex;
      gap: 0.5rem;
      flex-wrap: wrap;
    }
    .most-read-item .book-meta-sm span {
      background: rgba(60,100,140,0.04);
      padding: 0 0.6rem;
      border-radius: 20px;
    }
    .most-read-item .preview-indicator {
      position: absolute;
      right: 10px;
      top: 50%;
      transform: translateY(-50%);
      color: #4f6f8f;
      opacity: 0.3;
      font-size: 0.8rem;
      transition: opacity 0.2s;
    }
    .most-read-item:hover .preview-indicator {
      opacity: 0.7;
    }
    .most-read-more-btn {
      margin-top: 1.5rem;
      padding: 0.7rem 2rem;
      border-radius: 40px;
      border: 1px solid rgba(30,47,68,0.15);
      background: rgba(255,255,255,0.3);
      backdrop-filter: blur(4px);
      font-weight: 600;
      font-size: 0.85rem;
      color: #1e2f44;
      cursor: pointer;
      transition: all 0.25s ease;
      display: inline-flex;
      align-items: center;
      gap: 0.6rem;
    }
    .most-read-more-btn:hover {
      background: #1e2f44;
      color: white;
      border-color: #1e2f44;
      transform: scale(1.02);
    }
    body.dark .most-read-more-btn {
      border-color: rgba(255,255,255,0.08);
      color: #b8ccf0;
      background: rgba(255,255,255,0.04);
    }
    body.dark .most-read-more-btn:hover {
      background: #2a4a6e;
      color: white;
      border-color: #2a4a6e;
    }

    /* ----- PAGINATION ----- */
    .pagination-wrap {
      display: flex;
      justify-content: center;
      margin: 3rem 0 0.5rem;
      gap: 0.5rem;
      flex-wrap: wrap;
    }
    .pagination-wrap button {
      background: rgba(255,255,255,0.4);
      backdrop-filter: blur(4px);
      border: 1px solid rgba(255,255,255,0.6);
      padding: 0.6rem 1.1rem;
      border-radius: 60px;
      font-weight: 600;
      color: #1e2f44;
      cursor: pointer;
      transition: all 0.25s ease;
      font-size: 0.8rem;
    }
    .pagination-wrap button.active {
      background: #1e2f44;
      color: white;
      border-color: #1e2f44;
      box-shadow: 0 8px 16px -6px rgba(0,20,40,0.2);
      transform: scale(1.05);
    }
    .pagination-wrap button:hover:not(.active) {
      background: white;
      transform: translateY(-2px);
      box-shadow: 0 6px 16px rgba(0,0,0,0.04);
    }

    /* ----- IFRAME MODAL ----- */
    .iframe-modal {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.3);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 999;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.35s ease;
      padding: 1.5rem;
    }
    .iframe-modal.show {
      opacity: 1;
      pointer-events: auto;
    }
    .iframe-modal .modal-content {
      background: rgba(255, 255, 255, 0.1);
      backdrop-filter: blur(4px);
      border-radius: 40px;
      width: 100%;
      max-width: 1200px;
      height: 100%;
      max-height: 800px;
      overflow: hidden;
      box-shadow: 0 40px 80px -20px rgba(0,0,0,0.3);
      border: 1px solid rgba(255,255,255,0.15);
      position: relative;
      display: flex;
      flex-direction: column;
      transform: scale(0.95);
      transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
    }
    .iframe-modal.show .modal-content {
      transform: scale(1);
    }
    .iframe-modal .modal-content iframe {
      width: 100%;
      height: 100%;
      border: none;
      background: white;
      border-radius: 0 0 40px 40px;
    }
    .iframe-modal .modal-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0.8rem 1.8rem;
      background: rgba(255,255,255,0.03);
      backdrop-filter: blur(8px);
      border-bottom: 1px solid rgba(255,255,255,0.05);
      border-radius: 40px 40px 0 0;
    }
    .iframe-modal .modal-header span {
      color: white;
      font-weight: 600;
      font-size: 1rem;
      letter-spacing: 0.3px;
      text-shadow: 0 2px 6px rgba(0,0,0,0.2);
    }
    .iframe-modal .modal-header .close-modal {
      background: rgba(255,255,255,0.08);
      border: none;
      color: white;
      font-size: 1.6rem;
      cursor: pointer;
      padding: 0.2rem 1rem;
      border-radius: 40px;
      transition: 0.2s;
      backdrop-filter: blur(4px);
      font-weight: 300;
    }
    .iframe-modal .modal-header .close-modal:hover {
      background: rgba(255,255,255,0.2);
      transform: scale(0.96);
    }

    /* ----- FOOTER ----- */
    .footer {
      margin-top: 4rem;
      background: rgba(255, 255, 255, 0.5);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border-top: 1px solid rgba(255, 255, 255, 0.6);
      padding: 3rem 2.5rem 1.5rem;
      transition: background 0.2s, border-color 0.2s;
    }
    .footer-grid {
      max-width: 1400px;
      margin: 0 auto;
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 2.5rem;
    }
    .footer-col h4 {
      font-weight: 700;
      font-size: 0.95rem;
      letter-spacing: 0.3px;
      color: #0b1e33;
      margin-bottom: 1.2rem;
      position: relative;
    }
    .footer-col h4::after {
      content: '';
      position: absolute;
      bottom: -6px;
      left: 0;
      width: 28px;
      height: 2px;
      background: linear-gradient(90deg, #2b4b6f, rgba(43, 75, 111, 0.2));
      border-radius: 4px;
    }
    .footer-col ul {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 0.7rem;
    }
    .footer-col ul li a {
      text-decoration: none;
      color: #3e5a79;
      font-size: 0.85rem;
      font-weight: 500;
      transition: color 0.2s, transform 0.2s;
      display: inline-block;
    }
    .footer-col ul li a:hover {
      color: #0b1e33;
      transform: translateX(4px);
    }
    .footer-col p {
      color: #3e5a79;
      font-size: 0.85rem;
      line-height: 1.6;
      font-weight: 400;
    }
    .footer-bottom {
      max-width: 1400px;
      margin: 2rem auto 0;
      padding-top: 1.2rem;
      border-top: 1px solid rgba(0,0,0,0.04);
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      align-items: center;
      gap: 0.8rem;
      font-size: 0.8rem;
      color: #4f6f8f;
    }
    .footer-bottom .social-links {
      display: flex;
      gap: 1.2rem;
    }
    .footer-bottom .social-links a {
      color: #4f6f8f;
      transition: color 0.2s, transform 0.2s;
      font-size: 1.1rem;
    }
    .footer-bottom .social-links a:hover {
      color: #0b1e33;
      transform: scale(1.1);
    }
    body.dark .footer-col h4 { color: #d0e0f5; }
    body.dark .footer-col h4::after { background: linear-gradient(90deg, #7aa9d9, rgba(122, 169, 217, 0.2)); }
    body.dark .footer-col ul li a { color: #8aaacf; }
    body.dark .footer-col ul li a:hover { color: white; }
    body.dark .footer-col p { color: #8aaacf; }
    body.dark .footer-bottom { border-top-color: rgba(255,255,255,0.04); color: #8aaacf; }
    body.dark .footer-bottom .social-links a { color: #8aaacf; }
    body.dark .footer-bottom .social-links a:hover { color: white; }

    /* ----- RESPONSIVE ----- */
    @media (max-width: 680px) {
      .navbar { padding: 0.8rem 1.2rem; flex-direction: column; gap: 0.8rem; }
      .nav-links { gap: 0.8rem; flex-wrap: wrap; justify-content: center; }
      .search-section { flex-direction: column; align-items: stretch; }
      .filter-tabs { justify-content: center; }
      .book-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1.2rem; }
      .main-content { padding: 0 1rem; }
      .most-read-list { grid-template-columns: 1fr; }
      .most-read-section { padding: 1.2rem; }
      .iframe-modal .modal-content { max-height: 90vh; border-radius: 24px; }
      .iframe-modal .modal-content iframe { border-radius: 0 0 24px 24px; }
      .iframe-modal .modal-header { border-radius: 24px 24px 0 0; }
      .footer { padding: 2rem 1.2rem 1rem; }
      .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
      .footer-bottom { flex-direction: column; text-align: center; }
    }

    /* login/signup modals */
    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.2);
      backdrop-filter: blur(20px);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 999;
      opacity: 0;
      pointer-events: none;
      transition: 0.3s;
    }
    .modal-overlay.show {
      opacity: 1;
      pointer-events: auto;
    }
    .modal-box {
      background: rgba(255, 255, 255, 0.8);
      backdrop-filter: blur(40px);
      border-radius: 60px;
      padding: 2.5rem 3rem;
      max-width: 420px;
      width: 90%;
      box-shadow: 0 40px 80px -20px rgba(0,0,0,0.2);
      border: 1px solid rgba(255,255,255,0.4);
      transform: scale(0.94);
      transition: 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
    }
    .modal-overlay.show .modal-box { transform: scale(1); }
    .modal-box h3 {
      font-weight: 700;
      font-size: 1.8rem;
      margin-bottom: 1.2rem;
      color: #0b1e33;
    }
    .modal-box input {
      width: 100%;
      padding: 0.9rem 1.2rem;
      margin: 0.6rem 0;
      border-radius: 60px;
      border: 1px solid rgba(0,0,0,0.04);
      background: rgba(255,255,255,0.6);
      backdrop-filter: blur(4px);
      font-weight: 500;
      outline: none;
      transition: 0.2s;
    }
    .modal-box input:focus {
      border-color: #1e2f44;
      background: white;
      box-shadow: 0 4px 14px rgba(0,20,40,0.06);
    }
    .modal-box .btn-block {
      width: 100%;
      margin-top: 1.2rem;
      padding: 1rem;
      border-radius: 60px;
      background: #1e2f44;
      border: none;
      color: white;
      font-weight: 700;
      font-size: 1rem;
      cursor: pointer;
      transition: 0.2s;
    }
    .modal-box .btn-block:hover { background: #0f1e2f; }
    .modal-close {
      margin-top: 1rem;
      display: block;
      text-align: center;
      color: #4a6a8a;
      cursor: pointer;
      font-weight: 500;
      
    }



/* ============ IFRAME MODAL - NO EXTRA SPACING ============ */
.iframe-modal .modal-content {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 40px;
    overflow: hidden;
    height: 100%;
    max-height: 95vh;
}

body.dark .iframe-modal .modal-content {
    background: #0f1724;
}

/* Modal header - fixed height, no extra spacing */
.iframe-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 40px 40px 0 0;
    flex-shrink: 0;
    min-height: 50px;
}

body.dark .iframe-modal .modal-header {
    background: rgba(20, 30, 48, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.iframe-modal .modal-header span {
    color: #1a2639;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark .iframe-modal .modal-header span {
    color: #d0e0f5;
}

.iframe-modal .modal-header .close-modal {
    background: rgba(0, 0, 0, 0.04);
    border: none;
    color: #1a2639;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0 0.8rem;
    border-radius: 40px;
    transition: all 0.2s;
    font-weight: 300;
    line-height: 1.8;
    flex-shrink: 0;
}

body.dark .iframe-modal .modal-header .close-modal {
    color: #b0c8e8;
    background: rgba(255, 255, 255, 0.04);
}

.iframe-modal .modal-header .close-modal:hover {
    background: rgba(0, 0, 0, 0.08);
    transform: scale(0.96);
}

body.dark .iframe-modal .modal-header .close-modal:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Iframe container - takes all remaining space */
.iframe-modal .iframe-container {
    position: relative;
    flex: 1;
    background: #fff;
    min-height: 0;
    overflow: hidden;
}

body.dark .iframe-modal .iframe-container {
    background: #0f1724;
}

/* Iframe - fills container completely */
.iframe-modal .iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
    opacity: 0;
    transition: opacity 0.5s ease;
}

body.dark .iframe-modal .iframe-container iframe {
    background: #0f1724;
}

.iframe-modal .iframe-container iframe.loaded {
    opacity: 1;
}

/* Loader - centered in container */
.iframe-modal .iframe-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 1.5rem 2.5rem;
    border-radius: 16px;
    backdrop-filter: blur(8px);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.1);
}

body.dark .iframe-modal .iframe-loader {
    background: rgba(15, 23, 36, 0.9);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.3);
}

.iframe-modal .iframe-loader.hidden {
    display: none !important;
}

/* Red Spinner */
.iframe-modal .iframe-loader .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 0, 0, 0.1);
    border-top: 4px solid #ff0000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

body.dark .iframe-modal .iframe-loader .spinner {
    border: 4px solid rgba(255, 0, 0, 0.15);
    border-top: 4px solid #ff3333;
}

.iframe-modal .iframe-loader .loader-text {
    color: #4f6f8f;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

body.dark .iframe-modal .iframe-loader .loader-text {
    color: #8aaacf;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal overlay */
.iframe-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    padding: 1.5rem;
}

.iframe-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.iframe-modal .modal-content {
    width: 100%;
    max-width: 1200px;
    max-height: 85vh;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
    border-radius: 40px;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.3);
}

.iframe-modal.show .modal-content {
    transform: scale(1) translateY(0);
}

/* Responsive */
@media (max-width: 680px) {
    .iframe-modal {
        padding: 0.5rem;
    }
    .iframe-modal .modal-content {
        border-radius: 24px;
        max-height: 95vh;
    }
    .iframe-modal .modal-header {
        border-radius: 24px 24px 0 0;
        padding: 0.4rem 1rem;
        min-height: 44px;
    }
    .iframe-modal .modal-header span {
        font-size: 0.85rem;
    }
    .iframe-modal .modal-header .close-modal {
        font-size: 1.2rem;
        padding: 0 0.6rem;
    }
    .iframe-modal .iframe-loader {
        padding: 1rem 1.5rem;
    }
    .iframe-modal .iframe-loader .spinner {
        width: 32px;
        height: 32px;
    }
    .iframe-modal .iframe-loader .loader-text {
        font-size: 0.75rem;
    }
}


/* ============ AUTH MODAL STYLES ============ */
.auth-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    padding: 1.5rem;
}

.auth-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.auth-modal .modal-content {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-radius: 40px;
    padding: 2.5rem 3rem;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 40px 80px -20px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
    max-height: 90vh;
    overflow-y: auto;
}

body.dark .auth-modal .modal-content {
    background: rgba(25, 40, 60, 0.85);
    border-color: rgba(255,255,255,0.06);
}

.auth-modal.show .modal-content {
    transform: scale(1) translateY(0);
}

.auth-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.auth-modal .modal-header h2 {
    font-weight: 700;
    font-size: 1.8rem;
    color: #0b1e33;
    margin: 0;
}

body.dark .auth-modal .modal-header h2 {
    color: #e8edf5;
}

.auth-modal .modal-close {
    background: rgba(0,0,0,0.04);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4f6f8f;
}

body.dark .auth-modal .modal-close {
    background: rgba(255,255,255,0.04);
    color: #8aaacf;
}

.auth-modal .modal-close:hover {
    background: rgba(0,0,0,0.08);
    transform: rotate(90deg);
}

body.dark .auth-modal .modal-close:hover {
    background: rgba(255,255,255,0.08);
}

.auth-modal .demo-credentials {
    background: rgba(46, 204, 113, 0.06);
    border: 1px solid rgba(46, 204, 113, 0.1);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    margin-bottom: 1.2rem;
    text-align: center;
}

.auth-modal .demo-credentials p {
    font-size: 0.8rem;
    color: #27ae60;
    font-weight: 600;
    margin: 0;
}

body.dark .auth-modal .demo-credentials {
    background: rgba(46, 204, 113, 0.05);
    border-color: rgba(46, 204, 113, 0.08);
}

body.dark .auth-modal .demo-credentials p {
    color: #2ecc71;
}

.auth-modal .demo-credentials code {
    background: rgba(0,0,0,0.04);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #2c3e50;
}

body.dark .auth-modal .demo-credentials code {
    background: rgba(255,255,255,0.06);
    color: #e8edf5;
}

.auth-modal .form-group {
    margin-bottom: 1.2rem;
}

.auth-modal .form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: #1a2639;
    margin-bottom: 0.3rem;
}

body.dark .auth-modal .form-group label {
    color: #e8edf5;
}

.auth-modal .form-group .input-wrapper {
    position: relative;
}

.auth-modal .form-group .input-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #4f6f8f;
}

body.dark .auth-modal .form-group .input-wrapper i {
    color: #8aaacf;
}

.auth-modal .form-group input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.8rem;
    border-radius: 60px;
    border: 1px solid rgba(0,0,0,0.06);
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(4px);
    font-weight: 500;
    outline: none;
    transition: all 0.2s ease;
    color: #1a2639;
}

body.dark .auth-modal .form-group input {
    background: rgba(10, 20, 35, 0.5);
    border-color: rgba(255,255,255,0.06);
    color: #e8edf5;
}

.auth-modal .form-group input:focus {
    border-color: #2b4b6f;
    background: white;
    box-shadow: 0 4px 14px rgba(43, 75, 111, 0.08);
}

body.dark .auth-modal .form-group input:focus {
    border-color: #4a7aaa;
    background: rgba(20, 40, 65, 0.6);
}

.auth-modal .form-group input::placeholder {
    color: #8aa3c0;
}

.auth-modal .form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    font-size: 0.85rem;
}

.auth-modal .form-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #4f6f8f;
}

body.dark .auth-modal .form-options label {
    color: #8aaacf;
}

.auth-modal .form-options a {
    color: #2b4b6f;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

body.dark .auth-modal .form-options a {
    color: #7aa9d9;
}

.auth-modal .form-options a:hover {
    color: #1a3a5a;
}

.auth-modal .btn-auth {
    width: 100%;
    padding: 0.9rem;
    border-radius: 60px;
    background: #1e2f44;
    border: none;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-modal .btn-auth:hover {
    background: #0f1e2f;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -6px rgba(0,20,40,0.3);
}

body.dark .auth-modal .btn-auth {
    background: #2a4a6e;
}

body.dark .auth-modal .btn-auth:hover {
    background: #1f3a57;
}

.auth-modal .auth-footer {
    text-align: center;
    margin-top: 1.2rem;
    font-size: 0.9rem;
    color: #4f6f8f;
}

body.dark .auth-modal .auth-footer {
    color: #8aaacf;
}

.auth-modal .auth-footer a {
    color: #2b4b6f;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
}

body.dark .auth-modal .auth-footer a {
    color: #7aa9d9;
}

.auth-modal .auth-footer a:hover {
    color: #1a3a5a;
}

.auth-modal .password-strength {
    margin-top: 0.3rem;
    font-size: 0.7rem;
}

.auth-modal .password-strength .strength-bar {
    height: 3px;
    border-radius: 4px;
    background: #e0e0e0;
    margin-top: 0.2rem;
    overflow: hidden;
}

.auth-modal .password-strength .strength-bar .fill {
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

@media (max-width: 480px) {
    .auth-modal .modal-content {
        padding: 1.5rem;
        max-width: 100%;
        margin: 1rem;
        border-radius: 28px;
    }
}
