body {
  background: #efeff1;
}

#darkModeToggle,
.dark-mode-toggle {
  display: none !important;
}

.npc-wrap {
  max-width: 436px;
  margin: 18px auto 56px;
  padding: 0 10px;
}

.npc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.npc-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.npc-profile img {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  object-fit: cover;
}

.npc-profile h1 {
  margin: 0;
  color: #111111;
  font-size: 29px;
  font-weight: 700;
  line-height: 1.2;
}

.npc-profile p {
  margin: 2px 0 0;
  color: #6b7280;
  font-size: 14px;
}

.npc-back {
  text-decoration: none;
  background: #ffffff;
  color: #111111;
  border: 1px solid #111111;
  padding: 6px 17px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}

/* ── Grid ── */
.npc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

/* ── Card ── */
.npc-card {
  background: #ffffff;
  border: 1px solid #dddddd;
  border-radius: 16px;
  overflow: hidden;
  padding: 16px;
  width: 416px;
  height: 552px;
  box-sizing: border-box;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Media wrapper (blurred preview + badge overlays) ── */
.npc-media-wrap {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  height: 408px;
  margin-bottom: 0;
  background: #1a1a2e;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: pan-y;
}

.npc-media-wrap img,
.npc-media-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: blur(12px);
  transform: scale(1.05);
  -webkit-user-drag: none;
  user-select: none;
}

.npc-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.6);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
  background: #1a1a2e;
}

/* Badge row — top-left of image */
.npc-badge-row {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.npc-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.npc-badge svg {
  flex-shrink: 0;
}

/* ── Card title (below image) ── */
.npc-card-title {
  font-size: 15px;
  font-weight: 500;
  color: #111111;
  padding: 10px 2px 0;
  line-height: 1.35;
}

/* ── Carousel dot navigation ── */
.npc-dots {
  position: absolute;
  bottom: 11px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 7px;
  pointer-events: auto;
  width: fit-content;
  margin: 0 auto;
  background: rgba(0, 0, 0, 0.38);
  border-radius: 999px;
  padding: 6px 10px;
}

.npc-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.45);
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.2s, transform 0.2s;
  flex-shrink: 0;
}

.npc-dot.active {
  background: #ffffff;
  transform: scale(1.18);
}

/* ── Below-image row: date ── */
.npc-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 2px 10px;
}

.npc-card-date {
  color: #6b88a8;
  font-size: 12px;
}

/* ── Unlock button ── */
.npc-unlock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  width: 100%;
  padding: 9px 13px;
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  text-decoration: none;
  background: #0056B3;
  color: #ffffff;
  margin-top: auto;
  gap: 8px;
}

.npc-unlock-num {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}

.npc-unlock-label {
  flex: 1;
  text-align: center;
}

.npc-unlock-price {
  font-size: 15px;
  opacity: 1;
  flex-shrink: 0;
}

/* ── Other action buttons ── */
.npc-pay,
.npc-start-telegram,
.npc-close-success,
#npcCopyCommand,
.npc-open-invoice {
  display: block;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  width: 100%;
  padding: 12px 16px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  background: #0056B3;
  color: #ffffff;
}

#npcCheckoutModal {
  align-items: flex-end;
}

#npcCheckoutModal .npc-modal-card {
  width: min(420px, calc(100vw - 12px));
  border-radius: 28px 28px 0 0;
  padding: 12px 16px 16px;
  max-height: 72vh;
  overflow-y: auto;
  margin: 0 auto;
}

.npc-sheet-grip {
  width: 46px;
  height: 5px;
  border-radius: 999px;
  background: #d1d5db;
  margin: 0 auto 12px;
}

.npc-checkout-card h3 {
  margin: 4px 0 8px;
  font-size: 28px;
  line-height: 1.1;
  color: #0f0f10;
  font-weight: 800;
}

.npc-checkout-sub {
  margin: 0 0 8px;
  color: #6b7280;
  font-size: 12px;
}

#npcCheckoutItemText {
  margin: 0;
  color: #374151;
  font-size: 12px;
}

#npcCheckoutModal .npc-close {
  float: right;
  border: 0;
  background: #f3f4f6;
  color: #0f172a;
  width: 30px;
  height: 30px;
  border-radius: 999px;
}

#npcCheckoutModal .npc-modal-card label {
  margin-top: 10px;
  color: #4b5563;
}

#npcCheckoutModal .npc-modal-card input {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 10px 12px;
}

#npcCheckoutModal .npc-note {
  margin: 8px 0 10px;
  color: #6b7280;
}

.npc-delivery-guide {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 12px;
  margin: 0 0 10px;
}

.npc-delivery-guide strong {
  display: block;
  font-size: 12px;
  color: #0f172a;
  margin-bottom: 4px;
}

.npc-delivery-guide p {
  margin: 0;
  font-size: 12px;
  color: #475569;
  line-height: 1.45;
}

.npc-delivery-guide code {
  font-family: Consolas, monospace;
  font-size: 11px;
  background: #e2e8f0;
  border-radius: 6px;
  padding: 1px 5px;
  color: #1e293b;
}

#npcCheckoutModal .npc-pay {
  background: #0056B3;
  border-radius: 12px;
  padding: 11px 14px;
}

#npcCheckoutModal .npc-pay[disabled] {
  opacity: 0.65;
}

@media (max-width: 480px) {
  .npc-wrap {
    max-width: 100%;
    margin-top: 12px;
  }

  .npc-card {
    width: 100%;
    height: auto;
  }

  .npc-media-wrap {
    height: 300px;
  }

  #npcCheckoutModal .npc-modal-card {
    width: 100%;
    border-radius: 24px 24px 0 0;
  }
}

/* ── Legacy .npc-media kept for iframe etc ── */
.npc-media {
  background: #f8fafc;
  border-radius: 12px;
  overflow: hidden;
  height: 210px;
  margin-bottom: 10px;
}

.npc-media img,
.npc-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.npc-card h3 {
  display: none;
}

.npc-meta {
  display: none;
}

.npc-modal,
.npc-sheet {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 14, 26, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0s linear 0.28s;
}

.npc-modal.open,
.npc-sheet.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.28s ease, visibility 0s linear 0s;
}

.npc-modal-card {
  width: min(430px, calc(100vw - 24px));
  background: #ffffff;
  border-radius: 16px;
  padding: 16px;
  transform: translate3d(0, 16px, 0) scale(0.98);
  opacity: 0.98;
  will-change: transform, opacity;
  transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.28s ease;
}

.npc-modal.open .npc-modal-card {
  transform: translate3d(0, 0, 0) scale(1);
  opacity: 1;
}

.npc-modal-card h3 {
  margin: 0 0 8px;
}

.npc-close {
  float: right;
  border: 0;
  background: #f1f5f9;
  color: #0f172a;
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.npc-modal-card label {
  display: block;
  margin: 9px 0 6px;
  color: #334155;
  font-size: 13px;
}

.npc-modal-card input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
}

.npc-note {
  color: #64748b;
  margin: 8px 0 10px;
  font-size: 12px;
}

.npc-status {
  min-height: 20px;
  color: #b91c1c;
  margin-top: 8px;
  font-size: 12px;
}

.npc-price {
  margin-bottom: 8px;
  font-size: 18px;
  color: #0f172a;
  font-weight: 800;
}

.npc-sheet {
  align-items: flex-end;
}

.npc-sheet-card {
  width: min(900px, 100%);
  background: #ffffff;
  border-radius: 18px 18px 0 0;
  padding: 14px;
  max-height: 90vh;
  transform: translate3d(0, 24px, 0);
  opacity: 0.98;
  will-change: transform, opacity;
  transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.28s ease;
}

.npc-sheet.open .npc-sheet-card {
  transform: translate3d(0, 0, 0);
  opacity: 1;
}

@media (max-width: 768px) {
  .npc-modal-card {
    transform: translate3d(0, 22px, 0) scale(0.99);
  }

  .npc-sheet-card {
    transform: translate3d(0, 30px, 0);
  }
}

.npc-sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.npc-sheet-head button {
  border: 0;
  background: #f1f5f9;
  border-radius: 8px;
  width: 30px;
  height: 30px;
}

#npcPaymentFrame {
  width: 100%;
  height: 70vh;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
}

.npc-command-row {
  display: grid;
  grid-template-columns: 1fr 90px;
  gap: 8px;
}

.npc-success .npc-modal-card p {
  color: #334155;
}

/* ── Success card redesign ── */
@keyframes npcSuccessIn {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);  }
}

.npc-success-card {
  animation: npcSuccessIn .28s cubic-bezier(.22, 1, .36, 1) both;
  padding: 28px 24px 22px !important;
  box-shadow: 0 28px 70px rgba(0,0,0,.18), 0 0 0 1px rgba(0,86,179,.07) !important;
}

.npc-success-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8f1ff 0%, #d0e4ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 14px;
}

.npc-success-card h3 {
  margin: 0 0 4px !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  letter-spacing: -.25px;
  color: #0a0e1a !important;
}

.npc-success-divider {
  height: 1px;
  background: linear-gradient(90deg, #e2eaf5, transparent);
  margin: 12px 0 12px;
}

.npc-success-card p {
  font-size: 14px !important;
  line-height: 1.65 !important;
  color: #5a6a85 !important;
  margin: 0 0 16px !important;
}

.npc-bot-handle {
  display: inline-block;
  background: #f0f5ff;
  color: #0056B3;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 13px;
}

.npc-success-card .npc-command-wrap label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: #94a3b8;
  margin: 0 0 7px;
}

.npc-success-card input#npcStartCommand {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  color: #0f172a;
  font-size: 13px;
  font-family: monospace;
  padding: 10px 12px;
}

.npc-success-card #npcCopyCommand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px !important;
  width: auto !important;
  padding: 10px 16px !important;
  font-size: 13px !important;
  background: #0056B3 !important;
  color: #fff !important;
  box-shadow: 0 3px 10px rgba(0,86,179,.28);
  transition: filter .15s, transform .12s;
}

.npc-success-card #npcCopyCommand:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.npc-success-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.npc-success-actions .npc-start-telegram {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 10px !important;
  padding: 11px 16px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  background: #0056B3 !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(0,86,179,.3);
  transition: filter .15s, transform .12s;
  text-decoration: none;
  width: auto !important;
}

.npc-success-actions .npc-start-telegram:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.npc-success-actions .npc-close-success {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px !important;
  padding: 11px 16px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1.5px solid #e2e8f0 !important;
  box-shadow: none !important;
  width: auto !important;
  transition: background .15s, transform .12s;
}

.npc-success-actions .npc-close-success:hover {
  background: #e8edf5 !important;
  transform: translateY(-1px);
}

.npc-empty {
  padding: 22px;
  border-radius: 12px;
  border: 1px dashed #94a3b8;
  color: #475569;
  background: #ffffff;
}
