@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&display=swap");
:root {
  --primary-color1: #1c1337;
  --primary-color2: #4e122c;
  --secondary-color: #3eb1bd;
  --background-color: #1a1a1a;

  --text-color: rgba(255, 255, 255, 0.87);
  --border-radius: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: "Nunito Sans", sans-serif;
  line-height: 1.5;
  margin: 0;
  color: var(--text-color);
}

.main-container {
  background-image: linear-gradient(
    70deg,
    var(--primary-color1),
    var(--primary-color2)
  );
  height: 100vh;
  background-size: cover;
  background-position: center;
}

header {
  display: flex;
  justify-content: space-between;
}

header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 2;
  padding-inline-start: 38px;
}

.route-content h2 {
  font-size: 1.9rem;
  margin-bottom: 2rem;
  padding-inline-start: 40px;
}
.route-content .route-brdr {
  border: 2px solid transparent;
  border-image: linear-gradient(70deg, #271b4b, #671b44);
  border-image-slice: 1;
  border-radius: 18px;
}
.form-container {
  padding: 2rem;
  padding-top: 15px;
  border-radius: var(--border-radius);
}

label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 1.4rem;
  font-weight: 600;
}

select,
input {
  width: 100%;
  padding: 0.6em 1.2em;
  font-size: 1em;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background-color: transparent;
  color: var(--text-color);
  border: 2px solid #541635;
  border-radius: var(--border-radius);
  height: 50px;
}
select option {
  background-color: #1a1233;
  color: white;
}
select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.4em;
  padding-right: 2.5em;
}

.submit-btn {
  background-color: #a34949;
  color: white;
  border: 2px solid #541635;
  padding: 0.8em 2em;
  font-size: 1em;
  border-radius: var(--border-radius);
  height: 50px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.result-container {
  background: #1a1330;
  border: 2px solid transparent;
  border-image: linear-gradient(70deg, #322158, #541635);
  border-image-slice: 1;
  border-radius: var(--border-radius);
  padding: 1rem;
  margin-inline: 1.8rem;
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-bottom: 10px;
}

.map {
  position: relative;
  width: 520px;
  height: auto;
  background-color: #1a1233;
}

.route-line {
  position: absolute;
  top: -4px;
  left: -51px;
  width: 695px;
  height: 7px;
  background: #254e68;
  transform: rotate(24deg);
  transform-origin: 0 0;
  z-index: 1;
}

.stop-marker {
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: #2eceda;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.pin {
  position: absolute;
  width: 24px;
  height: 24px;
  background: #ff5733;
  border-radius: 50%;
  z-index: 3;
  animation: popIn 0.4s ease;
  transform: translate(-50%, -130%);
}

.pin::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border: 8px solid transparent;
  border-top-color: #ff5733;
}

.inner-dot {
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.label {
  position: absolute;
  background: none;
  color: white;
  padding: 0;
  border: none;
  font-size: 22px;
  font-weight: 600;
  transform: translate(33%, 49%);
  z-index: 2;
  white-space: nowrap;
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -150%) scale(0.5);
  }
  60% {
    opacity: 1;
    transform: translate(-50%, -130%) scale(1.2);
  }
  100% {
    transform: translate(-50%, -130%) scale(1);
  }
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -150%) scale(0.5);
  }
  60% {
    opacity: 1;
    transform: translate(-50%, -130%) scale(1.2);
  }
  100% {
    transform: translate(-50%, -130%) scale(1);
  }
}

.demand-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-content: center;
}

.demand-info h3 {
  color: var(--secondary-color);
  font-size: 2.5rem;
  font-weight: 600;
}

.demand-numbers .range {
  display: block;
  font-weight: bold;
  font-weight: 800;
  font-size: 5rem;
  background: linear-gradient(180deg, #ffda3f 9.8%, #ffa32f 70.86%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display:flex;
  align-items: center;
  column-gap: 1rem;
}

.demand-numbers .range small{
  font-size:20px;
}

.actual {
  display: block;
  color: #fff;
  font-size: 2rem;
  font-weight: 600;
}

@media (prefers-color-scheme: light) {
  body {
    background-color: #ffffff;
    color: var(--primary-color);
  }

  .form-container,
  .result-container {
    background: rgba(0, 0, 0, 0.05);
  }
}

@media (max-width: 768px) {
  .main-container {
    height: auto;
  }
  header {
    padding: 30px 20px 0px 20px;
    align-items: flex-start;
  }

  .header h1 {
    font-size: 1.4rem;
    padding-inline-start: 0;
  }
  .header img {
    width: 200px;
    height: 100px;
  }

  .route-content {
    padding-inline: 20px;
  }

  .route-content h2 {
    font-size: 1.5rem;
    padding-inline-start: 0;
    margin-bottom: 1.5rem;
  }

  .form-container {
    padding: 1rem;
  }

  label {
    font-size: 1.2rem;
  }

  input,
  select {
    font-size: 0.95rem;
    height: 45px;
    padding: 0.5em 1em;
  }

  .submit-btn {
    font-size: 0.95rem;
    padding: 0.6em 1.5em;
    height: 45px;
  }

  .result-container {
    grid-template-columns: 1fr;
    padding: 1rem;
    margin-inline: 0.5rem;
  }

  .map {
    width: 100%;
    max-width: 100%;
    height: 220px;
  }

  .route-line {
    width: 130vw;
    height: 6px;
    left: -70px;
    top: 10px;
    transform: rotate(28deg);
  }

  .stop-name {
    font-size: 12px;
  }

  .demand-info h3 {
    font-size: 2rem;
  }

  .demand-numbers .range {
    font-size: 4.5rem;
  }

  .actual {
    font-size: 1.2rem;
  }
}


.loading-overlay{
  background: #00000096;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  width: 100%;
  z-index: 10;

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
