/* Ensure body and html take full height */
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

/* General Styling */
body {
  font-family: ui-sans-serif, -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, Helvetica, Apple Color Emoji, Arial, Segoe UI Emoji, Segoe UI Symbol;
  background-color: #f4f7f6;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

#app {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  flex-grow: 1;
}


/* Top bar styling */
.top-bar a {
  text-decoration: none;
  color: inherit;
}

.top-bar {
  background-color:#37525b;
  position: fixed;
  top: 0;
  left: 0;
  height: 80px;
  width: 100%;
  display: flex;
  align-items: center;
  padding-left: 30px;
  z-index: 2;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: padding-left 1s;
}

.bar-image {
  height: 40px;
  width: 40px;
  transition: height 0.5s, width 0.5s;
}

.bar-text {
  color: #ecf0f1;
  font-size: 25px;
  font-weight: bold;
  margin-left: 5px;
  transition: font-size 0.5s;
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}

.bc_text {
  padding: 5px 10px;
  color: #333;
  font-weight: bold;
  background-color: #ecf0f1;
  font-size: 15px;
  margin-left: 10px;
  border-radius: 50%;
  text-align: center;
}

/* Responsive styling for top bar */
@media screen and (max-width: 600px) {
  .top-bar {
    padding-left: 20px;
  }

  .bar-image {
    height: 30px;
    width: 30px;
  }

  .bar-text {
    font-size: 22px;
  }

  .bc_text {
    display: none;
  }
}

.premium-crown{font-size:1.35rem;margin-left:.45rem;line-height:1;}
.hidden{display:none;}

/* Main content container */
.first-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 800px;
  max-width: 100%;
  height: auto;
  padding: 5px;
  border-radius: 10px;
  margin-top: 100px;
  margin-bottom: 200px;
  position: relative;
}

.content {
  padding: 10px;
  width: 800px;
  max-width: 100%;
  box-sizing: border-box;
  transition: all 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.top-buttons {
  font-size: 16px;
  cursor: pointer;
  width: 100%;
  display: flex;
  justify-content: space-between;
  /* Adjust alignment */
  padding: 5px 0;
}

.button-left {
  flex: 1;
  /* Ensure it takes available space */
}

.button-right {
  flex: 1;
  /* Ensure it takes available space */
  text-align: right;
  /* Align button to the right */
}

.flash-card {
  perspective: 1000px;
  width: 100%;
  height: 400px;
  margin: 10px auto;
}

.bottom-buttons {
  font-size: 16px;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Change to space-between */
  gap: 5px;
  padding: 5px 0;
  min-height: 50px;
}

.flash-card-buttons-center {
  margin-left: 110px;
  display: flex;
  justify-content: start;
  align-items: center;
  flex-grow: 1;
  /* This will allow the center section to take up remaining space */
  gap: 10px;
  /* Ensure proper spacing between buttons and question number */
}

.flash-card-question-number {
  font-size: 25px;
  width: 130px;
  text-align: center;
  /* Center text inside the question number box */
}

.flash-card-button {
  padding: 10px 20px;
  color: #ffffff;
  background-color: #404448;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border-radius: 5px;
  font-weight: bold;
  font-size: 18px;
}

.flash-card-checkbox-label {
  display: flex;
  align-items: center;
  margin-left: 10px;
  font-size: 18px;
}

.big-checkbox {
  width: 25px;
  height: 25px;
  margin-right: 5px;
}

.flash-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
  cursor: pointer;
}

.flash-card-front,
.flash-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.flash-card-front {
  background-color: #ffffff;
}

.flash-card-back {
  font-size: 25px;
  font-weight: bold;
  color: #333;
  background-color: #ffffff;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;

}

.signs-heading {
  margin-bottom: 10px;
  /* Space between heading and explanation */
  font-size: 25px;
  font-weight: bold;
  color: #333;
  padding: 0 20px;
}

.signs-explanation {
  font-size: 18px;
  font-weight: normal;
  color: #333;
  padding: 20px 40px;
}

.next-button {
  display: block;
  margin: 20px auto;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
}

.flash-card-image {
  width: 350px;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* reveal mode design */
.reveal-mode-flash-card {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
  background-color: #ffffff;

}

.reveal-mode-flash-card-front {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.reveal-mode-image-container {
  flex: 0 0 35%;
  height: 60%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.reveal-mode-text{
  flex: 0 0 65%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}
.reveal-mode-traffic-image {
  width: auto;
  height: auto;
  padding: 10px;
}
.reveal-mode-signs-heading {
  font-size: 25px;
  font-weight: bold;
  color: #333;
  align-items: center;
  padding-bottom: 10px;
  padding-right:20px;
}

.reveal-mode-signs-explanation {
  align-items: start;
  padding-right:20px;
  font-size: 18px;
  font-weight: normal;
  color: #333;
}

@media screen and (max-width: 800px) {
  .content,
  .first-container {
    width: 700px;
  }
  .flash-card-buttons-center {
    margin-left: 55px;
  }

  .flash-card-checkbox-label {
    font-size: 18px;
  }
  .reveal-mode-image-container {
    flex: 0 0 40%;
  }
  .reveal-mode-traffic-image {
    width: 70%;
    padding: 5px;
  }
  .reveal-mode-text {
    flex: 0 0 60%;
    padding: 10px;
  }
}
@media screen and (max-width: 600px) {
  .content,
  .first-container {
    width: 500px;
  }
  .flash-card-buttons-center {
    margin-left: 10px;
  }

  .flash-card-checkbox-label {
    font-size: 15px;
  }

  .flash-card-question-number {
    font-size: 18px;
    width: 90px;
  }
  .flash-card-buttons-center {
    gap: 1px;
  }
}
@media screen and (max-width: 500px) {
  .content,
  .first-container {
    width: 500px;
  }
  .flash-card-buttons-center {
    margin-left: 10px;
  }

  .flash-card-checkbox-label {
    font-size: 15px;
  }

  .flash-card-question-number {
    font-size: 18px;
    width: 90px;
  }
  .flash-card-buttons-center {
    gap: 1px;
  }
  .flash-card {
    height: 350px;
  }
  .flash-card-button {
    padding: 10px 15px;
  }
  .bottom-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .flash-card-checkbox-label {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    padding-bottom: 5px;
  }

  .flash-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .flash-card-front,
  .flash-card-back {
    flex-direction: column;
  }

  .flash-card-image {
    margin-top: 10px;
    width: 100%;
    height: auto;
  }
  .reveal-mode-flash-card-front {
    flex-direction: column;
    align-items: center;
  }
  .reveal-mode-image-container {
    padding-top: 10px;
    flex: 0 0 40%;
    width:100%;
    max-height: 300px; /* Set the maximum height as needed */
    overflow: hidden; 
  }
  .reveal-mode-traffic-image {
    width: 40%;
    height: auto; /* Maintain aspect ratio */
    max-height: 100%; /* Ensure the image does not exceed the container's height */
    object-fit: contain; 
  }
  .reveal-mode-text {
    display: flex;
    justify-content: start;
    align-items: center;
    margin-top:0px;
    flex: 0 0 60%;
    padding: 10px;
  }
  .reveal-mode-signs-heading {
    padding-bottom:5px;
  }
}


@media screen and (max-width: 400px) {

  .first-container {
    margin-top: 60px;
  }

  .content,
  .first-container {
    width: 500px;
  }
  .flash-card-buttons-center {
    margin-left: 10px;
  }

  .flash-card-checkbox-label {
    font-size: 15px;
  }

  .flash-card-question-number {
    font-size: 18px;
    width: 90px;
  }
  .flash-card-buttons-center {
    gap: 1px;
  }
  .flash-card {
    height: 350px;
  }
  .flash-card-button {
    padding: 10px 15px;
  }

 
  .bottom-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .flash-card-checkbox-label {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    padding-bottom: 5px;
  }

  .flash-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .flash-card-front,
  .flash-card-back {
    flex-direction: column;
  }

  .flash-card-image {
    margin-top: 10px;
    width: 100%;
    height: auto;
  }
  .reveal-mode-flash-card-front {
    flex-direction: column;
    align-items: center;
  }
  .reveal-mode-image-container {
    padding-top: 10px;
    flex: 0 0 40%;
    width:100%;
    max-height: 300px; /* Set the maximum height as needed */
    overflow: hidden; 
  }
  .reveal-mode-traffic-image {
    width: 40%;
    height: auto; /* Maintain aspect ratio */
    max-height: 100%; /* Ensure the image does not exceed the container's height */
    object-fit: contain; 
  }
  .reveal-mode-text {
    display: flex;
    justify-content: start;
    align-items: center;
    margin-top:0px;
    flex: 0 0 60%;
    padding: 10px;
  }
  .reveal-mode-signs-heading {
    font-size: 20px;
    padding-bottom:5px;
  }
  .reveal-mode-signs-explanation {
    font-size: 16px;
  }
}


/* Bottom panel styling */
.bottom-panel {
  background-color:#37525b;
  color: #ecf0f1;
  width: 100%;
  text-align: center;
  padding: 30px 0;
  margin-top: auto;
}

.bottom-panel p {
  margin: 5px 0;
}

.bottom-links {
  display: flex;
  justify-content: center;
  padding: 0 10px;
  width: 100%;
  box-sizing: border-box;
}

.bottom-links a {
  color: #A3D9E0;   /* pale teal  — contrast ≈4.8:1 */
  text-decoration: none;
  transition: color 0.3s ease;
  margin: 0 10px;
}


.bottom-links a:hover,
.bottom-links a:focus {
  color: #FFC857;           /* or whatever hover color you choose */
  text-decoration: underline;
}

.cookie-policy {
  color: blue;
  text-decoration: underline;
  cursor: pointer;
}

@media screen and (max-width: 800px) {
  .bottom-links {
    flex-direction: column;
    align-items: center;
    gap: 2px;
  }

  .bottom-links a {
    margin: 2px 0;
  }
}
