/* ==========================================================================
   ISLAMI COMICS - MY LIBRARY STYLESHEET (css/my-library.css)
   Personal Reader Library & Saved Collections
   ========================================================================== */

:root {
  --brand-green: #1a4332;
  --brand-green-dark: #122d22;
  --brand-green-light: #2d6a4f;
  --brand-green-soft: #eaf3ed;
  --brand-gold: #d4973b;
  --brand-gold-soft: #fcf6eb;
  
  --bg-page: #f8f6f0;
  --bg-card: #ffffff;
  --bg-subtle: #f0eae1;
  --bg-subtle-hover: #e6dfd3;
  
  --text-dark: #18221b;
  --text-muted: #57655c;
  --text-subtle: #87968e;
  
  --border-color: #e5dec9;
  --border-subtle: #efe9dc;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ==========================================================================
   TOP HEADER NAVBAR
   ========================================================================== */
.comics-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.comics-header-inner {
  max-width: 1480px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--text-dark);
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s ease;
  border: 1px solid var(--border-color);
}

.btn-home:hover {
  background: var(--bg-subtle-hover);
  color: var(--brand-green);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-green), #245840);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  border: 1.5px solid var(--brand-gold);
  box-shadow: 0 2px 6px rgba(26, 67, 50, 0.2);
}

.brand-text-wrap h1 {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.4px;
  color: var(--brand-green);
  line-height: 1.1;
}

.brand-text-wrap h1 span {
  color: var(--brand-gold);
}

.brand-tagline {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
}

/* Search Bar */
.header-center {
  flex: 1;
  max-width: 480px;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-subtle);
  font-size: 13px;
  pointer-events: none;
}

.search-shortcut-badge {
  position: absolute;
  right: 14px;
  color: var(--text-subtle);
  font-size: 11px;
  font-weight: 700;
  background: var(--bg-subtle);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.search-input {
  width: 100%;
  padding: 9px 40px 9px 38px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: #fdfbf7;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dark);
  outline: none;
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: var(--brand-green);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(26, 67, 50, 0.08);
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.nav-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  transition: all 0.2s;
}

.nav-link-btn:hover, .nav-link-btn.active {
  color: var(--brand-green);
  background: var(--bg-subtle);
}

.btn-studio-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  background: #edf6f0;
  color: var(--brand-green);
  border: 1px solid #c9e2d5;
  font-size: 13px;
  font-weight: 800;
  transition: all 0.2s;
}

.btn-studio-header:hover {
  background: #d8ebd0;
}

.notif-bell-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-dark);
  transition: all 0.2s;
}

.notif-bell-btn:hover {
  background: var(--bg-subtle-hover);
}

.notif-badge-pill {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* User Profile & Dropdown Popup */
.user-profile-wrapper {
  position: relative;
}

.user-profile-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.user-profile-btn:hover {
  background: var(--bg-subtle);
}

.user-profile-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-green);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--brand-gold);
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 200;
  animation: dropPop 0.15s ease-out;
}

.user-dropdown-menu.open {
  display: flex;
}

@keyframes dropPop {
  0% { opacity: 0; transform: translateY(-6px); }
  100% { opacity: 1; transform: translateY(0); }
}

.dropdown-header-info {
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 4px;
}

.dropdown-user-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--brand-green);
}

.dropdown-user-email {
  font-size: 11px;
  color: var(--text-muted);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dark);
  transition: all 0.2s;
}

.dropdown-item:hover {
  background: var(--brand-green-soft);
  color: var(--brand-green);
}

.dropdown-item i {
  font-size: 13px;
  width: 16px;
  color: var(--text-muted);
}

.dropdown-item:hover i {
  color: var(--brand-green);
}

/* ==========================================================================
   2. MAIN 2-COLUMN LAYOUT (Left Sidebar & Right Content)
   ========================================================================== */
.library-main-layout {
  max-width: 1480px;
  margin: 0 auto;
  padding: 24px 24px 60px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  align-items: start;
}

/* Left Sidebar */
.library-sidebar {
  position: sticky;
  top: 76px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-nav-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-group-title {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 6px;
  padding-left: 10px;
}

.sidebar-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  transition: all 0.2s ease;
  width: 100%;
}

.sidebar-menu-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-menu-item i {
  font-size: 14px;
  width: 18px;
  text-align: center;
  color: var(--text-muted);
}

.sidebar-menu-item:hover {
  background: var(--bg-subtle);
  color: var(--brand-green);
}

.sidebar-menu-item:hover i {
  color: var(--brand-green);
}

.sidebar-menu-item.active {
  background: var(--brand-green);
  color: #fff;
  font-weight: 800;
}

.sidebar-menu-item.active i {
  color: #fff;
}

.collection-count-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-subtle);
}

.btn-new-collection {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-color);
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-green);
  background: #fff;
  margin-bottom: 6px;
  transition: all 0.2s;
}

.btn-new-collection:hover {
  background: var(--brand-green-soft);
  border-color: var(--brand-green);
}

/* Sidebar Bottom: Read Anywhere Promo Card */
.sidebar-promo-card {
  background: linear-gradient(135deg, #fffdfa 0%, #f5efe4 100%);
  border: 1px solid #e7dbca;
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}

.promo-title {
  font-size: 12px;
  font-weight: 900;
  color: var(--brand-green);
}

.promo-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
}

.promo-img-wrap {
  width: 100%;
  height: 110px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  background: #f0e6d6;
}

.promo-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn-promo-app {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: var(--brand-green);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 800;
  transition: all 0.2s;
}

.btn-promo-app:hover {
  background: var(--brand-green-light);
}

/* ==========================================================================
   3. RIGHT LIBRARY CONTENT
   ========================================================================== */
.library-content-main {
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-width: 0;
}

/* Top Header & 4 Stat Badges */
.library-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.library-title-group h2 {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.6px;
  color: var(--brand-green);
}

.library-title-group p {
  font-size: 13px;
  color: var(--text-muted);
}

.library-stats-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 10px 16px;
  box-shadow: var(--shadow-sm);
}

.stat-item-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
}

.stat-item-cell:not(:last-child) {
  border-right: 1px solid var(--border-subtle);
  padding-right: 16px;
}

.stat-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-subtle);
  color: var(--brand-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.stat-icon-wrap.flame { color: #ea580c; background: #ffedd5; }
.stat-icon-wrap.trophy { color: #d97706; background: #fef3c7; }

.stat-info-wrap {
  display: flex;
  flex-direction: column;
}

.stat-val-text {
  font-size: 15px;
  font-weight: 900;
  color: var(--text-dark);
  line-height: 1.1;
}

.stat-label-text {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

/* ==========================================================================
   SECTION 1: CONTINUE READING (5 Cards)
   ========================================================================== */
.library-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lib-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lib-section-title {
  font-size: 15px;
  font-weight: 900;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.lib-view-all {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-gold);
}

.lib-view-all:hover {
  color: var(--brand-green);
}

.continue-reading-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.reading-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all 0.25s ease;
}

.reading-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-gold);
  box-shadow: var(--shadow-md);
}

.reading-card-cover {
  position: relative;
  height: 150px;
  overflow: hidden;
  background-color: #121815;
}

.reading-card-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.reading-card:hover .reading-card-cover img {
  transform: scale(1.06);
}

.reading-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 16, 13, 0.9) 0%, rgba(10, 16, 13, 0.1) 50%, rgba(10, 16, 13, 0.4) 100%);
}

.reading-chapter-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  z-index: 2;
}

.reading-title-overlay {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 60px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  z-index: 2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.reading-progress-footer {
  position: absolute;
  bottom: 6px;
  left: 8px;
  right: 8px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.reading-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  font-weight: 800;
  color: #f3f4f6;
}

.reading-progress-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
}

.reading-progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--brand-green);
}

.reading-card-body {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reading-card-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reading-card-author {
  font-size: 10px;
  color: var(--text-muted);
}

/* ==========================================================================
   SECTION 2: PURCHASED COMICS (6 Cards)
   ========================================================================== */
.purchased-grid-6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.purchased-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all 0.2s ease;
}

.purchased-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand-gold);
}

.purchased-thumb {
  position: relative;
  height: 80px;
  overflow: hidden;
  background-color: #121815;
}

.purchased-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.purchased-thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 16, 13, 0.85) 0%, rgba(10, 16, 13, 0.1) 60%, rgba(10, 16, 13, 0.35) 100%);
}

.purchased-title-on-thumb {
  position: absolute;
  inset: 0;
  padding: 6px 8px;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.purchased-download-icon {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  z-index: 3;
}

.purchased-download-icon.done {
  background: var(--brand-green);
}

.purchased-card-body {
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
}

.purchased-rating {
  font-weight: 700;
  color: var(--text-dark);
}

.purchased-rating i {
  color: #f59e0b;
}

.purchased-price {
  font-weight: 800;
  color: var(--brand-green);
}

/* ==========================================================================
   SECTION 3: BOTTOM 3-COLUMN MODULES (Bookmarks, Free, Completed)
   ========================================================================== */
.library-bottom-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.lib-module-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.lib-module-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
}

.lib-module-title {
  font-size: 13px;
  font-weight: 900;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 6px;
}

.lib-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  cursor: pointer;
  transition: all 0.2s;
}

.lib-item-row:hover {
  transform: translateX(3px);
}

.lib-item-thumb-sm {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #111;
}

.lib-item-thumb-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lib-item-info {
  flex: 1;
  min-width: 0;
}

.lib-item-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lib-item-meta {
  font-size: 10px;
  color: var(--text-muted);
}

.btn-read-sm {
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--brand-green);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  transition: all 0.2s;
}

.btn-read-sm:hover {
  background: var(--brand-green-light);
}

.icon-completed-check {
  color: #10b981;
  font-size: 15px;
}

.icon-bookmark-active {
  color: #10b981;
  font-size: 14px;
}

/* ==========================================================================
   MODAL DIALOGS (Reader)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 16, 13, 0.78);
  backdrop-filter: blur(8px);
  z-index: 999;
  display: none !important;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  display: flex !important;
  opacity: 1;
  pointer-events: auto;
}

.modal-window {
  background: #ffffff;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 780px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  position: relative;
}

.modal-window.dark {
  background: #121815;
  color: #fff;
  border: 1px solid rgba(212, 151, 59, 0.3);
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-window.dark .modal-header {
  border-color: rgba(255, 255, 255, 0.1);
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-header-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--brand-green-soft);
  color: var(--brand-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.modal-window.dark .modal-header-icon {
  background: rgba(212, 151, 59, 0.2);
  color: var(--brand-gold);
}

.modal-h3 {
  font-size: 16px;
  font-weight: 800;
}

.modal-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.modal-window.dark .modal-sub {
  color: #9eb1a8;
}

.btn-close-modal {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s;
}

.modal-window.dark .btn-close-modal {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.reader-canvas {
  height: 340px;
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.reader-dialogue-box {
  background: rgba(14, 22, 18, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 151, 59, 0.4);
  border-radius: var(--radius-md);
  padding: 16px;
  color: #fff;
}

.reader-dialogue-text {
  font-size: 14px;
  font-weight: 700;
  color: #f7ca97;
  margin-bottom: 6px;
}

.reader-narration-text {
  font-size: 12px;
  color: #e5ede9;
}

.reader-footer-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
}

.btn-reader-nav {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s;
}

/* ==========================================================================
   MOBILE-ONLY COMPONENTS & RESPONSIVE DESIGN (Mockup 12)
   ========================================================================== */
.mobile-menu-btn {
  display: none;
  font-size: 20px;
  color: var(--text-dark);
  padding: 4px;
}

.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
  z-index: 990;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
}

.mob-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
  flex: 1;
  height: 100%;
  transition: all 0.2s;
}

.mob-nav-item i {
  font-size: 16px;
}

.mob-nav-item.active {
  color: var(--brand-green);
  font-weight: 900;
}

.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100%;
  background: #ffffff;
  z-index: 999;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.mobile-drawer.active {
  left: 0;
}

.mobile-promo-banner {
  display: none;
  background: linear-gradient(135deg, #1a4332 0%, #245840 100%);
  border-radius: var(--radius-md);
  padding: 16px;
  color: #fff;
  margin-top: 20px;
  position: relative;
  overflow: hidden;
}

.mobile-promo-banner::after {
  content: '';
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(212, 151, 59, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

@media (max-width: 1200px) {
  .continue-reading-grid-5 {
    grid-template-columns: repeat(3, 1fr);
  }
  .purchased-grid-6 {
    grid-template-columns: repeat(3, 1fr);
  }
  .library-bottom-grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
  }

  body {
    padding-bottom: 65px;
  }

  .comics-header {
    width: 100% !important;
    max-width: 100vw !important;
    overflow: hidden !important;
  }

  .comics-header-inner {
    padding: 8px 10px;
    gap: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .header-left {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex-shrink: 1;
  }

  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #1a4332;
    padding: 4px 2px;
    background: none;
    border: none;
    flex-shrink: 0;
  }

  .brand-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
  }

  .btn-home, .header-center, .header-right .nav-link-btn {
    display: none;
  }

  .brand-icon {
    width: 26px;
    height: 26px;
    font-size: 12px;
    flex-shrink: 0;
  }

  .brand-text-wrap {
    min-width: 0;
  }

  .brand-text-wrap h1 {
    font-size: 12px;
    white-space: nowrap;
    line-height: 1.1;
  }

  .brand-tagline {
    display: none;
  }

  .header-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
  }

  .mobile-search-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    background: #f4f6f5 !important;
    color: #4b5563 !important;
    font-size: 11px !important;
    border: none;
    flex-shrink: 0;
  }

  .btn-studio-header {
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    padding: 4px 8px !important;
    border-radius: 999px !important;
    background: #eaf5ee !important;
    color: #166534 !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    border: 1px solid #bbf7d0 !important;
    flex-shrink: 0;
  }

  .notif-bell-btn {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    background: #fef3c7 !important;
    color: #b45309 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px !important;
    flex-shrink: 0;
  }

  .user-profile-btn {
    display: flex !important;
    align-items: center !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    flex-shrink: 0;
  }

  .user-profile-btn i {
    display: none !important;
  }

  .user-profile-avatar {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    border: 1.5px solid #d4cca8 !important;
    overflow: hidden !important;
    flex-shrink: 0;
  }

  .mobile-bottom-nav {
    display: flex;
  }

  .library-main-layout {
    display: block;
    padding: 12px 14px;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .library-sidebar {
    display: none;
  }

  .library-head-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    text-align: left !important;
    gap: 12px;
    margin-bottom: 20px;
    width: 100% !important;
  }

  .library-title-group {
    text-align: left !important;
    align-items: flex-start !important;
    width: 100% !important;
  }

  .library-title-group h2 {
    font-size: 24px !important;
    font-weight: 900 !important;
    color: #1a4332 !important;
    text-align: left !important;
    margin-bottom: 2px !important;
  }

  .library-title-group p {
    font-size: 13px !important;
    color: #64748b !important;
    text-align: left !important;
  }

  .library-stats-bar {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
    padding: 14px 12px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
    width: 100% !important;
  }

  .stat-item-cell {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 0 2px !important;
    gap: 3px !important;
    border-right: none !important;
  }

  .stat-icon-wrap {
    width: 28px !important;
    height: 28px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
    margin-bottom: 2px !important;
  }

  .stat-val-text {
    font-size: 16px !important;
    font-weight: 900 !important;
    color: #111827 !important;
    line-height: 1.1 !important;
  }

  .stat-label-text {
    font-size: 9px !important;
    font-weight: 700 !important;
    color: #4b5563 !important;
    white-space: nowrap !important;
  }

  .stat-info-wrap span:last-child {
    font-size: 8px !important;
    color: #9ca3af !important;
    white-space: nowrap !important;
  }

  .reading-card-author-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2px;
  }

  .card-dots-btn {
    color: var(--text-muted);
    font-size: 11px;
    cursor: pointer;
  }

  .continue-reading-grid-5, .purchased-grid-6 {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 8px;
    gap: 14px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .continue-reading-grid-5::-webkit-scrollbar, .purchased-grid-6::-webkit-scrollbar {
    display: none;
  }

  .continue-reading-grid-5 .reading-card, .continue-reading-grid-5 .continue-reading-card {
    width: 160px !important;
    min-width: 160px !important;
    max-width: 160px !important;
    flex: 0 0 160px !important;
  }

  .purchased-grid-6 .purchased-card, .purchased-grid-6 .purchased-comic-card {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    flex: 0 0 150px !important;
  }

  .reading-card-cover {
    height: 195px !important;
  }

  .purchased-card-cover {
    height: 195px !important;
  }

  .library-bottom-grid-3 {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .mobile-promo-banner {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
}




