.live-preview {
  position: relative;
  overflow: hidden;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  color: #101735;
  background: #f8faff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
}

.live-preview::before {
  position: absolute;
  top: -130px;
  right: -110px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(103, 87, 245, 0.09);
  content: "";
  pointer-events: none;
}

.live-preview__bar,
.live-preview__status,
.live-preview__filters,
.live-preview__actions,
.live-preview__passes,
.live-preview__result-balls,
.live-preview__stats {
  display: flex;
  align-items: center;
}

.live-preview__bar {
  position: relative;
  z-index: 2;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 12px 18px;
  border-bottom: 1px solid #dde4f1;
  background: rgba(255, 255, 255, 0.86);
}

.live-preview__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 900;
}

.live-preview__mark {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 10px;
  color: #10152d;
  background: #ffd83d;
  box-shadow: 2px 2px 0 #111632;
  font-size: 9px;
}

.live-preview__brand small,
.live-preview__status small {
  display: block;
  color: #7987a2;
  font-size: 7px;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.live-preview__status {
  justify-content: flex-end;
  gap: 8px;
  text-align: right;
}

.live-preview__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a879;
  box-shadow: 0 0 0 5px rgba(22, 168, 121, 0.12);
}

.live-preview.is-running .live-preview__status-dot {
  animation: live-pulse 1.2s ease-in-out infinite;
}

.live-preview__body {
  position: relative;
  z-index: 1;
  padding: 24px;
}

.live-preview__eyebrow {
  margin: 0 0 7px;
  color: #6757f5;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.live-preview h3.live-preview__title {
  margin: 0;
  color: #101735;
  font-size: 24px;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.live-preview__description {
  margin: 7px 0 0;
  color: #71809b;
  font-size: 10px;
  line-height: 1.5;
}

.live-preview__filters {
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.live-preview__filter {
  padding: 7px 9px;
  border: 1px solid #d9e1ef;
  border-radius: 999px;
  color: #5d6982;
  background: #fff;
  font-size: 7px;
  font-weight: 850;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.live-preview__filter.is-active {
  border-color: #6757f5;
  color: #fff;
  background: #6757f5;
  box-shadow: 0 6px 14px rgba(103, 87, 245, 0.22);
  transform: translateY(-1px);
}

.live-preview__label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 7px;
  color: #43506c;
  font-size: 8px;
  font-weight: 900;
}

.live-preview__label span {
  color: #8190aa;
  font-weight: 750;
}

.live-preview__pool {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 5px;
  padding: 10px;
  border: 1px solid #dce4f1;
  border-radius: 14px;
  background: #f0f4fa;
}

.live-preview__number {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid #ccd7e8;
  border-radius: 8px;
  color: #34415e;
  background: #fff;
  font-size: 7px;
  font-weight: 900;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.live-preview__number.is-selected {
  border-color: #6757f5;
  color: #fff;
  background: #6757f5;
  box-shadow: 0 5px 12px rgba(103, 87, 245, 0.28);
  transform: scale(1.08);
}

.live-preview__actions {
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.live-preview__generate {
  min-width: 132px;
  min-height: 38px;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(135deg, #6757f5, #834cff);
  box-shadow: 0 10px 22px rgba(103, 87, 245, 0.22);
  font-size: 9px;
  font-weight: 900;
}

.live-preview__generate.is-pressed {
  transform: scale(0.96);
}

.live-preview__actions small {
  max-width: 200px;
  color: #8390a9;
  font-size: 7px;
  line-height: 1.4;
  text-align: right;
}

.live-preview__engine {
  margin-top: 14px;
  padding: 13px;
  border: 1px solid #dedaff;
  border-radius: 15px;
  background: linear-gradient(145deg, #f8f7ff, #eeecff);
}

.live-preview__engine-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-preview__orb {
  position: relative;
  display: grid;
  flex: 0 0 32px;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff;
  background: radial-gradient(circle at 35% 25%, #9a78ff, #4f35c5 68%);
  box-shadow: 0 0 0 6px rgba(103, 87, 245, 0.08);
  font-size: 8px;
  font-weight: 900;
}

.live-preview.is-processing .live-preview__orb::after {
  position: absolute;
  inset: -7px;
  border: 2px solid transparent;
  border-top-color: #6757f5;
  border-right-color: #38bdf8;
  border-radius: 50%;
  content: "";
  animation: live-spin 0.85s linear infinite;
}

.live-preview__engine-copy strong {
  display: block;
  color: #17203f;
  font-size: 10px;
}

.live-preview__engine-copy span {
  display: block;
  margin-top: 2px;
  color: #7886a1;
  font-size: 7px;
}

.live-preview__progress {
  height: 4px;
  overflow: hidden;
  margin-top: 11px;
  border-radius: 999px;
  background: #dfe4ef;
}

.live-preview__progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6757f5, #31c8e8);
  transition: width 700ms cubic-bezier(.2,.8,.2,1);
}

.live-preview__passes {
  gap: 7px;
  margin-top: 10px;
}

.live-preview__pass {
  flex: 1;
  padding: 7px;
  border: 1px solid #d9def0;
  border-radius: 9px;
  color: #7a87a1;
  background: rgba(255,255,255,0.68);
  font-size: 7px;
  font-weight: 850;
  text-align: center;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.live-preview__pass.is-active {
  border-color: #6757f5;
  color: #5544d7;
  background: #fff;
}

.live-preview__pass.is-complete {
  border-color: #9addc8;
  color: #087352;
  background: #e9fbf5;
}

.live-preview__result {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 420ms ease, opacity 260ms ease, margin 420ms ease;
}

.live-preview.has-result .live-preview__result {
  max-height: 160px;
  margin-top: 13px;
  opacity: 1;
}

.live-preview__result-title {
  color: #17203f;
  font-size: 8px;
  font-weight: 900;
}

.live-preview__result-balls {
  gap: 6px;
  margin-top: 8px;
}

.live-preview__result-ball {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #d7dfed;
  border-radius: 50%;
  color: #17203f;
  background: #fff;
  box-shadow: 0 5px 12px rgba(20, 34, 77, 0.1);
  font-size: 8px;
  font-weight: 950;
  transform: translateY(9px) scale(0.88);
  opacity: 0;
}

.live-preview.has-result .live-preview__result-ball {
  animation: live-ball-in 360ms ease forwards;
}

.live-preview__result-ball.is-special {
  border-color: #ff486b;
  color: #fff;
  background: #ea315b;
}

.live-preview__stats {
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.live-preview__stats span {
  padding: 5px 7px;
  border-radius: 999px;
  color: #596681;
  background: #edf2f8;
  font-size: 6px;
  font-weight: 850;
}

.live-preview__foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: #8b97ae;
  font-size: 6px;
  line-height: 1.4;
}

.live-preview__foot strong {
  color: #6757f5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-preview--compact {
  max-width: 760px;
  margin: 0 auto 22px;
  border-color: #d9d4ff;
  box-shadow: 0 18px 50px rgba(31, 38, 85, 0.11);
}

.live-preview--compact .live-preview__body {
  padding: 20px;
}

.live-preview--compact .live-preview__pool {
  grid-template-columns: repeat(12, 1fr);
}

@keyframes live-spin {
  to { transform: rotate(360deg); }
}

@keyframes live-pulse {
  50% { box-shadow: 0 0 0 8px rgba(22, 168, 121, 0.04); }
}

@keyframes live-ball-in {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 680px) {
  .live-preview__bar { min-height: 52px; padding: 10px 12px; }
  .live-preview__status small { display: none; }
  .live-preview__body,
  .live-preview--compact .live-preview__body { padding: 16px; }
  .live-preview h3.live-preview__title { font-size: 21px; }
  .live-preview__pool,
  .live-preview--compact .live-preview__pool { grid-template-columns: repeat(8, 1fr); }
  .live-preview__actions { align-items: stretch; flex-direction: column; }
  .live-preview__generate { width: 100%; }
  .live-preview__actions small { max-width: none; text-align: left; }
  .live-preview__result-balls { gap: 4px; }
  .live-preview__result-ball { width: 29px; height: 29px; }
}

@media (prefers-reduced-motion: reduce) {
  .live-preview__status-dot,
  .live-preview__orb::after { animation: none !important; }
  .live-preview__progress span,
  .live-preview__result { transition: none !important; }
}
