/* Import the custom font */
@font-face {
  font-family: "League Spartan";
  src: url("assets/fonts/LeagueSpartan-VariableFont_wght.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 100%;
  font-style: normal;
  font-display: swap;
}

/* Base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: "League Spartan", sans-serif;
  font-weight: 400;
  overflow: hidden;
  width: 100%;
  height: 100%;
  background-color: #ffffff;
}
html {
  font-size: 16px;
  font-size: calc(min(100vw / 80, 100vh / 50));
  overflow: hidden;
  }
/* Game containers */
.game-container {
  width: 80rem;
  height: 50rem;
  /*box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);*/
  /*border-radius: 1rem;*/
  position: relative;
  background-color: #EBEEF5;
  overflow: hidden;
}

/* Intro and Game Over screens */
#intro-screen, #game-over {
  background-color: #ffffff;
}

.start-btn {
  background-color: #00699F;
  color: white;
  font-weight: bold;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Game area */
.game-area {
  width: 80rem;
  height: calc(50rem - 3rem);
  position: relative;
  overflow: hidden;
}

/* Road styling */
.road-background {
  width: 100%;
  height: 100%;
  background-color: #333333;
  position: relative;
  display: flex;
  flex-direction: row;
}

/* Lanes */
.lane {
  flex: 1;
  height: 100%;
  position: relative;
}

/* Lane dividers (vertical dashed lines) */
.lane:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  height: 200%;
  width: 3px;
  background: linear-gradient(to bottom, white 50%, transparent 50%);
  background-size: 20px 20px;
  animation: lineMovement 5s linear infinite;
}

@keyframes lineMovement {
  0% {
    transform: translateY(-50%);
  }
  100% {
    transform: translateY(0%);
  }
}

/* Info bar */
.info-bar {
  height: 3rem;
  width: 100%;
  background-color: #00699F;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
  font-size: 1.2rem;
}

.time-display, .speed-display {
  display: flex;
  align-items: center;
  background-color: white;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  justify-content: center;
  padding: 0.5rem;
}

.time-display img, .speed-display img {
  width: 1.5rem;
  height: 1.5rem;
}

#time-left, #speed-value {
  color: black;
  margin-left: 0.5rem;
}

/* Player car */
.player-car {
  position: absolute;
  bottom: 4rem;
  width: 6rem;
  height: 10rem;
  transition: left 0.2s ease-out;
  z-index: 10;
  cursor: pointer;
}

.car-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.current-word {
  position: absolute;
  top: 40%;
  left: 45%;
  transform: translate(-50%, 0);
  background-color: rgba(255, 255, 255, 0.9);
  border: 2px solid #00699F;
  border-radius: 0.5rem;
  padding: 0.5rem;
  font-weight: bold;
  color: #00699F;
  text-align: center;
  width: 180%;
  font-size: 1.3rem;
  transition: all 0.3s ease;
  z-index: 9;
}

/* Arrow pointing downward */
.current-word::after {
  content: '';
  position: absolute;
  bottom: -1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 0.8rem solid transparent;
  border-right: 0.8rem solid transparent;
  border-top: 1rem solid #00699F;
}

/* Word feedback styles */
.current-word.correct {
  background-color: #258174 !important;
  border-color: #258174 !important;
  color: white !important;
  transform: translate(-50%, 0) scale(1.1);
}

.current-word.correct::after {
  border-top-color: #258174 !important;
}

.current-word.incorrect {
  background-color: #ff0000 !important;
  border-color: #ff0000 !important;
  color: white !important;
  transform: translate(-50%, 0) scale(1.1);
}

.current-word.incorrect::after {
  border-top-color: #ff0000 !important;
}

/* Traffic signs */
.signs-row {
  position: absolute;
  top: -6rem;
  left: 0;
  width: 100%;
  display: flex;
  z-index: 5;
}

.sign {
  width: 80%;
  height: 5rem;
  background-color: #5f35f8;
  border-radius: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-weight: bold;
  font-size: 1.8rem;
  box-shadow: none;
}

/* Lane labels at the bottom */
.lane-bottom-labels {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  z-index: 4;
}

.lane-bottom-label {
  width: 25%;
  height: 3rem;
  background-color: #f9b000;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #333;
  font-weight: bold;
  font-size: 1.5rem;
}

/* Feedback colors */
.correct {
  background-color: #258174 !important;
  border-color: #258174 !important;
  color: white !important;
}

.incorrect {
  background-color: #ff0000 !important;
  border-color: #ff0000 !important;
  color: white !important;
}

/* Media queries for responsive design */
@media (max-width: 768px) {
  .game-container {
    width: 80rem;
    height: 50rem;
  }
  
  .sign {
    font-size: 1.4rem;
  }
  
  .info-bar {
    font-size: 1rem;
  }
}

/* Hide elements when needed */
.hidden {
  display: none !important;
}

/* Speed indicator animations */
@keyframes speedIncrease {
  0% { color: #00699F; transform: scale(1); }
  50% { color: #258174; transform: scale(1.3); }
  100% { color: #00699F; transform: scale(1); }
}

@keyframes speedDecrease {
  0% { color: #00699F; transform: scale(1); }
  50% { color: #ff0000; transform: scale(1.3); }
  100% { color: #00699F; transform: scale(1); }
}

.speed-increase {
  animation: speedIncrease 1s ease-in-out;
}

.speed-decrease {
  animation: speedDecrease 1s ease-in-out;
} 