@media (width <= 768px) {
  :root {
    --font-size: 18px;

    background: white;}


    #speeder-body h1#render-percentage {

      font-size: 16px!important
    }

      nav {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 1rem !important;
        position: fixed !important;
        top: 0 !important;
        z-index: 1000 !important;
        backdrop-filter: blur(8px) !important;
        box-shadow: 0 2px 6px rgb(0, 0, 0, 0.05) !important;
        border-bottom: 1px solid rgb(200, 200, 200, 0.3) !important;
      }
    
      h3 {
        font-size: 20px;
        margin: .4rem 1rem 1rem 0;
      }
    
      p {
        margin-bottom: 10px;
        font-weight: 400;
        font-size: 20px;
      }
    
      .logo-wrapper {
        margin-right: 10px !important;
      }
    
      .logo-img {
        width: 36px !important;
        height: 36px !important;
        object-fit: contain !important;
      }
    
      .site-footer {
        display: none !important;
        z-index:0;
      }
    
      .social-links {
        display: flex !important;
        gap: 1rem !important;
        margin-top: .4rem !important;
      }
    
      .footer-container {
        display: none !important;
      }
    
      .logo-title {
        margin: 0 !important
      }
      .checkbox-container {
        displaY: inline-block;
        margin: 1px 1px 1px 6rem;
        padding: 1px 1rem 1rem 1rem;
    }
   #toggle-right {
     position: fixed;
     top: 0.5rem;
     right: 0.5rem;
     z-index: 1300;
     background: none;
     border: none;
     
     font-size: 1.4rem;
     
     
   }
 
   
   .sidebar-right {
     transform: translateX(10%);
     display: none;
     position: fixed;
     top: 3rem !important;
     right: 10px;
     width: 70%;
     color: white;
     background: linear-gradient(145deg, #2C3E50, #34495E);
     border-radius: unset;
     height: 100%;
     z-index: 9999
   }
 
   label[for="volume-range"] {
     display: none !important;
   }

   div#font-popup {
    width: 100%!important;
}

   #popup-volume {
     position: relative;
     top: 0 !important;
     left: 0% !important;
     
     background: white;
     padding: 4px;
     border-radius: 12px;
     box-shadow: 0 4px 16px rgb(0, 0, 0, 0.2);
     z-index: 1100;
     min-width: 100%;
     text-align: center;
   }
 
   #volume-range {
     width: 120%;
     height: 10px;
     
     background: linear-gradient(to right, #f44336, #ccc 50%, #1976d2);
     border-radius: 4px;
     appearance: none;
     position: relative;
   }
 
   .volume-labels {
     display: flex;
     justify-content: space-between;
     margin-top: 6px;
     font-size: 13px;
     color: #555;
     margin-left: 1rem;
   }
 
   .sidebar-left.active {
     display: block !important;
     z-index: 1999;
     transform: translateY(-18px);
   }
 
   .sidebar-right {
     right: 0;
     display: none
   }
   input[type="radio"] {
    width: 18px !important;
    height: 18px !important;
    margin-right: 4px !important;
    accent-color: #007bff !important;
  }
   button.nav-nav-btn.icon-left-open {
    position: fixed!important;
    left: 0;
}

button#nextPageBtn {
  margin: 0!important;
}

   .sidebar-left {
     flex: 0 0 75%;
     background-color: #e0e0e0;
     padding: 15px;
     border-radius: 8px;
     overflow-y: auto;
     border-right: 2px solid #ccc;
     align-self: flex-start;
     margin: 0 0 0 -18px;
      max-width: 30rem;
     z-index: 1999999999 !important;
     background: white;
     height: 100vh;
     display: none
   }
 
   .sidebar-right.active {
     transform: translateX(5%);
     display: block !important;
   }
 
   
   #btnPrev,
   #btnNext {
     position: fixed;
     bottom: 1rem;
     width: 30%;
     z-index: 1110;
   }
 
   #btnPrev {
     left: 1rem;
   }
 
   #btnNext {
     right: 1rem;
   }
 
   
   .nav-icon {
     position: fixed;
     bottom: 1rem;
     left: 50%;
     transform: translateX(-50%);
     z-index: 1001;
     display: flex;
     gap: 1rem;
     background: white;
     border-radius: 2rem;
     box-shadow: 0 2px 10px rgb(0, 0, 0, 0.1);
   }
 
   .nav-icon li a {
     font-size: 1.2rem;
     display: block;
   }

   .nav-right {
     position: fixed;
     bottom: 0;
     left: 0;
     width: 100%;
     display: flex;
     justify-content: space-around;
     align-items: center;
     background: #fff;
     padding: 0.5rem 1rem;
     box-shadow: 0 -2px 8px rgb(0, 0, 0, 0.1);
     border-top: 1px solid #ddd;
     z-index: 1000;
   }
 
   
   nav .nav-right {
     display: none;
   }
 
   .nav-right a,
   .nav-right button {
     font-size: 1.2rem;
     color: #1976d2;
     background: none;
     border: none;
     padding: 0.5rem;
   }
 
   #popup-volume {
     position: relative;
     top: 4rem !important;
     left: 50% !important;
     
     background: white;
     padding: 4px;
     border-radius: 12px;
     box-shadow: 0 4px 16px rgb(0, 0, 0, 0.2);
     z-index: 1110;
     min-width: 100%;
     text-align: center;
   }
 
 


   .nav-right-mobile {
     display: flex;
     position: fixed;
     bottom: 0;
     left: 0;
     width: 100%;
     background: #f9f9f9;
     justify-content: space-around;
     align-items: center;
     padding: 0.5rem 1rem;
     border-top: 1px solid #ddd;
     box-shadow: 0 -2px 8px rgb(0, 0, 0, 0.1);
     z-index: 1110;
   }

   div#confirm-popup {
    width: 90vw!important;
    height: auto!important;
}

.confirm-popup-box {
  width: 90vw;
  height: auto;
}

   .nav-icon-mobile li {
     position: relative;
     display: inline-block;
     margin-right: 4px;
   }
 
   .nav-icon-mobile a {
     display: block;
     background: linear-gradient(to bottom, #f7f7f7, #e7e7e7);
     color: #555;
     margin: 0;
     width: 2rem;
     height: 2rem;
     text-align: center;
     line-height: 2rem;
     text-decoration: none;
     opacity: 0.95;
     border-radius: 50%;
     box-shadow: 0 3px 8px #aaa, inset 0 2px 3px #fff;
     position: relative;
     

   }
 
   .nav-icon-mobile a:hover {
     text-decoration: none;
     color: #202020;
     background: #f5f5f5;
   }

    .device-container {
      flex-direction: column;
      align-items: center;
      display: flex;
      flex-wrap: nowrap;
      padding: 0!important;
  }
    .device-box {
      width: 90%;
      margin-bottom: 10px;
    }
  
    #login-container {
      flex-direction: column-reverse;
      margin: auto;
      width: 100%;
      display: flex;
      flex-wrap: nowrap;
      align-content: center;
      justify-content: center;
      align-items: center;
      position: absolute;
      padding: 10px;
      height: 100%;
      background: ghostwhite;
  }
  
    .left-section,
    .right-section {
      width: 100%;
      min-width: auto;
    }
    .left-section {
        flex: 2;
        margin: 0 0 3rem 0!important;
        padding: 10px 10px 4rem 10px!important;
    }
  .right-section {
    flex: 1;
    padding: 3rem 2rem 0 2rem;
}
    #exam-container {
      width: 90%;
      margin: 20px auto;
    }

  #device-check-wrapper {
    flex-direction: column;
  }

   .exam-navigation {
     display: none !important;
 
   }

   button#example-skip-btn {
    margin: 1rem 0 3rem 1rem;
    position: fixed!important;
}

div#font-popup {
  width: 100%!important;
  
}

   #data-loading {
     
     
     margin: 3rem 0 !important;
     width: 100vw !important;
     height: 100vh !important;
     
     font-family: 'Segoe UI', sans-serif !important;
     border-radius: 18px !important;
     background: linear-gradient(to right, #fff, #f9f9f9) !important;
     box-shadow: 12px 20px 20px 7px rgb(0, 0, 0, 0.05) !important;
     border: 1px solid #d0dcf0 !important;
     padding: 0 !important;
   }
 
   .options-container {
    display: flex;
    flex-flow: column wrap;
    justify-content: flex-start;
    gap: 1rem;
    padding: 1rem;
}

.page.example-page {
  padding: 0!important;
}

    
 
   .options-container label:hover {
     background: #64aef3;
   }
 
   .options-container input[type="radio"] {
     margin-right: 0.5rem;
   }


   .toast {
     left: 50% !important;
     right: 0 !important;
     margin: 0 auto !important;
     max-width: 90% !important;
   }

   .confirm-popup {
     width: 90vw;
     height: 30vh;
 }

   .menu-toggle {
     display: none;
     font-size: 1.8rem !important;
     color: grey !important;
     background: none !important;
     border: none !important;
     border-radius: 4px !important;
     padding: 0 !important;
     position: fixed !important;
     top: 0 !important;
     left: 1rem !important;
     z-index: 2001 !important;
     cursor: pointer !important;
   }
 
   .menu-toggle.active {
     color: #007ACC !important;
   }

 
   .answer-grid {
     grid-template-columns: repeat(5, 1fr) !important;
     
     gap: 8px !important;
     margin-top: 12px !important;
   }
    #answer-sheet-wrapper {
      width: 100% !important;
      max-width: 100% !important;
      max-height: 100vh !important;
      overflow-y: auto !important;
      background: #fff !important;
      padding: 1rem !important;
      box-sizing: border-box !important;
      border-radius: 0 !important;
    }

    img#fin_img {
     width: 50vw!important;
     height: 30vh!important;
     max-width: 100%!important;
 }
  
    #answer-grid {
      display: grid !important;
      grid-template-columns: repeat(4, 1fr) !important;
      gap: 8px !important;
      padding: 0 !important;
    }
  
    #answer-grid button {
      padding: 10px 0 !important;
      font-size: 1rem !important;
      font-weight: bold !important;
      border-radius: 6px !important;
      border: 1px solid #ccc !important;
      background: #f0f0f0 !important;
      cursor: pointer !important;
    }
  
    #answer-grid button:hover {
      background: #e0f2ff !important;
    }
  
    #answer-sheet-wrapper h3 {
      writing-mode: vertical-rl;
      text-orientation: upright;
      font-size: 1.2rem;
      line-height: 1.4;
      letter-spacing: 2px;
      text-align: center;
    }
  
    #speeder-body .body {
      position: relative;
      animation: speeder 0.4s linear infinite;
      left: -20% !important;
    }
  
    #submit-wrapper {
      max-width: 100vw;
      margin: 3rem auto;
      padding: 47px;
      border-radius: 12px;
      background-color: #fdfdfd;
      box-shadow: 0 0 15px rgb(0, 0, 0, 0.08);
      font-family: "Segoe UI", sans-serif;
      transition: all 0.3s ease;
      height: 100vh;
  }
  #device-check {
    margin: 5px 0 3rem !important; 
    width: 100vw !important;       
    height: max-content !important;
    padding: 24px !important;      
    font-family: 'Segoe UI', sans-serif !important;
    border-radius: 18px !important;
    background: linear-gradient(to right, #fff, #f9f9f9) !important;
    box-shadow: 12px 20px 20px 7px rgb(0, 0, 0, 0.05) !important;
    border: 1px solid #d0dcf0 !important;
    
  }
 
   .device-box {
     flex: 1 1;
     
     border-radius: 12px;
     background-color: white;
     border: 1px solid #d0dcf0;
     box-shadow: 0 2px 8px rgb(0, 0, 0, 0.04);
     transition: all 0.3s ease;
     align-items: center;
     min-height: max-content;
     text-align: -webkit-center;
   }
 
   #camera-container {
     width: 90% !important;
     height: 10rem !important;
     background-color: rgb(0, 0, 0, 0.25) !important;
     border-radius: 10px !important;
     overflow: hidden !important;
     margin-bottom: 10px !important;
     border: 1px solid #ccc !important;
   }
 
   #device-check-wrapper {
     display: flex !important;
     flex-flow: column nowrap !important;
     gap: 0 !important;
     place-content: center center !important;
     align-items: center !important;
     padding: 0px !important;
   }
 
   #login-container {
     flex-direction: column-reverse;
     margin: 5rem 0 3rem
   }
 
   .login-text {
     display: none;
   }
 
   #toggle-right {
     display: none;
     content: '' \e811''
   }
 
   .footer-logo {
     display: none
   }
 
   #exam-wrapper {
     background: white;
     width: 100%;
     height: 100%;
     min-height: 90vh;
   }
 
   #exam-module {
     flex: 1 1 auto !important;
     overflow-y: auto !important;
     width: 100% !important;
     padding: 0 !important;
     background: white;
     border-radius: 8px;
     box-shadow: none !important;
     min-height: 100% !important;
   }
 
   .image-choice-container {
    display: flex;
    place-content: flex-start space-between;
    gap: 0!important;
    margin-bottom: 20px;
    flex-flow: row wrap;
    align-items: flex-start;
    
}
 
   label {
    display: inline-flex !important;
    align-items: center;
    margin-right: 11px;
    font-size: 18px;
    
    
    
}

 div#device-check-wrapper {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-content: center;
  justify-content: center;
  align-items: center;
  gap: 10px;
  height: 100%;
  padding: 4rem;
}
 #data-loading {
   margin: 5px 0 0 !important;
   width: 100vw !important;
   height: 100vh !important;
   padding: 0 !important;
   font-family: 'Segoe UI', sans-serif !important;
   border-radius: 16px !important;
   background: linear-gradient(to right, #fff, #f9f9f9) !important;
   box-shadow: 12px 20px 20px 7px rgb(0, 0, 0, 0.05) !important;
   border: 1px solid #d0dcf0 !important;
 }
 

.hidden {
   display: none !important;
 }
 
 
 #exam-module {
   display: flex;
   flex-direction: column;
   height: 100%;
   justify-content: space-between;
 }
 
 .exam-navigation {
   display: flex;
   justify-content: center;
   gap: 100px;
   margin-top: 2rem;
   padding-bottom: 2rem;
 }
 
 .exam-navigation button {
   font-size: 18px;
   padding: 8px 16px;
   background: #1976d2;
   color: white;
   border: none;
   border-radius: 6px;
   cursor: pointer;
   transition: background 0.3s ease;
 }
 
 .exam-navigation button:hover {
   background: #155cb0;
 }
 
 .exam-navigation button.disabled {
   opacity: 0.4;
   cursor: not-allowed;
   pointer-events: none;
 }
 
 
 
 #exam-module::-webkit-scrollbar {
   width: 10px;
 }
 
 #exam-module::-webkit-scrollbar-track {
   background: #f0f0f0;
   border-radius: 10px;
 }
 
 #exam-module::-webkit-scrollbar-thumb {
   background: linear-gradient(180deg, #42a5f5, #1e88e5);
   
   border-radius: 10px;
   box-shadow: 0 0 6px rgb(66, 165, 245, 0.6);
   
   transition: background 0.3s ease, box-shadow 0.3s ease;
 }
 
 #exam-module::-webkit-scrollbar-thumb:hover {
   background: linear-gradient(180deg, #1e88e5, #1565c0);
   box-shadow: 0 0 10px rgb(30, 136, 229, 0.8);
 }
 
 
 #exam-module {
   overflow: auto;
   scrollbar-width: none;
   
   -ms-overflow-style: none;
   
 }
 
 #exam-module::-webkit-scrollbar {
   display: none;
   
 }
 
 
 #exam-module:hover::-webkit-scrollbar {
   display: block;
   width: 10px;
 }
 
 #exam-module {
   overflow: auto;
   scrollbar-width: none;
   -ms-overflow-style: none;
 }
 
 #exam-module::-webkit-scrollbar {
   width: 0;
 }
 
 #exam-module:hover::-webkit-scrollbar {
   width: 10px;
 }
 
 #exam-module:hover::-webkit-scrollbar-thumb {
   background: linear-gradient(180deg, #42a5f5, #1e88e5);
   border-radius: 10px;
   box-shadow: 0 0 8px rgb(66, 165, 245, 0.6);
 }
 
 .page {
   overflow: auto;
   scrollbar-width: none;
   
   -ms-overflow-style: none;
   
 }
 
 
 .page::-webkit-scrollbar {
   width: 0;
   height: 0;
 }
 
 
 .page:hover::-webkit-scrollbar {
   width: 10px;
 }
 
 .page:hover::-webkit-scrollbar-track {
   background: #f0f0f0;
   border-radius: 10px;
 }
 
 .page:hover::-webkit-scrollbar-thumb {
   background: linear-gradient(180deg, #42a5f5, #1e88e5);
   border-radius: 10px;
   box-shadow: 0 0 6px rgb(66, 165, 245, 0.6);
   transition: background 0.3s ease, box-shadow 0.3s ease;
 }
 input[type="radio"]:checked::before {
  content: '' !important;
  position: absolute !important;
  top: -0.06rem !important;
  left: -.09rem !important;
  width: 16px !important;
  height: 16px !important;
  background: radial-gradient(circle at 50% 50%, #08fd00, #00e5ff);
  border-radius: 50% !important;
  backdrop-filter: blur(30px) !important;
  box-shadow: 0 0 8px #38BDF8, 0 0 2px #8B5CF6 inset;
}
 .page:hover::-webkit-scrollbar-thumb:hover {
   background: linear-gradient(180deg, #1e88e5, #1565c0);
   box-shadow: 0 0 10px rgb(21, 101, 192, 0.6);
 }
 
 .nav-nav-btn {
   font-size: 1.5rem;
   background: none;
   border: none;
   color: #1976d2;
   padding: 0.5rem;
   cursor: pointer;
   transition: color 0.2s ease;
 }
 
 .nav-nav-btn:hover {
   color: #0d47a1;
 }
 
 .nav-icon-mobile {
  align-content: center;
  margin-left: 35%!important;
  margin-right: auto;
  display: flex;
  gap: 5px;
}
.page.text-choice-page select {
min-width: 1rem;
min-height: 1rem;
padding: 10px 0;
font-size: 16px;
border: 1px solid #1976d2;

cursor: pointer;
transition: border-color 0.2s;
white-space: nowrap;
border-radius: 50%;
background: linen;
font-weight: bold;
color: darkred;
display: flex;
place-content: center center;
flex-flow: row nowrap;
align-items: center;
}

.page.text-choice-page select:focus {
border-color: #007bff;
transform: scale(4);
}
#main-content {
height: 100vh;
width: 100vw;
overflow: auto!important;
}


}

 
 @media (width >= 769px) {
   .nav-icon-mobile {
     display: none !important;
   }
 
   #menu-toggle,
   #toggle-right {
     display: none !important
   }
 
 }
@media (min-width: 769px) {          /* Desktop & lớn hơn */
  body.is-fullscreen .audio-progress-wrap {
    top: 0 !important;
  }
  body.is-fullscreen #login-container {
    width:85%;
    height:95%;
    margin:auto;
    justify-items: center;
  }
  
  body.is-fullscreen .right-section {
    width:500px
  }
  
  body.is-fullscreen .left-section {
    min-width: 60% !important;
  }
  
}
