:root {
    --primary: #a855f7;
    --primary-light: #c084fc;
    --secondary: #1e1b4b;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
}

body {
    font-family: 'Helvetica Neue', 'Segoe UI', Arial, sans-serif;
    font-size: 18px;
    line-height: 24px;
    color: var(--secondary);
    height: 100%;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    min-height: 100vh;
}

datalist {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  writing-mode: vertical-lr;
  width: 100%;
}

h1, h2, h3 {
  line-height: 2rem;
}

a {
    text-decoration: none;
    color: var(--primary);
}
a:hover {
    color: var(--secondary);
}

p {
  color: #4c1d95;
}

fieldset {
  padding: 0;
  margin: 0;
  border: 0;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: var(--secondary);
  border-radius: 3px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  background: var(--primary);
  height: 30px;
  width: 30px;
  border-radius: 50%;
  cursor: pointer;
  border: 4px solid var(--secondary);
}

input[type="range"]::-moz-range-thumb {
  background: var(--primary);
  border-radius: 100%;
  height: 20px;
  width: 20px;
  cursor: pointer;
  border: 4px solid var(--secondary);
}

input[type=range]::-webkit-slider-runnable-track  {
  -webkit-appearance: none;
  box-shadow: none;
  border: none;
  background: transparent;
}


button {
    background: var(--primary);
    cursor: pointer;
    border-color: var(--secondary);
    padding: 10px 30px;
    font-size: 1.3rem;
    border-width: 1px 3px 3px 1px;
    border-style: solid;
    border-radius: 3px;
    color: white;
    font-weight: 600;
}
    button:hover {
        background: var(--primary-light);
    }

.text-center {
  text-align: center;
}

.container {
    max-width: 800px;
    margin: 45px auto 30px auto;
}
.box {
    padding: 30px 45px;
    border: 1px solid #ddd;
    border-radius: 3px;
    border: 2px solid var(--secondary);
    box-shadow: 3px 3px 0px var(--secondary);
    margin-bottom: 45px;
    background: white;
}

.container .title {
  margin: 15px 0 0px 0;
  color: var(--secondary);
}

.help {
  margin-top: 5px;
}

.form {
  clear: both;
}
.form fieldset {
  font-size: 1.3rem;
  margin-bottom: 45px;
}
  .form label {
    display: block;
    margin-bottom: 15px;
    color: var(--secondary);
  }
  .form .value, .help {
    float: right;
    color: #9ca3af;
  }

.answer {
  text-align: center;
  display: none;
}
.answer h1 {
  margin: 30px 0;
  font-size: 2rem;
  line-height: 2.5rem;
}
  .answer span {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 5px 15px;
    border-radius: 5px;
  }
  .answer .summary {
    font-family: monospace;
    width: 100%;
    padding: 10px;
    min-height: 250px;
    border: 2px solid var(--secondary);
    border-radius: 3px;
  }

footer {
  margin: 30px auto;
  color: #6b7280;
  font-size: 0.975rem;
}

@media (max-width: 800px) {
  .container {
    max-width: none;
    margin: 20px 30px 20px 20px;
    padding: 0;
  }
  .box {
    padding: 20px;
    border: 2px solid var(--secondary);
    box-shadow: 3px 3px 0px var(--secondary);
  }
  .help {
    float: none;
  }
  .form label {
    float: left;
    max-width: 85%;
  }
  .answer h1 {
    font-size: 1.5rem;
    line-height: 2rem;
  }
}


@media (max-width: 400px) {
  .form label {
    max-width: 70%;
  }
}

.notice {
  position: fixed;
  top: 30px;
  left: 0;
  right: 0;
  width: 250px;
  margin: auto;
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  background: var(--primary);
  color: white;
  z-index: 100;
  visibility: hidden;
  border-radius: 3px;
  border: 2px solid var(--secondary);
  box-shadow: 3px 3px 0px var(--secondary);
}

.notice.visible {
  visibility: visible;
  -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
          animation: fadein 0.5s, fadeout 0.5s 2.5s;
  -webkit-animation-fill-mode: forwards;
          animation-fill-mode: forwards;
}

@-webkit-keyframes fadein {
  from {
    top: 0;
    opacity: 0;
  }
  to {
    top: 30px;
    opacity: 1;
  }
}

@keyframes fadein {
  from {
    top: 0;
    opacity: 0;
  }
  to {
    top: 30px;
    opacity: 1;
  }
}
@-webkit-keyframes fadeout {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
@keyframes fadeout {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
