﻿/* ══════════════════════════════════════════════
   COINFLIP
══════════════════════════════════════════════ */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

#cfMainArea { padding-top: 24px !important; }

.cf-layout {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 14px;
  width: 100%;
  max-width: 1240px;
}
.cf-left {
  grid-column: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.cf-sidebar {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cf-section {
  background: var(--bg-card);
  border: 1px solid rgba(var(--accent-rgb),0.14);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cf-section-hdr {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-mute);
  text-transform: uppercase;
}
.cf-section-line { flex: 1; height: 1px; background: rgba(var(--accent-rgb),0.08); }
.cf-section-cnt {
  background: rgba(var(--accent-rgb),0.08);
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}
.cf-empty-hint {
  text-align: center;
  padding: 20px 0;
  font-size: 13px;
  color: #1a3050;
}

/* ══ GAME CARD ══ */
.cf-game-card {
  background: var(--bg);
  border: 1px solid rgba(var(--accent-rgb),0.12);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.cf-game-card + .cf-game-card { margin-top: 8px; }

.cf-gc-hdr {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: var(--bg-card);
  border-bottom: 1px solid rgba(var(--accent-rgb),0.12);
}
.cf-gc-id { font-size: 11px; font-weight: 700; color: var(--text-mute); letter-spacing: 0.5px; }
.cf-gc-bank { font-size: 12px; color: var(--text-faint); }
.cf-gc-bank strong { color: var(--accent); }
.cf-gc-mult {
  font-size: 12px; font-weight: 800; color: #4ad476;
  background: #0d1f14; padding: 1px 7px; border-radius: 6px; border: 1px solid #1f3a28;
}
.cf-gc-status { margin-left: auto; font-size: 11px; font-weight: 700; letter-spacing: 0.5px; }
.cf-gc-status.waiting  { color: var(--accent); }
.cf-gc-status.running  { color: #a47fd4; animation: cf-blink .7s infinite alternate; }
.cf-gc-status.done     { color: var(--text-mute); }
@keyframes cf-blink { from { opacity:1; } to { opacity:0.35; } }

/* Slots */
.cf-gc-slots {
  display: flex;
  gap: 8px;
  padding: 12px 12px 12px;
  flex-wrap: nowrap;
}

/* ══ Slots wrapper — контекст для оверлея ══ */
.cf-gc-slots-wrap {
  position: relative;
}

/* Слоты скрыты только во время прокрутки и после */
.cf-game-card.spinning .cf-gc-slots,
.cf-game-card.done-spin .cf-gc-slots { display: none; }

/* Оверлей с отсчётом поверх слотов */
.cf-cd-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13, 17, 23, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  border-radius: 0 0 4px 4px;
}

.cf-slot {
  flex: 1; min-width: 0; height: 90px; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 5px; position: relative; overflow: hidden;
}
.cf-slot.filled {
  background: var(--slot-dark, #152030);
  border: 1.5px solid var(--slot-border, #1a9fff);
}
.cf-slot.empty {
  background: #0a0f18; border: 2px dashed #1f2a38;
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.cf-slot.empty:hover { border-color: var(--accent); background: #0e1e30; }
.cf-slot.empty-locked { background: #080d14; border: 1px solid #0f161f; }

.cf-slot-av {
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900;
}
.cf-slot-nick {
  font-size: 11px; font-weight: 600; color: var(--text-dim);
  max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cf-slot-amt { font-size: 12px; font-weight: 700; color: var(--accent); }
.cf-slot-you {
  position: absolute; top: 5px; right: 7px;
  font-size: 9px; font-weight: 800; color: #4ad476;
  letter-spacing: 0.5px; text-transform: uppercase;
}
.cf-slot-plus { font-size: 28px; font-weight: 300; color: #1a3050; line-height: 1; }
.cf-slot-add { font-size: 10px; font-weight: 700; color: #1a3050; text-transform: uppercase; letter-spacing: 0.5px; }
.cf-slot.empty:hover .cf-slot-plus,
.cf-slot.empty:hover .cf-slot-add { color: var(--accent); }

/* ══ SPIN STRIP ══ */
.cf-spin-area {
  padding: 10px 12px 12px;
  display: flex; flex-direction: column; gap: 7px;
}

.cf-strip-outer {
  position: relative;
  width: 100%;
  height: 90px;
  overflow: hidden;
  border-radius: 14px;
  background: #060b11;
  border: 1px solid rgba(var(--accent-rgb),0.14);
}

.cf-strip-track {
  position: absolute;
  top: 8px; left: 0;
  height: calc(100% - 16px);
  display: flex;
  align-items: stretch;
  gap: 4px;
  transform: translateX(0);
  will-change: transform;
}

.cf-strip-seg {
  flex-shrink: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 8px;
  border-radius: 10px;
}

/* Avatar inside strip */
.cf-seg-av {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.2);
  overflow: hidden;
}
.cf-seg-nick {
  font-size: 11px;
  font-weight: 700;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

/* Pointer */
.cf-strip-ptr {
  position: absolute; top: 8px; bottom: 8px; left: 50%;
  width: 2px; transform: translateX(-50%);
  background: rgba(255,255,255,0.85);
  z-index: 3; pointer-events: none;
  box-shadow: 0 0 6px rgba(255,255,255,0.4);
}
.cf-strip-ptr::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  border-left: 6px solid transparent; border-right: 6px solid transparent;
  border-top: 8px solid rgba(255,255,255,0.85);
}
.cf-strip-ptr::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  border-left: 6px solid transparent; border-right: 6px solid transparent;
  border-bottom: 8px solid rgba(255,255,255,0.85);
}

.cf-strip-fade-l,
.cf-strip-fade-r {
  position: absolute; top: 0; bottom: 0; width: 70px;
  pointer-events: none; z-index: 2;
}
.cf-strip-fade-l { left: 0;  background: linear-gradient(to right, #060b11 0%, transparent 100%); }
.cf-strip-fade-r { right: 0; background: linear-gradient(to left,  #060b11 0%, transparent 100%); }

/* ══ Mini card (чужие игры) ══ */
.cf-game-card.mini .cf-gc-hdr     { padding: 6px 12px; }
.cf-game-card.mini .cf-gc-id      { font-size: 10px; }
.cf-game-card.mini .cf-gc-bank    { font-size: 11px; }
.cf-game-card.mini .cf-gc-mult    { font-size: 10px; padding: 1px 5px; }
.cf-game-card.mini .cf-spin-area  { padding: 6px 10px 8px; }
.cf-game-card.mini .cf-strip-outer {
  height: 72px;
  border-radius: 12px;
}
.cf-game-card.mini .cf-strip-track {
  top: 6px;
  height: calc(100% - 12px);
}
.cf-game-card.mini .cf-strip-ptr  { top: 6px; bottom: 6px; }
.cf-game-card.mini .cf-strip-ptr::before { border-width: 6px 5px 0; }
.cf-game-card.mini .cf-strip-ptr::after  { border-width: 0 5px 6px; }
.cf-game-card.mini .cf-seg-av     { width: 39px; height: 39px; font-size: 11px; border-width: 1.5px; }
.cf-game-card.mini .cf-result-row { padding: 10px 14px; }
.cf-game-card.mini .cf-res-nick   { font-size: 13px; }
.cf-game-card.mini .cf-res-label  { font-size: 11px; }
.cf-game-card.mini .cf-res-pot-val   { font-size: 15px; }
.cf-game-card.mini .cf-res-pot-label { font-size: 10px; }

/* ══ Countdown number ══ */
.cf-countdown {
  font-size: 68px; font-weight: 900; letter-spacing: -2px;
  color: var(--accent);
  text-shadow: 0 0 40px rgba(var(--accent-rgb),0.55);
  animation: cf-cd-pop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  line-height: 1;
}
@keyframes cf-cd-pop {
  from { transform: scale(1.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.cf-countdown[data-n="0"] { color: #4ad476; text-shadow: 0 0 40px rgba(74,212,118,0.55); }

/* ══ Result ══ */
.cf-result-row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 18px; border-radius: 10px;
  background: linear-gradient(135deg, #0f1a10, var(--bg));
  border: 1px solid rgba(74,212,118,0.25);
  animation: cf-res-in 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes cf-res-in {
  from { transform: scale(0.88); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.cf-res-av {
  width: 56px; height: 56px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 2px solid rgba(74,212,118,0.4);
  box-shadow: 0 0 12px rgba(74,212,118,0.2);
}
.cf-res-av-ini {
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 900;
}

.cf-res-info { flex: 1; min-width: 0; }
.cf-res-nick {
  font-size: 15px; font-weight: 800;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cf-res-label { font-size: 11px; font-weight: 600; color: #4ad476; margin-top: 2px; text-transform: uppercase; letter-spacing: 0.5px; }

.cf-res-pot { text-align: right; flex-shrink: 0; }
.cf-res-pot-val  { font-size: 18px; font-weight: 900; color: var(--accent); }
.cf-res-pot-label { font-size: 10px; font-weight: 600; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 1px; }

/* ══ OPEN GAMES ══ */
.cf-open-list { display: flex; flex-direction: column; gap: 6px; }
.cf-open-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border: 1px solid rgba(var(--accent-rgb),0.14);
  border-radius: 10px; padding: 9px 12px;
  transition: border-color 0.15s;
}
.cf-open-row:hover { border-color: #2a3a4a; }
.cf-or-creator { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.cf-or-av {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 900; flex-shrink: 0; border: 1px solid transparent;
}
.cf-or-nick { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-or-sub  { font-size: 10px; font-weight: 700; letter-spacing: 0.5px; }
.cf-or-dots { display: flex; gap: 5px; align-items: center; flex-shrink: 0; }

.cf-or-slot-av {
  width: 30px; height: 30px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 1.5px solid;
}
.cf-or-slot-ini {
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 900;
}
.cf-or-slot-empty {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  border: 1.5px dashed #2a3a4a;
}
.cf-or-bet  { font-size: 14px; font-weight: 800; color: var(--accent); flex-shrink: 0; min-width: 68px; text-align: right; }
.cf-or-join-btn {
  height: 30px; padding: 0 14px; border-radius: 8px;
  background: var(--gradient-accent);
  color: var(--bg); font-size: 11px; font-weight: 800;
  border: none; cursor: pointer; flex-shrink: 0; transition: opacity 0.2s;
}
.cf-or-join-btn:hover { opacity: 0.85; }
.cf-or-join-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.cf-or-in-game {
  height: 30px; padding: 0 14px; border-radius: 8px;
  display: flex; align-items: center;
  background: rgba(74,212,118,0.1); border: 1px solid rgba(74,212,118,0.3);
  color: #4ad476; font-size: 11px; font-weight: 800;
  flex-shrink: 0; letter-spacing: 0.3px;
}

/* ══ SIDEBAR — crash-style ══ */
.cf-bet-card {
  background: var(--bg-card);
  border: 1px solid rgba(var(--accent-rgb),0.18);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cf-bet-hdr {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700;
  color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em;
}

.cf-bet-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent); box-shadow: 0 0 6px rgba(var(--accent-rgb),0.6);
}

.cf-bet-body { display: flex; flex-direction: column; gap: 10px; }

.cf-field-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  color: var(--text-mute); text-transform: uppercase; margin-bottom: 8px;
}
.cf-field-label-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}

.cf-count-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; }
.cf-count-btn {
  height: 40px; border-radius: 10px; background: var(--bg-card); border: 1px solid rgba(var(--accent-rgb),0.12);
  color: var(--text-faint); font-size: 16px; font-weight: 800; cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.cf-count-btn:hover { background: rgba(var(--accent-rgb),0.12); border-color: #2a3f5a; color: var(--text); }
.cf-count-btn.active { background: #1a1408; border-color: rgba(var(--accent-rgb),0.5); color: var(--accent); }

/* Ввод суммы — crash-style */
.cf-sb-amt-row {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  gap: 8px; align-items: center;
}

.cf-pm {
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid transparent;
  font-size: 20px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
  line-height: 1;
}
.cf-pm-minus { background: rgba(212,99,74,0.12); border-color: rgba(212,99,74,0.2); color: #d4634a; }
.cf-pm-minus:hover { background: rgba(212,99,74,0.22); border-color: rgba(212,99,74,0.4); color: #f0795e; transform: scale(1.08); }
.cf-pm-plus  { background: rgba(74,212,118,0.12); border-color: rgba(74,212,118,0.2); color: #4ad476; }
.cf-pm-plus:hover  { background: rgba(74,212,118,0.22); border-color: rgba(74,212,118,0.4); color: #6fe890; transform: scale(1.08); }

.cf-sb-amt-wrap { position: relative; display: flex; align-items: center; }

.cf-sb-coin {
  position: absolute; left: 10px;
  width: 20px; height: 20px; flex-shrink: 0;
  background: var(--gradient-accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 900; color: #0e0e0e; line-height: 1;
  box-shadow: 0 0 6px rgba(var(--accent-rgb),0.35);
  pointer-events: none;
}

.cf-sb-amt-input {
  width: 100%; text-align: center;
  background: var(--bg-card); border: 1px solid rgba(var(--accent-rgb),0.12); border-radius: 10px;
  padding: 10px 10px 10px 38px;
  font-size: 15px; font-weight: 800; color: #fff;
  letter-spacing: 0.5px; font-variant-numeric: tabular-nums;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.cf-sb-amt-input:focus {
  border-color: rgba(var(--accent-rgb),0.45);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.07);
}

.cf-quick-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; margin-top: 5px; }
.cf-q-btn {
  height: 30px; border-radius: 8px; background: var(--bg-card); border: 1px solid rgba(var(--accent-rgb),0.12);
  color: var(--text-faint); font-size: 13px; font-weight: 700; cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}
.cf-q-btn:hover { background: rgba(var(--accent-rgb),0.12); border-color: #2a3f5a; color: var(--text); transform: translateY(-1px); }
.cf-q-btn:active { transform: translateY(0); }

/* ══ Preset amounts edit ══ */
.cf-quick-rows {
  display: flex;
  flex-direction: column;
}
.cf-presets-row {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  margin-top: 5px;
}
.cf-presets-row .cf-quick-row { flex: 1; margin-top: 0; }

.cf-preset-edit-btn {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--bg-card); border: 1px solid rgba(var(--accent-rgb),0.12);
  color: var(--text-mute); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.cf-preset-edit-btn:hover { background: rgba(var(--accent-rgb),0.12); border-color: #2a3f5a; color: var(--text-dim); }
.cf-preset-edit-btn.active {
  background: rgba(74,212,118,0.12);
  border-color: rgba(74,212,118,0.35);
  color: #4ad476;
}

.cf-q-inp {
  width: 100%; height: 30px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid rgba(var(--accent-rgb),0.4);
  color: var(--text);
  font-size: 13px; font-weight: 700; text-align: center;
  outline: none; padding: 0 4px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.cf-q-inp:focus {
  border-color: rgba(var(--accent-rgb),0.7);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb),0.07);
}
.cf-q-inp::-webkit-outer-spin-button,
.cf-q-inp::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cf-q-inp { -moz-appearance: textfield; }

.cf-create-btn {
  width: 100%; height: 48px; border-radius: 12px; margin-top: 4px;
  background: var(--gradient-accent);
  color: var(--bg); font-size: 14px; font-weight: 800; border: none; cursor: pointer;
  transition: opacity 0.2s, transform 0.1s, background 0.2s;
  letter-spacing: 0.4px;
}
.cf-create-btn:hover:not(:disabled) { opacity: 0.88; }
.cf-create-btn:active { transform: scale(0.98); }
.cf-create-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.cf-create-btn.error { background: rgba(212,99,74,0.1); border: 1px solid rgba(212,99,74,0.45); color: #d4634a; }

/* ══ История ══ */
.cf-history-btn {
  width: 100%; height: 42px; border-radius: 12px; margin-top: 8px;
  background: var(--bg-card); border: 1px solid rgba(var(--accent-rgb),0.12);
  color: var(--text-faint); font-size: 13px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.cf-history-btn:hover { background: rgba(var(--accent-rgb),0.14); border-color: #2a3a4a; color: var(--text); }

.cf-hist-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
  backdrop-filter: blur(3px);
}
.cf-hist-overlay.open { opacity: 1; pointer-events: all; }

.cf-hist-modal {
  width: 560px; max-width: calc(100vw - 32px);
  max-height: 80vh;
  background: var(--bg); border: 1px solid rgba(var(--accent-rgb),0.12); border-radius: 18px;
  display: flex; flex-direction: column;
  transform: scale(0.93); transition: transform 0.2s;
  overflow: hidden;
}
.cf-hist-overlay.open .cf-hist-modal { transform: scale(1); }

.cf-hist-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid rgba(var(--accent-rgb),0.12); flex-shrink: 0;
}
.cf-hist-title { font-size: 15px; font-weight: 800; color: var(--text); letter-spacing: 0.3px; }
.cf-hist-close {
  width: 30px; height: 30px; border-radius: 8px;
  background: rgba(var(--accent-rgb),0.14); border: none; color: var(--text-faint);
  font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.cf-hist-close:hover { background: #2a3a4a; color: var(--text); }

.cf-hist-body {
  overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 8px;
}
.cf-hist-body::-webkit-scrollbar { width: 4px; }
.cf-hist-body::-webkit-scrollbar-track { background: transparent; }
.cf-hist-body::-webkit-scrollbar-thumb { background: rgba(var(--accent-rgb),0.08); border-radius: 4px; }

.cf-hist-loading, .cf-hist-empty {
  text-align: center; padding: 40px 0;
  font-size: 13px; color: #1a3050;
}

.cf-hi-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card); border: 1px solid rgba(var(--accent-rgb),0.14);
  border-radius: 12px; padding: 12px 14px;
  transition: border-color 0.15s;
}
.cf-hi-row:hover { border-color: #2a3a4a; }

.cf-hi-num { font-size: 11px; font-weight: 700; color: #1a3050; min-width: 32px; }

/* Обёртка всех участников — один прямоугольник */
.cf-hi-players {
  flex: 1;
  display: flex; align-items: stretch;
  background: #0a0f18; border: 1px solid rgba(var(--accent-rgb),0.14);
  border-radius: 12px; overflow: hidden;
}

/* Один участник внутри прямоугольника */
.cf-hi-slot {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px; padding: 10px 8px; position: relative;
}
.cf-hi-slot.win {
  background: none;
}

/* Разделитель между слотами */
.cf-hi-slot + .cf-hi-slot {
  border-left: 1px solid rgba(var(--accent-rgb),0.14);
}

.cf-hi-crown {
  position: absolute; top: 5px; left: 50%; transform: translateX(-50%);
  font-size: 11px; line-height: 1;
}

.cf-hi-av {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover; border: 2px solid;
  flex-shrink: 0;
}
.cf-hi-av.win { box-shadow: 0 0 10px 2px rgba(var(--accent-rgb),0.5); }
.cf-hi-av-ini {
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 900;
}

.cf-hi-nick {
  font-size: 10px; font-weight: 600; max-width: 60px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center;
}

.cf-hi-meta { text-align: right; flex-shrink: 0; }
.cf-hi-pot  { font-size: 14px; font-weight: 900; color: var(--accent); }
.cf-hi-date { font-size: 11px; color: #1a3050; margin-top: 2px; }

.cf-cancel-btn {
  margin-left: auto; padding: 3px 10px; border-radius: 6px;
  background: transparent; border: 1px solid #4b3030;
  color: #d4634a; font-size: 11px; font-weight: 700; cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.cf-cancel-btn:hover:not(:disabled) { background: #2a1010; border-color: #d4634a; }
.cf-cancel-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.cf-addbot-btn {
  margin-left: auto; padding: 3px 10px; border-radius: 6px;
  background: transparent; border: 1px solid #2a3a4a;
  color: var(--accent); font-size: 11px; font-weight: 700; cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.cf-addbot-btn:hover { background: #0e1e30; border-color: var(--accent); }
.cf-addbot-btn + .cf-cancel-btn { margin-left: 0; }

.cf-slot-wait {
  font-size: 10px; font-weight: 600; color: #1a3050;
  letter-spacing: 0.3px; text-transform: uppercase;
}

/* ══ TOP BARS WRAPPER ══ */
.cf-top-bars {
  display: flex; flex-direction: column; gap: 10px;
  width: 100%; max-width: 1240px; margin-bottom: 4px;
}

/* ══ FEED BAR ══ */
.cf-feed-bar {
  display: flex; align-items: center; gap: 0;
  background: var(--bg-card); border: 1px solid rgba(var(--accent-rgb),0.14);
  border-radius: 12px; height: 46px; overflow: hidden;
}
.cf-feed-label {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
  font-size: 10px; font-weight: 800; color: var(--text-mute);
  text-transform: uppercase; letter-spacing: 1px;
  padding: 0 16px; height: 100%;
  border-right: 1px solid rgba(var(--accent-rgb),0.12); white-space: nowrap;
}
.cf-feed-track {
  display: flex; align-items: center; gap: 6px;
  flex: 1; overflow: hidden; padding: 0 14px;
}
.cf-feed-empty { font-size: 12px; color: #2a3a4a; }
.cf-feed-item {
  display: flex; align-items: center; gap: 7px; flex-shrink: 0;
  background: var(--bg); border: 1px solid rgba(var(--accent-rgb),0.12); border-radius: 8px;
  padding: 5px 10px 5px 5px;
  animation: cf-feed-in 0.45s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes cf-feed-in {
  from { transform: translateX(-20px) scale(0.9); opacity: 0; }
  to   { transform: translateX(0)     scale(1);   opacity: 1; }
}
.cf-feed-nick { font-size: 12px; font-weight: 700; color: var(--text); white-space: nowrap; }
.cf-feed-dot  { font-size: 10px; color: #2a3a4a; }
.cf-feed-pot  { font-size: 12px; font-weight: 800; color: var(--accent); white-space: nowrap; }

/* ══ STATS BAR ══ */
.cf-stats-bar {
  display: flex; align-items: center;
  background: var(--bg-card); border: 1px solid rgba(var(--accent-rgb),0.14);
  border-radius: 12px; height: 52px;
}
.cf-stat-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
}
.cf-stat-val { font-size: 16px; font-weight: 900; color: var(--text); font-variant-numeric: tabular-nums; }
.cf-stat-lbl { font-size: 10px; font-weight: 700; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.5px; }
.cf-stat-sep { width: 1px; height: 26px; background: rgba(var(--accent-rgb),0.08); flex-shrink: 0; }

/* ══ TOAST ══ */
.cf-toast-container {
  position: fixed; top: 76px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none; align-items: flex-end;
}
.cf-toast {
  background: var(--bg-card); border: 1px solid rgba(var(--accent-rgb),0.12); border-radius: 12px;
  padding: 12px 16px; display: flex; align-items: center; gap: 12px;
  min-width: 230px; max-width: 310px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  pointer-events: all; cursor: pointer;
  animation: cf-toast-in 0.35s cubic-bezier(0.34,1.56,0.64,1) both;
}
.cf-toast--win  { border-color: rgba(var(--accent-rgb),0.45); }
.cf-toast--join { border-color: rgba(var(--accent-rgb),0.45); }
.cf-toast-icon { font-size: 24px; flex-shrink: 0; line-height: 1; }
.cf-toast-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cf-toast-title { font-size: 13px; font-weight: 800; color: var(--text); }
.cf-toast-sub   { font-size: 11px; color: var(--text-faint); }
@keyframes cf-toast-in {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
.cf-toast-leaving { animation: cf-toast-out 0.28s ease forwards; }
@keyframes cf-toast-out {
  from { transform: translateX(0);    opacity: 1; }
  to   { transform: translateX(110%); opacity: 0; }
}

/* ══ MODE TOGGLE ══ */
.cf-mode-wrap {
  position: relative; display: flex;
  background: var(--bg-card); border: 1px solid rgba(var(--accent-rgb),0.12); border-radius: 12px;
  padding: 4px; cursor: pointer; user-select: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.cf-mode-wrap:not(.bot-mode) {
  border-color: rgba(var(--accent-rgb),0.35);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.06);
}
.cf-mode-wrap.bot-mode {
  border-color: rgba(164,127,212,0.35);
  box-shadow: 0 0 0 3px rgba(164,127,212,0.06);
}
.cf-mode-thumb {
  position: absolute; top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 4px); border-radius: 8px; z-index: 0;
  background: linear-gradient(135deg, #1e4a6e, #1a9fff);
  box-shadow: 0 2px 12px rgba(var(--accent-rgb),0.3);
  transition: left 0.38s cubic-bezier(0.34,1.4,0.64,1),
              background 0.35s, box-shadow 0.35s;
}
.cf-mode-wrap.bot-mode .cf-mode-thumb {
  left: calc(50%);
  background: linear-gradient(135deg, #3a1a55, #a47fd4);
  box-shadow: 0 2px 12px rgba(164,127,212,0.3);
}
.cf-mode-opt {
  flex: 1; position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 6px; font-size: 12px; font-weight: 800; letter-spacing: 0.3px;
  color: #1a3050; transition: color 0.25s;
}
.cf-mode-wrap:not(.bot-mode) .cf-mode-opt--left { color: var(--text); }
.cf-mode-wrap.bot-mode     .cf-mode-opt--right { color: var(--text); }

/* ══ BOT SECTION ══ */
.cf-bot-section {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.3s, margin-top 0.3s;
  margin-top: 0;
}
.cf-bot-section.open {
  max-height: 120px; opacity: 1; margin-top: 10px;
}
.cf-bot-section-hdr {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.cf-bot-section-lbl {
  font-size: 11px; font-weight: 700; color: var(--text-mute);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.cf-bot-badge {
  background: rgba(164,127,212,0.18); border: 1px solid rgba(164,127,212,0.35);
  color: #a47fd4; font-size: 12px; font-weight: 800;
  padding: 2px 10px; border-radius: 20px;
  transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1);
}
.cf-bot-badge.bump { transform: scale(1.3); }
.cf-bot-count-row { display: flex; gap: 6px; }
.cf-bot-cnt {
  flex: 1; height: 36px; border-radius: 10px;
  background: var(--bg-card); border: 1px solid rgba(var(--accent-rgb),0.12);
  color: var(--text-faint); font-size: 14px; font-weight: 800; cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.cf-bot-cnt:hover { background: #1a1530; border-color: rgba(164,127,212,0.4); color: #c0a0e0; }
.cf-bot-cnt.active {
  background: rgba(164,127,212,0.15); border-color: rgba(164,127,212,0.5); color: #a47fd4;
}
.cf-bot-cnt svg { opacity: 0.7; }
.cf-bot-hint {
  font-size: 10px; color: #1a3050; margin-top: 8px; line-height: 1.5; text-align: center;
}

/* ══ CARD ENTRANCE ANIMATION ══ */
@keyframes cf-card-in {
  from { transform: translateY(14px) scale(0.97); opacity: 0; }
  to   { transform: translateY(0)    scale(1);    opacity: 1; }
}
.cf-card-new {
  animation: cf-card-in 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* ══ 3D COIN ══ */
.cf-coin-3d-wrap {
  position: absolute; inset: 0; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  perspective: 220px;
}
.cf-coin-3d {
  width: 62px; height: 62px;
  transform-style: preserve-3d;
  animation: cf-coin-spin 1.3s ease-in-out infinite;
}
@keyframes cf-coin-spin {
  0%   { transform: rotateY(0deg); }
  100% { transform: rotateY(360deg); }
}
.cf-coin-face {
  position: absolute; inset: 0; border-radius: 50%;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; align-items: center; justify-content: center;
}
.cf-coin-head {
  background: radial-gradient(circle at 38% 30%, #f7db6a, #c49320);
  border: 3px solid rgba(255,220,80,0.35);
  box-shadow: inset 0 0 14px rgba(0,0,0,0.25), 0 0 22px rgba(var(--accent-rgb),0.55);
  font-size: 26px; font-weight: 900; color: #5a3d00;
}
.cf-coin-tail {
  background: radial-gradient(circle at 38% 30%, #d8d8d8, #7a7a7a);
  border: 3px solid rgba(200,200,200,0.3);
  box-shadow: inset 0 0 14px rgba(0,0,0,0.3), 0 0 16px rgba(160,160,160,0.35);
  transform: rotateY(180deg);
  font-size: 20px; font-weight: 900; color: #444;
}

/* ══ REMATCH BUTTON ══ */
.cf-rematch-btn {
  width: 100%; height: 36px; margin-top: 8px;
  border-radius: 10px; cursor: pointer;
  background: rgba(var(--accent-rgb),0.08);
  border: 1px solid rgba(var(--accent-rgb),0.25);
  color: var(--accent); font-size: 13px; font-weight: 700;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  letter-spacing: 0.3px;
}
.cf-rematch-btn:hover { background: rgba(var(--accent-rgb),0.15); border-color: rgba(var(--accent-rgb),0.45); }
.cf-rematch-btn:active { transform: scale(0.97); }

/* ══ HOVER CARD ══ */
.cf-hover-card {
  position: fixed; z-index: 9997;
  background: var(--bg); border: 1px solid rgba(var(--accent-rgb),0.12); border-radius: 14px;
  padding: 14px; min-width: 185px;
  box-shadow: 0 10px 36px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.03);
  opacity: 0; pointer-events: none;
  transform: scale(0.88) translateY(8px);
  transition: opacity 0.16s, transform 0.16s cubic-bezier(0.34,1.4,0.64,1);
}
.cf-hover-card.visible {
  opacity: 1;
  pointer-events: all;
  transform: scale(1) translateY(0);
}
.cf-hc-top {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.cf-hc-av {
  flex-shrink: 0;
}
.cf-hc-meta { min-width: 0; }
.cf-hc-nick {
  font-size: 13px; font-weight: 800; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cf-hc-profile-link {
  font-size: 10px; font-weight: 600; color: var(--accent);
  text-decoration: none; letter-spacing: 0.3px;
}
.cf-hc-profile-link:hover { color: #6ab8e8; }
.cf-hc-profile-link[href=""] { display: none; }
.cf-hc-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  border-top: 1px solid rgba(var(--accent-rgb),0.12); padding-top: 10px;
}
.cf-hc-stat {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: var(--bg-card); border-radius: 8px; padding: 6px 4px;
}
.cf-hc-stat-val { font-size: 15px; font-weight: 900; color: var(--text); font-variant-numeric: tabular-nums; }
.cf-hc-stat-lbl { font-size: 9px; font-weight: 700; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.4px; }

/* ══ INFO BUTTON ══ */
.cf-info-btn {
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(var(--accent-rgb),0.08); border: 1px solid rgba(var(--accent-rgb),0.2);
  color: var(--text-faint); font-size: 10px; font-weight: 900;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; line-height: 1;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.cf-info-btn:hover { background: #2a3a4a; border-color: var(--accent); color: var(--accent); }

/* ══ INFO MODAL ══ */
.cf-info-modal { width: 480px; }
.cf-info-body {
  padding: 6px 20px 20px;
  display: flex; flex-direction: column;
  overflow-y: auto; max-height: calc(80vh - 60px);
}
.cf-info-body::-webkit-scrollbar { width: 4px; }
.cf-info-body::-webkit-scrollbar-track { background: transparent; }
.cf-info-body::-webkit-scrollbar-thumb { background: rgba(var(--accent-rgb),0.08); border-radius: 4px; }
.cf-info-section {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 0;
}
.cf-info-icon {
  font-size: 22px; flex-shrink: 0; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card); border-radius: 10px; border: 1px solid rgba(var(--accent-rgb),0.12);
}
.cf-info-title {
  font-size: 13px; font-weight: 800; color: var(--text); margin-bottom: 5px;
}
.cf-info-text {
  font-size: 12px; color: var(--text-faint); line-height: 1.6;
}
.cf-info-divider {
  height: 1px; background: rgba(var(--accent-rgb),0.08); margin: 0 0;
}

/* ══ FEED LINK ══ */
.cf-feed-item--link {
  text-decoration: none; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.cf-feed-item--link:hover { border-color: #2a3a4a; background: var(--bg-card); }
.cf-av-hoverable { cursor: pointer; }
