/* ═══════════════════════════════════════
   PATCH2.CSS — premium overrides
═══════════════════════════════════════ */

/* ─── Кнопка правил в хедере чата ─── */
.ch-rules-btn {
  margin-left: 6px;
  width: 26px; height: 26px;
  border-radius: 7px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--t3);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .18s; flex-shrink: 0;
}
.ch-rules-btn:hover { background: rgba(195,0,255,0.15); border-color: rgba(195,0,255,0.4); color: #c300ff }
.ch-rules-btn svg { width: 13px; height: 13px }

/* ─── Модал правил чата ─── */
.cr-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 2000;
  align-items: center; justify-content: center;
  padding: 16px;
}
.cr-overlay.on { display: flex }

.cr-modal {
  background: var(--bg2);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  width: 100%; max-width: 440px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  animation: crIn .22s cubic-bezier(.22,1,.36,1) both;
}
@keyframes crIn {
  from { opacity:0; transform: scale(.94) translateY(12px) }
  to   { opacity:1; transform: scale(1)  translateY(0) }
}

.cr-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.cr-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 16px; font-weight: 800; color: var(--t1);
}
.cr-title svg { width: 20px; height: 20px; color: #c300ff }
.cr-close {
  width: 30px; height: 30px; border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--t3); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.cr-close:hover { background: rgba(255,80,80,0.15); color: var(--red); border-color: rgba(255,80,80,0.3) }
.cr-close svg { width: 14px; height: 14px }

.cr-body {
  overflow-y: auto; padding: 16px 20px 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.cr-body::-webkit-scrollbar { width: 3px }
.cr-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px }

.cr-intro {
  font-size: 12px; color: var(--t2); line-height: 1.5;
  background: rgba(195,0,255,0.07);
  border: 1px solid rgba(195,0,255,0.18);
  border-radius: 10px; padding: 10px 13px;
  margin: 0;
}

.cr-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px }

.cr-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 11px 13px; border-radius: 11px;
  border: 1px solid transparent;
}
.cr-bad { background: rgba(255,60,60,0.07); border-color: rgba(255,60,60,0.15) }
.cr-ok  { background: rgba(0,212,100,0.07); border-color: rgba(0,212,100,0.15) }

.cr-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cr-bad .cr-icon { background: rgba(255,60,60,0.15) }
.cr-ok  .cr-icon { background: rgba(0,212,100,0.15) }
.cr-bad .cr-icon svg { width: 16px; height: 16px; color: #ff5050 }
.cr-ok  .cr-icon svg { width: 16px; height: 16px; color: #00d464 }

.cr-item > div:last-child { display: flex; flex-direction: column; gap: 2px }
.cr-item strong { font-size: 13px; font-weight: 700; color: var(--t1) }
.cr-item span { font-size: 11px; color: var(--t3); line-height: 1.4 }

.cr-footer {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 11px 13px; border-radius: 10px;
  background: rgba(255,180,0,0.07);
  border: 1px solid rgba(255,180,0,0.2);
  font-size: 11px; color: #ffb800; line-height: 1.5;
}
.cr-footer svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px }

/* ─── Стат-строки в играх (.gs / .sl / .sv) ─── */
.gs {
  display: flex; flex-direction: column; gap: 6px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px; padding: 10px 12px;
}

.gs .sb { display: flex; align-items: center; justify-content: space-between; gap: 6px }
.gs .sb + .sb { border-top: 1px solid rgba(255,255,255,0.05); padding-top: 6px }

.sl { font-size: 10px; text-transform: uppercase; letter-spacing: .7px; color: var(--t3); font-weight: 700 }
.sv { font-size: 15px; font-weight: 800; color: var(--t1); font-variant-numeric: tabular-nums }

/* ─── Иконки SVG внутри кнопок ─── */
.gbtn svg { width: 1em; height: 1em; vertical-align: -0.15em; flex-shrink: 0 }

/* ─── Mines auto-pick ─── */
.m-pick-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 12px; border-radius: 9px;
  background: rgba(139,0,255,0.1);
  border: 1px solid rgba(139,0,255,0.25);
  color: #b07fe0; font-size: 13px; font-weight: 700;
  transition: all .18s; cursor: pointer;
}

.m-pick-btn:hover:not(:disabled) {
  background: rgba(139,0,255,0.18);
  border-color: rgba(139,0,255,0.45); color: #c99ef0;
}

.m-pick-btn:disabled { opacity: .35; cursor: not-allowed }
.m-pick-btn .pick-icon { font-size: 12px; color: inherit }

/* ─── Live bet slot wrapper ─── */
.lbt-wrap {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px; overflow: hidden; margin-top: 4px;
}

.lb-slot .lbt-wrap,
.lb-slot > div { border-radius: 14px; overflow: hidden }

.lbt { margin-top: 20px }

.lbt-title {
  font-size: 15px; font-weight: 800; color: var(--t1);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 9px;
}

.lbt-title::before {
  content: ''; width: 3px; height: 17px;
  background: linear-gradient(to bottom, var(--cyan), var(--mag));
  border-radius: 2px; flex-shrink: 0;
}

.lbt-hdr {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1fr 1fr 1fr;
  padding: 8px 14px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .7px; color: var(--t3);
  background: rgba(0,0,0,0.15);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.lbr {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1fr 1fr 1fr;
  padding: 10px 14px; font-size: 12px;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background .15s;
}

.lbr:last-child  { border-bottom: none }
.lbr:hover { background: rgba(255,255,255,0.03) }

.lbr .lb-u {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; color: var(--t1); overflow: hidden;
}

.lbr .lb-av {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 800; color: #fff; flex-shrink: 0;
}

.lbr .lb-uname {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100px;
}

.lbr .lb-g { color: var(--t2) }
.lbr .lb-b { color: var(--t2); font-variant-numeric: tabular-nums }
.lbr .lb-m { font-weight: 700; color: var(--t3); font-variant-numeric: tabular-nums }
.lbr .lb-p { font-weight: 800; font-variant-numeric: tabular-nums }
.lbr .lb-p.w { color: var(--grn) }
.lbr .lb-p.l { color: var(--red) }
.lbr .lb-p.p { color: var(--t3) }

@keyframes lbrIn {
  from { opacity: 0; background: rgba(0,240,255,0.07) }
  to   { opacity: 1; background: transparent }
}
.lbr.new-row { animation: lbrIn .55s ease }

.lb-slot { margin-top: 16px }

/* ─── LTAG badges ─── */
.ltag {
  font-size: 9px; font-weight: 800;
  padding: 2px 8px; border-radius: 20px;
  letter-spacing: .5px; text-transform: uppercase; flex-shrink: 0;
}

.ltag.live {
  background: rgba(255,61,107,0.14); color: #ff7a90;
  border: 1px solid rgba(255,61,107,0.25);
}

.ltag.new {
  background: rgba(0,212,255,0.1); color: var(--accent);
  border: 1px solid rgba(0,212,255,0.22);
}

/* ─── Referral program ─── */
.rp-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, #0d0d14 0%, #10101a 50%, #0c0c11 100%);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 20px; padding: 48px 32px;
  margin-bottom: 20px; text-align: center;
  border-top: 2px solid rgba(0,240,255,0.3);
}

.rp-hero-orb { position: absolute; border-radius: 50%; filter: blur(60px); pointer-events: none }

.rp-hero-orb1 {
  width: 260px; height: 260px; top: -80px; left: -60px;
  background: rgba(0,212,255,0.06);
}

.rp-hero-orb2 {
  width: 200px; height: 200px; bottom: -60px; right: -40px;
  background: rgba(139,0,255,0.06);
}

.rp-hero-inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  align-items: center; gap: 10px;
}

.rp-hero-icon {
  width: 64px; height: 64px; border-radius: 16px;
  background: rgba(0,212,255,0.1);
  border: 1px solid rgba(0,212,255,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: var(--accent); margin-bottom: 4px;
}

.rp-hero-title { font-size: 28px; font-weight: 900; color: var(--t1); letter-spacing: -.5px }
.rp-hero-sub   { font-size: 14px; color: var(--t2); line-height: 1.5; max-width: 420px }
.rp-hero-sub strong { color: var(--accent) }

/* Balance card */
.rp-balance-card {
  position: relative;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px; padding: 20px 22px;
  margin-bottom: 14px; overflow: hidden;
}

.rp-balance-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 60%);
}

.rp-balance-glow {
  position: absolute; top: -40px; right: -40px;
  width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,212,255,0.07), transparent 70%);
  pointer-events: none;
}

.rp-balance-top {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 8px;
}

.rp-balance-label {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .7px; color: var(--t3);
  display: flex; align-items: center; gap: 6px;
}

.rp-balance-hint {
  font-size: 10px; color: var(--t3);
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  padding: 2px 8px; border-radius: 20px;
}

.rp-balance-amount {
  font-size: 32px; font-weight: 900; color: var(--accent);
  font-variant-numeric: tabular-nums; margin-bottom: 12px; letter-spacing: -1px;
}

#refWithdrawBlock {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.rp-wd-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; font-weight: 800; font-size: 13px;
  padding: 9px 18px; border-radius: 10px;
  transition: transform .15s, box-shadow .15s; cursor: pointer; border: none;
}

.rp-wd-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,212,255,0.3) }

.rp-balance-note { font-size: 11px; color: var(--t3); margin-top: 8px; text-align: center; }

/* Mini stats */
.rp-mini-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-bottom: 16px;
}

.rp-mini-stat {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px; padding: 14px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center;
}

.rp-ms-icon { font-size: 20px }
.rp-ms-val  { font-size: 20px; font-weight: 900; color: var(--t1); font-variant-numeric: tabular-nums }
.rp-ms-lbl  { font-size: 10px; color: var(--t3); text-transform: uppercase; letter-spacing: .5px; font-weight: 700 }

/* Link card */
.rp-link-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px; padding: 14px 16px; margin-bottom: 16px;
}

.rp-link-label {
  font-size: 11px; font-weight: 700; color: var(--t3);
  text-transform: uppercase; letter-spacing: .6px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}

.rp-link-row { display: flex; align-items: center; gap: 8px }

.rp-link-url {
  flex: 1; background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 9px; padding: 8px 12px;
  font-size: 12px; color: var(--accent);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.rp-copy-btn {
  display: flex; align-items: center; gap: 6px;
  background: rgba(0,212,255,0.1);
  border: 1px solid rgba(0,212,255,0.25);
  color: var(--accent); font-size: 12px; font-weight: 700;
  padding: 8px 14px; border-radius: 9px;
  transition: all .15s; cursor: pointer; flex-shrink: 0;
}

.rp-copy-btn:hover { background: rgba(0,212,255,0.2); border-color: rgba(0,212,255,0.4) }

/* Section header */
.rp-section-hd {
  font-size: 13px; font-weight: 800; color: var(--t1);
  margin-bottom: 12px; margin-top: 20px;
  display: flex; align-items: center; gap: 8px;
}

.rp-section-hd::before {
  content: ''; width: 3px; height: 16px;
  background: linear-gradient(to bottom, var(--cyan), var(--mag));
  border-radius: 2px; flex-shrink: 0;
}

/* Tiers */
.rp-tiers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px; margin-bottom: 8px;
}

.rp-tier {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px; padding: 16px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  text-align: center; transition: border-color .18s, transform .18s; cursor: default;
}

.rp-tier:hover { transform: translateY(-2px); border-color: rgba(0,212,255,0.2) }

.rp-tier.active-tier {
  border-color: var(--accent) !important;
  background: rgba(0,212,255,0.06);
}

.rp-tier-medal {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; margin-bottom: 2px;
}

.rp-tier1 .rp-tier-medal { background: rgba(46,204,113,0.1); border-color: rgba(46,204,113,0.2); color: var(--grn) }
.rp-tier2 .rp-tier-medal { background: rgba(205,127,50,0.1); border-color: rgba(205,127,50,0.2); color: #cd7f32 }
.rp-tier3 .rp-tier-medal { background: rgba(176,184,196,0.1); border-color: rgba(176,184,196,0.2); color: #b0b8c4 }
.rp-tier4 .rp-tier-medal { background: rgba(255,215,0,0.1); border-color: rgba(255,215,0,0.2); color: var(--gold) }
.rp-tier5 .rp-tier-medal { background: rgba(0,240,255,0.1); border-color: rgba(0,240,255,0.2); color: var(--cyan) }
.rp-tier6 .rp-tier-medal { background: rgba(139,0,255,0.1); border-color: rgba(139,0,255,0.2); color: var(--mag) }

.rp-tier-pct  { font-size: 20px; font-weight: 900; color: var(--t1) }
.rp-tier-name { font-size: 11px; font-weight: 700; color: var(--t2) }
.rp-tier-range { font-size: 10px; color: var(--t3) }

/* Referrals table */
.rp-table-wrap {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px; overflow: hidden; margin-bottom: 20px;
}

.rp-table { width: 100%; border-collapse: collapse; font-size: 12px }

.rp-table thead tr { background: rgba(0,0,0,0.15) }

.rp-table th {
  padding: 9px 14px; text-align: left;
  font-size: 10px; text-transform: uppercase;
  letter-spacing: .6px; color: var(--t3); font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.rp-table td {
  padding: 9px 14px; color: var(--t2);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.rp-table tbody tr:last-child td { border-bottom: none }
.rp-table tbody tr:hover { background: rgba(255,255,255,0.03) }

.rp-empty { text-align: center; color: var(--t3); padding: 24px 14px !important; font-size: 13px; font-weight: 600 }

/* ─── DROPDOWN БАЛАНСА fix ─── */
.nbc-wrap { position: relative }

.nbc-drop {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  left: 0 !important;
  min-width: 220px;
  background: #0f0f16;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px; padding: 6px;
  flex-direction: column; z-index: 10001 !important;
  box-shadow: 0 16px 48px rgba(0,0,0,.7), 0 0 0 1px rgba(0,212,255,0.08);
  animation: fadeIn .15s ease;
  display: none;
}

.nbc-drop.open { display: flex !important }

.nav-center { position: relative; z-index: 1001 }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .rp-mini-stats { grid-template-columns: repeat(3, 1fr) }
  .rp-tiers { grid-template-columns: repeat(3, 1fr) }
  .rp-hero { padding: 28px 16px }
  .rp-hero-title { font-size: 22px }
}

@media (max-width: 480px) {
  .rp-mini-stats { gap: 6px }
  .rp-tiers { grid-template-columns: repeat(2, 1fr) }
  .rp-tier-pct { font-size: 17px }
}

/* ─── CHAT MESSAGE ANIMATION ─── */
@keyframes chatMessageIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.cm {
  animation: chatMessageIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cm-sysline {
  animation: chatMessageIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

