@import url('https://fonts.googleapis.com/css2?family=Schibsted+Grotesk:ital,wght@0,400..900;1,400..900&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: 'Schibsted Grotesk', sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(
      circle at top,
      rgba(45, 116, 255, 0.18),
      transparent 35%
    ),
    linear-gradient(180deg, #11151c 0%, #151a22 45%, #0f1319 100%);
  color: #e9eef7;
}

.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 2rem 1.25rem 1rem;
  text-align: left;
}

main {
  width: min(100%, 700px);
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
  flex: 1;
}

.panel {
  background: rgba(20, 25, 33, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.5rem;
  padding: 1.25rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  margin-bottom: 1rem;
  backdrop-filter: blur(10px);
}

.hero__copy h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1;
}

.hero__copy p {
  margin-top: 0.35rem;
  color: #aab5c7;
  font-size: 0.98rem;
}

.field-label {
  display: inline-block;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #c9d4e5;
}

footer {
  padding: 1.25rem 1rem 2rem;
  color: #eaeaea;
  font-size: 0.9rem;
  text-align: center;
  margin-top: auto;
}

button {
  border: none;
  border-radius: 999px;
  padding: 0.9rem 1.2rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease,
    box-shadow 0.2s ease, border-color 0.2s ease;
}

h2 {
  font-size: 1.15rem;
  line-height: 1.3;
  margin-bottom: 1rem;
  font-weight: 800;
}

.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

#img-logo {
  border-radius: 1.5rem;
  width: 4.5rem;
  height: auto;
}

#textToFormat {
  width: 100%;
  min-height: 9rem;
  resize: vertical;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #1a1a1a;
  color: #f4f7fb;
  padding: 1rem;
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#textToFormat::placeholder {
  color: #7f8ca5;
}

#textToFormat:focus {
  border-color: rgba(45, 116, 255, 0.8);
  box-shadow: 0 0 0 4px rgba(45, 116, 255, 0.18);
}

#formattedText {
  display: block;
  min-height: 5rem;
  font-size: 1.2rem;
  line-height: 1.6;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
  white-space: pre-wrap;
  word-break: break-word;
}

.checkbox-grid {
  display: grid;
  gap: 0.75rem;
}

.checkbox-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease,
    background-color 0.2s ease;
}

.checkbox-card:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(45, 116, 255, 0.35);
}

.checkbox-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkbox-card__control {
  flex: 0 0 1.2rem;
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.15rem;
  border-radius: 0.35rem;
  border: 1.5px solid rgba(201, 212, 229, 0.45);
  background: #12161d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.checkbox-card__control::after {
  content: '';
  width: 0.45rem;
  height: 0.75rem;
  border-right: 2px solid transparent;
  border-bottom: 2px solid transparent;
  transform: rotate(40deg) translate(-0.05rem, -0.05rem);
}

.checkbox-card__text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.checkbox-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: #f4f7fb;
}

.checkbox-card__description {
  font-size: 0.9rem;
  line-height: 1.45;
  color: #aab5c7;
}

.checkbox-card input:checked + .checkbox-card__control {
  background: #2d74ff;
  border-color: #2d74ff;
  box-shadow: 0 0 0 4px rgba(45, 116, 255, 0.16);
}

.checkbox-card input:checked + .checkbox-card__control::after {
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
}

.checkbox-card input:focus-visible + .checkbox-card__control {
  box-shadow: 0 0 0 4px rgba(45, 116, 255, 0.2);
}

.btn-primary {
  background: linear-gradient(135deg, #2d74ff 0%, #1f5fe0 100%);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(45, 116, 255, 0.24);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(45, 116, 255, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #e9eef7;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover {
  transform: translateY(-1px);
  border-color: rgba(45, 116, 255, 0.4);
  background: rgba(45, 116, 255, 0.12);
}

.btn-success {
  background: #1f8f5f !important;
  box-shadow: 0 12px 24px rgba(31, 143, 95, 0.24) !important;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #c9d4e5;
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, background-color 0.2s ease,
    border-color 0.2s ease;
}

.footer-links a:hover {
  transform: translateY(-1px);
  background: rgba(45, 116, 255, 0.1);
  border-color: rgba(45, 116, 255, 0.3);
}

.footer-links svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

@media (min-width: 768px) {
  .hero {
    padding: 2.5rem 2rem 1rem;
  }

  main {
    padding: 1rem 1.5rem 2.5rem;
  }

  footer {
    padding: 1.5rem 1rem 2.5rem;
  }

  button {
    padding: 1rem 1.4rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  #img-logo {
    width: 5.5rem;
  }

  #formattedText {
    font-size: 1.25rem;
  }

  .checkbox-card__title {
    font-size: 1.02rem;
  }
}

@media (min-width: 1024px) {
  main {
    padding-inline: 0;
  }

  .panel {
    padding: 1.5rem;
  }

  h2 {
    font-size: 1.3rem;
  }
}
