/* ========================
   GLOBAL SETTINGS
======================== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: #000000;
  color: #ffffff;
  font-family: "Quantico", sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  width: 100vw;
  overflow: hidden;
  background: url('/static/background.png') no-repeat center center;
  background-size: cover;
  position: relative;
}

/* Autofill override (Chrome/Edge) */
input:-webkit-autofill,
input:-webkit-autofill:focus,
input:-webkit-autofill:hover,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px black inset !important;
  -webkit-text-fill-color: white !important;
  transition: background-color 9999s ease-in-out 0s;
}

/* ========================
   CONTAINER
======================== */
.container {
  height: 95vh;
  width: 95vw;
  max-width: 850px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 3.5rem; /* space for footer */
}

/* ========================
   HEADER
======================== */
header {
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
}
hr{
  width: 100%;
  border: 0;
  height: 1px;
  background: #dadada;
  margin-top: 0.5rem;
}

#airdrop_simulator {
  text-align: center;
  font-weight: 700;
  font-size: clamp(2.1rem, 5.1vw, 3.6rem);
  font-family: "Quantico", sans-serif;
  color: #ffffff;
  margin: 0;
}

#description{
  margin: 0.1rem;
  font-size: 1.2rem;
}


/* ========================
   FORM
======================== */
#allocationForm {
  width: 40vw;
  display: flex;
  flex-direction: column;
  height: auto;
  gap: 0.8rem;
}

.row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
  width: 100%;
}

input,
select {
  text-align: center;
  border: 2px solid #dadada;
  background-color: black;
  color: #ffffff;
  font-family: inherit;
  font-size: 1.2rem;
  outline: none;
  padding: 0.6rem;
  width: 100%;
}

#address {
  height: 3.5rem;
  margin-bottom: 0.1rem;
}

/* Select arrow customization */
select {
  padding-right: 2rem !important;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23dadada" height="10" viewBox="0 0 20 20" width="10" xmlns="http://www.w3.org/2000/svg"><polygon points="0,0 20,0 10,10"/></svg>');
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 0.7rem;
}

select option {
  background-color: #000000;
  color: #ffffff;
}

input::placeholder {
  color: #888888;
}

/* Focus states */
input:focus,
select:focus,
input:active,
select:active {
  background-color: transparent;
  color: #ffffff;
  border-color: #dadada;
}

/* ========================
   BUTTONS
======================== */
button {
  font-family: "Quantico", sans-serif;
  background-color: transparent;
  color: #090909;
  border: 2px solid #dadada;
  padding: 2px 20px;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  font-size: 1.5rem;
  font-weight: 700;
  background-color: #dadada;
}
#submitbutton {
  padding-top: 5px;
  padding-bottom: 5px;
}

button:hover {
  background-color: #cacaca;
  color: #000000;
  scale: 1.02;
}

/* Modal background */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.7);
}

/* ========================
   MODAL CONTENT
======================== */
.modal-content {
  background-color: #111;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 90%;
  max-width: 500px;
  color: #fff;
  font-family: 'Quantico', sans-serif;
  position: relative;
}

/* Close button */
.close {
  color: #aaa;
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: #fff;
}


/* ========================
   RESULT DISPLAY
======================== */
#result {
  display: none;
  flex-direction: column;
  align-items: center;
}

#allocation_text {
  text-align: center;
  font-size: clamp(1rem, 4vw, 2rem);
  font-family: "Quantico", sans-serif;
  color: #ffffff;
  margin-top: 5%;
  margin-bottom: 4%;
}

.allocation-box {
  width: 35vw;
  background-color: #111;
  border: 2px solid #dadada;
  padding: 1rem 2rem;
  margin: 0 auto;
  box-sizing: border-box;
  color: #fff;
}

.big-number {
  font-size: 3rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.6rem;
  font-family: "Quantico", sans-serif;
  color: #dadada;
}

/* ========================
   FOOTER
======================== */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #000000;
  color: #c8c8c8;
  text-align: center;
  padding: 1rem 0;
  font-family: "Quantico", sans-serif;
  font-size: 1.2rem;
  user-select: none;
  z-index: 1000;
}

footer a {
  color: #dadada;
  transition: color 0.3s;
  text-decoration: none;
}

footer a:hover,
footer a:focus {
  color: #ffffff;
  text-decoration: none;
}

/* ========================
   RESPONSIVE
======================== */
@media (max-width: 600px) {
  header {
    margin-bottom: 1rem;
  }

  #airdrop_simulator {
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 4em);
  }

  #description{
    font-size: 0.75rem;
  }

  #allocationForm {
    width: 70vw;
    gap: 0.6rem;
  }

  input,
  select{
    font-size: 1rem;
    padding: 0.75rem;
    width: 100%;
  }

  button{
    font-size: 1.2rem;
    padding: 1rem 7px !important;
    width: 100%;
  }
  .row {
    flex-direction: column;
    gap: 0.6rem;
    align-items: center;
    width: 100%;
  }
    .modal-content {
    margin: 20% 1rem;
    width: 95%;   
    padding: 15px;   
    font-size: 0.95rem; 
  }

  .close {
    top: 8px;
    right: 15px;
    font-size: 24px;
  }

  #contractsText {
    font-size: 0.75rem;
    line-height: 1rem; 
  }

  #allocation_text {
    font-size: clamp(1.2rem, 4.5vw, 2.5rem);
  }

  .allocation-box {
    width: 70vw;
    padding: 1rem 1.3rem;
  }

  footer {
    font-size: clamp(0.9rem, 0.9vw, 0.9rem);
  }
}
