:root {
  --blue: #0196b8;
  --blue-dark: #01647a;
  --navy: #102f3d;
  --navy-deep: #123f49;
  --background: #eef5f8;
  --card: #ffffff;
  --border: #d7e4e9;
  --muted: #60747d;
  --soft-blue: #e4f4f7;
  --soft-gray: #edf2f4;
  --shadow: 0 16px 45px rgba(29, 71, 87, 0.09);
  --font: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--background);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--navy);
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 255, 255, 0.92), transparent 34rem),
    var(--background);
  /*background: #EFF4F7;*/
  font-family: var(--font);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.is-hidden {
  display: none !important;
}

.site-header {
  display: flex;
  justify-content: center;
  padding: 27px 20px 25px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
}

.wordmark {
  color: var(--blue);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.38em;
}

.wordmark small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.3em;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 40px;
  padding: 9px 20px;
  color: rgba(255, 255, 255, 0.76);
  background: var(--navy-deep);
  box-shadow: 0 2px 0 #0f3038;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.top-bar i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #f2bd68;
}

.top-bar small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.page-content {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 56px 16px 64px;
}

.generator {
  width: 100%;
  max-width: 710px;
}

.intro {
  margin-bottom: 36px;
  text-align: center;
}

.sparkle {
  display: grid;
  width: 46px;
  height: 46px;
  margin: 0 auto 16px;
  place-items: center;
  color: var(--blue);
  background: var(--soft-blue);
  border-radius: 16px;
  font-size: 24px;
}

#generator-title{
  margin: 0;
  color: var(--navy);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-style:karla;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.intro p {
  max-width: 430px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.generator-card {
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 20px;
  padding: 28px 32px 27px;
  border-bottom: 1px solid var(--border);
}

.control-copy {
  flex: 1 1 280px;
}

.control-copy label {
  display: block;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
}

.control-copy p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.line-input {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 7px 6px 14px;
  color: var(--muted);
  background: var(--soft-gray);
  border-radius: 13px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.line-input input {
  width: 64px;
  padding: 10px 7px;
  color: var(--blue);
  background: #ffffff;
  border: 1px solid transparent;
  border-radius: 9px;
  outline: none;
  box-shadow: 0 1px 3px rgba(29, 71, 87, 0.1);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.line-input input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(1, 150, 184, 0.18);
}

.primary-button {
  display: flex;
  flex: 1 0 100%;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 14px 20px;
  color: #ffffff;
  background: var(--blue);
  border: 0;
  border-radius: 13px;
  box-shadow: 0 6px 0 var(--blue-dark);
  font-size: 15px;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button:hover {
  background: #078eac;
  transform: translateY(-2px);
  box-shadow: 0 8px 0 var(--blue-dark);
}

.primary-button:active {
  transform: translateY(2px);
  box-shadow: 0 3px 0 var(--blue-dark);
}

.primary-button:focus-visible,
.copy-button:focus-visible {
  outline: 3px solid rgba(1, 150, 184, 0.35);
  outline-offset: 3px;
}

.button-icon {
  font-size: 22px;
  line-height: 0;
}

.empty-state {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 13px;
  place-items: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 50%;
  font-size: 20px;
}

.empty-state strong,
.results-heading strong {
  color: var(--navy);
  font-size: 14px;
}

.empty-state p,
.results-note {
  max-width: 330px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.results-panel {
  padding: 25px 32px 28px;
  background: #f8fbfc;
}

.results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.results-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.copy-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  color: var(--blue);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
}

.copy-button:hover {
  background: var(--soft-blue);
  border-color: var(--blue);
}

.results-list {
  display: grid;
  gap: 12px;
}

.result-line {
  padding: 16px 20px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 13px;
  box-shadow: 0 2px 9px rgba(29, 71, 87, 0.035);
}

.result-line-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.number-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.main-numbers {
  display: flex;
  flex: 1;
  justify-content: flex-start;
  gap: 7px;
}

.number-ball {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  color: #ffffff;
  background: var(--blue);
  border-radius: 50%;
  box-shadow: inset 0 -2px 0 rgba(0, 57, 72, 0.35);
  font-size: 14px;
  font-weight: 700;
}

.divider {
  width: 1px;
  height: 34px;
  margin: 0 3px;
  background: var(--border);
}

.life-ball {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
}

.life-ball small {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.life-ball .number-ball {
  background: var(--navy);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.4);
}

.results-note {
  max-width: none;
  margin: 20px 0 0;
  text-align: center;
}

.local-note {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-align: center;
}

@media (min-width: 620px) {
  .primary-button {
    flex-basis: 100%;
  }
}

@media (max-width: 560px) {
  .page-content {
    padding: 42px 12px 48px;
  }

  .intro {
    margin-bottom: 28px;
  }

  .intro p {
    font-size: 14px;
  }

  .controls,
  .results-panel {
    padding-right: 16px;
    padding-left: 16px;
  }

  .controls {
    gap: 14px;
  }

  .line-input {
    flex: 1;
    justify-content: space-between;
  }

  .number-row {
    gap: 7px;
  }

  .main-numbers {
    gap: 4px;
  }

  .number-ball {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    font-size: 12px;
  }

  .life-ball {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .life-ball small {
    top: -14px;
  }

  .divider {
    margin: 0;
  }

  .result-line {
    padding-right: 12px;
    padding-left: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}