* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: sans-serif;
}

:root {
  --color-main: rgb(196, 137, 0);
  --color-text: rgb(255, 255, 255);

  --color-success: #78fa75;
  --color-accent: #69af00;

  --color-warning: #faf02d;
  --color-highlight: #fadb6e;
  --color-secondary: #b67000;
}

.start-page-btn {
  position: fixed;
  background-color: var(--color-main);
  border: none;
  width: 3rem;
  height: 3rem;
  bottom: 2rem;
  right: 2rem;
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: 0.2s ease;

  img {
    width: 100%;
    height: 100%;
    padding: 0.8rem;
    filter: invert(1);
  }
}

.start-page-btn:hover {
  transform: scale(1.02) translateY(-0.2rem);
}

.start-page-btn:active {
  transform: scale(0.98) translateY(-0.2rem);
}

.field-error {
  outline: 2px solid rgb(162, 49, 49);
  background-color: rgb(255, 148, 148);
  color: rgb(105, 0, 0);
  box-shadow: 0 0 20px rgb(255, 0, 0);
}

.field-valid {
  outline: 2px solid rgb(56, 162, 49);
  background-color: rgb(148, 255, 151);
  color: rgb(12, 105, 0);
  box-shadow: 0 0 20px rgb(77, 255, 0);
}

.error-msg {
  color: rgb(255, 74, 74);
}

.valid-msg {
  color: rgb(22, 186, 0);
}

.field-msg {
  position: absolute;
  margin-top: 0.5rem;
}

body {
  background-color: rgb(20, 20, 20);
}

.wrapper {
  margin: 0 auto;
  padding: 0.5em;
  max-width: 1200px;
}

p {
  line-height: 1.5rem;
}

section {
  color: var(--color-text);
  min-height: 50vh;
  margin-top: 100vh;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

section:first-child {
  margin-top: 1rem;
}

section:last-child {
  margin-bottom: 40vh;
}

.info-content {
  padding: 1rem;
  border-radius: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.valid-select-g {
  margin-top: 3rem;
  display: flex;
  align-items: center;
  gap: 1rem;

  select {
    padding: 0.5rem;
    width: 8rem;
  }
}

.select-private {
  padding-left: 1rem;
  margin: 1rem 0;
  margin-left: 0.4rem;
  width: 8rem;
}

header {
  background-color: var(--color-main);
  color: var(--color-text);
  text-align: center;
  padding: 4rem 0;
  width: 100%;
}

span {
  text-wrap: nowrap;
}

h2 {
  border-radius: 0.5rem 0 0 0.5rem;
  margin-bottom: 1rem;
  padding: 1rem 1rem 1rem 2.4rem;
  color: var(--color-text);
  font-size: 1.2rem;
  background: linear-gradient(
    to left,
    rgba(0, 0, 0, 0),
    var(--color-secondary)
  );
  position: relative;
}

h2::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  background-color: var(--color-accent);
  box-shadow: 0 0 5px rgb(0, 104, 9) inset;
  border-radius: 50%;
}

h2.current-step::before {
  background-color: rgb(158, 255, 138);
  box-shadow: 0 0 10px rgb(13, 255, 33);
}

h3 {
  border-radius: 1rem 0 0 1rem;
  margin: 2rem 0;

  padding: 0.5rem;
  padding-left: 1rem;
  color: var(--color-text);
  font-size: 1rem;
  background: linear-gradient(
    to left,
    rgba(0, 0, 0, 0),
    var(--color-secondary)
  );
  position: relative;
}

select {
  background-color: #69af00;
  border: none;
  border-radius: 0.5rem;
  color: var(--color-text);
  height: 2.5rem;

  option {
    opacity: 0.5;
    color: var(--color-text);
  }
}

.key-pair {
  display: flex;
  flex-direction: column;
  gap: 1rem;

  .key-item {
    .key-value {
      display: inline-block;
      margin-top: 1rem;
    }
  }
}

.general-key {
  text-align: center;
  margin-top: 5rem;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 3rem;
}

h4 {
  border-radius: 1rem 0 0 1rem;
  margin: 1rem 0;
  margin-left: 2rem;
  padding: 0.1rem;
  padding-left: 1rem;
  color: var(--color-text);
  font-size: 0.8rem;
  background: linear-gradient(
    to left,
    rgba(0, 0, 0, 0),
    var(--color-secondary)
  );
  position: relative;
}

h4 ~ p {
  margin-left: 2rem;
}

.calculation-step {
  p ~ b {
    margin-left: 2rem;
  }
}

.input-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;

  input {
    height: 2.5rem;
    width: 12rem;
    border-radius: 0.5rem;
    border: none;
    padding-left: 1rem;
    box-shadow: 0 0 10px rgba(199, 199, 199, 0.3);
  }

  input:focus {
    outline: 4px solid orange;
  }

  .input-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;

    details {
      position: absolute;
      top: 6rem;
      right: 0;
      width: 250px;
      border-radius: 0.5rem;
      background-color: var(--color-secondary);
      display: flex;
      flex-direction: column;
      justify-content: center;
      padding: 0.6rem;
      z-index: 10;
      margin-top: 0.5rem;

      a {
        text-decoration: none;
        color: var(--color-text);
        animation: textGradient 1.5s ease-in infinite;
      }

      summary {
        cursor: pointer;
        color: var(--color-text);
        list-style: none;
      }

      summary::-webkit-details-marker {
        display: none;
      }

      .generate-content {
        margin-top: 1rem;
        display: flex;
        flex-direction: column;
        gap: 1rem;

        .content {
          display: flex;
          align-items: center;
          gap: 1rem;

          select {
            padding-left: 0.5rem;
            width: 3.5rem;
            height: 2.5rem;
          }
        }

        .generate-btn {
          cursor: pointer;
          border-radius: 0.5rem;
          border: none;
          padding: 0.2rem;
          display: flex;
          align-items: center;
          justify-content: center;
          transition: 0.2s ease;

          img {
            width: 2rem;
            height: 2rem;
            object-fit: fill;
          }
        }
      }
    }
  }
}

.next-btn {
  height: 3rem;
  width: 7rem;
  box-shadow: 0 0 10px rgba(199, 199, 199, 0.3);
  background-color: var(--color-secondary);
  border: none;
  color: var(--color-text);
  border-radius: 0.5rem;
  padding: 0 1rem;
  cursor: pointer;
  transition: 0.2s ease;
  margin-top: 2rem;
}

button:hover {
  transform: scale(1.04);
  box-shadow: 0 0 15px rgba(199, 199, 199, 0.3);
}

button:active {
  transform: scale(0.96);
  box-shadow: 0 0 2px rgba(199, 199, 199, 0.3);
}

@keyframes textGradient {
  0%,
  100% {
    color: var(--color-text);
  }
  25%,
  75% {
    color: rgb(198, 198, 198);
  }
  50% {
    color: rgb(139, 139, 139);
  }
}

main {
  padding: 4rem 0;

  .wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }
}

@media (max-width: 1200px) {
  .wrapper {
    max-width: 876px;
  }
}

@media (max-width: 876px) {
  .wrapper {
    max-width: 576px;
  }
}

@media (max-width: 576px) {
  body {
    font-size: 12px;
  }

  .wrapper {
    max-width: 100%;
    padding: 0.5em 1em;
  }

  header {
    padding: 2rem 0;
    font-size: 0.8rem;
  }

  h2 {
    font-size: 1rem;
  }

  h3 {
    font-size: 0.8rem;
  }

  h4 {
    font-size: 0.6rem;
  }

  main {
    padding: 2rem 0;
  }

  .next-btn {
    margin: 0 auto;
  }

  .input-section {
    .next-btn {
      margin-top: 14rem;
    }

    .input-content {
      details {
        top: 12rem;
        left: 50%;
        transform: translateX(-50%);
      }
    }
  }
}
