@font-face {
  font-family: 'Rocher';
  src: url(https://assets.codepen.io/9632/RocherColorGX.woff2);
}

html, body {
  height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  font-family: 'Rocher';
}

body {
  flex: 1 0 auto; /* grow, don’t shrink, auto basis */
}


/* Title and header styling */
.header {
  background-color: #f55e5e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
}

.header .logo {
  font-size: 2rem;
  padding-left: 10px;
}

.header .buttons {
  display: flex;
  gap: 10px;
}

.header .buttons div {
  width: 40px;
  height: 40px;
  background-color: #ffc107;
  border-radius: 5px;
}

.title {
  background-color: #f88a8a;
  text-align: center;
  color: #2b2b2b;
  padding: 10px;
  font-size: 2rem;
}

/* Container fills the available space */
.container {
  flex: 1 0 auto;
  display: flex;
  flex-direction: row;
  min-height: 0; /* fixes Safari collapse */
}

/* Left section */
.left-section {
  flex: 0 0 20%;
  background-color: #589ebf;
  padding: 10px;
  box-sizing: border-box;
  color: #2b2b2b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.left-section h4 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.left-section form {
  display: flex;
  flex-direction: column;
  width: 90%;
  font-size: 1.1rem;
}

#routeForm label {
  margin-bottom: 5px;
}

.left-section input,
.left-section button {
  margin-bottom: 20px;
  padding: 8px;
  border: none;
  border-radius: 4px;
  width: 100%;
  box-sizing: border-box;
  background-color: #fae0e0;
}

.left-section button {
  background: #ee7569;
  cursor: pointer;
  font-family: 'Rocher', sans-serif;
  font-size: 1.1rem;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  margin-bottom: 20px;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.6);
}

.weight-display {
  margin-top: 0px !important;
  margin-bottom: 10px;
  width: 100% !important;
}

.distance-display {
  /* margin-top: 10px; */
  width: 90%;
  
}

.distance-display label {
  font-size: 1.1rem;
  color: #2b2b2b;
  display: block;
  margin-bottom: 5px;
}

.distance-display input {
  width: 100%;
  padding: 8px;
  /* margin-top: 5px; */
  border: none;
  border-radius: 4px;
  background-color: #fae0e0;
  color: #333;
  box-sizing: border-box;
}


.character-select {
  /* margin: 20px 0;  */
  text-align: center;
}

.character-buttons {
  display: flex;
  justify-content: center;
  gap: 30px !important; /* Space between buttons */
}


.character-btn img {
  width: 64px !important;
  height: 64px !important;
  display: block;
  max-width: 64px !important;
  max-height: 64px !important;
}


.character-btn {
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}




/* Map container */
.right-section {
  /* flex: 1; */
  background-color: #76a79c;
  /* position: relative;
  min-height: 200px;  */

  flex: 1;
  min-height: 0; /* Crucial for Safari to not collapse */
  position: relative;
}

#map {
  width: 100%;
  height: 100%;
  min-height: 200px;
}


.video-container {
  width: 100%;
  height: auto;
  margin-top: 10px;
  position: relative;
  transform: translateY(150px);
  /* display: none !important; */
}

.video-container video,
.video-container canvas {
  width: 100%;
  height: auto;
  position: absolute;
  top: 0;
  left: 0;
  display: none !important;
}

.video-container video {
  z-index: 1;
}

.video-container canvas {
  z-index: 2;
  pointer-events: none;
}

/* .hidden-video {
  display: none !important;
} */


.footer {
  background-color: #f55e5e;
  text-align: center;
  font-weight: bold;
  height: 40px;
  line-height: 40px;
}

/* Tablet optimization (landscape tablets, small laptops) */
@media (max-width: 1400px) {
  .title {
    font-size: 2.5rem;
  }
  .left-section h4 {
    font-size: 1.5rem;
  }
  .left-section form {
    font-size: 1rem;
  }
  .left-section button {
    font-size: 1rem;
  }
  .distance-display label {
    font-size: 1rem;
  }
  .header .logo {
    font-size: 1.3rem;
  }
}

@media (max-width: 1129px) {
  .container {
    flex-direction: column;
  }
  .left-section,
  .right-section {
    width: 100%;
  }
  .left-section {
    padding: 15px;
  }
  .title {
    font-size: 2.5rem;
  }
  .left-section h4 {
    font-size: 1rem;
  }
  .left-section form {
    font-size: 0.9rem;
  }
  .left-section button {
    font-size: 0.9rem;
  }
  .distance-display label {
    font-size: 0.8rem;
  }
  .header .logo {
    font-size: 1.3rem;
  }
}

/* Smaller tablets & larger mobile devices */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }
  .left-section,
  .right-section {
    width: 100%;
  }
  .left-section {
    padding: 15px;
  }
  .title {
    font-size: 2rem;
  }
  .left-section h4 {
    font-size: 1.5rem;
  }
  .left-section form {
    font-size: 0.95rem;
  }
  .left-section button {
    font-size: 0.95rem;
  }
  .distance-display label {
    font-size: 0.95rem;
  }
  .header .logo {
    font-size: 1.2rem;
  }
  .header .buttons div {
    width: 30px;
    height: 30px;
  }
  #map {
    width: 100%;
    height: 260px;
  }
}

/* Mobile phones */
@media (max-width: 480px) {
  .container {
    flex-direction: column;
  }
  .left-section,
  .right-section {
    width: 100%;
  }
  .right-section {
    flex: 1;
    min-height: 200px;
  }
  #map {
    width: 100%;
    height: 290px;
  }
  .title {
    font-size: 1.5rem;
  }
  .left-section h4 {
    font-size: 1.3rem;
  }
  .left-section form {
    font-size: 0.9rem;
  }
  .left-section button {
    font-size: 0.9rem;
    padding: 6px 12px;
  }
  .distance-display label {
    font-size: 0.9rem;
  }
  .header .logo {
    font-size: 1rem;
  }
  .header .buttons div {
    width: 25px;
    height: 25px;
  }
}
