@import url('https://fonts.googleapis.com/css2?family=Nova+Flat&display=swap');

/* Reset & base */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
  Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background: #16213e;
  color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
header {
  background: #1a1a2e;
  border-bottom: 1px solid #3a3a5e;
  padding: 12px 24px;
  text-align: center;
}

header a {
  font-family: 'Nova Flat', cursive;
  font-size: 22px;
  color: #ffd700;
  text-decoration: none;
}

header a:hover {
  text-decoration: none;
}

/* Main content */
main {
  flex: 1;
  max-width: 480px;
  margin: 2rem auto 3rem;
  padding: 0 1rem;
  background: white;
  border-radius: 16px;
  border: 1px solid #3a3a5e;
  box-shadow: 0 8px 24px rgb(0 71 171 / .15);
}

main h1 {
  /* Standard font here */
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
  Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-size: 28px;
  margin-bottom: 1rem;
  text-align: center;
  color: #0047ab;
}

form {
  display: grid;
  gap: 1.25rem;
}

label {
  font-weight: 600;
  color: #0047ab;
}

input[type='number'] {
  width: 100%;
  padding: 10px 14px;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 10px;
  transition: border-color .3s ease;
}

input[type='number']:focus {
  outline: none;
  border-color: #0047ab;
}

.result {
  font-weight: 600;
  background: #eaf3ff;
  margin-bottom: 20px;
  padding: 12px 16px;
  border-radius: 10px;
  font-family: monospace;
  font-size: 18px;
  color: #0047ab;
}

/* Footer */
footer {
  background: #1a1a2e;
  border-top: 1px solid #3a3a5e;
  color: white;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
  Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

footer .left a, footer .right a {
  color: #0dcaf0;
  text-decoration: none;
  margin: 0 .6rem;
}

footer .left a:hover, footer .right a:hover {
  text-decoration: none;
}

footer .left {
  flex: 1 1 40%;
  text-align: left;
}

footer .right {
  flex: 1 1 50%;
  text-align: right;
}

/* Responsive */
@media (max-width: 480px) {
  footer {
    flex-direction: column;
    gap: .5rem;
    font-size: 13px;
    text-align: center;
  }

  footer .left, footer .right {
    flex: unset;
    text-align: center;
  }

  footer .right a {
    margin: 0 .4rem;
  }
}
