html,
body {
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
body {
  font-family: "Quicksand", system-ui, -apple-system, "Segoe UI", Roboto, Arial,
    sans-serif;
  color: #2b2140;
  background-image: url("pink_sparkles.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}

.container {
  width: 100%;
  max-width: 720px;
  margin-top: 8vh;
}

h1 {
  margin: 0 0 6px;
  font-size: 30px;
  color: #fd4a8f;
}

h1,
p {
  margin-top: 0;
  margin-bottom: 0;
}

.tagline {
  margin: 0 0 18px;
  font-weight: 600;
  color: #4a8bb4;
}

.card {
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(214, 230, 242, 0.45);
  border-radius: 16px;
  padding: 20px;
  margin: 0 auto 16px;
  max-width: 540px;
  text-align: center;
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
  backdrop-filter: blur(8px) saturate(1.1);
}

.field {
  margin: 0 0 12px;
}

label {
  display: block;
  font-size: 14px;
  color: #ff5f9c;
  margin-bottom: 6px;
  font-weight: 600;
}

input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e6dcfb;
  text-align: center;
  border-radius: 10px;
  font: inherit;
  outline: none;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;

  background-color: rgba(253, 250, 255, 0.45);
  color: #70b0d8;
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
  input[type="text"] {
    background-image: linear-gradient(
        90deg,
        rgb(255, 0, 157),
        red,
        orange,
        rgb(113, 169, 214),
        rgb(255, 0, 157),
        violet,
        rgb(108, 182, 231),
        rgb(150, 53, 219),
        rgb(253, 152, 0),
        rgba(84, 84, 253, 0.781),
        rgb(204, 96, 204),
        rgb(255, 112, 112),
        orange,
        rgb(135, 194, 202),
        rgb(199, 82, 199),
        rgb(111, 150, 111),
        blue,
        violet,
        orange
      ),
      linear-gradient(rgba(253, 250, 255, 0.1), rgba(253, 250, 255, 0.1));
    -webkit-background-clip: text, padding-box;
    background-clip: text, padding-box;

    -webkit-text-fill-color: transparent;
    color: transparent;

    caret-color: #ff5f9c;
  }
}

input[type="text"]:focus {
  border-color: #3d7ea6;
  box-shadow: 0 0 0 4px rgba(61, 126, 166, 0.2);
}

.btn {
  display: block;
  width: 60%;
  margin: 6px auto 0;
  padding: 12px 16px;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, #ff9acb, #ff7bb8);
  color: #ffffff;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(255, 155, 203, 0.4);
  transition: all 0.2s ease;
  margin-top: 6px;
  font-family: "Quicksand", system-ui, -apple-system, "Segoe UI", Roboto, Arial,
    sans-serif;
}

.btn:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 12px rgba(61, 126, 166, 0.3);
}

.btn:active {
  transform: scale(0.98);
  box-shadow: 0 3px 6px rgba(61, 126, 166, 0.25);
}

.btn-secondary {
  width: 25%;
  background: rgba(122, 177, 214, 0.836);
  color: #ffffff;
  font-family: "Quicksand", system-ui, -apple-system, "Segoe UI", Roboto, Arial,
    sans-serif;
}

.result-line1 {
  font-size: 16px;
  color: #4a8bb4;
  font-weight: 600;
}

.result-percent {
  font-size: 34px;
  font-weight: 800;
  color: #fd4a8f;
}

.result-line2 {
  font-size: 14px;
  color: #ff5f9c;
  font-weight: 600;
}

#resultText {
  margin: 0 0 8px;
  line-height: 2;
  text-align: center;
  color: #ff6fa6;
  padding-bottom: 10px;
  font-weight: 600;
  font-size: 14px;
}

.hidden {
  display: none;
}

@media (max-width: 480px) {
  .card {
    padding: 14px;
  }
  h1 {
    font-size: 1.6rem;
  }
  .btn {
    font-size: 12px;
    width: 80%;
  }
  .btn-secondary {
    font-size: 12px;
    width: 35%;
  }

  .result-line1 {
    font-size: 14px;
  }

  .result-percent {
    font-size: 18px;
  }

  .result-line2 {
    font-size: 12px;
  }
}
