/* ==========================================================================
   Cricket Lab – визуал как у Crash Lab
   ========================================================================== */

/* Страница Cricket Lab целиком */
.fgcr-page {
  max-width: 1120px;
  margin: 0 auto 60px;
  padding: 40px 20px 60px;
  color: #e5e7f3;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ───── Заголовок блока ───── */
.fgcr-header {
  text-align: center;
  margin-bottom: 30px;
}

.fgcr-title {
  font-size: 32px;
  margin: 0 0 6px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fgcr-subtitle {
  margin: 0;
  font-size: 16px;
  opacity: 0.8;
}

/* ───── Верхняя панель управления ───── */
.fgcr-topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  justify-content: center;
  background: #020617;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,.6);
  margin-bottom: 24px;
}

.fgcr-form {
  display: flex;
  flex-direction: column;
  min-width: 180px;
}

.fgcr-form label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  opacity: 0.8;
}

.fgcr-input {
  background: #020617;
  border-radius: 999px;
  border: 1px solid #1f2937;
  padding: 8px 14px;
  color: #e5e7eb;
  font-size: 14px;
  outline: none;
  box-shadow: inset 0 0 0 1px #020617;
}

.fgcr-input:focus {
  border-color: #22c55e;
  box-shadow:
    inset 0 0 0 1px #020617,
    0 0 0 1px rgba(34,197,94,.5);
}

.fgcr-presets {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-left: 12px;
}

.fgcr-presets-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.8;
}

.fgcr-preset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #020617;
  border: 1px solid #1f2937;
  color: #e5e7eb;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .12s ease;
}

.fgcr-preset:hover {
  background: #0b1120;
  border-color: #22c55e;
  transform: translateY(-1px);
}

.fgcr-preset:active {
  transform: translateY(0);
}

/* ───── Игровой блок ───── */
.fgcr-wrapper {
  background: radial-gradient(circle at top, #111827 0%, #020617 55%, #020617 100%);
  padding: 24px 20px 18px;
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(0,0,0,.8);
  margin-bottom: 30px;
}

.fgcr-game-area {
  display: flex;
  justify-content: center;
}

.fgcr-game-canvas {
  position: relative;
  width: 100%;
  max-width: 560px;         /* игровое окно ~в 2 раза компактнее */
  aspect-ratio: 3 / 2;
  border-radius: 14px;
  overflow: hidden;
  background: #020617;
  border: 1px solid #111827;
}

.fgcr-game-canvas canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ───── Кнопки GO / Cash Out ───── */
.fgcr-controls {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.fgcr-btn {
  min-width: 120px;
  padding: 10px 24px;
  border-radius: 999px;
  border: none;
  outline: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background .15s ease, box-shadow .15s ease, transform .12s ease,
              color .15s ease, opacity .15s ease;
}

.fgcr-btn--go {
  background: linear-gradient(90deg, #22c55e, #4ade80);
  color: #022c22;
  box-shadow: 0 10px 24px rgba(34,197,94,.45);
}

.fgcr-btn--go:hover {
  background: linear-gradient(90deg, #16a34a, #22c55e);
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(34,197,94,.6);
}

.fgcr-btn--go:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(34,197,94,.5);
}

.fgcr-btn--cash {
  background: #111827;
  color: #e5e7eb;
  box-shadow: 0 6px 16px rgba(0,0,0,.8);
}

.fgcr-btn--cash:hover:not(:disabled) {
  background: #020617;
  transform: translateY(-1px);
}

.fgcr-btn--cash:disabled {
  opacity: 0.35;
  cursor: default;
  box-shadow: none;
}

/* ───── Строка баланса ───── */
.fgcr-balance-bar {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 16px;
  border-radius: 999px;
  background: #020617;
  border: 1px solid #111827;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ca3af;
}

.fgcr-balance-bar span:last-child {
  color: #e5e7eb;
}

/* ───── Блок статистики ───── */
.fgcr-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.fgcr-stats-left,
.fgcr-stats-right {
  flex: 1 1 320px;
}

.fgcr-stats-left {
  background: #020617;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,.6);
}

.fgcr-stats-right {
  flex: 1 1 480px;
  background: #0f172a;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,.6);
}

.fgcr-stats-left h2,
.fgcr-stats-right h2 {
  margin: 0 0 10px;
  font-size: 16px;
}

.fgcr-stats-left ul {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  font-size: 14px;
}

.fgcr-stats-left li {
  margin-bottom: 4px;
}

.fgcr-stats-left strong {
  display: inline-block;
  width: 160px;
  opacity: 0.85;
}

.fgcr-note {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.7;
}

/* ───── Таблица последних раундов ───── */
.fgcr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.fgcr-table th,
.fgcr-table td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(148,163,184,.2);
}

.fgcr-table thead th {
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  opacity: 0.7;
}

.fgcr-table tbody tr:nth-child(even) {
  background: rgba(15,23,42,.6);
}

.fgcr-table tbody tr:hover {
  background: rgba(30,64,175,.45);
}

/* ───── Адаптив ───── */
@media (max-width: 768px) {
  .fgcr-page {
    padding: 24px 10px 40px;
  }

  .fgcr-title {
    font-size: 24px;
  }

  .fgcr-topbar {
    align-items: stretch;
  }

  .fgcr-form {
    min-width: 0;
    flex: 1 1 45%;
  }

  .fgcr-presets {
    width: 100%;
    margin-left: 0;
    margin-top: 8px;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .fgcr-wrapper {
    padding: 18px 12px 14px;
  }

  .fgcr-balance-bar {
    font-size: 11px;
  }
}
