/* ================================================================
   MangaVerse Extra CSS — Wallet, Admin, Schedule, News, Premium
   ================================================================ */

/* ─── WALLET MODAL ─────────────────────────────────────────────── */
.wallet-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--gold, #ffd60a), var(--orange, #ff9f1c));
  border: none;
  border-radius: 20px;
  padding: 7px 14px;
  font-size: .78rem;
  font-weight: 800;
  color: #111;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.wallet-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,214,10,.3); }
.wallet-btn .w-icon { font-size: 1rem; }

.wallet-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.7);
  display: none; align-items: center; justify-content: center;
  z-index: 2147483640;
}
.wallet-overlay.open { display: flex; }
.wallet-modal {
  background: var(--card-bg, #1a1a2e);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  padding: 28px;
  width: min(480px, 95vw);
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn .25s ease;
}
.wallet-modal h3 {
  font-family: Bangers, cursive;
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--text1, #fff);
}
.wallet-balance-row {
  display: flex; gap: 12px; margin-bottom: 20px;
}
.wallet-balance-card {
  flex: 1; background: rgba(255,255,255,.05); border-radius: 12px;
  padding: 14px; text-align: center;
}
.wallet-balance-card .wb-value { font-size: 1.4rem; font-weight: 900; color: var(--gold, #ffd60a); }
.wallet-balance-card .wb-label { font-size: .72rem; color: var(--text3, #666); margin-top: 2px; }

.wallet-deposit-wrap label { font-size: .82rem; color: var(--text2, #aaa); margin-bottom: 6px; display: block; }
.wallet-deposit-wrap input {
  width: 100%; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px; padding: 12px 14px; color: var(--text1, #fff);
  font-size: 1rem; font-weight: 700; margin-bottom: 10px;
  box-sizing: border-box;
}
.wallet-quick-amounts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.wqa-btn {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px; padding: 6px 12px; color: var(--text2, #aaa);
  font-size: .8rem; font-weight: 700; cursor: pointer; transition: all .15s;
}
.wqa-btn:hover { background: rgba(230,57,70,.2); color: var(--red, #e63946); border-color: var(--red, #e63946); }
.btn-wallet-deposit {
  width: 100%; background: linear-gradient(135deg, var(--red, #e63946), var(--orange, #ff9f1c));
  border: none; border-radius: 12px; padding: 14px; color: #fff;
  font-size: 1rem; font-weight: 800; cursor: pointer; margin-bottom: 16px;
}
.wallet-section-title { font-weight: 800; color: var(--text1); margin: 16px 0 10px; font-size: .9rem; }

.coin-packs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 16px; }
.coin-pack-card {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px; padding: 14px; text-align: center; cursor: pointer;
  transition: all .2s;
}
.coin-pack-card:hover { border-color: var(--gold, #ffd60a); background: rgba(255,214,10,.08); }
.coin-pack-card .cp-coins { font-size: 1.2rem; font-weight: 900; color: var(--gold, #ffd60a); }
.coin-pack-card .cp-bonus { font-size: .7rem; color: var(--green, #2dc653); margin-top: 2px; }
.coin-pack-card .cp-price { font-size: .78rem; color: var(--text2, #aaa); margin-top: 6px; }

/* Promo code */
.promo-row { display: flex; gap: 8px; }
.promo-row input {
  flex: 1; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px; padding: 10px 12px; color: var(--text1, #fff); font-size: .9rem;
  text-transform: uppercase; letter-spacing: 2px;
}
.btn-promo { background: var(--purple, #7b2fff); border: none; border-radius: 10px; padding: 10px 16px; color: #fff; font-weight: 800; cursor: pointer; }

/* ─── PREMIUM MODAL ─────────────────────────────────────────────── */
.premium-plans-grid { display: grid; gap: 12px; }
.premium-plan-card {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; padding: 18px; cursor: pointer; transition: all .2s;
}
.premium-plan-card:hover { border-color: var(--gold, #ffd60a); }
.premium-plan-card .pp-name { font-weight: 800; color: var(--text1); margin-bottom: 4px; }
.premium-plan-card .pp-desc { font-size: .8rem; color: var(--text3); margin-bottom: 10px; }
.premium-plan-card .pp-price { font-size: 1.4rem; font-weight: 900; color: var(--gold, #ffd60a); }
.premium-plan-card .pp-days { font-size: .75rem; color: var(--text3); }
.btn-buy-plan {
  margin-top: 10px; width: 100%; background: linear-gradient(135deg, var(--gold, #ffd60a), var(--orange, #ff9f1c));
  border: none; border-radius: 10px; padding: 10px; color: #111; font-weight: 800; cursor: pointer;
}

/* ─── SCHEDULE PAGE ──────────────────────────────────────────────── */
.schedule-page { max-width: 1100px; margin: 0 auto; padding: 24px 16px; }

/* Desktop: 7-column grid */
.schedule-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0,1fr));
  gap: 12px;
}

/* Tablet: 3-column grid */
@media(max-width:900px) {
  .schedule-week-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile: Horizontal scrollable strip — much better UX */
@media(max-width:640px) {
  .schedule-week-grid {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 12px;
    /* Snap to each day card */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .schedule-week-grid::-webkit-scrollbar { display: none; }
  .schedule-day-col {
    min-width: 200px;
    flex-shrink: 0;
    scroll-snap-align: start;
  }
  .schedule-day-col.today {
    min-width: 220px;
  }
}

.schedule-day-col {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 14px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .2s;
}
.schedule-day-col.today {
  border-color: rgba(230,57,70,.5);
  box-shadow: 0 0 0 1px rgba(230,57,70,.15) inset, 0 4px 20px rgba(230,57,70,.1);
}
.schedule-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: .78rem;
  font-weight: 800;
  color: var(--text2);
}
.schedule-day-header .sdh-day {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .7rem;
  letter-spacing: .03em;
}
.schedule-day-header .sdh-date {
  font-size: 1.05rem;
  color: var(--text1);
  font-weight: 900;
}
.schedule-day-header .sdh-count {
  font-size: .68rem;
  color: var(--text3);
  background: rgba(255,255,255,.05);
  padding: 2px 7px;
  border-radius: 6px;
}
.schedule-day-header.today .sdh-day,
.schedule-day-header.today .sdh-date { color: var(--red, #e63946); border-color: rgba(230,57,70,.35); }
.schedule-day-header.today .sdh-count { background: rgba(230,57,70,.15); color: #e63946; }

.schedule-items { display: flex; flex-direction: column; gap: 6px; }
.schedule-item {
  background: rgba(230,57,70,.1);
  border: 1px solid rgba(230,57,70,.18);
  border-radius: 10px;
  padding: 9px 11px;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, border-color .2s;
}
.schedule-item:hover { background: rgba(230,57,70,.22); border-color: rgba(230,57,70,.4); transform: translateY(-2px); }
.schedule-item:active { transform: translateY(0); }
.schedule-item .si-title {
  font-size: .82rem;
  font-weight: 800;
  color: var(--text1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.schedule-item .si-ch { font-size: .7rem; color: var(--text3); }
.schedule-empty {
  font-size: .72rem;
  color: var(--text3);
  text-align: center;
  padding: 18px 0;
  opacity: .6;
}

/* Mobile scroll hint arrow */
@media(max-width:640px) {
  .schedule-scroll-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .72rem;
    color: var(--text3);
    margin-bottom: 10px;
    animation: fadeOut 3s 2s forwards;
  }
  .schedule-scroll-hint svg { flex-shrink: 0; }
  @keyframes fadeOut { to { opacity: 0; pointer-events: none; } }
}
@media(min-width:641px) {
  .schedule-scroll-hint { display: none; }
}

/* ─── NEWS BANNER ──────────────────────────────────────────────── */
.news-banner {
  margin: 0 16px 20px;
  background: linear-gradient(135deg, rgba(123,47,255,.2), rgba(230,57,70,.2));
  border: 1px solid rgba(255,255,255,.1); border-radius: 16px;
  overflow: hidden; cursor: pointer; transition: transform .2s;
}
.news-banner:hover { transform: translateY(-2px); }
.news-banner-inner { display: flex; align-items: center; gap: 16px; padding: 16px; }
.news-banner-img { width: 80px; height: 60px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.news-banner-text h4 { font-size: .9rem; font-weight: 800; color: var(--text1); margin-bottom: 4px; }
.news-banner-text p { font-size: .78rem; color: var(--text3); line-height: 1.4; }
.news-badge { display: inline-block; background: var(--red, #e63946); color: #fff; font-size: .65rem; font-weight: 800; padding: 2px 7px; border-radius: 20px; margin-bottom: 6px; }

/* ─── ALL MANGAS PAGE ───────────────────────────────────────────── */
.all-mangas-page { max-width: 1280px; margin: 0 auto; padding: 24px 16px; }
.all-mangas-toolbar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 20px;
}
.all-mangas-toolbar input {
  flex: 1; min-width: 200px; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1); border-radius: 10px;
  padding: 10px 14px; color: var(--text1); font-size: .9rem;
}
.all-mangas-toolbar select {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px; padding: 10px 14px; color: var(--text2); font-size: .85rem;
  cursor: pointer;
}
.all-mangas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
@media(max-width: 480px) { .all-mangas-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; } }
.load-more-wrap { text-align: center; margin-top: 24px; }
.btn-load-more-all {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px; padding: 12px 32px; color: var(--text2); font-weight: 700; cursor: pointer;
  transition: all .2s;
}
.btn-load-more-all:hover { background: rgba(230,57,70,.15); color: var(--red); border-color: var(--red); }

/* ─── ACCOUNT MENU ──────────────────────────────────────────────── */
.account-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--card-bg, #1a1a2e); border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px; padding: 12px; min-width: 220px; z-index: 5000;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  display: none; animation: modalIn .2s ease;
}
.account-dropdown.open { display: block; }
.account-dropdown .ad-user { padding: 8px 10px 12px; border-bottom: 1px solid rgba(255,255,255,.06); margin-bottom: 8px; }
.account-dropdown .ad-name { font-weight: 800; color: var(--text1); font-size: .9rem; }
.account-dropdown .ad-balance { font-size: .78rem; color: var(--gold); margin-top: 2px; }
.account-dropdown .ad-link {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px; border-radius: 8px; color: var(--text2);
  font-size: .85rem; cursor: pointer; transition: background .15s;
}
.account-dropdown .ad-link:hover { background: rgba(255,255,255,.06); color: var(--text1); }
.account-dropdown .ad-link.danger { color: var(--red); }

/* ─── NAV WALLET BUTTON ─────────────────────────────────────────── */
.nav-right .wallet-btn { margin-right: 4px; }
@media(max-width: 700px) {
  .nav-right .wallet-btn .w-text { display: none; }
  .nav-right .wallet-btn { padding: 7px 9px; }
}

/* ─── COIN MANGA OVERLAY ─────────────────────────────────────────── */
.coin-manga-overlay {
  position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,.8));
  display: flex; align-items: flex-end; padding: 8px;
}
.coin-manga-badge { background: linear-gradient(135deg, var(--gold), var(--orange)); color: #111; font-size: .68rem; font-weight: 800; border-radius: 20px; padding: 3px 8px; }

/* ─── ADMIN PANEL (standalone page) ─────────────────────────────── */
.admin-layout { display: flex; min-height: 100vh; background: #0a0a0f; color: #e0e0e0; font-family: Nunito, sans-serif; }
.admin-layout html, .admin-layout body { max-width: 100%; overflow-x: hidden; }
.admin-sidebar {
  width: 240px; background: #111120; border-right: 1px solid rgba(255,255,255,.06);
  padding: 24px 0; position: fixed; top: 0; left: 0; bottom: 0; overflow-y: auto;
  z-index: 100;
}
.admin-mobile-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  background: #17172a;
  color: #fff;
  font-weight: 800;
  font-size: .85rem;
}
.admin-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 95;
}
.admin-sidebar .as-logo { padding: 0 20px 20px; border-bottom: 1px solid rgba(255,255,255,.06); margin-bottom: 16px; }
.admin-sidebar .as-logo-text { font-family: Bangers, cursive; font-size: 1.4rem; color: #e63946; margin-left: 8px; }
.admin-nav-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 20px;
  cursor: pointer; border-radius: 0; transition: background .15s;
  color: #888; font-size: .88rem; font-weight: 700;
  border-left: 3px solid transparent;
}
.admin-nav-item:hover { background: rgba(255,255,255,.05); color: #ddd; }
.admin-nav-item.active { background: rgba(230,57,70,.1); color: #e63946; border-left-color: #e63946; }
.admin-main { margin-left: 240px; padding: 28px; min-height: 100vh; }
.admin-main { width: 100%; max-width: 100%; }
.admin-subtitle {
  margin: 2px 0 10px;
  font-size: .8rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #9a9ab5;
}
.admin-help {
  margin: 0 0 12px;
  font-size: .8rem;
  color: #9b9bb0;
  line-height: 1.5;
}
@media(max-width:900px) {
  .admin-mobile-toggle { display: inline-flex; }
  .admin-main { margin-left: 0; padding: 14px; }
  .admin-sidebar {
    width: 260px;
    transform: translateX(-100%);
    transition: transform .25s ease;
    z-index: 110;
  }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-sidebar .as-label { display: inline; }
  .admin-sidebar .as-logo-text { display: inline; }
  .admin-sidebar-overlay.open { display: block; }
}
@media(max-width:620px) {
  .admin-card { padding: 14px; border-radius: 12px; }
  .admin-form-row { grid-template-columns: 1fr; gap: 10px; }
  .admin-form-group input,
  .admin-form-group select,
  .admin-form-group textarea { font-size: .95rem; }
  .admin-btn { width: 100%; padding: 11px 14px; }
  .admin-table { font-size: .78rem; min-width: 640px; }
  .admin-stat-row { grid-template-columns: 1fr 1fr; }
}

body.admin-guest .admin-sidebar,
body.admin-guest .admin-sidebar-overlay,
body.admin-guest .admin-mobile-toggle {
  display: none !important;
}
body.admin-guest .admin-main {
  margin-left: 0 !important;
  padding: 20px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.admin-guest #adminLoginSection {
  width: 100%;
  max-width: 520px;
}

.admin-card { background: #141425; border: 1px solid rgba(255,255,255,.07); border-radius: 16px; padding: 22px; margin-bottom: 20px; }
.admin-card h3 { font-size: 1rem; font-weight: 800; margin-bottom: 16px; color: #e0e0e0; }
.admin-stat-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-bottom: 24px; }
.admin-stat-card { background: #141425; border: 1px solid rgba(255,255,255,.07); border-radius: 14px; padding: 18px; text-align: center; }
.admin-stat-card .asc-val { font-size: 2rem; font-weight: 900; color: #e63946; }
.admin-stat-card .asc-label { font-size: .78rem; color: #666; margin-top: 4px; }

.admin-table { width: 100%; border-collapse: collapse; font-size: .83rem; }
.admin-table th { text-align: left; padding: 10px 12px; color: #666; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,.06); }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.04); color: #ccc; }
.admin-table tr:hover td { background: rgba(255,255,255,.03); }

.admin-form-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 14px; }
.admin-form-group { display: flex; flex-direction: column; gap: 6px; }
.admin-form-group label { font-size: .78rem; color: #888; font-weight: 700; }
.admin-form-group input,
.admin-form-group select,
.admin-form-group textarea {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px; padding: 10px 12px; color: #e0e0e0; font-size: .88rem;
  font-family: Nunito, sans-serif;
}
.admin-form-group textarea { min-height: 80px; resize: vertical; }
.admin-btn { background: #e63946; border: none; border-radius: 8px; padding: 10px 20px; color: #fff; font-weight: 800; cursor: pointer; font-size: .88rem; }
.admin-btn.secondary { background: rgba(255,255,255,.1); color: #ddd; }
.admin-btn.danger { background: #c62828; }
.admin-btn.success { background: #2dc653; color: #111; }
.admin-img-preview { width: 80px; height: 110px; object-fit: cover; border-radius: 8px; margin-top: 6px; border: 1px solid rgba(255,255,255,.1); }
.admin-badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: .7rem; font-weight: 800; }
.admin-badge.active { background: rgba(45,198,83,.15); color: #2dc653; }
.admin-badge.inactive { background: rgba(255,89,94,.15); color: #ff595e; }
.admin-badge.premium { background: rgba(255,214,10,.15); color: #ffd60a; }
.admin-search-bar { display: flex; gap: 10px; margin-bottom: 16px; }
.admin-search-bar input { flex: 1; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 8px; padding: 10px 14px; color: #e0e0e0; font-size: .88rem; }
.admin-pagination { display: flex; gap: 8px; align-items: center; margin-top: 16px; }
.admin-page-btn { background: rgba(255,255,255,.07); border: none; border-radius: 6px; padding: 6px 14px; color: #aaa; cursor: pointer; }
.admin-page-btn.active { background: #e63946; color: #fff; }

/* Upload image area */
.upload-area {
  border: 2px dashed rgba(255,255,255,.15); border-radius: 10px; padding: 20px;
  text-align: center; cursor: pointer; transition: all .2s; margin-top: 6px;
}
.upload-area:hover { border-color: #e63946; background: rgba(230,57,70,.05); }
.upload-area input[type=file] { display: none; }
.upload-area .ua-icon { font-size: 2rem; }
.upload-area .ua-text { font-size: .82rem; color: #666; margin-top: 4px; }

/* ─── GENRE TAGS (smaller) ──────────────────────────────────────── */
.genre-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.gtab {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px; padding: 5px 12px; color: var(--text2);
  font-size: .78rem; font-weight: 700; cursor: pointer; transition: all .15s;
  white-space: nowrap;
}
.gtab.active, .gtab:hover { background: var(--red, #e63946); color: #fff; border-color: transparent; }

/* ─── RESPONSIVE FIXES ──────────────────────────────────────────── */
@media(max-width: 480px) {
  .nav-right .wallet-btn { display: none; }
  .wallet-in-drawer { display: flex !important; }
}
.wallet-in-drawer { display: none; }

/* ─── COIN MANGA WALL ───────────────────────────────────────────── */
.coin-wall {
  max-width: 420px; margin: 40px auto; padding: 32px 24px;
  background: rgba(255,214,10,.05); border: 1px solid rgba(255,214,10,.2);
  border-radius: 20px; text-align: center;
}
.coin-wall .cw-icon { font-size: 3rem; margin-bottom: 12px; }
.coin-wall .cw-title { font-family: Bangers, cursive; font-size: 1.8rem; color: var(--gold); margin-bottom: 8px; }
.coin-wall .cw-price { font-size: 1.2rem; font-weight: 900; color: var(--gold); margin: 12px 0; }
.coin-wall .cw-balance { font-size: .85rem; color: var(--text3); margin-bottom: 16px; }
.btn-buy-coin-manga {
  background: linear-gradient(135deg, var(--gold, #ffd60a), var(--orange, #ff9f1c));
  border: none; border-radius: 12px; padding: 14px 28px;
  color: #111; font-weight: 900; font-size: 1rem; cursor: pointer;
}

/* ═══════════════════════════════════════════════════════
   TUZATISHLAR v2 — Karta o'lchamlari, Toast, Yangilik, Mobil
═══════════════════════════════════════════════════════ */

/* ── MANGA KARTA — YANGI/TOP ROW da kichik ── */
#newRow.manga-row .manga-card,
#topRow.manga-row .manga-card {
  min-width: 130px !important;
  max-width: 160px;
}
#newRow.manga-row .manga-thumb,
#topRow.manga-row .manga-thumb {
  aspect-ratio: 3/4;
}

/* ── MANGA GRID kartalar — o'rtacha o'lcham ── */
.manga-grid .manga-card { max-width: 200px; }
.all-mangas-grid .manga-card { max-width: 220px; }

/* ── DETAIL sahifasidagi img — katta emas ── */
.detail-cover img { max-height: 340px; width: auto; max-width: 100%; }

/* ── TOAST — ko'zga tashlanarli ── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1e1e30;
  color: #fff;
  border-radius: 50px;
  padding: 13px 28px;
  font-size: .92rem;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 999999;
  white-space: nowrap;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  border: 1px solid rgba(255,255,255,.1);
  max-width: 90vw;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.success {
  background: linear-gradient(135deg, #1a8c3a, #2dc653);
  border-color: rgba(45,198,83,.4);
  color: #fff;
}
.toast.error {
  background: linear-gradient(135deg, #8c1a1a, #e63946);
  border-color: rgba(230,57,70,.4);
}
.toast.info {
  background: linear-gradient(135deg, #1a3a8c, #2a5fc4);
  border-color: rgba(42,95,196,.4);
}

/* ── YANGILIK SAHIFASI ── */
.news-page-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}
.news-full-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.news-full-img-wrap { width: 100%; max-height: 360px; overflow: hidden; }
.news-full-img { width: 100%; height: 360px; object-fit: cover; display: block; }
.news-full-body { padding: 24px; }
.news-full-title {
  font-family: Bangers, cursive;
  font-size: 1.8rem;
  letter-spacing: 1px;
  margin: 10px 0 6px;
  color: var(--text);
}
.news-full-date { font-size: .78rem; color: var(--text2); margin-bottom: 16px; }
.news-full-content {
  font-size: .95rem;
  line-height: 1.8;
  color: var(--text2);
  white-space: pre-wrap;
}
.news-badge {
  background: rgba(230,57,70,.15);
  color: var(--red);
  border: 1px solid rgba(230,57,70,.2);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: .75rem;
  font-weight: 800;
}

/* ── READER PAGE — footer ko'rinmasin ── */
#readerPage footer,
#readerPage .navbar { display: none !important; }

/* ── MOBIL RESPONSIV ── */
@media (max-width: 480px) {
  /* Navbar wallet kichikroq */
  .wallet-btn .w-text { max-width: 80px; overflow: hidden; text-overflow: ellipsis; font-size: .7rem; }
  
  /* Manga grid 3 ustun */
  .manga-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 8px !important; }
  .all-mangas-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 8px !important; }
  
  /* Card kichikroq */
  .manga-info { padding: 6px !important; }
  .manga-name { font-size: .72rem !important; }
  
  /* Wallet modal */
  .wallet-modal { padding: 18px !important; }
  .coin-packs-grid { grid-template-columns: repeat(2, 1fr) !important; }
  
  /* Reader topbar */
  .reader-manga-name { display: none; }
  .reader-tb-left { gap: 6px; }
  .reader-back-btn { padding: 5px 8px; font-size: .7rem; }
  
  /* Toast */
  .toast { font-size: .82rem; padding: 11px 20px; bottom: 20px; }

  /* Detail sahifasi */
  .detail-cover img { max-height: 240px; }
  
  /* News sahifasi */
  .news-full-img { height: 200px; }
  .news-full-title { font-size: 1.3rem; }
}

@media (max-width: 360px) {
  .manga-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .all-mangas-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ── FOOTER BOSH SAHIFADA QOLSIN ── */
#detailPage footer,
#savedPage footer,
#allMangasPage footer,
#schedulePage footer,
#newsPage footer { display: none; }

/* ── READER FULLSCREEN ── */
/* #readerPage isolation removed */

/* ─── READER LOADING YAXSHILASH ─────────────────────────────────── */
.reader-loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 20px;
  background: #0d0d12;
}
.reader-loading-screen .rl-spinner {
  width: 52px; height: 52px;
  border: 4px solid rgba(255,255,255,.06);
  border-top-color: #e63946;
  border-radius: 50%;
  animation: spin .75s linear infinite;
}
.reader-loading-screen .rl-text {
  color: #666; font-size: .9rem; font-weight: 600;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:.5} 50%{opacity:1} }

/* Rasm yuklanish spinner */
.rp-page-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255,255,255,0.08);
  border-top-color: #e63946;
  border-radius: 50%;
  -webkit-animation: spin-kf 0.8s linear infinite;
  animation: spin-kf 0.8s linear infinite;
  display: block;
  flex-shrink: 0;
}
@-webkit-keyframes spin-kf {
  0% { -webkit-transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); }
}
@keyframes spin-kf {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── SHRIFT YAXSHILASH — Menyu shriftiga moslashtirish ──────────── */
/* Barcha UI elementlari uchun Nunito */
.reader-ch-label,
.chap-drawer-title,
.reader-manga-name,
.end-divider span,
.reader-back-btn {
  font-family: 'Nunito', sans-serif !important;
  font-weight: 800;
  letter-spacing: .3px;
}
.section-title,
.c-title,
.detail-title,
.feat-text h3,
.saved-hero-text h2 {
  font-family: 'Nunito', sans-serif !important;
  font-weight: 900;
  letter-spacing: .5px;
}
.modal-logo span,
.nav-logo,
.reader-end-zone .pw-title,
.premium-wall .pw-title {
  font-family: 'Bangers', cursive !important;
}

/* ─── AVATAR PREVIEW ─────────────────────────────────────────────── */
#avatarPreview {
  background-size: cover !important;
  background-position: center !important;
  transition: opacity .2s;
}
#avatarPreview:hover { opacity: .85; }

/* ─── BTN-WALLET-DEPOSIT kenglik fix ────────────────────────────── */
.btn-wallet-deposit {
  flex: 1;
  margin-bottom: 0 !important;
}
.wallet-deposit-btn-row {
  display: flex; gap: 8px; margin-bottom: 16px;
}

/* ── iOS / Android / Telegram Browser fixes ── */

/* Telegram WebView va eski Safari uchun dvh fallback */
@supports not (height: 100dvh) {
  #readerPage { height: -webkit-fill-available !important; }
}

/* iOS Safari bottom bar uchun navbar padding */
.navbar {
  padding-bottom: max(8px, env(safe-area-inset-bottom)) !important;
}

/* Reader topbar iOS notch */
.reader-topbar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 9999999 !important;
  padding-top: max(8px, env(safe-area-inset-top));
  padding-left: max(12px, env(safe-area-inset-left));
  padding-right: max(12px, env(safe-area-inset-right));
  transition: transform .3s ease !important;
}
.reader-topbar.hide {
  transform: translateY(-100%) !important;
}
#readerContent {
  padding-top: 52px;
}

/* Wallet modal iOS bottom */
.wallet-modal {
  padding-bottom: max(24px, env(safe-area-inset-bottom)) !important;
  max-height: 92dvh !important;
  max-height: 92vh !important;
}

/* Tap highlight o'chirish — barcha interaktiv elementlar */
* { -webkit-tap-highlight-color: transparent; }

/* Rasm siqilishini oldini olish */
.rp-direct-img {
  -webkit-user-drag: none !important;
  user-drag: none !important;
  pointer-events: none !important;
}

/* Telegram in-app browser scroll muammosi */
/* overscroll-behavior removed — breaks Android scroll */

/* iOS input zoom oldini olish */
input, select, textarea {
  font-size: 16px !important;
}

/* Modal ochilganda reader-mode overflow */
body.reader-mode.modal-open #readerPage {
  overflow: hidden !important;
}
body.modal-open .modal-overlay {
  z-index: 9999990 !important;
}
body.modal-open .wallet-overlay {
  z-index: 9999990 !important;
}

/* Rasmlar orasidagi qora chiziqlarni yo'qotish */
.reader-pages-wrap {
  gap: 0 !important;
  font-size: 0 !important;
  line-height: 0 !important;
}


/* navbar smooth hide */
.navbar { transition: transform .3s ease; }

/* ================================================================
   READER CSS — FINAL VERSION
   ================================================================ */

/* Spinner — rasm yuklanmaguncha */


@media (max-width: 600px) { .reader-pages-wrap { max-width: 100% !important; } }
@media (min-width: 1100px) { .reader-pages-wrap { max-width: 860px; } }
@media (min-width: 1400px) { .reader-pages-wrap { max-width: 960px; } }

/* ══ READER SCROLL FORCE FIX ══ */
body.reader-mode,
body.reader-mode html,
html:has(body.reader-mode) {
  overflow: unset !important;
  overflow-y: scroll !important;
  height: auto !important;
  position: static !important;
  touch-action: pan-y !important;
}
body.reader-mode #readerPage {
  overflow: visible !important;
  height: auto !important;
  min-height: 100vh !important;
  touch-action: pan-y !important;
}
body.reader-mode #readerContent {
  overflow: visible !important;
  height: auto !important;
  touch-action: pan-y !important;
}
