/* ======================================================
   CHAPTER PAGE FINAL APP READER
====================================================== */

.mjv2-chapter-page{
  padding:0;
  margin:0;
  background:#000;
  color:#fff;
  min-height:100vh;
}

.mjv2-chapter-page .mjv2-container{
  width:100%;
  max-width:100%;
  padding-left:0;
  padding-right:0;
}

/* ======================================================
   READER SHELL
====================================================== */

.mjv2-reader-shell{
  position:relative;
  min-height:100vh;
  background:#000;
  overflow-x:hidden;
}

/* ======================================================
   READER LOADER
====================================================== */

.mjv2-reader-loader{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(6,10,18,.88);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:
    opacity .22s ease,
    visibility .22s ease;
}

.mjv2-reader-loader.is-active{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}

.mjv2-reader-loader-box{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:14px;
  padding:20px 24px;
  border-radius:20px;
  background:rgba(16,22,34,.92);
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 12px 32px rgba(0,0,0,.28);
}

.mjv2-reader-loader-spinner{
  width:42px;
  height:42px;
  border-radius:50%;
  border:3px solid rgba(255,255,255,.14);
  border-top-color:var(--mjv2-primary);
  animation:mjv2-reader-spin .8s linear infinite;
}

.mjv2-reader-loader-text{
  font-size:13px;
  line-height:1.4;
  color:var(--mjv2-text);
  font-weight:700;
  letter-spacing:.01em;
}

@keyframes mjv2-reader-spin{
  to{
    transform:rotate(360deg);
  }
}

/* ======================================================
   READER UI BASE
====================================================== */

.mjv2-reader-ui{
  position:fixed;
  left:0;
  width:100%;
  z-index:60;
  pointer-events:none;
  transition:
    opacity .22s ease,
    transform .22s ease;
}

.mjv2-reader-ui > *{
  pointer-events:auto;
}

.mjv2-chapter-page.is-ui-hidden .mjv2-reader-ui-top{
  opacity:0;
  transform:translateY(-14px);
}

.mjv2-chapter-page.is-ui-hidden .mjv2-reader-ui-bottom{
  opacity:0;
  transform:translateY(14px);
}

/* ======================================================
   TOP UI
====================================================== */

.mjv2-reader-ui-top{
  top:0;
  padding:12px 12px 8px;
  background:linear-gradient(180deg, rgba(0,0,0,.84), rgba(0,0,0,.46), rgba(0,0,0,0));
}

.mjv2-reader-ui-bar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.mjv2-reader-top-left{
  min-width:0;
  flex:1 1 auto;
  display:flex;
  align-items:flex-start;
  gap:10px;
}

.mjv2-reader-back{
  width:42px;
  height:42px;
  flex:0 0 42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  text-decoration:none;
  color:#fff;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.08);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  box-shadow:0 8px 20px rgba(0,0,0,.22);
  transition:
    background .16s ease,
    transform .16s ease,
    border-color .16s ease,
    color .16s ease;
}

.mjv2-reader-back:hover{
  background:rgba(255,255,255,.12);
  transform:translateY(-1px);
}

.mjv2-reader-back-icon{
  width:20px;
  height:20px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:inherit;
}

.mjv2-reader-back-icon svg{
  width:20px;
  height:20px;
  display:block;
  stroke:currentColor;
}

.mjv2-reader-title-group{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
  padding-top:2px;
}

.mjv2-reader-manga-title{
  font-size:15px;
  font-weight:800;
  line-height:1.25;
  color:#fff;
  display:-webkit-box;
  -webkit-line-clamp:1;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.mjv2-reader-chapter-title{
  font-size:12px;
  line-height:1.35;
  color:rgba(255,255,255,.72);
  display:-webkit-box;
  -webkit-line-clamp:1;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.mjv2-reader-top-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex:0 0 auto;
}

.mjv2-reader-icon-btn{
  width:42px;
  height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.08);
  color:#fff;
  text-decoration:none;
  cursor:pointer;
  box-shadow:0 8px 20px rgba(0,0,0,.22);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  transition:
    background .16s ease,
    transform .16s ease,
    border-color .16s ease,
    color .16s ease,
    box-shadow .16s ease;
}

.mjv2-reader-icon-btn:hover{
  background:rgba(255,255,255,.12);
  transform:translateY(-1px);
}

.mjv2-reader-icon-btn.is-bookmarked{
  background:linear-gradient(135deg,var(--mjv2-primary),var(--mjv2-primary-2));
  color:#08111f;
  border-color:transparent;
  box-shadow:0 10px 22px rgba(42,171,238,.22);
}

.mjv2-reader-icon{
  width:20px;
  height:20px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:inherit;
  position:relative;
}

.mjv2-reader-icon svg{
  width:20px;
  height:20px;
  display:block;
  stroke:currentColor;
}

.mjv2-reader-icon-bookmark{
  width:20px;
  height:20px;
}

.mjv2-reader-icon-bookmark svg{
  width:20px;
  height:20px;
  display:block;
}

.mjv2-reader-bookmark-outline{
  opacity:1;
  transform:scale(1);
  transition:opacity .16s ease, transform .16s ease;
}

.mjv2-reader-bookmark-filled{
  position:absolute;
  inset:0;
  opacity:0;
  transform:scale(.88);
  transition:opacity .16s ease, transform .16s ease;
  color:inherit;
}

.mjv2-reader-icon-btn.is-bookmarked .mjv2-reader-bookmark-outline{
  opacity:0;
  transform:scale(.88);
}

.mjv2-reader-icon-btn.is-bookmarked .mjv2-reader-bookmark-filled{
  opacity:1;
  transform:scale(1);
}

/* ======================================================
   PROGRESS
====================================================== */

.mjv2-reader-progressbar-wrap{
  margin-top:10px;
  display:flex;
  align-items:center;
  gap:10px;
}

.mjv2-reader-progressbar{
  flex:1 1 auto;
  height:6px;
  border-radius:999px;
  overflow:hidden;
  background:rgba(255,255,255,.12);
  box-shadow:inset 0 1px 2px rgba(0,0,0,.2);
}

.mjv2-reader-progressbar-fill{
  display:block;
  width:0%;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,var(--mjv2-primary),var(--mjv2-primary-2));
  transition:width .18s ease;
}

.mjv2-reader-progress-text{
  flex:0 0 auto;
  min-width:62px;
  text-align:right;
  font-size:12px;
  font-weight:800;
  line-height:1;
  color:rgba(255,255,255,.84);
}

/* ======================================================
   READER STAGE
====================================================== */

.mjv2-reader-stage{
  position:relative;
  z-index:1;
  width:100%;
  min-height:100vh;
  background:#000;
  padding-top:86px;
  padding-bottom:108px;
}

.mjv2-reader-images{
  width:100%;
  max-width:980px;
  margin:0 auto;
  display:block;
  background:#000;
}

.mjv2-page-image-wrap{
  position:relative;
  width:100%;
  margin:0;
  padding:0;
  display:block;
  line-height:0;
  background:#000;
}

.mjv2-page-image{
  display:block;
  width:100%;
  height:auto;
  margin:0;
  padding:0;
  border:0;
  vertical-align:bottom;
  background:#000;
  image-rendering:auto;
}

.mjv2-reader-images img{
  display:block;
  vertical-align:bottom;
}

.mjv2-page-image.is-load-failed{
  opacity:.72;
}

/* ======================================================
   EMPTY STATE
====================================================== */

.mjv2-reader-stage .mjv2-empty-state{
  max-width:720px;
  margin:24px auto 0;
}

/* ======================================================
   BOTTOM UI - APP DOCK
====================================================== */

.mjv2-reader-ui-bottom{
  bottom:0;
  padding:8px 12px 12px;
  background:linear-gradient(0deg, rgba(0,0,0,.88), rgba(0,0,0,.48), rgba(0,0,0,0));
}

.mjv2-reader-bottom-dock{
  width:calc(100% - 4px);
  max-width:720px;
  margin:0 auto;
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:10px;
  padding:10px;
  border-radius:26px;
  background:linear-gradient(180deg, rgba(8,15,32,.96), rgba(5,10,24,.96));
  border:1px solid rgba(255,255,255,.06);
  box-shadow:
    0 10px 30px rgba(0,0,0,.32),
    0 0 0 1px rgba(255,255,255,.03) inset;
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
}

.mjv2-reader-dock-btn{
  min-width:0;
  min-height:62px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 8px;
  border-radius:20px;
  text-decoration:none;
  color:rgba(255,255,255,.84);
  background:linear-gradient(180deg, rgba(12,20,40,.98), rgba(8,14,30,.98));
  border:1px solid rgba(255,255,255,.06);
  box-shadow:
    0 8px 20px rgba(0,0,0,.20),
    inset 0 1px 0 rgba(255,255,255,.03);
  transition:
    transform .18s ease,
    background .18s ease,
    border-color .18s ease,
    color .18s ease,
    box-shadow .18s ease;
}

.mjv2-reader-dock-btn:hover{
  color:#fff;
  transform:translateY(-1px);
  border-color:rgba(255,255,255,.10);
}

.mjv2-reader-dock-btn.is-active{
  color:#08111f;
  background:linear-gradient(135deg,var(--mjv2-primary),var(--mjv2-primary-2));
  border-color:transparent;
  box-shadow:
    0 10px 24px rgba(56,189,248,.24),
    0 0 20px rgba(56,189,248,.14);
}

.mjv2-reader-dock-btn.is-disabled{
  opacity:.38;
  pointer-events:none;
  box-shadow:none;
}

.mjv2-reader-dock-btn-icon{
  width:22px;
  height:22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:inherit;
}

.mjv2-reader-dock-btn-icon svg{
  width:22px;
  height:22px;
  display:block;
  stroke:currentColor;
}

/* ======================================================
   DESKTOP
====================================================== */

@media (min-width:981px){
  .mjv2-reader-ui-top{
    padding-left:18px;
    padding-right:18px;
  }

  .mjv2-reader-ui-bottom{
    padding-left:18px;
    padding-right:18px;
  }

  .mjv2-reader-images{
    border-radius:0;
    overflow:visible;
    box-shadow:none;
  }
}

/* ======================================================
   TABLET
====================================================== */

@media (max-width:900px){
  .mjv2-reader-stage{
    padding-top:82px;
    padding-bottom:104px;
  }

  .mjv2-reader-manga-title{
    font-size:14px;
  }

  .mjv2-reader-bottom-dock{
    gap:8px;
    padding:9px;
    border-radius:24px;
  }

  .mjv2-reader-dock-btn{
    min-height:58px;
    border-radius:18px;
  }
}

/* ======================================================
   MOBILE
====================================================== */

@media (max-width:700px){
  .mjv2-reader-ui-top{
    padding:10px 10px 8px;
  }

  .mjv2-reader-ui-bottom{
    padding:8px 10px 10px;
  }

  .mjv2-reader-back,
  .mjv2-reader-icon-btn{
    width:40px;
    height:40px;
    flex-basis:40px;
  }

  .mjv2-reader-back-icon,
  .mjv2-reader-icon,
  .mjv2-reader-icon-bookmark{
    width:18px;
    height:18px;
  }

  .mjv2-reader-back-icon svg,
  .mjv2-reader-icon svg,
  .mjv2-reader-icon-bookmark svg{
    width:18px;
    height:18px;
  }

  .mjv2-reader-title-group{
    padding-top:1px;
  }

  .mjv2-reader-manga-title{
    font-size:13px;
  }

  .mjv2-reader-chapter-title{
    font-size:11px;
  }

  .mjv2-reader-progressbar-wrap{
    gap:8px;
    margin-top:8px;
  }

  .mjv2-reader-progress-text{
    min-width:56px;
    font-size:11px;
  }

  .mjv2-reader-stage{
    padding-top:78px;
    padding-bottom:98px;
  }

  .mjv2-reader-bottom-dock{
    width:100%;
    gap:8px;
    padding:8px;
    border-radius:22px;
  }

  .mjv2-reader-dock-btn{
    min-height:54px;
    padding:8px 6px;
    border-radius:18px;
  }

  .mjv2-reader-dock-btn-icon{
    width:20px;
    height:20px;
  }

  .mjv2-reader-dock-btn-icon svg{
    width:20px;
    height:20px;
  }

  .mjv2-reader-loader-box{
    padding:18px 20px;
    border-radius:18px;
  }

  .mjv2-reader-loader-spinner{
    width:38px;
    height:38px;
  }

  .mjv2-reader-loader-text{
    font-size:12px;
  }
}

/* ======================================================
   SMALL MOBILE
====================================================== */

@media (max-width:480px){
  .mjv2-reader-ui-top{
    padding:8px 8px 6px;
  }

  .mjv2-reader-ui-bottom{
    padding:6px 8px 8px;
  }

  .mjv2-reader-back,
  .mjv2-reader-icon-btn{
    width:38px;
    height:38px;
    flex-basis:38px;
  }

  .mjv2-reader-back-icon,
  .mjv2-reader-icon,
  .mjv2-reader-icon-bookmark{
    width:17px;
    height:17px;
  }

  .mjv2-reader-back-icon svg,
  .mjv2-reader-icon svg,
  .mjv2-reader-icon-bookmark svg{
    width:17px;
    height:17px;
  }

  .mjv2-reader-manga-title{
    font-size:12px;
  }

  .mjv2-reader-chapter-title{
    font-size:10px;
  }

  .mjv2-reader-progressbar{
    height:5px;
  }

  .mjv2-reader-progress-text{
    min-width:50px;
    font-size:10px;
  }

  .mjv2-reader-stage{
    padding-top:74px;
    padding-bottom:92px;
  }

  .mjv2-reader-bottom-dock{
    gap:7px;
    padding:7px;
    border-radius:20px;
  }

  .mjv2-reader-dock-btn{
    min-height:50px;
    border-radius:16px;
  }

  .mjv2-reader-dock-btn-icon{
    width:18px;
    height:18px;
  }

  .mjv2-reader-dock-btn-icon svg{
    width:18px;
    height:18px;
  }

  .mjv2-reader-loader-box{
    gap:12px;
    padding:16px 18px;
    border-radius:16px;
  }

  .mjv2-reader-loader-spinner{
    width:34px;
    height:34px;
    border-width:3px;
  }

  .mjv2-reader-loader-text{
    font-size:11px;
  }
}

/* ======================================================
   ULTRA SMALL
====================================================== */

@media (max-width:360px){
  .mjv2-reader-bottom-dock{
    gap:6px;
    padding:6px;
  }

  .mjv2-reader-dock-btn{
    min-height:46px;
    border-radius:15px;
  }

  .mjv2-reader-dock-btn-icon{
    width:17px;
    height:17px;
  }

  .mjv2-reader-dock-btn-icon svg{
    width:17px;
    height:17px;
  }
}