/* ==========================================================================
   DropHub Trade

   Продолжение home.css: те же токены, чёрная база, лаймовый акцент.

   Экран читается сверху вниз как сам контракт: какая ступень → что уходит
   → что может выйти и с какими шансами → вскрытие. Шансы стоят ДО кнопки
   намеренно: контракт — это ставка, и её условия должны быть прочитаны
   раньше, чем нажата кнопка, а не после.
   ========================================================================== */

/* Свой фон странице больше не нужен: он общий и живёт в home.css.
   Плоская заливка здесь перекрывала общий градиент — он оставался
   только на главной. */

.tr-page {
  max-width: 1080px; margin: 0 auto;
  padding: 18px var(--pad-x) 56px;
  display: flex; flex-direction: column; gap: 14px;
}

.tr-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); padding: 14px 16px 16px;
}
.tr-card h2 {
  margin: 0 0 12px;
  font-family: var(--f-cond), sans-serif;
  font-size: 17px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
}
.tr-card h2 i { font-style: normal; font-size: 12px; font-weight: 500; color: var(--text-mute); letter-spacing: 0; text-transform: none; }

.tr-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tr-head h2 { margin: 0 0 12px; }
.tr-head__end { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.tr-total { font-size: 13px; color: var(--text-mute); }
.tr-total b { font-size: 17px; color: var(--text); font-variant-numeric: tabular-nums; }
.tr-reroll {
  height: 34px; padding: 0 14px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--panel-3);
  font-size: 12px; font-weight: 600; color: var(--text-mute);
  transition: border-color .14s, color .14s;
}
.tr-reroll:hover { border-color: var(--text-mute); color: var(--text); }

/* ═══════════════ СТУПЕНИ ═══════════════ */

.tr-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.tr-step {
  display: grid; justify-items: center; gap: 7px;
  padding: 11px 8px 10px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel-3);
  font-size: 12px; color: var(--text-mute);
  transition: border-color .14s, color .14s, background-color .14s;
}
.tr-step:hover { color: var(--text); }
.tr-step.is-on { border-color: var(--accent); color: var(--text); background: rgba(215,255,0,.06); }
/* Две точки со стрелкой между ними: ступень читается цветом раньше, чем
   подписью, а цвета редкости на этом сайте уже выучены. */
.tr-step i {
  width: 46px; height: 10px; border-radius: 5px;
  background: linear-gradient(90deg, var(--a), var(--b));
}

/* ═══════════════ ВХОД ═══════════════ */

.tr-empty { margin: 0 0 10px; font-size: 13px; color: var(--text-mute); }
.tr-empty[hidden] { display: none; }

.tr-inputs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.tr-in {
  padding: 7px 5px 6px; border-radius: 8px;
  display: grid; justify-items: center; gap: 1px;
  background: var(--panel-3);
  border-bottom: 3px solid var(--rar, #4b69ff);
}
.tr-in img { width: 78px; height: 58px; object-fit: contain; display: block; }
.tr-in b { font-size: 10px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-in span { font-size: 10px; color: var(--text-mute); font-variant-numeric: tabular-nums; }

/* ═══════════════ ШАНСЫ ═══════════════ */

.tr-odds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tr-odd {
  display: grid; gap: 3px; padding: 12px 14px;
  border-radius: 10px; background: var(--panel-3);
  border-left: 3px solid var(--c, var(--line));
}
.tr-odd--lo { --c: #6E7886; }
.tr-odd--hi { --c: var(--accent); }
.tr-odd__p {
  font-family: var(--f-cond), sans-serif;
  font-size: 26px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums;
}
.tr-odd--hi .tr-odd__p { color: var(--accent); }
.tr-odd__t { font-size: 12px; color: var(--text-mute); }
.tr-odd__m { font-size: 12px; color: var(--text-mute); }
.tr-odd__m b { color: var(--text); font-variant-numeric: tabular-nums; }

.tr-note { margin: 12px 0 0; font-size: 12px; color: var(--text-mute); }
.tr-note b { color: var(--text); font-variant-numeric: tabular-nums; }
.tr-warn { margin: 8px 0 0; font-size: 12px; color: #FFC463; }
.tr-warn[hidden] { display: none; }

/* ═══════════════ ВСКРЫТИЕ ═══════════════ */

.tr-card--act { display: flex; flex-direction: column; gap: 12px; }

.tr-go {
  height: 52px; border-radius: 12px; border: 0;
  background: linear-gradient(180deg, var(--accent), #A9C400);
  color: #0E1102;
  font-family: var(--f-cond), sans-serif;
  font-size: 18px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 10px 26px -16px var(--accent);
  transition: transform .12s, filter .14s, opacity .14s;
}
.tr-go:hover:not([disabled]) { transform: translateY(-2px); filter: brightness(1.06); }
.tr-go[disabled] { opacity: .45; cursor: not-allowed; }

.tr-hint { margin: 0; min-height: 15px; font-size: 12px; color: #FF7A7A; }

.tr-reel { position: relative; overflow: hidden; border-radius: 10px; background: var(--panel-3); }
.tr-reel:empty { display: none; }
.tr-reel::before {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, var(--panel-3), transparent 16%, transparent 84%, var(--panel-3));
}
.tr-reel::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: 50%; z-index: 3;
  width: 2px; margin-left: -1px;
  background: linear-gradient(180deg, var(--accent), rgba(215,255,0,.15));
  box-shadow: 0 0 12px rgba(215,255,0,.7);
}
.tr-strip { display: flex; gap: 6px; padding: 10px 0; will-change: transform; }
.tr-rit {
  flex: none; width: 104px; display: grid; place-items: center;
  border-bottom: 3px solid var(--rar, #eb4b4b); border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), transparent);
}
.tr-rit img { width: 88px; height: 66px; object-fit: contain; display: block; }

.tr-out { display: grid; justify-items: center; gap: 8px; }
.tr-out[hidden] { display: none; }
.tr-out__card {
  width: 220px; padding: 14px 12px 12px;
  display: grid; justify-items: center; gap: 2px;
  border: 1px solid var(--line); border-radius: var(--radius);
  border-bottom: 3px solid var(--rar, #eb4b4b);
  background:
    radial-gradient(80% 60% at 50% 0%, color-mix(in srgb, var(--rar, #eb4b4b) 24%, transparent), transparent 70%),
    var(--panel-3);
  animation: tr-pop .3s cubic-bezier(.2,1.3,.5,1);
}
@keyframes tr-pop { from { opacity: 0; transform: translateY(14px) scale(.94); } }
.tr-out__card img { width: 100%; height: 120px; object-fit: contain; display: block; }
.tr-out__card b { font-size: 14px; font-weight: 600; text-align: center; }
.tr-out__card u { font-size: 11px; color: var(--text-mute); text-decoration: none; }
.tr-out__card span { margin-top: 3px; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }

.tr-out__sum { margin: 0; display: flex; align-items: baseline; gap: 10px; }
.tr-out__sum b { font-family: var(--f-cond), sans-serif; font-size: 24px; font-variant-numeric: tabular-nums; }
.tr-out.is-up   .tr-out__sum b { color: var(--accent); }
.tr-out.is-down .tr-out__sum b { color: #FF7A7A; }
.tr-out__sum i { font-style: normal; font-size: 12px; color: var(--text-mute); }

/* ═══════════════ УЗКИЕ ЭКРАНЫ ═══════════════ */

@media (max-width: 620px) {
  .tr-odds { grid-template-columns: 1fr; }
  .tr-inputs { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
  .tr-in img { width: 62px; height: 46px; }
  .tr-rit { width: 84px; }
  .tr-rit img { width: 70px; height: 53px; }
}
