.lotto-app,
.lotto-app * {
  box-sizing: border-box;
}

.lotto-app {
  --lotto-ink: #07162f;
  --lotto-muted: #627089;
  --lotto-line: #dce6f5;
  --lotto-blue: #315cf4;
  --lotto-violet: #7048f5;
  --lotto-cyan: #4bd7e5;
  max-width: 1200px;
  margin: 0 auto 48px;
  color: var(--lotto-ink);
}

.lotto-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 22px;
  padding: 6px 2px;
}

.lotto-eyebrow {
  margin: 0 0 8px;
  color: var(--lotto-blue);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .16em;
}

.lotto-intro h2 {
  margin: 0 0 10px;
  color: var(--lotto-ink);
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  font-weight: 900;
  letter-spacing: -.045em;
}

.lotto-intro > div:first-child > p:last-child {
  max-width: 700px;
  margin: 0;
  color: var(--lotto-muted);
  line-height: 1.75;
}

.lotto-intro__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.lotto-intro__badges span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border: 1px solid #d7e2f5;
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  color: #40516e;
  font-size: .76rem;
  font-weight: 800;
  white-space: nowrap;
}

.lotto-intro__badges i {
  color: var(--lotto-blue);
}

.lotto-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.07fr) minmax(420px, .93fr);
  overflow: hidden;
  border: 1px solid var(--lotto-line);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 24px 58px rgba(7, 22, 47, .12);
}

.lotto-settings,
.lotto-results {
  min-width: 0;
  padding: 38px;
}

.lotto-results {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 12%, rgba(91, 90, 242, .55), transparent 31%),
    radial-gradient(circle at 15% 86%, rgba(18, 184, 197, .25), transparent 34%),
    linear-gradient(145deg, #07162f 0%, #102553 58%, #172f70 100%);
  color: #fff;
}

.lotto-results::before {
  position: absolute;
  top: -70px;
  right: -58px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  content: "";
}

.lotto-panel-heading {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 14px;
  margin-bottom: 30px;
}

.lotto-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: #edf2ff;
  color: var(--lotto-blue);
  font-size: .74rem;
  font-weight: 900;
}

.lotto-panel-heading h3 {
  margin: 1px 0 6px;
  color: var(--lotto-ink);
  font-size: 1.25rem;
  font-weight: 900;
}

.lotto-panel-heading p {
  margin: 0;
  color: var(--lotto-muted);
  font-size: .84rem;
  line-height: 1.55;
}

.lotto-panel-heading--result .lotto-step {
  background: rgba(75, 215, 229, .16);
  color: #79eff8;
}

.lotto-panel-heading--result h3 {
  color: #fff;
}

.lotto-panel-heading--result p {
  color: rgba(255, 255, 255, .68);
}

.lotto-field {
  margin-bottom: 24px;
}

.lotto-field__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lotto-field label,
.lotto-field__head label {
  display: block;
  margin-bottom: 8px;
  color: #1a2b48;
  font-size: .9rem;
  font-weight: 900;
}

.lotto-field label small {
  margin-left: 4px;
  color: #8a96aa;
  font-size: .7rem;
  font-weight: 700;
}

.lotto-field__help,
.lotto-input-status {
  margin: 0 0 9px;
  color: var(--lotto-muted);
  font-size: .77rem;
}

.lotto-input-status {
  min-height: 18px;
  margin: 7px 0 0;
  color: #315cf4;
  font-weight: 700;
}

.lotto-field input {
  width: 100%;
  min-height: 50px;
  padding: 11px 14px;
  border: 1px solid #cad7ec;
  border-radius: 13px;
  outline: none;
  background: #fbfcff;
  color: var(--lotto-ink);
  font-size: .9rem;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.lotto-field input:focus {
  border-color: var(--lotto-blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(49, 92, 244, .1);
}

.lotto-text-button {
  margin: 0 0 8px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--lotto-blue);
  cursor: pointer;
  font-size: .76rem;
  font-weight: 900;
}

.lotto-text-button:hover {
  color: var(--lotto-violet);
}

.lotto-condition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.lotto-validation-message {
  min-height: 22px;
  margin: -3px 0 8px;
  color: #c9354c;
  font-size: .8rem;
  font-weight: 700;
}

.lotto-draw-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 56px;
  padding: 13px 19px;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--lotto-blue), var(--lotto-violet));
  box-shadow: 0 13px 28px rgba(49, 92, 244, .25);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  transition: transform .2s ease, box-shadow .2s ease;
}

.lotto-draw-button:hover {
  box-shadow: 0 16px 32px rgba(49, 92, 244, .32);
  transform: translateY(-2px);
}

.lotto-draw-button span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.lotto-account-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 19px;
  padding: 13px 14px;
  border: 1px solid #d9e4f7;
  border-radius: 13px;
  background: #f4f7ff;
  color: #4f607c;
  font-size: .76rem;
  line-height: 1.55;
}

.lotto-account-note i,
.lotto-account-note a {
  color: var(--lotto-blue);
}

.lotto-account-note a {
  font-weight: 900;
  text-decoration: underline;
}

.lotto-sets {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 13px;
}

.lotto-set {
  display: flex;
  align-items: center;
  gap: 11px;
}

.lotto-set-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 8px;
  color: #9debf4;
  font-size: .7rem;
  font-weight: 900;
}

.lotto-ball-row {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.lotto-ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 48px;
  aspect-ratio: 1;
  border: 2px solid rgba(255, 255, 255, .55);
  border-radius: 50%;
  box-shadow: 0 7px 15px rgba(0, 0, 0, .25), inset 0 1px 2px rgba(255, 255, 255, .48);
  color: #07162f;
  font-size: clamp(.76rem, 1.2vw, .95rem);
  font-weight: 900;
}

.lotto-ball--yellow { background: #f9cd54; }
.lotto-ball--blue { background: #66c9e8; }
.lotto-ball--red { background: #ff7d7d; }
.lotto-ball--gray { background: #c6cfdb; }
.lotto-ball--green { background: #70d197; }

.lotto-ball--placeholder {
  border: 1px dashed rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .06);
  box-shadow: none;
  color: rgba(255, 255, 255, .35);
}

.lotto-result-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-top: auto;
  padding-top: 30px;
}

.lotto-result-footer strong,
.lotto-result-footer span {
  display: block;
}

.lotto-result-footer strong {
  color: #78e8f2;
  font-size: .78rem;
  letter-spacing: .12em;
}

.lotto-result-footer span {
  min-height: 17px;
  margin-top: 5px;
  color: rgba(255, 255, 255, .58);
  font-size: .7rem;
}

.lotto-result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.lotto-copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 14px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 900;
  transition: background .2s ease, border-color .2s ease;
}

.lotto-copy-button:hover:not(:disabled) {
  border-color: #79eff8;
  background: rgba(121, 239, 248, .14);
}

.lotto-copy-button:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.lotto-redraw-button {
  border-color: rgba(121, 239, 248, .45);
  background: rgba(121, 239, 248, .16);
  color: #dffcff;
}

.lotto-redraw-button:hover:not(:disabled) {
  background: rgba(121, 239, 248, .26);
}

.lotto-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.lotto-guide article {
  padding: 20px 21px;
  border: 1px solid var(--lotto-line);
  border-radius: 17px;
  background: rgba(255, 255, 255, .9);
}

.lotto-guide span {
  color: var(--lotto-blue);
  font-size: .67rem;
  font-weight: 900;
  letter-spacing: .13em;
}

.lotto-guide h3 {
  margin: 7px 0 6px;
  color: var(--lotto-ink);
  font-size: .94rem;
  font-weight: 900;
}

.lotto-guide p {
  margin: 0;
  color: var(--lotto-muted);
  font-size: .78rem;
  line-height: 1.6;
}

@media (max-width: 991px) {
  .lotto-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .lotto-intro__badges {
    justify-content: flex-start;
  }

  .lotto-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .lotto-results {
    min-height: 520px;
  }

  .lotto-ball {
    max-width: 52px;
  }
}

@media (max-width: 575px) {
  .lotto-app {
    margin-bottom: 28px;
  }

  .lotto-intro {
    gap: 18px;
    margin-bottom: 16px;
  }

  .lotto-intro h2 {
    font-size: 1.65rem;
  }

  .lotto-intro__badges span {
    padding: 8px 10px;
    font-size: .7rem;
  }

  .lotto-workspace {
    border-radius: 20px;
  }

  .lotto-settings,
  .lotto-results {
    padding: 25px 18px;
  }

  .lotto-condition-grid,
  .lotto-guide {
    grid-template-columns: minmax(0, 1fr);
  }

  .lotto-condition-grid {
    gap: 0;
  }

  .lotto-results {
    min-height: 470px;
  }

  .lotto-ball-row {
    gap: 5px;
  }

  .lotto-ball {
    max-width: none;
    font-size: .72rem;
  }

  .lotto-set {
    gap: 7px;
  }

  .lotto-set-label {
    flex-basis: 21px;
    width: 21px;
    height: 21px;
  }

  .lotto-result-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .lotto-result-actions {
    flex-direction: column;
  }

  .lotto-copy-button {
    width: 100%;
  }
}
