/* NIGHT ZONE — extras: лотерея + VIP (подключается после shop.css) */

/* ── Лотерея (страница кейсов) ── */
#lotteryBlock { margin: 0 0 30px; }
.lot-head {
  font-size: 20px;
  letter-spacing: 1.5px;
  margin: 0 0 14px;
  color: var(--txt, #e5e2d8);
}
.lot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.lot-card {
  background: var(--panel2, #14171c);
  border: 1px solid var(--border2, #2a2f37);
  border-radius: var(--r-sm, 8px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lot-title { font-weight: 700; font-size: 15px; color: var(--txt, #e5e2d8); }
.lot-prize { color: #ffd34d; font-size: 13px; font-weight: 600; }
.lot-meta { font-size: 12px; color: var(--muted, #8b9078); }
.lot-mine { font-size: 12px; color: var(--info, #5aa9e6); }
.lot-timer { font-size: 13px; font-weight: 700; color: var(--acc, #c8d44a); font-variant-numeric: tabular-nums; }
.lot-buy { display: flex; gap: 8px; margin-top: 4px; }
.lot-qty {
  width: 64px;
  background: var(--panel, #0e1116);
  border: 1px solid var(--border2, #2a2f37);
  border-radius: var(--r-sm, 8px);
  color: var(--txt, #e5e2d8);
  padding: 8px 6px;
  font-size: 13px;
  text-align: center;
}
.lot-buy-btn { flex: 1; }
.lot-empty { color: var(--muted, #8b9078); font-size: 13px; }
.lot-recent { margin-top: 20px; border-top: 1px solid var(--border2, #2a2f37); padding-top: 12px; }
.lot-recent-head {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--muted, #8b9078);
  margin-bottom: 8px;
}
.lot-result {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, .06);
}
.lot-result:last-child { border-bottom: none; }
.lot-res-title { color: var(--txt, #e5e2d8); }
.lot-res-win { color: #ffd34d; text-align: right; }
.lot-res-cancel { color: var(--muted, #8b9078); }

/* ── VIP-бейдж на карточке кейса (второй бейдж, слева) ── */
.case-badge-vip {
  left: 10px;
  right: auto;
  background: linear-gradient(135deg, #d4af37, #f5d76e);
  color: #1a1400;
  text-transform: none;
}

/* ── VIP-карточка в ЛК ── */
.vip-card { border-color: rgba(255, 211, 77, .35); }
.vip-card.vip-active { background: linear-gradient(135deg, rgba(255, 211, 77, .08), rgba(255, 211, 77, .015)); }
.vip-perks { list-style: none; margin: 10px 0; padding: 0; }
.vip-perks li { font-size: 13px; color: var(--txt, #c8d0d6); padding: 4px 0 4px 22px; position: relative; }
.vip-perks li::before { content: '✦'; position: absolute; left: 4px; color: #ffd34d; }
.vip-buy-btn { width: 100%; background: linear-gradient(135deg, #d4af37, #f5d76e); color: #1a1400; font-weight: 800; border: none; border-radius: 10px; padding: 10px; cursor: pointer; }
.vip-buy-btn:hover { filter: brightness(1.06); }

/* ── VIP promo strip (главная) ── */
.vip-strip { max-width: 1240px; margin: 18px auto 0; padding: 0 24px; }
.vip-strip-in {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px 20px; border-radius: 14px;
  background: linear-gradient(120deg, rgba(212, 175, 55, .14), rgba(212, 175, 55, .03));
  border: 1px solid rgba(255, 211, 77, .4);
  box-shadow: 0 0 0 1px rgba(255, 211, 77, .12), 0 8px 26px rgba(212, 175, 55, .08);
}
.vip-strip-txt { font-size: 14px; color: var(--txt, #c8d0d6); }
.vip-strip-txt b { color: #ffd34d; }
.vip-strip-btn {
  flex-shrink: 0; padding: 10px 20px; border-radius: 10px; text-decoration: none;
  background: linear-gradient(135deg, #d4af37, #f5d76e); color: #1a1400; font-weight: 800; font-size: 14px;
}
.vip-strip-btn:hover { filter: brightness(1.06); }
@media (max-width: 640px) { .vip-strip { padding: 0 14px; } .vip-strip-in { flex-direction: column; align-items: stretch; text-align: center; } }

/* VIP wide card at the top of the ЛК main column */
.vip-card-wide { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.vip-wide-left { flex: 1; min-width: 260px; }
.vip-card-wide .vip-perks { display: flex; flex-wrap: wrap; gap: 2px 18px; margin: 8px 0 0; }
.vip-card-wide .vip-buy-btn { width: auto; padding: 12px 22px; white-space: nowrap; }
@media (max-width: 640px) { .vip-card-wide { flex-direction: column; align-items: stretch; } .vip-card-wide .vip-buy-btn { width: 100%; } }

/* VIP active — unmistakable */
.vip-card-wide { position: relative; overflow: hidden; }
.vip-card.vip-active { border-color: rgba(255, 211, 77, .65); box-shadow: 0 0 0 1px rgba(255, 211, 77, .25), 0 10px 34px rgba(212, 175, 55, .18); }
.vip-glow { position: absolute; top: -60px; right: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 211, 77, .22), transparent 70%); pointer-events: none; }
.vip-active-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.vip-status-badge { display: inline-block; padding: 6px 14px; border-radius: 20px; background: linear-gradient(135deg, #d4af37, #f5d76e); color: #1a1400; font-weight: 900; font-size: 14px; letter-spacing: .04em; box-shadow: 0 4px 14px rgba(212, 175, 55, .35); }
.vip-until { font-size: 13px; color: var(--txt, #c8d0d6); }
.vip-until b { color: #ffd34d; }
.profile-vip { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 12px; background: linear-gradient(135deg, #d4af37, #f5d76e); color: #1a1400; font-size: 11px; font-weight: 900; vertical-align: middle; }

/* VIP avatar picker */
.vip-avatar-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.vip-avatar-btn { background: rgba(255, 211, 77, .12); border: 1px solid rgba(255, 211, 77, .4); color: #ffd34d; border-radius: 9px; padding: 7px 13px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.vip-avatar-btn:hover { background: rgba(255, 211, 77, .2); }
.vip-avatar-btn:disabled { opacity: .5; cursor: default; }
.ava-modal { position: fixed; inset: 0; z-index: 600; background: rgba(0, 0, 0, .7); display: flex; align-items: center; justify-content: center; padding: 20px; }
.ava-modal-in { background: var(--panel, #14181d); border: 1px solid var(--border, #2a2f37); border-radius: 16px; max-width: 860px; width: 100%; max-height: 84vh; display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.ava-modal-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border, #2a2f37); color: #fff; }
.ava-close { margin-left: auto; background: none; border: none; color: var(--dim, #9aa); font-size: 18px; cursor: pointer; }
.ava-grid { padding: 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; overflow-y: auto; }
.ava-cell { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 2px solid transparent; cursor: pointer; transition: border-color .12s, transform .12s; }
.ava-cell:hover { border-color: #ffd34d; transform: scale(1.04); }

/* История операций */
.hist-list { display: flex; flex-direction: column; max-height: 420px; overflow-y: auto; }
.hist-row { display: grid; grid-template-columns: 84px 1fr auto; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--border, #2a2f37); font-size: 13px; }
.hist-row:last-child { border-bottom: none; }
.hist-when { color: var(--dim, #9aa); font-family: var(--mono, monospace); font-size: 11.5px; }
.hist-what { color: var(--txt, #c8d0d6); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-delta { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hist-pos { color: #3ddc6b; }
.hist-neg { color: #f87171; }

/* ЛК: карточка исследований */
.rescard-row { display: grid; grid-template-columns: 140px 1fr auto; gap: 12px; align-items: center; padding: 7px 0; }
.rescard-fac { font-size: 13px; font-weight: 700; color: var(--txt, #c8d0d6); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rescard-bar { height: 8px; border-radius: 999px; background: var(--panel2, #171c24); overflow: hidden; }
.rescard-bar span { display: block; height: 100%; border-radius: 999px; }
.rescard-num { font-size: 12px; font-weight: 800; color: var(--dim, #9aa); font-variant-numeric: tabular-nums; }
.acc-link:hover { filter: brightness(1.15); }

/* Модалка пополнения баланса */
.topup-modal { position: fixed; inset: 0; z-index: 600; background: rgba(5,7,9,.72); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.topup-modal-card { width: 100%; max-width: 420px; background: var(--panel, #14181d); border: 1px solid var(--border, #2a2f37); border-radius: 16px; padding: 20px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.topup-modal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.topup-modal-ico { font-size: 24px; }
.topup-modal-title { font-size: 17px; font-weight: 800; color: #fff; }
.topup-modal-x { margin-left: auto; background: none; border: none; color: var(--dim, #9aa); font-size: 18px; cursor: pointer; }
.topup-modal-x:hover { color: #fff; }
.topup-modal .topup-presets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 10px; }
.topup-modal .topup-amt { padding: 12px; border-radius: 10px; background: var(--panel2, #171c24); border: 1px solid var(--border, #2a2f37); color: var(--txt, #e5e2d8); font-size: 15px; font-weight: 700; cursor: pointer; transition: border-color .12s, background .12s; }
.topup-modal .topup-amt:hover { border-color: var(--acc, #aef23a); background: rgba(174,242,58,.08); }
.topup-modal .topup-custom { display: flex; gap: 8px; }
.topup-modal .topup-input { flex: 1; background: var(--bg, #0e1116); border: 1px solid var(--border2, #333a44); border-radius: 10px; color: var(--txt, #e5e2d8); padding: 11px 12px; font-size: 14px; }
.topup-modal .topup-input:focus { outline: none; border-color: var(--acc, #aef23a); }
.topup-modal .topup-go { white-space: nowrap; }
.topup-modal-cancel { background: none; border: 1px solid var(--border2, #333a44); color: var(--dim, #9aa); border-radius: 10px; padding: 10px 16px; font-size: 14px; cursor: pointer; }
.topup-modal-cancel:hover { color: #fff; border-color: #556; }
.spec-modal-label { display: block; font-size: 12px; color: var(--dim, #9aa); margin-bottom: 5px; font-weight: 600; }

/* Специалист ГП — блок в профиле */
.spec-line { font-size: 12.5px; line-height: 1.45; border-radius: 10px; padding: 9px 11px; }
.spec-line.spec-ok { background: rgba(46,160,90,.12); border: 1px solid rgba(46,160,90,.35); color: #8fe0a8; }
.spec-line.spec-wait { background: rgba(230,201,143,.1); border: 1px solid rgba(230,201,143,.3); color: #e6c98f; }
.spec-line.spec-rej { background: rgba(226,138,138,.1); border: 1px solid rgba(226,138,138,.3); color: #e8a0a0; margin-bottom: 8px; }
.spec-apply-btn { width: 100%; }
