/* Уровни, рейкбек и рефералы — по блоку «Level 13» из макета Figma */

/* ── Карточка уровня ──────────────────────────────────────── */
.LevelCard {
  position: relative;
  display: flex;
  align-items: center;
  gap: 30px;
  margin-top: 22px;
  padding: 28px 30px;
  border-radius: 14px;
  border: 1px solid #241d3f;
  overflow: hidden;
  background:
    radial-gradient(120% 140% at 100% 50%, rgba(134, 58, 255, 0.28) 0%, rgba(134, 58, 255, 0) 60%),
    linear-gradient(180deg, #141026 0%, #171232 100%);
}

.LevelCard__left { flex: 1; min-width: 0; }

.LevelCard__title {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 30px;
  font-weight: 700;
}
.LevelCard__gem {
  width: 22px;
  height: 22px;
  transform: rotate(45deg);
  border-radius: 4px;
  background: var(--level-color, #a855ff);
  box-shadow: 0 0 18px var(--level-color, #a855ff);
}
.LevelCard__tier { color: #a095de; font-size: 13px; margin-top: 4px; }

.LevelBar {
  position: relative;
  height: 10px;
  margin: 26px 0 10px;
  border-radius: 6px;
  background: #221c3c;
  overflow: visible;
}
.LevelBar__fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #a448ff 0%, #c257ff 100%);
  box-shadow: 0 0 18px rgba(164, 72, 255, 0.5);
  transition: width 0.4s ease;
}
.LevelBar__marker {
  position: absolute;
  top: -26px;
  transform: translateX(-50%);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.LevelBar__marker::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #fff;
}

.LevelCard__hint { color: #7d76a8; font-size: 12px; }
.LevelCard__rewarded {
  display: inline-block;
  margin-top: 14px;
  padding: 8px 14px;
  border-radius: 8px;
  background: #19152e;
  border: 1px solid #2a2340;
  color: #7d76a8;
  font-size: 12px;
}
.LevelCard__rewarded b { color: #a855ff; font-weight: 600; }

.LevelCard__right {
  flex: none;
  width: 260px;
  text-align: center;
}
.LevelCard__amount {
  color: #a855ff;
  font-size: 28px;
  font-weight: 700;
  text-shadow: 0 0 34px rgba(168, 85, 255, 0.4);
}
.LevelCard__caption { margin-top: 2px; color: #fff; font-size: 13px; font-weight: 600; }
.LevelCard__btn {
  width: 100%;
  height: 46px;
  margin-top: 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(180deg, #a448ff 0%, #873aff 100%);
  box-shadow: 0 0 24px rgba(134, 58, 255, 0.25);
  transition: 0.15s;
}
.LevelCard__btn:hover:not(:disabled) { filter: brightness(1.08); }
.LevelCard__btn:disabled { opacity: 0.45; cursor: default; }

/* Бейдж уровня рядом с именем */
.LevelBadge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(134, 58, 255, 0.22);
  color: #a855ff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

/* ── Таблица уровней ──────────────────────────────────────── */
.LevelTable { width: 100%; border-collapse: collapse; font-size: 13px; }
.LevelTable th {
  padding: 10px 12px;
  text-align: left;
  color: #7d76a8;
  font-weight: 600;
  border-bottom: 1px solid #241d3f;
}
.LevelTable td { padding: 10px 12px; color: #fff; border-bottom: 1px solid #1c1733; }
.LevelTable tr.is-current td { background: rgba(134, 58, 255, 0.1); }
.LevelTable tr.is-current td:first-child { color: #a855ff; font-weight: 700; }

/* ── Рефералы ─────────────────────────────────────────────── */
.RefLink {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 0 0 0 16px;
  height: 48px;
  border-radius: 10px;
  border: 1px solid #2a2450;
  background: linear-gradient(180deg, #19182d 0%, #1e1733 100%);
}
.RefLink input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: none;
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-size: 13px;
}
.RefLink button {
  height: 100%;
  padding: 0 22px;
  border: none;
  border-radius: 0 10px 10px 0;
  cursor: pointer;
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  font-weight: 600;
  background: linear-gradient(180deg, #a448ff 0%, #873aff 100%);
}

.RefStats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-top: 18px; }
.RefStat {
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #241d3f;
  background: #141026;
}
.RefStat__label { color: #7d76a8; font-size: 12px; }
.RefStat__value { margin-top: 6px; color: #fff; font-size: 20px; font-weight: 700; }
.RefStat__value_accent { color: #a855ff; }

@media screen and (max-width: 900px) {
  .LevelCard { flex-direction: column; align-items: stretch; gap: 20px; }
  .LevelCard__right { width: 100%; }
}
