
:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: #0b0b12;
  color: #f5f5fa;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 50% 0%, #29204b 0%, transparent 48%),
    #0b0b12;
}

button, textarea, select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid #b8a1ff;
  outline-offset: 3px;
}

.topbar {
  height: 72px;
  padding: 0 7%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #ffffff12;
}

.brand {
  color: #fff;
  font-weight: 750;
  font-size: 19px;
  text-decoration: none;
  display: flex;
  gap: 10px;
  align-items: center;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: white;
  background: linear-gradient(135deg, #8a5cff, #d55cff);
}

.status {
  color: #b8b5c8;
  font-size: 12px;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #73e6b1;
}

.container {
  width: min(860px, 90%);
  margin: 0 auto;
}

.hero {
  text-align: center;
  padding: 65px 0 36px;
}

.eyebrow {
  color: #c3a9ff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
}

.hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1.08;
  letter-spacing: -2.5px;
}

.hero h1 span {
  color: #b49aff;
}

.hero p, .result-heading p {
  color: #a5a2b5;
  line-height: 1.6;
}

.workspace {
  padding: 28px;
  border: 1px solid #ffffff1c;
  border-radius: 20px;
  background: #13131de8;
  box-shadow: 0 25px 90px #00000030;
}

.field-heading, .result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.field-heading label {
  font-weight: 650;
}

#charCount {
  font-size: 12px;
  color: #a5a2b5;
}

textarea, select {
  width: 100%;
  color: #f5f5fa;
  background: #0c0c14;
  border: 1px solid #ffffff20;
  border-radius: 11px;
}

textarea {
  min-height: 150px;
  resize: vertical;
  padding: 15px;
  line-height: 1.7;
  margin-top: 12px;
}

textarea::placeholder {
  color: #777488;
}

.controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}

.select-group label {
  display: block;
  margin-bottom: 9px;
  font-size: 12px;
  color: #c6c2d5;
}

select {
  padding: 12px;
}

.primary-btn {
  width: 100%;
  border: 0;
  border-radius: 11px;
  padding: 15px;
  color: white;
  font-weight: 700;
  background: linear-gradient(100deg, #7653ed, #a64ce1);
  transition: filter 0.2s, transform 0.2s;
}

.primary-btn:hover:not(:disabled) {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.message {
  min-height: 22px;
  color: #aaa6bb;
  font-size: 12px;
  line-height: 1.5;
}

.result-heading {
  margin-top: 28px;
  align-items: center;
}

.result-heading h2 {
  margin: 0;
  font-size: 18px;
}

.result-heading p {
  margin: 7px 0 0;
  font-size: 12px;
}

.secondary-btn {
  flex-shrink: 0;
  padding: 10px 14px;
  color: #e6dcff;
  background: #29203e;
  border: 1px solid #7056a8;
  border-radius: 9px;
}

.result {
  min-height: 210px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0;
  color: #89869a;
  font-size: 11px;
}

@media (max-width: 560px) {
  .topbar {
    padding: 0 5%;
  }

  .container {
    width: 92%;
  }

  .hero {
    padding-top: 45px;
  }

  .hero h1 {
    letter-spacing: -1.5px;
  }

  .workspace {
    padding: 17px;
  }

  .controls {
    grid-template-columns: 1fr;
  }

  .result-heading {
    align-items: flex-start;
  }

  footer {
    flex-direction: column;
  }
}
