@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500&family=Black+Han+Sans&family=quicksand:wght@700&display=swap');


@media screen and (max-width: 768px) {
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    text-align: center;
    padding: 0;
  }

  nav {
    flex-wrap: wrap;
  }

  .nav-button {
    margin: 10px auto;
  }

  .info-box {
    margin: 20px;
  }

  .info-content {
    flex-direction: column;
    text-align: center;
  }

  .buttons {
    flex-direction: column;
    gap: 10px;
  }

  .start-btn,
  .continue-btn {
    width: 100%;
  }

  .les-cont {
    flex-direction: column;
  }

  aside {
    width: 100%;
    max-height: 300px;
  }

  .video-area {
    padding: 10px;
  }

  .typing-test-btn-wrapper {
    margin-left: 0;
    padding-right: 0;
    justify-content: center;
  }
}

@media screen and (max-width: 480px) {
  .logo p {
    font-size: 14px;
  }

  .greet {
    font-size: 24px;
  }

  .start {
    font-size: 14px;
  }

  .progress {
    font-size: 16px;
  }

  .video-wrapper {
    height: 300px;
  }
}


nav {
  display: flex;
  align-items: center;

  height: 80px;
  padding: 0px 20px;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: #FFF;
  box-shadow: 0 2px 8px 0 rgba(31, 153, 255, 0.04);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 5rem;
  margin-left: 22rem;
  padding: 0;
  list-style: none;
  height: 100%;
}

.nav-links li {
  display: flex;
  align-items: center;
  height: 100%;
}

body {
  background: #F2F8FF;
  padding-top: 80px;
  /* Match exactly with nav height */
  margin: 0;
  transition: none;
  /* Disable transitions during page load */
  overflow: auto;
  /* Prevent body scrolling */
  height: 100vh;
}

.logo {
  display: flex;
  height: 40px;
  padding: 0px 10px;
  align-items: center;
  gap: 6.349px;
  flex-shrink: 0;
  border-radius: 3.175px;
  background: #0080FF;
}

.logo p {
  color: #E8EFF6;
  font-family: "Black Han Sans";
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.logo img {
  width: 20px;
  flex-shrink: 0;
  aspect-ratio: 28.57/24.15;
  fill: #E8EFF6;
}

ul {
  display: flex;
  padding: 10px;
  justify-content: center;
  align-items: center;
  gap: 50px;
  list-style: none;
}

ul li {
  color: #0080FF;
  font-family: "Baloo 2";
  font-size: 18px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
}

ul li a {
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: color 0.3s;
}

ul li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: #0080FF;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

ul li a:hover::after {
  transform: scaleX(1);
}

.nav-button {
  display: flex;
  height: 40px;
  padding: 10px 12px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border-radius: 24px;
  border: 1px solid #0080FF;
  background: #0080FF;
  color: white;
}

.info-box {
  display: flex;
  gap: 30px;
  justify-content: center;
  margin-bottom: 30px;
  margin-top: 30px;
}

.info-content {
  border-radius: 8px;
  background: #FFF;
  display: flex;
  gap: 20px;
  height: 170px;
  width: 480px;
  padding: 18px 18px;
  align-items: center;
  gap: 48px;
}

.info-text {
  display: flex;
  width: 304px;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0px;
  /* Changed from 1px to 0px to bring .start closer to .greet */
  align-self: stretch;
}

.greet {
  color: #006DDB;
  font-family: "Baloo 2";
  font-size: 22px;
  font-style: normal;
  font-weight: 700;
  /* line-height: normal;
  align-self: stretch; */
}

.start {
  color: #696969;
  font-family: "Baloo 2";
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  margin-top: -5px;
  /* Added negative margin to bring it closer to .greet */
  /* line-height: normal; */
}

.key-icon {
  width: 60px;
  flex-shrink: 0;
  aspect-ratio: 1/1;
  border-radius: 100px;
  background-color: #FFFCEF;
  padding: 12px 10px;

}

.start-btn {
  border-radius: 24px;
  border: 1px solid #0080FF;
  background: #0080FF;
  color: #fff;
  display: flex;
  width: 138px;
  height: 30px;
  padding: 12px 16px;
  justify-content: center;
  align-items: center;
}

.continue-btn {
  border-radius: 24px;
  border: 1px solid #0080FF;
  background: #F4FAFF;
  color: #0080FF;
  display: flex;
  width: 138px;
  height: 30px;
  padding: 12px 16px;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.buttons {
  display: flex;
  gap: 10px;
}

.info-content2 {
  display: flex;
  gap: 10px;
  line-height: 20px;
  justify-content: center;
  margin-bottom: 10px;
}

.cont {
  padding: 7px 18px 28px 18px;
  border-radius: 8px;
  background: #FFF;
  height: 170px;
  width: 480px;
}

.progress {
  color: #A3A3A3;
  font-family: "Baloo 2";
  font-size: 12px;
  font-style: normal;
  font-weight: 500;

  /* 22.4px */
}

.bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  line-height: normal;

}

.bars {
  display: flex;
  padding: 10px 10px;
  justify-content: space-between;
  align-items: center;
  flex: 1 0 0;
}

.progress-bar1,
.progress-bar2,
.progress-bar3,
.progress-bar4 {
  height: 25px;
  width: 210px;
  border-radius: 4px;
}

.progress-bar1 {
  background: #70BCFF;
}

.progress-bar2 {
  background: #FFB0A6;
}

.progress-bar3 {
  background: #FC9338;
}

.progress-bar4 {
  background: #54D46C;
}

.leaderbaord {
  color: #0080FF;
  text-align: right;
  font-family: "Urbanist";
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  display: flex;
  width: 98%;
  height: 40px;
  margin-left: 5px;
  /* padding: 8.978px 14.365px; */
  justify-content: center;
  align-items: center;
  margin-top: 5px;
  border-radius: 4px;
  border: 1px solid #0080FF;
  background: #F4FAFF;
}

.overall {
  color: #FFF;
  text-align: center;
  font-family: "Baloo 2";
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

h2 {
  color: #FFF;
  font-family: "Baloo 2";
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

span {
  color: #FFF;
  font-family: "Baloo 2";
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
}

.all-levels {
  background-color: #fff;
  width: 80%;
  margin: auto;
  padding: 10px;
}

.level-selection {
  display: flex;
  height: 60px;
  padding: 0px 24px;
  justify-content: space-between;
  align-items: center;
  align-self: stretch;
  border-radius: 4px;
  background: #F3FAFF;
}

.levels {
  color: #A3A3A3;
  font-family: "Baloo 2";
  font-size: 20px;
  font-style: normal;
  font-weight: 400;
  line-height: 18.815px;
  /* 78.394% */
}

.level-selection a {
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: color 0.3s;
}

.level-selection a.selected .levels {
  color: #0080FF;
  position: relative;
}

.level-selection a.selected .levels::after {
  content: "";
  display: block;
  margin: 0 auto;
  margin-top: 3px;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: #0080FF;
}

.warning {
  display: flex;
  padding: 5px;
  align-items: center;
  gap: 12px;
  align-self: stretch;
  border-radius: 8px;
  border: 1px solid #FFEF9A;
  background: #FFFCEF;
  margin: 15px;
}

.warn {
  color: #FFC100;
  text-align: center;
  font-family: "Baloo 2";
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  line-height: 24px;
}

.level-title {
  color: #414141;
  font-family: "Baloo 2";
  font-size: 25px;
  font-style: normal;
  font-weight: 700;
  line-height: 18.815px;
  margin: 20px;
}

.level-one {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.level-box {
  display: flex;
  height: 140px;
  padding: 5px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 32px;
  flex: 1 0 0;
  border-radius: 4px;
  border-bottom: 0.784px solid #E9EAF0;
  background: #E8EFF6;
}

.box-btn {
  display: flex;
  height: 40px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  align-self: stretch;
  border-radius: 4px;
  background: #0080FF;
  border: none;
  color: #FFF;
}

.rectangle {
  background: url(/assets/images/backg.png) lightgray 50% / cover no-repeat;
  height: 200px;
  width: 80%;
  margin: 40px auto 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
  box-shadow: 0 2px 8px 0 rgba(31, 153, 255, 0.06);
  text-align: center;
}

.rec {
  color: #FFF;
  font-family: "Baloo 2";
  font-size: 20px;
  font-style: normal;
  font-weight: 500;
  line-height: 22px;
}

.rectangle .box-btn {
  width: auto;
  min-width: 120px;
  max-width: 220px;
  align-self: center;
  padding-left: 24px;
  padding-right: 24px;
}

.lesson-content {
  overflow: hidden;
  height: calc(100vh - 80px);
  position: relative;
  margin-top: -15px;
  /* Reduce gap between nav and content */
  overflow: hidden;
}

.les-cont {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100%;
  position: relative;
}

/*  */

.lesson-content aside:hover {
  scrollbar-color: #b3d4fc #f3faff
}

.lesson-content aside::-webkit-scrollbar {
  width: 5px;
  background: transparent;
}

.lesson-content aside:hover::-webkit-scrollbar {
  background: #f3faff;
}

.lesson-content aside::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 4px;
}

.lesson-content aside:hover::-webkit-scrollbar-thumb {
  background: #b3d4fc;
}

.lesson-content iframe,
.video-wrapper iframe {
  width: 100%;
  height: 100%;
  min-height: 300px;
  border-radius: 12px;
  background: #000;
  border: none;
  box-shadow: 0 2px 8px 0 rgba(31, 153, 255, 0.06);
  margin-top: 10px;
  display: block;
}

.header {
  display: flex;
  height: auto;
  padding: 16px 30px;
  align-items: center;
  justify-content: space-between;
  background: #FFF;
  position: sticky;
  top: 80px;
  z-index: 10;
  box-shadow: 0 2px 8px 0 rgba(31, 153, 255, 0.04);
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  min-width: 150px;
}

.header-left {
  gap: 15px;
}

.level-title-header {
  color: #414141;
  font-family: "Baloo 2";
  font-size: 16px;
  font-weight: 600;
}

.nav-title {
  color: #1F99FF;
  font-family: Urbanist;
  font-size: 18px;
  font-style: normal;
  font-weight: 600;
  line-height: 24px;
  text-align: center;
  flex: 1;
  margin: 0;
}

.fa-arrow-left {
  color: #1F99FF;
  font-size: 30px;
}

aside {
  display: flex;
  width: 300px;
  flex-direction: column;
  flex-shrink: 0;
  background: #FFF;
  height: 100%;
  border-right: 1px solid #e0e0e0;
  position: relative;
  overflow-y: auto;
  /* Enable vertical scrolling */
  scrollbar-width: thin;
  /* For Firefox */
  scrollbar-color: #b3d4fc #f3faff;
  /* For Firefox */
  padding-top: 25px;
  /* Increased from 10px to push content down more */
}

/* Fix the level-id to stay at the top while scrolling */
.level-id {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 5;
  padding: 20px 12px 15px;
  /* Increased padding top and bottom */
  margin-top: 0;
  margin-bottom: 15px;
  /* Increased from 10px for more space below title */
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Adjust level-id font styling for better visibility */
.level-id {
  color: #414141;
  font-family: Urbanist;
  font-size: 24px;
  font-style: normal;
  font-weight: 500;
  line-height: 28px;
  /* Increased from 22px for better readability */
  padding-left: 15px;
}

/* Adjust topic styling to match the new spacing */
.topics:first-child {
  margin-top: 10px;
  /* Increased from 5px */
}

/* Adjust media queries for mobile */
@media screen and (max-width: 768px) {
  aside {
    padding-top: 15px;
    /* Increased from 5px but still less than desktop */
  }

  .level-id {
    padding: 15px 12px 10px;
    /* Increased but still compact for mobile */
    font-size: 20px;
  }
}

.topics {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
  padding: 8px 10px;
  gap: 10px;
  border-bottom: 1px solid #e0e0e0;
  position: relative;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.topics .fa-lock {
  margin-left: auto;
  color: gray;
}

.topic-num {
  display: flex;
  padding: 3px;
  /* Reduced from 6px */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  aspect-ratio: 1/1;
  border-radius: 20px;
  /* Reduced from 40px */
  background: #DDEFFF;
  font-size: 13px;
  /* Reduced from 17px */
  min-width: 22px;
  /* Added to maintain shape */
  min-height: 22px;
  /* Added to maintain shape */
}

.topic-title {
  color: #8C8C8C;
  font-family: Urbanist;
  font-size: 14px;
  /* Reduced from 16px */
  font-style: normal;
  font-weight: 600;
  /* Reduced from 700 */
  line-height: 16px;
  /* Reduced from 20px */
}

.level-id {
  color: #414141;
  font-family: Urbanist;
  font-size: 28px;
  /* increased from 24px */
  font-style: normal;
  font-weight: 400;
  line-height: 22px;
  /* increased from 18.815px */
  padding: 10px;
}

.topics.selected .topic-num {
  color: #0080FF;
  font-weight: bold;
}


.topics.selected {
  background: lightskyblue;
}

.signup-box {
  width: 274px;
  height: 146px;
  flex-shrink: 0;
  border-radius: 8px;
  background: #FFC50F;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-bottom: 6rem;
  margin-left: .5rem;
}

.signup {
  width: 90%;
  height: 51px;
  flex-direction: column;
  justify-content: center;
  flex-shrink: 0;
  color: #FFF;
  font-family: "Urbanist";
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  margin-bottom: 12px;
  text-align: center;
}

.sign {
  width: 236.66px;
  height: 33px;
  flex-shrink: 0;
  fill: #FFF;
  display: block;
  margin: 0 auto;
  color: #FFC50F;
  font-family: Urbanist;
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
}

.video-area {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: calc(100vh - 140px);
  /* Adjusted height to account for nav and header */
  overflow-y: auto;
  /* Enable vertical scrolling */
  overflow-x: hidden;
  /* Disable horizontal scrolling */
  padding: 20px;
  box-sizing: border-box;
  scrollbar-width: thin;
  /* For Firefox */
  scrollbar-color: #b3d4fc #f3faff;
  /* For Firefox */
}

/* Add scrollbar styling for WebKit browsers (Chrome, Safari, etc.) */
.video-area::-webkit-scrollbar {
  width: 8px;
  background: #f3faff;
}

.video-area::-webkit-scrollbar-thumb {
  background: #b3d4fc;
  border-radius: 4px;
}

.video-area::-webkit-scrollbar-thumb:hover {
  background: #0080FF;
}

/* Ensure the wrapper stays properly sized within the scrollable area */
.video-wrapper {
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
  height: 25rem;
  max-width: 55rem;
  margin: 0 auto 20px auto;
  /* Added bottom margin for spacing */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px 0 rgba(31, 153, 255, 0.06);
  padding-top: 32px;
  flex-shrink: 0;
  /* Prevent video from shrinking */
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 12px;
  display: block;
  background: #000;
}

.video-mirror-controls {
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 2;
}

.video-wrapper:hover .video-mirror-controls,
.video-mirror-controls.show {
  opacity: 1;
  pointer-events: auto;
}

.center-controls {
  display: none;
}

.bottom-controls {
  width: 100%;
  display: flex;
  flex-direction: column;

  justify-content: flex-end;
  background: none;
  border-radius: 0 0 12px 12px;
  padding: 0;
  box-sizing: border-box;
  gap: 0;
  position: absolute;
  left: 0;
  bottom: 0;
}

.seek-group {
  width: 95%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.seek-group input[type="range"] {
  width: 98%;
  max-width: none;
  accent-color: #0080FF;
  margin: 0;
  vertical-align: middle;
}

.bottom-row {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  background: rgba(30, 30, 30, 0.35);
  border-radius: 0 0 12px 12px;

  box-sizing: border-box;

}

.bottom-row .left-group,
.bottom-row .right-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.bottom-row .left-group {
  min-width: 120px;
}


.bottom-row .right-group {
  min-width: 50px;
  margin-right: 20px;
}

.bottom-row button {
  background: transparent;
  border: none;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 22px;
  width: 40px;
  height: 40px;
}

.bottom-row button:hover {
  background: rgba(0, 128, 255, 0.18);
}

.bottom-row .time {
  color: #fff;
  font-size: 15px;

  text-align: right;
  font-family: "Quicksand", Arial, sans-serif;
  letter-spacing: 0.5px;
  opacity: 0.9;
}

/* Volume control styles */
.mute-group {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  transition: min-width 0.2s;
}

.volume-bar {
  width: 10px;
  height: 4px;
  accent-color: #0080FF;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, margin-left 0.2s;
  position: static;
  background: #222;
  border-radius: 4px;
  z-index: 10;
  flex-shrink: 0;
  margin-left: 0;
}

.mute-group.show-slider .volume-bar {
  opacity: 1;
  pointer-events: auto;
  margin-left: 8px;
  width: 70px;
  /* Add space only when visible */
}

.mute-group:hover .volume-bar,
.mute-group:focus-within .volume-bar {
  opacity: 1;
  pointer-events: auto;
}

.mute-group:hover,
.mute-group:focus-within {
  min-width: 110px;
}

/* Responsive controls */
@media (max-width: 900px) {
  .video-wrapper {
    max-width: 100vw;
    min-height: 140px;
    /* Slightly bigger than 100px */
    height: 160px;
    /* Slightly bigger than 120px */
    aspect-ratio: 16/9;
  }

  .seek-group input[type="range"] {
    width: 96%;
  }

  .bottom-row {
    padding: 6px 4px 8px 4px;
    font-size: 16px;
  }

  .bottom-row .time {
    font-size: 13px;
    min-width: 50px;
  }

  .bottom-row button {
    font-size: 18px;
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 600px) {
  .video-wrapper {
    min-height: 90px;
    /* Slightly bigger than 60px */
    height: 110px;
    /* Slightly bigger than 80px */
    aspect-ratio: 16/10;
  }

  .seek-group input[type="range"] {
    width: 90%;
  }

  .bottom-row {
    gap: 2px;
    padding: 4px 2px 6px 2px;
  }

  .bottom-row .left-group,
  .bottom-row .center-group,
  .bottom-row .right-group {
    gap: 2px;
  }
}

button,
.box-btn,
.start-btn,
.continue-btn,
.nav-button,
.leaderbaord,
.sign {
  cursor: pointer;
}

.typing-test-btn-wrapper {
  display: flex;
  align-items: flex-start;
  width: 100%;
  margin-top: 14px;
  margin-left: 47em;
  /* Reduced from 47em to move button to the left */
  position: static;
  padding-right: 24px;
  background: none;
  z-index: 10;
}

.typing-test-btn {
  background: #cce6ff;
  color: #0080ff;
  border: none;
  border-radius: 6px;
  padding: 10px 24px;
  font-size: 16px;
  font-family: "Baloo 2", Arial, sans-serif;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px 0 rgba(31, 153, 255, 0.06);
  cursor: pointer;
  transition: background 0.2s;
}

.typing-test-btn:hover {
  background: #b3daff;
}

/* Example CSS */
.controls-bar {
  display: flex;
  align-items: center;
  width: 100%;
}

.left-controls {
  display: flex;
  gap: 8px;
  /* or your preferred spacing */
}

.bottom-controls {
  display: flex;
  gap: 2px;
  /* minimal space between bottom controls */
  margin-left: 16px;
  /* space from left controls */
}

.fullscreen-btn {
  margin-left: auto;
  /* pushes fullscreen to far right */
}

.center-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  background: rgba(0, 0, 0, 0.55);
  border: none;
  border-radius: 50%;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2.5rem;
  box-shadow: 0 2px 8px 0 rgba(31, 153, 255, 0.18);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.center-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.08);
}

.center-pause-btn {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9;
  background: transparent;
  border: none;
  cursor: pointer;
  display: none;
}

.left-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.left-timer-group {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: 0;
  transition: margin-left 0.2s;
}

.mute-group.show-slider~.left-timer-group {
  margin-left: 10px;
  /* Adjust to match your slider width */
}

/* Additional styles to integrate with existing design */

/* Lesson Cards Grid */
.lessons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

.lesson-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  display: flex;
  align-items: center;
  gap: 15px;
  position: relative;
}

.lesson-card:hover:not(.locked) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: #0080ff;
}

.lesson-card.locked {
  opacity: 0.6;
  cursor: not-allowed;
  background: #f8f9fa;
}

.lesson-number {
  background: #0080ff;
  color: white;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
  flex-shrink: 0;
}

.lesson-card.locked .lesson-number {
  background: #6c757d;
}

.lesson-details {
  flex: 1;
}

.lesson-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 5px;
  color: #333;
}

.lesson-desc {
  color: #666;
  font-size: 14px;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lesson-lock {
  color: #6c757d;
  font-size: 18px;
  position: absolute;
  top: 15px;
  right: 15px;
}

/* Sidebar Enhancements */
.level-group {
  margin-bottom: 25px;
}

.level-id {
  font-weight: bold;
  color: #0080ff;
  margin-bottom: 10px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.topics:hover:not(.locked) {
  background: #f8f9fa;
}

.topics.active {
  background: #0080ff;
  color: white;
}

.topics.active .topic-num,
.topics.active .topic-title {
  color: white;
}

.topics.locked {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Completion styling for topics */
.topics {
  justify-content: space-between;
}

.topic-content {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
}

.topic-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.completion-badge {
  color: rgb(55, 153, 214);
  font-size: 16px;
  animation: completionGlow 2s ease-in-out infinite alternate;
}

.topics.completed {
  background: linear-gradient(135deg, #f8fff8 0%, #e8f5e8 100%);
  border-left: 4px solid blue;
}

.topics.completed .topic-num {
  background: rgb(55, 153, 214);
  color: white;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.topics.completed .topic-title {
  color: rgb(55, 153, 214);
  font-weight: 600;
}

@keyframes completionGlow {
  0% {
    opacity: 0.8;
    transform: scale(1);
  }

  100% {
    opacity: 1;
    transform: scale(1.1);
  }
}

/* Active completed lesson styling - modifying to keep the same background as uncompleted active topics */
.topics.completed.active {
  background: rgb(55, 153, 214);
  /* Same as the uncompleted active topics */
  border-left: 4px solid blue;
  /* Keeping the green border to indicate completion */
}

.topics.completed.active .topic-num {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.topics.completed.active .topic-title {
  color: white;
}

.topics.completed.active .completion-badge {
  color: #fff;
}

/* Error Message Styling */
.error-message {
  text-align: center;
  padding: 40px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin: 20px 0;
}

.error-message h3 {
  color: #dc3545;
  margin-bottom: 15px;
}

.error-message p {
  color: #666;
  margin-bottom: 20px;
}

.error-message button {
  background: #dc3545;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s ease;
}

.error-message button:hover {
  background: #c82333;
}

/* Loading State */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #0080ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Prevent layout shifts and ensure smooth transitions */
body {
  background: #F2F8FF;
  padding-top: 75px;
  transition: none;
  /* Disable transitions during page load */
}

/* Lesson content transition optimization */
#lesson-content {
  transition: opacity 0.15s ease-in-out;
}

#lesson-content.loading {
  opacity: 0.7;
}

/* Prevent flash of unstyled content */
.all-levels,
.info-box {
  transition: opacity 0.1s ease-in-out;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    text-align: center;
    padding: 0;
  }

  nav {
    flex-wrap: wrap;
  }

  .nav-button {
    margin: 10px auto;
  }

  .info-box {
    margin: 20px;
  }

  .info-content {
    flex-direction: column;
    text-align: center;
  }

  .buttons {
    flex-direction: column;
    gap: 10px;
  }

  .start-btn,
  .continue-btn {
    width: 100%;
  }

  .les-cont {
    flex-direction: column;
  }

  aside {
    width: 100%;
    height: 300px;
    order: 2;
  }

  .level-group {
    height: calc(100% - 80px);
  }

  .header {
    position: static;
    padding: 12px 20px;
  }

  .header-left,
  .header-right {
    min-width: 100px;
  }

  .level-title-header {
    font-size: 14px;
  }

  .scrollable-content {
    height: calc(100% - 40px);
    /* Adjust for smaller level-id on mobile */
  }
}

@media screen and (max-width: 480px) {
  .logo p {
    font-size: 14px;
  }

  .greet {
    font-size: 24px;
  }

  .start {
    font-size: 14px;
  }

  .progress {
    font-size: 16px;
  }

  .video-wrapper {
    height: 300px;
  }
}

/* Video wrapper loading state */
.video-shimmer-loader {
  border-radius: 12px !important;
}

/* Ensure immediate visibility for returning from lesson */
body.from-lesson #lesson-content {
  opacity: 1 !important;
  display: block !important;
}

body.from-lesson .all-levels,
body.from-lesson .info-box {
  display: none !important;
}