/* ===== MangaVerse — MangaDex-inspired theme ===== */
:root {
  --bg:          #1c1c1f;   /* asosiy fon (MangaDex dark) */
  --bg-2:        #18181b;
  --surface:     #26262b;   /* panellar */
  --surface-2:   #2f2f35;
  --surface-3:   #3a3a42;
  --border:      #333339;
  --border-soft: #2a2a30;
  --text:        #f4f4f5;
  --text-dim:    #b5b5bd;
  --text-mute:   #828289;
  --accent:      #ff6740;   /* MangaDex orange */
  --accent-2:    #ff8a63;
  --accent-soft: rgba(255, 103, 64, 0.16);
  --green:       #5dd6a0;
  --radius:      6px;
  --radius-lg:   10px;
  --shadow:      0 8px 30px rgba(0,0,0,.5);
  --nav-h:       58px;
  --side-w:      250px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 78px; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #45454e; }

/* ===== Buttons ===== */
.btn-primary {
  background: var(--accent);
  color: #fff; border: none; border-radius: var(--radius);
  padding: 8px 16px; font-weight: 700; font-size: 14px;
  cursor: pointer; transition: filter .15s, transform .15s;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost {
  background: rgba(255,255,255,.06); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 8px 16px; font-weight: 600; font-size: 14px; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--accent); }
.btn-primary.lg, .btn-ghost.lg { padding: 11px 22px; font-size: 15px; }

.icon-btn {
  background: transparent; border: none; color: var(--text-dim);
  cursor: pointer; display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: var(--radius); transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* ===== Navbar ===== */
.navbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 18px;
  background: rgba(24,24,27,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-left { display: flex; align-items: center; gap: 8px; }
.brand { display: flex; align-items: center; }
.brand img { transition: transform .2s; }
.brand:hover img { transform: scale(1.04); }

.nav-search {
  flex: 1; max-width: 480px; position: relative;
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0 12px; height: 40px;
  transition: border-color .15s, box-shadow .15s;
}
.nav-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-ico { color: var(--text-mute); flex-shrink: 0; }
.nav-search input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-size: 14px;
}
.nav-search input::placeholder { color: var(--text-mute); }

.nav-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* Mobil-only elementlar desktopda yashirin */
.search-open, .search-close, .side-header { display: none; }

/* ===== Layout shell ===== */
.shell { display: flex; align-items: flex-start; }

/* ===== Sidebar (doimiy desktopda) ===== */
.sidebar {
  position: sticky; top: var(--nav-h);
  flex-shrink: 0;
  display: flex; flex-direction: column;
  width: var(--side-w); height: calc(100vh - var(--nav-h));
  padding: 14px 10px; overflow-y: auto;
  background: var(--bg-2); border-right: 1px solid var(--border);
}
.side-link {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 14px; border-radius: var(--radius);
  color: var(--text-dim); font-weight: 600; font-size: 16px;
  transition: background .15s, color .15s;
}
.side-link .ico { width: 24px; font-size: 19px; text-align: center; flex-shrink: 0; }
.side-link:hover { background: var(--surface-2); color: var(--text); }
.side-link.active { background: var(--accent-soft); color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.side-divider { height: 1px; background: var(--border); margin: 12px 8px; }
.side-group { display: flex; flex-direction: column; gap: 4px; }

/* Sidebar ijtimoiy tarmoqlar (eng pastda) */
.side-social { margin-top: auto; padding: 16px 8px 6px; border-top: 1px solid var(--border); }
.side-social-label {
  display: block; font-size: 12px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--text-mute);
  margin-bottom: 12px; padding-left: 6px;
}
.side-social-icons { display: flex; gap: 10px; }
.social-btn {
  display: grid; place-items: center; width: 42px; height: 42px;
  border-radius: 12px; color: var(--text-dim);
  background: var(--surface-2); border: 1px solid var(--border);
  transition: transform .15s, background .15s, color .15s, border-color .15s;
}
.social-btn:hover { transform: translateY(-2px); color: #fff; }
.social-btn.tg:hover { background: #229ED9; border-color: #229ED9; }
.social-btn.ig:hover {
  background: linear-gradient(45deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5);
  border-color: transparent;
}
.menu-toggle { display: grid; }

.overlay {
  position: fixed; inset: 0; z-index: 55; background: rgba(0,0,0,.6);
  opacity: 0; visibility: hidden; transition: opacity .25s;
}
.overlay.show { opacity: 1; visibility: visible; }

/* ===== Main ===== */
.main { flex: 1; min-width: 0; }
.container { max-width: 1340px; margin: 0 auto; padding: 26px 30px 70px; }

/* ===== Home view (banner full-bleed) ===== */
.home { display: block; }
.home-body { /* container rules already applied */ padding-top: 0; }

/* ===== Featured carousel (Popular New Titles) — full width fon, kontent markazlangan ===== */
.featured { margin-bottom: 38px; }
.feat-head {
  position: absolute; top: 0; left: 0; right: 0; z-index: 6;
}
.feat-head-inner {
  max-width: 1340px; margin: 0 auto; padding: 18px 30px;
  display: flex; align-items: center; justify-content: space-between;
}
.feat-head h2 {
  font-size: 23px; font-weight: 800; display: flex; align-items: center; gap: 10px;
  text-shadow: 0 2px 12px rgba(0,0,0,.7);
}
.feat-nav { display: flex; gap: 8px; }
.feat-nav button {
  width: 36px; height: 36px; border-radius: var(--radius);
  background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.18); color: #fff;
  cursor: pointer; display: grid; place-items: center; transition: all .15s; backdrop-filter: blur(4px);
}
.feat-nav button:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.carousel { position: relative; border-radius: 0; overflow: hidden; min-height: 480px; box-shadow: none; }
.carousel-track { display: flex; transition: transform .5s cubic-bezier(.4,0,.2,1); }
.slide {
  position: relative; flex: 0 0 100%;
  min-height: 480px; display: flex; align-items: center;
  padding: 0; overflow: hidden;
}
/* Pastki qism fonga to'liq erib birlashadi (faqat pastda, interfeys foni rangi) */
.slide::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 150px; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg,
    rgba(28,28,31,0) 0%,
    rgba(28,28,31,.55) 45%,
    rgba(28,28,31,.92) 78%,
    var(--bg) 100%);
}
.slide-inner {
  position: relative; z-index: 2;
  width: 100%; max-width: 1340px; margin: 0 auto;
  padding: 72px 30px 92px;
  display: flex; align-items: center; gap: 36px;
}
.slide-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  filter: blur(2.6px) saturate(1.2) brightness(1.12); transform: scale(1.25); opacity: .72;
}
.slide::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(20,20,23,.82) 0%, rgba(20,20,23,.55) 50%, rgba(20,20,23,.3) 100%);
}
.slide-cover {
  position: relative; z-index: 2; flex-shrink: 0;
  width: 210px; aspect-ratio: 2/3; border-radius: 8px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.55);
}
.slide-cover .cover-art { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 14px; }
.slide-cover .cover-art span { font-weight: 800; font-size: 18px; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.5); }
.slide-info { position: relative; z-index: 2; max-width: 620px; min-width: 0; }
.slide-rank { font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 10px; letter-spacing: .03em; }
.slide-title { font-size: clamp(26px, 3.4vw, 40px); font-weight: 800; line-height: 1.1; margin-bottom: 12px; }
.slide-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.slide-meta { display: flex; flex-wrap: wrap; gap: 18px; font-size: 15px; color: var(--text-dim); margin-bottom: 14px; }
.slide-meta b { color: var(--text); }
.slide-desc {
  color: var(--text-dim); font-size: 16px; line-height: 1.6; margin-bottom: 20px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.slide-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.carousel-dots {
  position: absolute; bottom: 16px; left: 0; right: 0; z-index: 6;
  display: flex; justify-content: center; gap: 7px;
}
.carousel-dots button {
  width: 8px; height: 8px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--surface-3); transition: all .2s;
}
.carousel-dots button.active { background: var(--accent); width: 22px; border-radius: 4px; }

/* ===== Sections ===== */
.section { margin-bottom: 48px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-head h2 { font-size: 23px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.section-head h2::before { content: ""; width: 5px; height: 24px; background: var(--accent); border-radius: 3px; }
.see-all { color: var(--text-dim); font-size: 15px; font-weight: 600; transition: color .15s; }
.see-all:hover { color: var(--accent); }

/* ===== Tags / chips ===== */
.tag {
  display: inline-block; font-size: 12px; font-weight: 600;
  padding: 5px 11px; border-radius: 5px;
  background: var(--surface-2); color: var(--text-dim);
  border: 1px solid var(--border); cursor: pointer; transition: all .15s;
}
.tag:hover { border-color: var(--accent); color: var(--accent); }
.slide-tags .tag { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.16); color: #fff; }

/* ===== Card ===== */
.card { cursor: pointer; display: block; }
.cover {
  position: relative; aspect-ratio: 2 / 3; border-radius: 6px; overflow: hidden;
  background: var(--surface); box-shadow: 0 4px 14px rgba(0,0,0,.4);
  transition: transform .18s, box-shadow .18s;
}
.card:hover .cover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(0,0,0,.55); }
.cover-art { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 14px; }
.cover-art span { font-weight: 800; font-size: 19px; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.5); }
.cover-badge {
  position: absolute; bottom: 7px; left: 7px; z-index: 2;
  background: rgba(0,0,0,.75); backdrop-filter: blur(4px);
  color: #fff; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 5px;
  display: flex; align-items: center; gap: 3px;
}
.cover-type {
  position: absolute; top: 7px; left: 7px; z-index: 2;
  background: var(--accent); color: #fff; font-size: 10px; font-weight: 800;
  padding: 3px 7px; border-radius: 5px; text-transform: uppercase; letter-spacing: .04em;
}
.card-title {
  margin-top: 10px; font-size: 17px; font-weight: 700; color: var(--text); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-sub { font-size: 13px; color: var(--text-mute); margin-top: 4px; }

/* ===== Grid & Row ===== */
.grid {
  display: grid; gap: 32px 22px;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
}
.row-scroll {
  display: grid; grid-auto-flow: column; grid-auto-columns: 236px;
  gap: 20px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory;
}
.row-scroll .card { scroll-snap-align: start; }

/* ===== Latest Updates list (MangaDex uslubi) ===== */
.latest-list {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.lu-item {
  display: flex; gap: 14px; padding: 12px;
  background: var(--surface); border: 1px solid var(--border-soft); border-radius: 10px;
  transition: border-color .15s, background .15s;
}
.lu-item:hover { border-color: var(--accent); background: var(--surface-2); }
.lu-cover {
  position: relative; flex-shrink: 0;
  width: 72px; aspect-ratio: 2/3; border-radius: 5px; overflow: hidden;
}
.lu-cover .cover-art { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 4px; }
.lu-cover .cover-art span { font-weight: 700; font-size: 10px; color: #fff; line-height: 1.15; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.lu-body { flex: 1; min-width: 0; }
.lu-title {
  font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.lu-title:hover { color: var(--accent); }
.lu-chaps { display: flex; flex-direction: column; gap: 4px; }
.lu-chap {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; color: var(--text-dim); padding: 3px 0;
}
.lu-chap .flag { flex-shrink: 0; font-size: 15px; }
.lu-chap .ch-name { color: var(--text); font-weight: 600; flex-shrink: 0; }
.lu-chap .ch-group { color: var(--text-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.lu-chap .ch-time { color: var(--text-mute); flex-shrink: 0; font-size: 12px; }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--border); background: var(--bg-2); }
.footer-inner {
  max-width: 1180px; margin: 0 auto; padding: 38px 26px 22px;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px;
}
.footer-brand p { color: var(--text-mute); font-size: 13px; margin-top: 12px; max-width: 320px; }
.footer-col h4 { font-size: 14px; margin-bottom: 12px; }
.footer-col a { display: block; color: var(--text-dim); font-size: 13px; padding: 4px 0; transition: color .15s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { text-align: center; color: var(--text-mute); font-size: 13px; padding: 18px; border-top: 1px solid var(--border); }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .latest-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .latest-list { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .menu-toggle { display: grid; }
  .sidebar {
    position: fixed; top: 0; left: 0; z-index: 60;
    width: 290px; max-width: 86vw;
    height: 100vh; transform: translateX(-100%); transition: transform .25s ease;
    padding-top: 8px;
  }
  .sidebar.open { transform: translateX(0); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .slide-cover { width: 130px; }
  .feat-head-inner { padding: 14px 22px; }

  /* --- Mobil navbar: ixchamlashtirish --- */
  .navbar { gap: 6px; padding: 0 12px; }
  .nav-left { gap: 4px; }
  .brand img { height: 34px; }
  .nav-right { gap: 4px; }

  /* Inline qidiruv satrini yashirish, o'rniga ikonka tugma */
  .nav-search { display: none; }
  .search-open { display: grid; }

  /* Qidiruv ikonka bosilganda — to'liq kenglikdagi qidiruv paneli */
  .navbar.search-active .nav-search {
    display: flex;
    position: absolute; left: 0; right: 0; top: 0;
    height: var(--nav-h); z-index: 70;
    margin: 0; padding: 0 12px;
    background: var(--bg-2); border: none;
    border-bottom: 1px solid var(--border); border-radius: 0;
    box-shadow: none;
  }
  .navbar.search-active .nav-search input { font-size: 15px; }
  .search-close { display: grid; flex-shrink: 0; }
  .navbar.search-active .nav-search .search-dropdown { left: 8px; right: 8px; }

  /* --- Mobil sidebar header (logo + yopish) --- */
  .side-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 8px 12px 12px; margin-bottom: 4px;
    border-bottom: 1px solid var(--border);
  }
  .side-header .brand img { height: 30px; }
  .side-close { display: grid; color: var(--text); }
  .side-link { font-size: 15px; padding: 12px 14px; }
  .side-link .ico { font-size: 18px; }
}
@media (max-width: 560px) {
  .container { padding: 16px 14px 50px; }
  .nav-search { max-width: none; }

  /* Featured karusel — ixcham, MangaDex mobil uslubi */
  .featured { margin-bottom: 24px; }
  .feat-head-inner { padding: 12px 16px; }
  .feat-head h2 { font-size: 16px; }
  .feat-nav button { width: 30px; height: 30px; }
  .carousel, .slide { min-height: 0; }
  .slide::before { height: 90px; }
  .slide-inner { flex-direction: row; align-items: flex-start; gap: 14px; padding: 52px 16px 60px; text-align: left; }
  .slide-cover { width: 104px; }
  .slide-rank { font-size: 11px; margin-bottom: 6px; }
  .slide-title { font-size: clamp(17px, 5vw, 22px); margin-bottom: 8px; }
  .slide-meta { font-size: 12px; gap: 10px; margin-bottom: 8px; }
  .slide-tags { gap: 5px; margin-bottom: 10px; }
  .slide-tags .tag { font-size: 11px; padding: 3px 8px; }
  .slide-desc { display: none; }
  .slide-actions .btn-primary, .slide-actions .btn-ghost { padding: 8px 14px; font-size: 13px; }

  /* Bo'lim sarlavhalari va kartalar — kichikroq */
  .section { margin-bottom: 30px; }
  .section-head { margin-bottom: 14px; }
  .section-head h2 { font-size: 18px; gap: 8px; }
  .section-head h2::before { height: 19px; width: 4px; }
  .see-all { font-size: 13px; }
  .card-title { font-size: 14px; margin-top: 8px; }
  .card-sub { font-size: 12px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 18px 12px; }
  .row-scroll { grid-auto-columns: 150px; gap: 14px; }

  /* So'nggi yangilanishlar ro'yxati */
  .lu-item { padding: 10px; gap: 12px; }
  .lu-cover { width: 60px; }
  .lu-title { font-size: 14px; margin-bottom: 6px; }
  .lu-chap { font-size: 12.5px; }
  .lu-chap .ch-group { display: none; }

  .footer-inner { grid-template-columns: 1fr; }
}


/* ===== View switching ===== */
.view[hidden] { display: none !important; }

/* ===== Back / breadcrumb ===== */
.back-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-dim);
  padding: 8px 14px; border-radius: var(--radius); font-weight: 600; font-size: 14px; cursor: pointer;
  transition: all .15s;
}
.back-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--accent); }

/* ===== Title (detail) page ===== */
/* Banner main page nikiga o'xshab to'liq kenglikda; rasm/matn kontent kengligida */
.title-hero { position: relative; overflow: hidden; margin-bottom: 24px; }
.title-hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
/* Pastdan yuqoriga yengil qoraytirish — banner ko'rinib tursin, matn o'qilsin */
.title-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to bottom, rgba(10,10,12,.15), rgba(10,10,12,.78));
}
.title-hero-inner {
  position: relative; z-index: 2;
  max-width: 1340px; margin: 0 auto;
  padding: 22px 30px 30px;
}
.title-back { margin-bottom: 20px; }
.title-hero-main { display: flex; gap: 24px; align-items: flex-end; }
.title-cover {
  position: relative; flex-shrink: 0;
  width: 180px; aspect-ratio: 2/3; border-radius: 8px; overflow: hidden;
  box-shadow: 0 12px 34px rgba(0,0,0,.6);
}
.title-cover .cover-art { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 14px; }
.title-cover .cover-art span { font-weight: 800; font-size: 17px; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.5); }
.title-head { flex: 1; min-width: 0; padding-bottom: 6px; }
.title-head h1 { font-size: clamp(24px, 4vw, 40px); font-weight: 800; line-height: 1.1; margin-bottom: 10px; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.title-author { color: var(--text); font-size: 15px; font-weight: 600; margin-bottom: 12px; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.title-format { display: flex; flex-wrap: wrap; gap: 6px; }

.title-body { display: grid; grid-template-columns: 1fr; gap: 22px; }
.title-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
}
.title-stat { display: flex; align-items: center; gap: 6px; color: var(--text-dim); font-size: 14px; }
.title-stat b { color: var(--text); }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); display: inline-block; }
.status-dot.ended { background: var(--text-mute); }

.title-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.title-desc { color: var(--text-dim); font-size: 15px; line-height: 1.65; max-width: 820px; }

.title-meta-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px;
  background: var(--surface); border: 1px solid var(--border-soft); border-radius: 8px; padding: 16px 18px;
}
.title-meta-grid div span { display: block; color: var(--text-mute); font-size: 12px; margin-bottom: 3px; }
.title-meta-grid div b { color: var(--text); font-size: 14px; font-weight: 700; }

/* ===== Chapters list ===== */
.chapters-head { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 4px; }
.chapters-head h2 { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.chapters-head h2::before { content: ""; width: 4px; height: 18px; background: var(--accent); border-radius: 3px; }
.vol-group { margin-top: 16px; }
.vol-label { font-size: 13px; font-weight: 700; color: var(--text-dim); margin-bottom: 8px; padding-left: 2px; }
.chap-rows { display: flex; flex-direction: column; gap: 6px; }
.chap-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border-soft); border-radius: 6px;
  padding: 10px 14px; cursor: pointer; transition: border-color .15s, background .15s;
}
.chap-row:hover { border-color: var(--accent); background: var(--surface-2); }
.chap-row .flag { flex-shrink: 0; font-size: 15px; }
.chap-row .c-name { font-weight: 700; color: var(--text); flex-shrink: 0; min-width: 88px; }
.chap-row .c-group { color: var(--text-dim); font-size: 13px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chap-row .c-cmt { color: var(--text-mute); font-size: 12px; display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.chap-row .c-time { color: var(--text-mute); font-size: 12px; flex-shrink: 0; min-width: 96px; text-align: right; }

/* ===== Reader ===== */
.reader { max-width: 880px; margin: 0 auto; padding: 0 0 60px; }
.reader-bar {
  position: sticky; top: var(--nav-h); z-index: 20;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--bg-2); border-bottom: 1px solid var(--border);
  padding: 12px 22px;
}
.reader-bar .r-title { font-weight: 700; font-size: 15px; flex: 1; min-width: 140px; }
.reader-bar select {
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 7px 10px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.reader-nav-btn {
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 7px 14px; font-size: 13px; font-weight: 700; cursor: pointer;
  transition: all .15s;
}
.reader-nav-btn:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: #fff; }
.reader-nav-btn:disabled { opacity: .4; cursor: not-allowed; }
.reader-pages { display: flex; flex-direction: column; gap: 8px; padding: 18px 22px; }
.reader-page {
  position: relative; width: 100%; aspect-ratio: 5/7; border-radius: 6px;
  display: grid; place-items: center; color: rgba(255,255,255,.85);
  font-weight: 800; font-size: 18px; text-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.reader-foot { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 10px 22px 0; }

@media (max-width: 560px) {
  .title-hero-inner { padding: 18px 16px 22px; }
  .title-back { margin-bottom: 14px; }
  .title-hero-main { flex-direction: column; align-items: flex-start; gap: 16px; }
  .title-cover { width: 120px; }
  .chap-row .c-group { display: none; }
  .chap-row .c-name { min-width: 70px; }
}


/* ===== Generic page ===== */
.page { padding-top: 22px; }
.page-head { margin-bottom: 24px; }
.page-head h1 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; }
.page-head p { color: var(--text-dim); font-size: 15px; margin-top: 8px; }

.page-prose { max-width: 760px; color: var(--text-dim); font-size: 15px; line-height: 1.75; }
.page-prose h3 { color: var(--text); font-size: 18px; margin: 24px 0 10px; }
.page-prose ul { padding-left: 20px; margin: 8px 0; }
.page-prose li { margin: 6px 0; }
.page-prose .muted { color: var(--text-mute); font-size: 13px; margin-top: 24px; }

/* ===== Empty state ===== */
.empty-state {
  text-align: center; padding: 64px 20px;
  border: 1px dashed var(--border); border-radius: var(--radius-lg);
  background: var(--surface);
}
.empty-state .empty-ico { font-size: 54px; margin-bottom: 14px; }
.empty-state h3 { font-size: 21px; font-weight: 800; margin-bottom: 8px; }
.empty-state p { color: var(--text-dim); font-size: 14px; max-width: 460px; margin: 0 auto 22px; }

/* ===== Advanced search ===== */
.as-form {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px;
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg); padding: 18px; margin-bottom: 22px;
}
.as-field { display: flex; flex-direction: column; gap: 6px; }
.as-field.as-wide { grid-column: 1 / -1; }
.as-field label { font-size: 13px; font-weight: 700; color: var(--text-dim); }
.as-field input, .as-field select {
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius); padding: 10px 12px; font-size: 14px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.as-field input:focus, .as-field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.as-resulthead { color: var(--text-dim); font-size: 14px; font-weight: 600; margin-bottom: 16px; }

/* ===== Contact ===== */
.contact-wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 26px; align-items: start; max-width: 920px; }
.contact-form { display: flex; flex-direction: column; gap: 14px; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text-dim); }
.contact-form input, .contact-form textarea {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius); padding: 11px 13px; font-size: 14px; outline: none; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.contact-form .btn-primary { align-self: flex-start; }
.form-note { color: var(--green); font-size: 14px; font-weight: 600; }
.contact-info { display: flex; flex-direction: column; gap: 16px; background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: 20px; }
.contact-info > div { display: flex; gap: 12px; align-items: flex-start; }
.contact-info .ci-ico { font-size: 22px; flex-shrink: 0; }
.contact-info b { font-size: 14px; }
.contact-info p { color: var(--text-dim); font-size: 13px; margin-top: 2px; }

@media (max-width: 640px) {
  .contact-wrap { grid-template-columns: 1fr; }
}

/* ===== Desktop: yon panelni yig'ish (toggle) ===== */
@media (min-width: 861px) {
  .shell.nav-collapsed .sidebar { display: none; }
}


/* ===== Navbar qidiruv dropdown ===== */
.search-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 90;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 6px; max-height: 72vh; overflow-y: auto;
}
.search-dropdown[hidden] { display: none; }
.sd-head {
  padding: 7px 10px 9px; font-size: 12px; font-weight: 700; color: var(--text-mute);
  text-transform: uppercase; letter-spacing: .05em;
}
.sd-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 8px; border: none; background: transparent; cursor: pointer;
  border-radius: var(--radius); text-align: left;
  transition: background .12s;
}
.sd-item:hover { background: var(--surface-2); }
.sd-cover {
  width: 40px; aspect-ratio: 2/3; border-radius: 4px; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
  overflow: hidden; display: grid; place-items: center;
}
.sd-cover-letter { font-size: 16px; font-weight: 800; color: rgba(255,255,255,.9); }
.sd-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sd-title {
  font-size: 14px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sd-meta {
  font-size: 12px; color: var(--text-mute);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sd-empty { padding: 22px; text-align: center; color: var(--text-mute); font-size: 14px; }
.sd-foot {
  display: block; width: 100%; margin-top: 4px;
  padding: 11px; border: none; border-top: 1px solid var(--border);
  background: transparent; color: var(--accent); font-weight: 700; font-size: 13px;
  cursor: pointer; text-align: center; border-radius: 0 0 var(--radius) var(--radius);
  transition: background .12s;
}
.sd-foot:hover { background: var(--accent-soft); }


/* ===== Title actions / substats ===== */
.title-actions { flex-wrap: wrap; }
.btn-ghost.btn-icon { padding: 11px 14px; font-size: 17px; line-height: 1; }
.title-substats {
  display: flex; flex-wrap: wrap; gap: 18px; align-items: center;
  padding-bottom: 18px; border-bottom: 1px solid var(--border); margin-top: -4px;
}
.title-substats .title-stat { font-size: 15px; }
.title-substats small { color: var(--text-mute); font-weight: 500; }

/* ===== Title tabs ===== */
.title-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.tt-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-dim); font-weight: 700; font-size: 15px;
  padding: 12px 16px; border-bottom: 3px solid transparent; transition: color .15s, border-color .15s;
}
.tt-btn:hover { color: var(--text); }
.tt-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel[hidden] { display: none; }

/* ===== Chapters head / sort ===== */
.chapters-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ch-count { color: var(--text-mute); font-size: 14px; font-weight: 600; }
.sort-btn {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius); padding: 8px 14px; font-size: 13px; font-weight: 700; cursor: pointer;
  transition: all .15s;
}
.sort-btn:hover { border-color: var(--accent); color: var(--accent); }

/* O'qilgan bob belgisi */
.chap-row.read { opacity: .62; }
.chap-row .c-read { color: var(--green); font-weight: 800; flex-shrink: 0; }

/* ===== Comments ===== */
.comment-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; max-width: 720px; }
.comment-form input, .comment-form textarea {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius); padding: 11px 13px; font-size: 14px; outline: none; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.comment-form .btn-primary { align-self: flex-start; }
.comment-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cmt-counter { font-size: 12px; color: var(--text-mute); }
.comment-list { display: flex; flex-direction: column; gap: 14px; }
.comment { display: flex; gap: 12px; }
.comment-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
}
.comment-body { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: 12px 14px; }
.comment-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 5px; }
.comment-head b { font-size: 14px; }
.comment-head span { color: var(--text-mute); font-size: 12px; }
.comment-body p { color: var(--text-dim); font-size: 14px; line-height: 1.55; word-break: break-word; }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.62); display: grid; place-items: center; padding: 20px;
  opacity: 0; transition: opacity .18s;
}
.modal-overlay.show { opacity: 1; }
.modal {
  position: relative; width: 100%; max-width: 420px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 24px;
  transform: translateY(8px) scale(.98); transition: transform .18s;
}
.modal-overlay.show .modal { transform: none; }
.modal-x {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: var(--radius);
  background: var(--surface-2); border: none; color: var(--text-dim); cursor: pointer; font-size: 14px;
}
.modal-x:hover { background: var(--surface-3); color: var(--text); }
.modal-title { font-size: 19px; font-weight: 800; margin-bottom: 4px; padding-right: 30px; }
.modal-sub { color: var(--text-dim); font-size: 14px; margin-bottom: 18px; }
.modal-row { display: flex; gap: 10px; margin-bottom: 14px; }
.modal-select {
  flex: 1; background: var(--bg); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius); padding: 10px 12px; font-size: 14px; outline: none;
}
.modal-select:focus { border-color: var(--accent); }
.modal-quick { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-dim);
  border-radius: 30px; padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }

/* Baholash yulduzlari */
.rate-stars { display: flex; gap: 6px; justify-content: center; margin: 6px 0 12px; }
.rate-star {
  background: none; border: none; cursor: pointer; font-size: 38px; line-height: 1;
  color: var(--surface-3); transition: color .12s, transform .12s;
}
.rate-star:hover { transform: scale(1.12); }
.rate-star.on { color: #ffbf3d; }
.rate-hint { text-align: center; color: var(--text-dim); font-size: 14px; font-weight: 600; }

/* ===== Auth modal (Kirish / Ro'yxatdan o'tish) ===== */
.auth-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.auth-head .modal-title { padding-right: 0; }
.auth-tabs {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 20px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
}
.auth-tab {
  flex: 1; padding: 10px; border: none; background: none; cursor: pointer;
  color: var(--text-dim); font-weight: 700; font-size: 14px;
  border-radius: calc(var(--radius) - 2px); transition: background .15s, color .15s;
}
.auth-tab:hover { color: var(--text); }
.auth-tab.active { background: var(--accent); color: #fff; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form[hidden] { display: none; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field > span { font-size: 13px; font-weight: 600; color: var(--text-dim); }
.auth-field input {
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius); padding: 11px 13px; font-size: 14px; outline: none;
  transition: border-color .15s;
}
.auth-field input:focus { border-color: var(--accent); }
.auth-check { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-dim); cursor: pointer; }
.auth-check input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }
.auth-terms-link { color: var(--accent); }
.auth-terms-link:hover { text-decoration: underline; }
.auth-error {
  color: #ff6b6b; font-size: 13px; font-weight: 600;
  background: rgba(255,107,107,.1); border: 1px solid rgba(255,107,107,.3);
  border-radius: var(--radius); padding: 9px 12px;
}
.auth-submit { width: 100%; margin-top: 4px; }
.auth-prompt-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }

/* Email tasdiqlash oynasi */
.auth-code {
  text-align: center; font-size: 26px !important; font-weight: 800;
  letter-spacing: 12px; padding-left: 12px !important;
}
.auth-dev-hint {
  font-size: 12.5px; color: var(--text-dim);
  background: var(--accent-soft); border: 1px dashed var(--border);
  border-radius: var(--radius); padding: 9px 12px; text-align: center;
}
.auth-dev-hint a { color: var(--accent); }
.auth-verify-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 2px; }
.auth-link-btn {
  background: none; border: none; cursor: pointer; padding: 4px 2px;
  color: var(--text-dim); font-size: 13px; font-weight: 600;
}
.auth-link-btn:hover { color: var(--accent); }
.auth-link-btn:disabled { opacity: .5; cursor: default; }
.auth-foot { margin: 2px 0 0; text-align: center; }
.auth-sent-ico { font-size: 40px; text-align: center; margin: 4px 0 6px; }
/* "yoki" ajratgich + Google tugma bloki */
.auth-google-wrap { margin-top: 16px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.auth-google-wrap[hidden] { display: none; }
.auth-or {
  width: 100%; display: flex; align-items: center; gap: 12px;
  color: var(--text-dim); font-size: 12.5px;
}
.auth-or::before, .auth-or::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}
.auth-google-btn { display: flex; justify-content: center; min-height: 40px; color-scheme: light; }
.btn-ghost.in-lib { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* Tarix ro'yxati */
.hist-list { display: flex; flex-direction: column; gap: 8px; max-width: 760px; }
.hist-row {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color .15s, background .15s;
}
.hist-row:hover { border-color: var(--accent); background: var(--surface-2); }
.hist-swatch {
  display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 10px; color: #fff; font-weight: 800; font-size: 20px;
}
.hist-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.hist-main b { color: var(--text); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-sub { color: var(--text-dim); font-size: 13px; }
.hist-time { color: var(--text-mute); font-size: 12px; flex-shrink: 0; }

/* ===== Bildirishnomalar ===== */
.notif-wrap { position: relative; }
.notif-badge {
  position: absolute; top: 0; right: 0;
  min-width: 17px; height: 17px; padding: 0 4px;
  display: grid; place-items: center;
  background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 800; border-radius: 9px;
  border: 2px solid var(--bg-2); box-sizing: content-box;
}
.notif-panel {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 120;
  width: 340px; max-height: 70vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.notif-head {
  padding: 14px 16px; font-weight: 800; font-size: 15px;
  border-bottom: 1px solid var(--border); position: sticky; top: 0;
  background: var(--surface);
}
.notif-list { display: flex; flex-direction: column; }
.notif-empty { padding: 28px 16px; text-align: center; color: var(--text-mute); font-size: 14px; }
.notif-item {
  display: flex; gap: 12px; padding: 13px 16px; align-items: flex-start;
  border-bottom: 1px solid var(--border); transition: background .15s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--surface-2); }
.notif-item.unread { background: var(--accent-soft); }
.notif-item.unread:hover { background: var(--accent-soft); }
.notif-ico {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; font-size: 17px; background: var(--surface-2);
}
.notif-ico.chapter { background: var(--accent-soft); }
.notif-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-body b { color: var(--text); font-size: 14px; }
.notif-text { color: var(--text-dim); font-size: 13px; line-height: 1.4; }
.notif-time { color: var(--text-mute); font-size: 11px; margin-top: 2px; }

@media (max-width: 480px) {
  .notif-panel { position: fixed; top: calc(var(--nav-h) + 6px); right: 8px; left: 8px; width: auto; }
}

/* Navbar foydalanuvchi chipi */
.user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 30px; padding: 5px 14px 5px 5px; font-weight: 700; font-size: 14px;
  cursor: pointer; transition: border-color .15s;
}
.user-chip:hover { border-color: var(--accent); }
.user-ava {
  display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 50%; background: var(--accent); color: #fff; font-size: 14px; font-weight: 800; flex-shrink: 0;
}
.user-ava.lg { width: 52px; height: 52px; font-size: 22px; }
.user-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Toast bildirishnoma */
.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 300;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface-3); color: var(--text);
  border: 1px solid var(--border); border-radius: 30px;
  padding: 12px 22px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== Reader like ===== */
.reader-like { text-align: center; padding: 26px 22px 6px; }
.like-btn {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: 40px; padding: 14px 26px; font-size: 16px; font-weight: 700; cursor: pointer;
  transition: all .15s;
}
.like-btn:hover { border-color: var(--accent); background: var(--surface-2); }
.like-btn.liked { border-color: var(--accent); color: var(--accent); }
.like-btn .like-ico { font-size: 22px; }
.like-btn .like-count {
  background: var(--accent-soft); color: var(--accent); font-weight: 800;
  padding: 3px 12px; border-radius: 30px; font-size: 14px;
}
.like-btn.pop { animation: likePop .35s ease; }
@keyframes likePop { 0% { transform: scale(1); } 40% { transform: scale(1.08); } 100% { transform: scale(1); } }
.like-sub { color: var(--text-mute); font-size: 13px; margin-top: 12px; }

@media (max-width: 560px) {
  .title-substats { gap: 12px; }
  .reader-like { padding: 18px 16px 4px; }
}


/* ===== Izoh: javoblar, amallar ===== */
.cmt-note { color: var(--text-mute); font-size: 14px; padding: 14px 2px; }
.comment-actions { display: flex; gap: 14px; margin-top: 6px; }
.cmt-link {
  background: none; border: none; cursor: pointer; padding: 0;
  color: var(--text-mute); font-size: 12.5px; font-weight: 600;
}
.cmt-link:hover { color: var(--accent); }
.cmt-link.danger:hover { color: #ff6b6b; }
.comment-thread { margin-bottom: 6px; }
.comment-replies { margin-left: 46px; }
.comment.reply { padding-top: 10px; }
.comment.reply .comment-avatar { width: 30px; height: 30px; font-size: 13px; }
.reply-form { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 8px 46px; }
.reply-form textarea {
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius); padding: 10px 12px; font-size: 14px; outline: none; resize: vertical; font-family: inherit;
}
.reply-form textarea:focus { border-color: var(--accent); }
.reply-form button { align-self: flex-start; }

/* ===== Profil sahifasi ===== */
.profile-wrap { display: grid; grid-template-columns: 360px 1fr; gap: 28px; align-items: start; }
.profile-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; }
.profile-id { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.profile-id-text { display: flex; flex-direction: column; min-width: 0; }
.profile-id-text b { font-size: 18px; }
.profile-id-text span { color: var(--text-dim); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.profile-sep {
  margin: 6px 0 2px; padding-top: 14px; border-top: 1px solid var(--border);
  color: var(--text-mute); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.profile-h { font-size: 16px; font-weight: 800; margin: 4px 0 12px; }
.profile-comments .profile-h:nth-of-type(2) { margin-top: 24px; }
.pf-cmt {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; transition: border-color .15s;
}
.pf-cmt:hover { border-color: var(--accent); }
.pf-cmt-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.pf-cmt-top b { font-size: 14px; color: var(--text); }
.pf-cmt-top span { color: var(--text-mute); font-size: 12px; flex-shrink: 0; }
.pf-cmt p { color: var(--text-dim); font-size: 14px; line-height: 1.5; }
.pf-quote { color: var(--text-mute) !important; font-style: italic; font-size: 13px !important; border-left: 2px solid var(--border); padding-left: 8px; margin-bottom: 4px; }
.pf-tag { display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: 20px; }
.pf-cmt-src { color: var(--text-mute); font-size: 12px; margin-top: 6px; }
.auth-account-actions { display: flex; flex-direction: column; gap: 10px; }

@media (max-width: 820px) {
  .profile-wrap { grid-template-columns: 1fr; }
}


/* ===== Profil (Twitter uslubida) ===== */
.user-ava { background-size: cover; background-position: center; }
.tw-profile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 24px; }
.tw-banner {
  height: 200px; background-size: cover; background-position: center;
  background-color: var(--surface-2);
}
.tw-banner.empty { background: linear-gradient(120deg, #ff8a3d, #ff5722); }
.tw-bar { display: flex; justify-content: space-between; align-items: flex-end; padding: 0 20px; margin-top: -46px; }
.tw-avatar {
  width: 116px; height: 116px; border-radius: 50%;
  border: 4px solid var(--surface); background-color: var(--surface-3);
  background-size: cover; background-position: center; flex-shrink: 0;
  display: grid; place-items: center;
}
.tw-avatar.letter { background: var(--accent); color: #fff; font-size: 44px; font-weight: 800; }
.tw-edit { margin-bottom: 12px; border-radius: 30px !important; padding: 9px 20px !important; font-weight: 700; }
.tw-info { padding: 10px 22px 22px; }
.tw-name { font-size: 22px; font-weight: 800; }
.tw-handle { color: var(--text-mute); font-size: 14px; }
.tw-bio { color: var(--text); font-size: 15px; line-height: 1.5; margin: 12px 0; white-space: pre-wrap; }
.tw-bio.empty { color: var(--text-mute); font-style: italic; }
.tw-meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--text-dim); font-size: 14px; }
.tw-link { color: var(--accent); }
.tw-link:hover { text-decoration: underline; }
.tw-joined { color: var(--text-mute); }

/* Profil tahrirlash modali */
.edit-banner {
  height: 130px; border-radius: var(--radius); background-color: var(--surface-2);
  background-size: cover; background-position: center; cursor: pointer;
  display: grid; place-items: center; margin-bottom: -36px; position: relative; overflow: hidden;
}
.edit-banner.empty { background: linear-gradient(120deg, #ff8a3d, #ff5722); }
.edit-avatar-row { display: flex; align-items: flex-end; gap: 12px; padding-left: 16px; }
.edit-avatar {
  width: 84px; height: 84px; border-radius: 50%; border: 3px solid var(--surface);
  background-color: var(--surface-3); background-size: cover; background-position: center;
  cursor: pointer; display: grid; place-items: center; flex-shrink: 0; position: relative; z-index: 1;
}
.edit-avatar-hint { color: var(--text-mute); font-size: 12px; padding-bottom: 6px; }
.edit-cam {
  background: rgba(0,0,0,.45); color: #fff; font-size: 12px; font-weight: 600;
  padding: 5px 10px; border-radius: 20px; pointer-events: none;
}
.edit-avatar .edit-cam { padding: 4px 7px; font-size: 14px; }


/* ===== Rol galochkasi ===== */
.role-badge {
  display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 50%;
  font-size: 8px; font-weight: 900; color: #fff; margin-left: 4px; vertical-align: middle;
}
.role-badge.owner { background: linear-gradient(135deg, #ffd700, #f0a500); color: #5a3d00; box-shadow: 0 0 0 1px rgba(240,165,0,.5); }
.role-badge.admin { background: #1d9bf0; }

/* ===== Admin panel ===== */
.admin-head { margin-bottom: 18px; }
.admin-head h1 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; }
.admin-head p { color: var(--text-dim); font-size: 14px; margin-top: 6px; }
.admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.admin-tab {
  background: none; border: none; cursor: pointer; padding: 11px 16px;
  color: var(--text-dim); font-weight: 700; font-size: 14px; border-bottom: 2px solid transparent;
}
.admin-tab:hover { color: var(--text); }
.admin-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.adm-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 8px; }
.adm-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; text-align: center; }
.adm-stat-ico { font-size: 22px; }
.adm-stat-v { font-size: 22px; font-weight: 800; margin: 6px 0 2px; }
.adm-stat-l { color: var(--text-mute); font-size: 12px; }

.adm-tlist { display: flex; flex-direction: column; gap: 6px; }
.adm-trow { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; font-size: 13px; color: var(--text-dim); }
.adm-tname { font-weight: 700; color: var(--text); flex: 1; min-width: 120px; }
.adm-rec { color: var(--accent); font-weight: 700; }

.adm-bar { margin-bottom: 16px; }
.adm-titlelist { display: flex; flex-direction: column; gap: 10px; }
.adm-titlerow { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; }
.adm-titlecover { width: 46px; height: 62px; border-radius: 6px; flex-shrink: 0; background-size: cover; background-position: center; }
.adm-titlemain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.adm-titlemain b { font-size: 15px; }
.adm-titlemain span { color: var(--text-mute); font-size: 12.5px; }
.adm-titleacts { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-ghost.sm { padding: 7px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-ghost.sm.danger { color: #ff6b6b; }
.btn-ghost.sm.danger:hover { border-color: #ff6b6b; }

.adm-userlist { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.adm-userrow { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 9px 14px; }
.adm-uemail { color: var(--text-mute); font-size: 12px; margin-left: auto; }
.adm-addadmin { display: flex; gap: 10px; margin-bottom: 4px; }
.adm-addadmin input { flex: 1; background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius); padding: 10px 13px; outline: none; }
.adm-addadmin input:focus { border-color: var(--accent); }
.adm-err { color: #ff6b6b; font-size: 13px; }
.user-ava.sm { width: 30px; height: 30px; font-size: 13px; }

/* Taytl tahrirlash modali */
.tedit-row { display: flex; gap: 12px; }
.tedit-row .auth-field { flex: 1; }
.edit-avatar.sq { border-radius: 10px; width: 70px; height: 94px; }
.genre-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 4px; max-height: 140px; overflow-y: auto; padding: 8px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); }
.genre-chk { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-dim); cursor: pointer; }
.genre-chk input { accent-color: var(--accent); }
.modal { }


/* Baland modallar (taytl tahrirlash) ekranga sig'ishi uchun */
.modal { max-height: 92vh; overflow-y: auto; }


/* ===== Admin panelni kattalashtirish ===== */
.admin-head h1 { font-size: clamp(28px, 4vw, 40px); }
.admin-head p { font-size: 16px; }
.admin-tabs { gap: 4px; margin-bottom: 28px; }
.admin-tab { padding: 15px 24px; font-size: 16px; }

.adm-stats { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; margin-bottom: 18px; }
.adm-stat { padding: 26px 20px; border-radius: 16px; }
.adm-stat-ico { font-size: 30px; }
.adm-stat-v { font-size: 32px; margin: 10px 0 4px; }
.adm-stat-l { font-size: 14px; }

.profile-h { font-size: 19px; margin: 22px 0 14px; }
.adm-trow { padding: 14px 18px; font-size: 14px; gap: 18px; }
.adm-tname { font-size: 15px; min-width: 160px; }

.adm-bar { margin-bottom: 22px; }
.adm-bar .btn-primary { padding: 14px 26px; font-size: 16px; }
.adm-titlerow { padding: 14px 18px; gap: 18px; }
.adm-titlecover { width: 60px; height: 82px; border-radius: 8px; }
.adm-titlemain b { font-size: 17px; }
.adm-titlemain span { font-size: 13.5px; }
.btn-ghost.sm { padding: 9px 14px; font-size: 13.5px; }
.adm-userrow { padding: 13px 18px; }

/* Profil va akkaunt oynasidagi galochkani kattalashtirish */
.tw-name .role-badge, .modal-title .role-badge { width: 20px; height: 20px; font-size: 11px; margin-left: 7px; }

/* ===== Taytl editor — to'liq sahifa ===== */
.te-page { max-width: 1000px; }
.te-top { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.te-h1 { font-size: clamp(24px, 3.5vw, 34px); font-weight: 800; }
.te-form { display: flex; flex-direction: column; gap: 18px; }
.te-banner {
  height: 200px; border-radius: 14px; background-color: var(--surface-2);
  background-size: cover; background-position: center; cursor: pointer;
  display: grid; place-items: center; overflow: hidden;
}
.te-banner.empty { background: linear-gradient(120deg, #ff8a3d, #ff5722); }
.te-coverrow { display: flex; align-items: center; gap: 18px; }
.te-cover {
  width: 120px; height: 165px; border-radius: 12px; background-color: var(--surface-3);
  background-size: cover; background-position: center; cursor: pointer;
  display: grid; place-items: center; flex-shrink: 0; border: 1px solid var(--border);
}
.te-coverhint { display: flex; flex-direction: column; gap: 4px; }
.te-coverhint b { font-size: 16px; }
.te-coverhint span { color: var(--text-mute); font-size: 13px; }
.te-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 22px; align-items: start; }
.te-col { display: flex; flex-direction: column; gap: 16px; }
.te-form .auth-field > span { font-size: 14px; }
.te-form .auth-field input, .te-form .auth-field select, .te-form .auth-field textarea {
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius); padding: 13px 15px; font-size: 15px; outline: none; font-family: inherit; width: 100%;
}
.te-form .auth-field input:focus, .te-form .auth-field select:focus, .te-form .auth-field textarea:focus { border-color: var(--accent); }
.te-bio { min-height: 220px; resize: vertical; line-height: 1.6; }

.te-genres { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px 22px; }
.te-genregroup { margin-bottom: 18px; }
.te-genregroup h4 { font-size: 14px; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 10px; }
.te-genreitems { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 14px; }
.te-genreitems .genre-chk { font-size: 14px; }
.te-actions { display: flex; gap: 12px; padding-bottom: 30px; }

@media (max-width: 760px) {
  .te-grid { grid-template-columns: 1fr; }
}


/* ===== Boblar bo'limi ===== */
.ch-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.ch-pick { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-dim); }
.ch-pick select { background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius); padding: 11px 14px; font-size: 15px; outline: none; min-width: 220px; }
.ch-pick select:focus { border-color: var(--accent); }
.ch-bar .btn-primary { padding: 13px 22px; font-size: 15px; }
.ch-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 10px; }
.ch-num { font-weight: 700; font-size: 15px; min-width: 130px; }
.ch-paid { color: #f0a500; font-weight: 700; font-size: 13px; background: rgba(240,165,0,.12); padding: 3px 10px; border-radius: 20px; }
.ch-free { color: var(--text-mute); font-size: 13px; }
.ch-file { color: var(--text-dim); font-size: 13px; flex: 1; min-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-acts { display: flex; gap: 6px; }

/* ===== Bob editor ===== */
.ch-for { font-size: 16px; color: var(--text-dim); margin-bottom: 18px; }
.ch-for b { color: var(--text); }
.ch-pdf { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; }
.ch-pdf-head { margin-bottom: 12px; }
.ch-pdf-info { margin-top: 12px; display: flex; align-items: center; gap: 12px; }
.ch-pdf-name { color: var(--text); font-size: 14px; font-weight: 600; }
.ch-pdf-empty { color: var(--text-mute); font-size: 14px; }
.ch-paidrow { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 20px; }
.ch-paidrow b { font-size: 16px; }
.ch-hint { color: var(--text-mute); font-size: 13px; margin-top: 4px; }
.ch-price { max-width: 300px; }

/* iOS uslubidagi toggle */
.ios-switch { position: relative; display: inline-block; flex-shrink: 0; cursor: pointer; }
.ios-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.ios-track { display: block; width: 52px; height: 30px; background: var(--surface-3); border-radius: 30px; transition: background .2s; }
.ios-thumb { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.ios-switch input:checked + .ios-track { background: var(--accent); }
.ios-switch input:checked + .ios-track .ios-thumb { transform: translateX(22px); }


/* ===== Admin: qidiruv, taytl ochish ===== */
.adm-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.adm-search {
  flex: 1; min-width: 200px; background: var(--bg); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius); padding: 12px 15px; font-size: 15px; outline: none;
}
.adm-search:focus { border-color: var(--accent); }
.adm-titlerow.link { cursor: pointer; }
.adm-titlerow.link:hover { border-color: var(--accent); }
.adm-open { color: var(--accent); font-weight: 700; font-size: 14px; }
.ch-fortitle { font-weight: 700; font-size: 16px; flex: 1; }

/* Adminlar ro'yxati: bosiladigan avatar/nom */
.adm-userrow .user-ava.sm { cursor: pointer; }
.adm-uname { cursor: pointer; }
.adm-uname:hover { color: var(--accent); }

/* ===== Inbox (Gmail uslubidagi xabarlar) ===== */
.inbox { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.inbox-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .15s; }
.inbox-row:last-child { border-bottom: none; }
.inbox-row:hover { background: var(--surface-2); }
.inbox-row.unread { background: var(--accent-soft); }
.inbox-row.unread .inbox-from b, .inbox-row.unread .inbox-preview { font-weight: 800; color: var(--text); }
.inbox-ava { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; flex-shrink: 0; }
.inbox-ava.lg { width: 52px; height: 52px; font-size: 22px; }
.inbox-from { display: flex; flex-direction: column; min-width: 140px; max-width: 180px; font-size: 14px; color: var(--text); }
.inbox-from small { color: var(--text-mute); font-size: 12px; }
.inbox-preview { flex: 1; color: var(--text-dim); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-time { color: var(--text-mute); font-size: 12px; flex-shrink: 0; }

.msg-view { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; margin-top: 14px; }
.msg-view-head { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.msg-view-from b { font-size: 16px; }
.msg-view-from span { color: var(--text-mute); font-size: 13px; }
.msg-view-date { color: var(--text-mute); font-size: 12.5px; margin-top: 3px; }
.msg-view-body { color: var(--text); font-size: 15px; line-height: 1.7; white-space: pre-wrap; min-height: 80px; }
.msg-view-acts { display: flex; gap: 10px; margin-top: 22px; }

/* ===== Staff profil modali ===== */
.sp-banner { height: 110px; border-radius: 12px; background-size: cover; background-position: center; background-color: var(--surface-2); margin: -4px -4px 0; }
.sp-banner.empty { background: linear-gradient(120deg, #ff8a3d, #ff5722); }
.sp-head { margin-top: -40px; padding-left: 8px; }
.sp-ava { display: inline-grid; place-items: center; width: 80px; height: 80px; border-radius: 50%; border: 4px solid var(--surface); background-color: var(--surface-3); background-size: cover; background-position: center; }
.sp-ava.letter { background: var(--accent); color: #fff; font-size: 32px; font-weight: 800; }
.sp-info { padding: 8px 4px 4px; }
.sp-info h3 { font-size: 20px; font-weight: 800; }
.sp-handle { color: var(--text-mute); font-size: 14px; }
.sp-bio { color: var(--text); font-size: 14px; line-height: 1.5; margin: 10px 0; }
.sp-email { color: var(--text-dim); font-size: 13px; margin-top: 8px; }


/* ===== E'lonlar (admin) ===== */
.ann-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; margin-bottom: 6px; }
.ann-form-row { display: flex; gap: 10px; margin-bottom: 10px; }
.ann-form input, .ann-form textarea {
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius); padding: 12px 14px; font-size: 15px; outline: none; font-family: inherit; width: 100%;
}
.ann-form input:focus, .ann-form textarea:focus { border-color: var(--accent); }
.ann-icon-inp { width: 64px !important; text-align: center; font-size: 20px !important; flex-shrink: 0; }
.ann-form textarea { resize: vertical; }
.ann-form-acts { display: flex; gap: 10px; margin-top: 12px; }
.ann-list { display: flex; flex-direction: column; gap: 10px; }
.ann-row { display: flex; align-items: flex-start; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.ann-ico { font-size: 26px; flex-shrink: 0; }
.ann-main { flex: 1; min-width: 0; }
.ann-main b { font-size: 16px; }
.ann-main p { color: var(--text-dim); font-size: 14px; line-height: 1.5; margin: 4px 0; white-space: pre-wrap; }
.ann-time { color: var(--text-mute); font-size: 12px; }
.ann-acts { display: flex; gap: 6px; flex-shrink: 0; }


/* Bob qatorida poster (admin username) va pullik belgi */
.c-group.link { color: var(--accent); cursor: pointer; }
.c-group.link:hover { text-decoration: underline; }
.c-paid { color: #f0a500; font-weight: 700; font-size: 12px; background: rgba(240,165,0,.12); padding: 2px 8px; border-radius: 20px; }


/* ===== Umumiy statistika: bosiladigan karta, foydalanuvchilar, chart ===== */
.adm-stat.clickable { cursor: pointer; transition: border-color .15s, transform .15s; }
.adm-stat.clickable:hover { border-color: var(--accent); transform: translateY(-3px); }

.users-list { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; }
.user-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.user-row:hover { border-color: var(--accent); }
.user-row b { font-size: 15px; }

.vchart-controls { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }
.vbtn-group { display: flex; gap: 4px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px; }
.vbtn { background: none; border: none; cursor: pointer; padding: 9px 15px; color: var(--text-dim); font-weight: 600; font-size: 13px; border-radius: calc(var(--radius) - 2px); }
.vbtn:hover { color: var(--text); }
.vbtn.active { background: var(--accent); color: #fff; }
.vchart { display: flex; align-items: flex-end; gap: 10px; height: 300px; padding: 24px 16px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow-x: auto; }
.vchart-col { flex: 1; min-width: 38px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 8px; }
.vchart-bar { width: 62%; min-height: 2px; background: linear-gradient(180deg, #ff8a3d, #ff5722); border-radius: 6px 6px 0 0; position: relative; transition: height .3s; }
.vchart-bar span { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--text-dim); font-weight: 700; }
.vchart-label { font-size: 11px; color: var(--text-mute); white-space: nowrap; }


/* ===== PDF o'quvchi (webtoon uslubi) ===== */
.reader-pages { display: flex; flex-direction: column; align-items: center; background: transparent; }
.reader-pdf-page { display: block; margin: 0 auto; max-width: 100%; }
.reader-loading { padding: 70px 20px; text-align: center; color: var(--text-mute); font-size: 15px; }
/* Bobni yuklab olishni qiyinlashtirish: tanlash/sudrash o'chiriladi (o'ng tugma JS bilan bloklanadi) */
.reader-pages, .reader-pdf-page, .reader-page {
  user-select: none; -webkit-user-select: none; -webkit-user-drag: none;
  -webkit-touch-callout: none;
}



/* ===================================================================
   M COIN TIZIMI
   =================================================================== */
:root { --coin: #f0a500; --coin-soft: rgba(240,165,0,.12); }

/* ---- Bob qatori: qulf / ochilgan holatlar ---- */
.c-paid.c-locked { color: var(--coin); background: var(--coin-soft); }
.c-paid.c-owned  { color: var(--green); background: rgba(93,214,160,.12); }
.chap-row.locked { cursor: pointer; }
.chap-row.locked:hover { border-color: var(--coin); }

/* ---- Hamyon (profil ichidagi balans bo'limi) ---- */
.wallet-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px; margin: 22px 0;
}
.wallet-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.wallet-bal-box { display: flex; flex-direction: column; gap: 2px; }
.wallet-label { color: var(--text-mute); font-size: 13px; }
.wallet-balance { font-size: 30px; font-weight: 800; color: var(--coin); display: flex; align-items: baseline; gap: 6px; }
.wallet-balance b { font-size: 34px; }
.wallet-unit { font-size: 16px; color: var(--text-dim); font-weight: 700; }
.wallet-hist { margin-top: 6px; display: flex; flex-direction: column; gap: 8px; }
.wtx-row {
  display: flex; align-items: center; gap: 12px; background: var(--bg-2);
  border: 1px solid var(--border-soft); border-radius: 10px; padding: 11px 14px;
}
a.wtx-row:hover { border-color: var(--accent); }
.wtx-ico { font-size: 20px; width: 30px; text-align: center; flex: none; }
.wtx-main { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.wtx-main b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wtx-sub { color: var(--text-mute); font-size: 12px; }
.wtx-amt { font-weight: 800; font-size: 15px; flex: none; }
.wtx-amt.pos { color: var(--green); }
.wtx-amt.neg { color: var(--coin); }

/* ---- Hisobni to'ldirish oynasi (paketlar) ---- */
.topup-pkgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px,1fr)); gap: 10px; margin: 14px 0; }
.topup-pkg {
  display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer;
  background: var(--bg-2); border: 1.5px solid var(--border); border-radius: 12px;
  padding: 14px 10px; color: var(--text); transition: .15s;
}
.topup-pkg:hover { border-color: var(--coin); transform: translateY(-2px); }
.topup-pkg.active { border-color: var(--coin); background: var(--coin-soft); }
.tp-coins { font-weight: 800; font-size: 16px; color: var(--coin); }
.tp-uzs { font-size: 13px; color: var(--text-dim); }
.topup-custom { margin: 6px 0 14px; }
.topup-sum { margin-top: 8px; font-size: 14px; color: var(--text-dim); }
.topup-sum b { color: var(--text); font-size: 16px; }
.topup-notice {
  background: rgba(255,103,64,.12); border: 1px solid var(--accent);
  color: var(--accent-2); border-radius: 8px; padding: 9px 12px; font-size: 13px; margin-bottom: 8px;
}
.topup-support {
  display: block; text-align: center; margin-top: 14px; color: var(--text-mute);
  font-size: 13px; text-decoration: underline;
}
.topup-support:hover { color: var(--accent); }

/* ---- "Hozircha admindan" oynasi ---- */
.buyinfo { text-align: center; }
.buyinfo-ico { font-size: 48px; margin-bottom: 8px; }
.buyinfo-sum { font-size: 15px; color: var(--text-dim); margin: 10px 0; }
.buyinfo-sum b { color: var(--coin); }
.buyinfo-btn { display: inline-flex; margin-top: 6px; }

/* ---- Bobni ochish (unlock) oynasi ---- */
.unlock-modal { text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.unlock-ico { font-size: 46px; }
.unlock-bal { font-size: 14px; color: var(--text-dim); }
.unlock-after { color: var(--text-mute); }
.unlock-modal .btn-primary, .unlock-modal .btn-ghost { width: 100%; max-width: 320px; }

/* ---- Reader ichidagi qulflangan ko'rinish ---- */
.reader-locked {
  text-align: center; padding: 60px 22px; max-width: 460px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 12px; align-items: center;
}
.reader-locked .rl-ico { font-size: 60px; }
.reader-locked h3 { font-size: 22px; }
.reader-locked p { color: var(--text-dim); }
.reader-locked b { color: var(--coin); }

/* ---- Admin: daromad (earnings) sahifasi ---- */
.earn-card {
  background: linear-gradient(135deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; text-align: center; margin: 16px 0 8px;
}
.earn-label { color: var(--text-mute); font-size: 13px; }
.earn-balance { font-size: 38px; font-weight: 800; color: var(--coin); margin: 4px 0; }
.earn-uzs { color: var(--text-dim); font-size: 15px; margin-bottom: 16px; }
.earn-uzs small { color: var(--text-mute); }

/* ---- Pul yechish arizalari ro'yxati (admin earnings) ---- */
.wd-list { display: flex; flex-direction: column; gap: 8px; }
.wd-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 16px;
}
.wd-code { font-family: ui-monospace, monospace; font-weight: 800; color: var(--accent-2); letter-spacing: .5px; }
.wd-amt { font-weight: 700; }
.wd-card { color: var(--text-dim); font-size: 13px; }
.wd-date { color: var(--text-mute); font-size: 12px; margin-left: auto; }
.wd-status { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.wd-status.pending  { color: #e0a800; background: rgba(240,165,0,.14); }
.wd-status.approved { color: var(--green); background: rgba(93,214,160,.14); }
.wd-status.rejected { color: #ff6b6b; background: rgba(255,107,107,.14); }

/* ---- Ega: Xabarlar bo'limidagi pul yechish arizalari ---- */
.wd-pendcount { font-size: 12px; font-weight: 700; color: var(--accent-2); background: var(--accent-soft); padding: 2px 9px; border-radius: 20px; margin-left: 6px; }
.wd-req {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px; margin-bottom: 12px;
}
.wd-req.pending { border-color: var(--coin); }
.wd-req-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.wd-req-ico { font-size: 22px; }
.wd-req-title { flex: 1; font-size: 14px; }
.wd-req-title .wd-code { margin-left: 6px; }
.wd-req-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 12px; }
.wd-req-grid > div { display: flex; flex-direction: column; gap: 2px; }
.wd-req-grid span { color: var(--text-mute); font-size: 12px; }
.wd-req-grid b { font-size: 14px; word-break: break-word; }
.wd-req-note { grid-column: 1 / -1; }
.wd-req-acts { display: flex; gap: 10px; margin-top: 14px; }

/* ---- Ega: M coin tab (foydalanuvchilarga yuborish) ---- */
.mc-userlist { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.mc-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px;
}
.mc-main { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 120px; }
.mc-main b { font-size: 14px; }
.mc-email { color: var(--text-mute); font-size: 12px; }
.mc-bal { color: var(--coin); font-weight: 700; font-size: 14px; }
.btn-primary.sm { padding: 7px 12px; font-size: 13px; }

/* ---- Bog'lanish: qo'llab-quvvatlash kartasi ---- */
a.ci-support { transition: .15s; }
a.ci-support:hover { color: var(--accent); transform: translateX(2px); }



/* Bob qatoridagi yaratuvchi (poster) havolasi — faqat matnning o'zi bosiladi */
.c-userlink { color: var(--accent); cursor: pointer; }
.c-userlink:hover { text-decoration: underline; }
/* c-group konteyneri bo'sh joyni egallaydi, lekin havola emas (bosilsa bob ochiladi) */
.chap-row .c-group .c-userlink,
.lu-chap .ch-group .c-userlink { display: inline; }



/* Admin tayinlash: username qidiruv avtocomplete */
.adm-addadmin-wrap { margin-bottom: 4px; }
.adm-search-box { position: relative; flex: 1; }
.adm-search-box input { width: 100%; background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius); padding: 10px 13px; outline: none; }
.adm-search-box input:focus { border-color: var(--accent); }
.adm-search-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow); max-height: 320px; overflow-y: auto;
}
.adm-search-result {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: none; border: none; cursor: pointer; padding: 9px 12px; color: var(--text);
}
.adm-search-result:hover { background: var(--surface-3); }
.asr-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.asr-main b { font-size: 14px; }
.asr-email { color: var(--text-mute); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-search-empty { padding: 12px; color: var(--text-mute); font-size: 13px; text-align: center; }
.adm-uemail i { color: var(--text-mute); opacity: .7; }



/* "M coin nima?" havola (profil balans yonida) */
.mcoin-what { color: var(--coin); text-decoration: underline; font-size: 12px; }
.mcoin-what:hover { color: var(--accent); }

/* M coin haqida sahifa */
.mcoin-page { max-width: 760px; margin: 0 auto; }
.mcoin-poster {
  width: 100%; height: auto; border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--shadow); margin-bottom: 8px;
}
.mcoin-info h2 { font-size: 26px; margin: 18px 0 10px; }
.mcoin-info h3 { font-size: 18px; margin: 18px 0 8px; }
.mcoin-info ul { padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.mcoin-info ul li { background: var(--surface); border: 1px solid var(--border-soft); border-radius: 10px; padding: 11px 14px; }
.mcoin-pkgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px,1fr)); gap: 10px; margin: 12px 0; }
.mci-pkg {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--bg-2); border: 1.5px solid var(--border); border-radius: 12px; padding: 14px 10px;
}
.mci-pkg .tp-coins { font-weight: 800; font-size: 16px; color: var(--coin); }
.mci-pkg .tp-uzs { font-size: 13px; color: var(--text-dim); }
.mcoin-buy { display: block; width: 100%; margin-top: 18px; }



/* Biz haqimizda — ijtimoiy tarmoqlar */
.about-social { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 6px; }
.about-social-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 11px 16px; color: var(--text); font-weight: 600; transition: .15s;
}
.about-social-btn:hover { border-color: var(--accent); transform: translateY(-2px); }
.about-social-btn.tg svg { color: #29a9eb; }


/* ===== Ulashish (share) modali ===== */
.share-copy { display: flex; gap: 8px; margin-bottom: 16px; }
.share-copy input {
  flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius); padding: 10px 12px; font-size: 13px; outline: none;
}
.share-copy input:focus { border-color: var(--accent); }
.share-socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.share-soc {
  width: 48px; height: 48px; padding: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer; color: #fff; text-decoration: none;
  transition: transform .12s, filter .12s; line-height: 0;
}
.share-soc:hover { transform: translateY(-2px); filter: brightness(1.1); }
.share-soc.tg { background: #2aabee; }
.share-soc.wa { background: #25d366; }
.share-soc.x  { background: #000; }
.share-soc.dc { background: #5865f2; }
.share-soc.ig { background: linear-gradient(45deg,#f09433,#dc2743,#bc1888); }
