@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,700;1,900&display=swap');


/*
=============================================================================
>>>> color variable <<<<
==============================================================================
*/
:root {
    --primary-color: #;
    --secondary-color: #;
}


/*
=============================================================================
DEFAULT STYLE START
==============================================================================
*/

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

body {
    font-family: 'WorkSans', 'Segoe UI', sans-serif;
    background: #f4f4f4;
}
h1,h2,h3,h4,h5,h6,p,span,a,strong{
    font-family: 'WorkSans', 'Segoe UI', sans-serif;
}
h1 {
    font-size: 38px;
    margin: 0;
    color: black;
}
.section-padding {
    padding: 50px 0;
}
.inner-container-padding{
    padding: 0 75px;
    position: relative;
}
ul{
    margin: 0;
    padding: 0;
    list-style: none;
}
ul li a, ul li a:hover, ul li a:focus, a,a:hover,a:focus{
text-decoration: none;
}

img{
    max-width: 100%;
}
.container{
    max-width: 1240px;
}


/*
===================================================================================
===============================  Header Section Style =============================
===================================================================================
 */

#header{
    background: #d7d7d7;
}
.navbar{
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
}
.navbar ul{
    padding: 5px 0;
}
.navbar ul li{
    display: inline-block;

}
.navbar ul li a{
    display: block;
    margin: 0px 22px;
    font-size: 17px;
    font-weight: 700;
    color: #2d2d2d;
}
.navbar ul li a::after{
    content: '';
    width: 0;
    height: 2px;
    background: #fff;
    margin: -2px auto;
    display: block;
}
.navbar ul li a:hover::after{
    width: 100%;
    transition: width 0.3s linear;
}
a.active {
    border-bottom: 2px solid #fff;
}
.menu-btn{
    color: #fff;
    font-size: 23px;
    cursor: pointer;
    display: none;
}

.main-section {
    padding: 12px 0;
}

/*
===================================================================================
===============================  My Class Page Style ==============================
===================================================================================
 */
.my-class-title h2 {
    text-align: center;
    font-size: 40px ;
    font-weight: 800;
    font-family: WorkSans;
}
.accordion-renamed-content .card-body{
    margin: 10px 0;
}
.accordion-renamed-content .card-body a{
    padding: 5px 8px;
    border-radius: 5px;
    color: #fff;
    font-weight: 500;
    font-size: 13px;
    margin-right: 10px;
}
.accordion-renamed-content .card-body .add{
    background: green;
}
.accordion-renamed-content .card-body .delete{
    background: red;
}
.accordion-renamed-content .card-body .export{
    background: #17a2b8;;
}
.accordion-renamed-content .card-body .ld{
    background: #6f42c1;
}
.accordion-renamed li label{
    display: flex;
    align-items: center;
    color: #080808;
    font-size: 20px;
    font-weight: 800;
    margin: 10px auto;
    cursor: pointer;
}
.index-table{
   display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 800;
    margin: 10px auto;
}
.active-accordion-renamed{
    color: #0c63e4;
    background: #e7f1ff;
}
label::before{
    content: '';
    color: #080808;
    font-size: 20px;
    margin-right: 10px;
}
.accordion-renamed .accordion-renamed-content{
    max-height: 0;
    overflow: hidden;
    transition: 0.5s;
}
.accordion-renamed input[type="radio"]:checked + label + .accordion-renamed-content{
    /* max-height: 800px; */
    /* padding: 10px 10px 20px; */
}
.accordion-renamed input[type="radio"]:checked + label::before{
    content: '';
}
ul .accordion-renamed{
    margin: auto 20px;
}
.accordion-renamed-content table{
    border-collapse: collapse;
    width: 100%;
}
.accordion-renamed-content thead{
    background: #2691d9;
    color: #fff;
    font-size: 18px;
}
.accordion-renamed-content thead th{
    padding: 15px 0;
    text-align: center;
}
.accordion-renamed-content td{
    font-size: 15px;
}
.accordion-renamed-content th, .accordion-renamed-content td{
    text-align: center;
    padding: 15px 0;
}
.accordion-renamed-content tbody tr:nth-child(even){
    background: #4e6270;
    color: #fff;
}

.add-new-class h5{
    font-size: 18px;
    font-weight: 600;
    margin-top: 30px;
}
.add-new-class input[type="text"] {
    display: block;
    border: 1px solid #2691d9;
    padding: 10px 15px;
    width: 450px;
    margin: 15px 0;
    border-radius: 5px;
}
.add-new-class textarea{
    display: block;
    border: 1px solid #2691d9;
    width: 450px;
    margin: 15px 0;
    border-radius: 5px;
    padding: 10px 15px;
}
.add-new-class button{
    padding: 10px 40px;
    margin: auto;
    border-radius: 5px;
    background: #2691d9;
    border: none;
    color: #fff;
}
.add-new-class input[type="text"]:focus{
    outline: none;
}
.add-new-class textarea:focus{
    outline: none;
}


/*
===================================================================================
===============================  List Page Style ==================================
===================================================================================
 */

.list-header button{
    padding: 5px 25px;
    border-radius: 5px;
    border: navajowhite;
    background: #2691d9;
    color: #fff;
    font-weight: 600;
    margin-right: 15px;
}
.list-header button:disabled {
    background: #ccc; /* Change the background color for disabled state */
    color: #999; /* Change the text color for disabled state */
    /* You can add more styles for the disabled state if needed */
}
.list-header .d_e-button .e-b{
    background: #4e6270;
    padding: 5px 34px;
}
.list-header h2{
    font-size: 30px;
    margin: 35px 0;
}
.list-header table{
    border-collapse: collapse;
    width: 100%;
}
.list-header thead{
    background: #2691d9;
    color: #fff;
    font-size: 18px;
}
.list-header thead th{
    padding: 18px 0;
    text-align: center;
}
.list-header th, .list-header td{
    text-align: center;
    padding: 18px 0;
}
.list-header tbody td a{
    color: #282529;
}
/* .list-header td a:first-child{
    margin: 0 10px;
    color: black;
    background: transparent;
    padding: 2px 5px;
    border-radius: 5px;
} */
.list-header td:last-child {
    max-width: 70px;
}
.list-header td:last-child a {
    /* padding: 3px; */
}
.list-header tbody tr{
    font-size: 15px;
}
.list-header tbody tr:nth-child(even){
    background: #4e6270;
    color: #fff;
}
.create-list h2{
    text-align: center;
    margin: 50px 0;
}
.create-list select{
    width: 50%;
    display: flex;
    margin: auto;
    margin-bottom: 40px;
    border: 1px solid #2691d9;
    padding: 10px 20px;
    border-radius: 5px;
    background: #f6f4f4;
    cursor: pointer;
}
.create-list select:focus{
    outline: none;
}
.create-list button{
    padding: 8px 25px;
    width: unset;
    display: flex;
    margin: auto;
    border-radius: 5px;
    background: #2691d9;
    color: #fff;
    font-weight: 700;
    border: none;
    margin-top: 25px;
}

/* .new-list{
    margin-top: 100px;
} */
/* .new-list h3{
    text-align: center;
    margin: 20px 0;
    margin-top: 50px;
} */
.new-list select{
    width: 50%;
    display: flex;
    margin: auto;
    margin-bottom: 40px;
    border: 1px solid #2691d9;
    padding: 10px 20px;
    border-radius: 5px;
    background: #f6f4f4;
    cursor: pointer;
}

.new-list textarea{
    width: 50%;
    display: flex;
    margin: auto;
    margin-bottom: 40px;
    border: 1px solid #2691d9;
    padding: 10px 20px;
    border-radius: 5px;
    background: #f6f4f4;
    cursor: pointer;
}
.new-list select:focus, .new-list input[type="text"], .new-list input[type="number"], .new-list textarea:focus{
    outline: none;
}
.left-align {
    width: 50%;
    display: flex;
    margin: auto;
}
.new-list input[type="text"], .new-list input[type="number"]{
    width: 50%;
    margin-bottom: 40px;
    border: 1px solid #2691d9;
    padding: 10px 20px;
    border-radius: 5px;
    background: #f6f4f4;
    cursor: pointer;
}
.new-list p{
    width: 50%;
    display: flex;
    margin: auto;
    font-size: 15px;
    margin-top: -20px;
    margin-bottom: 40px;
}
.type-of-question-select{
    display: flex;
    width: 50%;
    margin: auto;
}
.type-of-question-select h5{
    margin: auto 10px;
}
.type-of-question-select h4{
    font-size: 25px;
    font-weight: 700;
    margin: auto 0;
}
.type-of-question P{
    width: 50%;
    margin: auto;
    font-size: 15px;
    margin-top: 10px;
    margin-bottom: 40px;
}
.type-of-question h3{
    font-size: 25px;
    font-weight: 700;
    margin: auto;
    width: 50%;
}
.character-writing h3{
    font-size: 25px;
    font-weight: 700;
    margin: 25px auto;
    width: 50%;
    margin-top: 50px;
}
.character-writing p{
    width: 50%;
    margin: auto;
    font-size: 20px;
    margin-bottom: 20px;
}
.list-type-button button{
    padding: 8px 25px;
    width: unset;
    display: flex;
    margin: auto;
    border-radius: 5px;
    background: #2691d9;
    color: #fff;
    font-weight: 700;
    border: none;
    margin-top: 25px;
}

/*
===================================================================================
===============================  Account Page Style ===============================
===================================================================================
 */

#account-body{
    padding: 50px 0;
}
.account-info-header h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 35px;
}
.account-info-details h6{
    margin: 10px 0;
}
.account-info-details h6 span{
    font-weight: 800;
    margin-right: 10px;
}
.account-info-details {
    background: #fff;
    padding: 30px 30px;
    border-radius: 8px;
}
.account-info-details input[type="password"] {
    border: 1px solid #2691d9;
    border-radius: 5px;
    padding: 5px 20px;
    cursor: pointer;
}
.account-info-details input[type="password"]:focus{
    outline: none;
    border: 1px solid #2691d9;
}

.account-cancel-details {
    margin: 50px 0;
    background: #fff;
    padding: 30px 30px;
    border-radius: 8px;
}
.account-contact-details h2 {
    font-size: 32px;
    font-weight: 600;
}
.account-contact-details p{
    margin: 20px 0;
}

/*
===================================================================================
===============================  Quiz Page Style ===============================
===================================================================================
 */


#quiz-body{
    padding: 30px 0;
}
.quiz-header h2{
    text-align: center;
    font-size: 40px;
    font-weight: 800;
}
.quiz-header h5{
    text-align: center;
    font-weight: 600;
    font-size: 30px;

}
.quiz-content{
    display: grid;
    grid-gap: 30px;
    grid-template-columns: repeat(auto-fit,minmax(280px, 1fr));
    grid-auto-flow: dense;
    margin: 20px auto;
    justify-items: center;
    
}
.quiz-content .content-box{
    height: 330px;
    width: 396px;
    border: 1px solid #2691d9;
    border-radius: 5px;
}
.quiz-content .content-box-fill{
    height: 330px;
    width: 330px;
    border: 1px solid #2691d9;
    border-radius: 5px;
}
.inner-content-box p{
    text-align: center;
    margin: 10px 0;
}
.answers-counter {
    text-align: center;
    margin: 10px 0;
}
.answers-counter p {
    font-weight: 500;
}
.answers-counter button{
    padding: 8px 25px;
    width: unset;
    display: flex;
    margin: auto;
    border-radius: 5px;
    background: #2691d9;
    color: #fff;
    font-weight: 700;
    border: none;
    margin-top: 25px;
    transition: .4s;
}
.answers-counter button:hover{
    background: #333;
}
.quiz-table {
    margin: 50px 0;
}
.quiz-table h2{
    text-align: center;
    margin-bottom: 20px;
}
table.quiz-table {
    border-collapse: collapse;
    width: 100%;
}
.quiz-table thead {
    background: #d7d7d7;
    color: #fff;
    font-size: 18px;
    box-shadow: #b9caca 0px -3px 2px;
    border-bottom: #535353 2px solid;
    border-radius: 8px;
    color: black;
}
.quiz-table thead th{
    padding: 5px 0;
    /* text-align: center !important; */
    font-size: 15px;
    
}
.quiz-table th, .quiz-table td{
    /* text-align: center; */
    padding: 10px 0;
    font-size: 15px;
}
.quiz-table tbody tr:nth-child(even){
    background: #cacaca;
    color: black;
}


/*
===================================================================================
===============================  EnterQuiz Page Style =============================
===================================================================================
 */

#enterquiz {
    margin-bottom: 100px;
}
#enterquiz-content p {
    margin: 40px 0 20px 0;
}
#enterquiz-content h2 {
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    margin: 20px 0;
}

#enterquiz-content select{
    width: 80%;
    display: flex;
    margin: auto;
    margin-bottom: 40px;
    border: 1px solid #2691d9;
    padding: 10px 20px;
    border-radius: 5px;
    background: #f6f4f4;
    cursor: pointer;
}
#enterquiz-content select:focus{
    outline: none;
    border: 1px solid #2691d9;
}
#enterquiz-content input[type="submit"] {
    padding: 10px 40px;
    width: unset;
    display: flex;
    margin: auto;
    border-radius: 5px;
}


/*
===================================================================================
===============================  Log In Page Style ================================
===================================================================================
 */


.center{
  margin: auto;
  width: 400px;
  border-radius: 10px;
}
.center h1{
  text-align: center;
  font-family: WorkSans;
}
.center p{
    text-align: center;
    font-size: 16px;
    color: #4f4f4f;
}
.center img{
    display: flex;
    margin: auto;
    width: 200px;
}
.center form{
  box-sizing: border-box;
}
form .txt_field{
  position: relative;
  border: 1px solid #2691d9;
  margin: 30px 0;
  border-radius: 5px;
}
.txt_field input{
  width: 100%;
  padding: 0 5px;
  height: 40px;
  font-size: 16px;
  border: none;
  background: none;
  outline: none;
}
.txt_field label{
  position: absolute;
  top: 50%;
  left: 5px;
  color: #adadad;
  transform: translateY(-50%);
  font-size: 16px;
  pointer-events: none;
  transition: .5s;
}
.txt_field span::before{
  content: '';
  position: absolute;
  top: 40px;
  left: 0;
  width: 0%;
  height: 2px;
  background: #2691d9;
  transition: .5s;
}
.txt_field input:focus ~ label,
.txt_field input:valid ~ label{
  top: -15px;
  color: #2691d9;
}
.pass{
  margin: -5px 0 20px 5px;
  color: #a6a6a6;
  cursor: pointer;
}
.pass:hover{
  text-decoration: underline;
}
input[type="submit"]{
    padding: 8px 35px;
    display: flex;
    margin: auto;
    border-radius: 5px;
    background: #2691d9;
    color: #fff;
    font-weight: 700;
    border: none;
    margin-top: 25px;
    transition: .4s;
}
input[type="submit"]:hover{
  border-color: #2691d9;
  transition: .5s;
}
.signup_link{
  margin: 30px 0;
  text-align: center;
  font-size: 16px;
  color: #666666;
}
.signup_link a{
  color: #2691d9;
  text-decoration: none;
}
.signup_link a:hover{
  text-decoration: underline;
}

span.class-options {
    border: 2px darkblue solid;
    padding: 6px;
    border-radius: 8px;
    margin-right: 3px;
}

.blah {
    line-height: .3;
    font-size: 10px;
}

.delete-student i, .delete-character_list i {
    color: #ff5733; /* Replace with your desired color code */
}
.edit-student i, .edit-character_list i {
    color: turquoise; /* Replace with your desired color code */
}
.cancel-edit i {
    color: grey;
    display: none;
}

input[class*="student-edit"] {
    display: none !important;
}

  .w-options {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 4px;
  }
  
  .edit-quiz {
    background-color: transparent !important;
  }
  .edit-quiz i {
    color: turquoise;
  }
  .quiz-option-top {
    display: flex;
    align-content: center;
  }
  @keyframes fadeInOut {
    0% {
      opacity: 1;
    }
    50% {
      opacity: 0.5;
    }
    100% {
      opacity: 1;
    }
  }

  .copy-link {
    text-decoration: none;
    color: #333; /* Set your desired link color */
    transition: color 0.3s ease; /* Smooth color transition on hover */
  }

  .copy-link:hover {
    color: #C0C0C0 !important; /* Set your desired hover color (bright silver) */
    transform: scale(1.05); /* Slightly enlarge the link on hover */
  }

  .copy-link.clicked {
    animation: fadeInOut 1s ease-in-out; /* Use the defined animation on click */
  }

  .prompt {
    text-shadow: 0 0 black;
    font-kerning: auto;
    font-size: 21px;
    /* animation: highlightBackground 1s ease-in-out; Change the duration (2s) as needed */
  }

@keyframes highlightBackground {
    0% { background-color: black; }
    50% { background-color: lightgreen; }
    100% { background-color: black; }
}

#skip-button {
    background: orange;
    color: white;
}

#word-input {
    padding: 6px;
    margin: 0 auto;
    background: lightblue;
    border-radius: 10px;
}

.list-title {
    font-size: 1.9rem !important;
    font-weight: 700 !important;
    font-family: 'Inter', 'SF Pro Display', 'Segoe UI', sans-serif;
    letter-spacing: 0.02em;
    line-height: 1.2;
    margin-left: 8px;
}

.list-title:hover {
    text-decoration: underline;
}

.list-title-input {
    color: grey;
    background: white; 
    border: none;
    font-size: 1.9rem !important;
    font-weight: 700 !important;
    font-family: 'Inter', 'SF Pro Display', 'Segoe UI', sans-serif;
    line-height: 1.2;
    padding-left: 8px;
    text-align: left;
}

#new-list-title-form-group {
    /* background: #f42f2f; */
    background: #6c757d87;
    padding: 8px 12px;
    color: white;
    border-radius: 10px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
}

#new-list-title-form-group .row {
    flex: 1 1 auto;
    align-items: center;
    margin-left: 0;
    margin-right: 0;
}

#new-list-title-form-group .row > [class^='col-'],
#new-list-title-form-group .row > [class*=' col-'] {
    display: flex;
    align-items: center;
}

#new-list-title-form-group .row > [class^='col-']:not(.freq-lock),
#new-list-title-form-group .row > [class*=' col-']:not(.freq-lock) {
    justify-content: flex-start;
    padding-left: 0;
}

#new-list-title-form-group .freq-lock {
    justify-content: center;
}
#combine-lists-title-form-group {
    padding: 8px;
    color: white;
    border-radius: 10px;
    margin-bottom: 4px;
}

#newListSubmitButton {
    /* margin-top: 10px;
    border: aliceblue 1px solid;
    padding: 3px;
    border-radius: 6px;
    color: red;
    border: blue 1px solid; */
}

.word-view {
    padding-left: 12px;
}

.card.wordlist-card {
    background: lightblue;
    /* float: left; */
    margin: 10px;
    border-radius: 5px;
    padding: 3px;
}

p.list-item-view {
    margin-left: 15px;
}

.remove-word-button {
    transform: translateX(4px);
    width: 20px;
    padding: 3px;
}

/* Add this CSS to your stylesheet or style section */

.custom-dropdown {
    padding: 8px; /* Adjust spacing as needed */
}

/* Media query for screens with a maximum width of 767px (typical for mobile devices) */
@media (max-width: 767px) {
    .custom-dropdown {
        transform: translate3d(-78px, 25px, 9px) !important;
    }
}

.custom-dropdown a.dropdown-item {
    display: flex;
    align-items: center;
}

.custom-dropdown i {
    padding-right: 5px;
}

.custom-dropdown a.dropdown-item:hover {
    background-color: #f8f9fa; /* Light hover background color */
}

.custom-dropdown .dropdown-divider {
    margin: 8px 0; /* Adjust margin as needed */
    border-color: #e9ecef; /* Faint line color */
}

.no-padding-left {
    padding-left: 0px !important;
}

/* @media (min-width: 900px) {
    .modal-xlg {
       width: 90%; 
    }
 } */

 .bopomofo-selected {
    margin-right: -1px;
    background: lightblue;
    padding-right: 6px;
    padding-left: 6px;
    border-radius: 3px;
    padding-bottom: 3px;
    color: darkblue;
    line-height: 1.2;
 }
 .live-quiz {
    /* position: fixed;
    padding: -2px;
    float: left; */
    margin-left: 10px;
    background: red;
    border-radius: 10px;
    padding: 3px;
    color: white;
    font-size: 10px;
    animation-name: color;
    animation-duration: 1s;
    animation-iteration-count: infinite;
    animation-direction: alternate-reverse;
    animation-timing-function: ease; 
}

@keyframes color {
from {
  
  }
to {
  background-color: white;
  color: lightslategray;
  }
}

/* Add a class to the container of auto and manual Bopomofo columns */
.bopomofo-container {
    position: relative;
}

/* Create the arrow icon using :after pseudo-element */
.bopomofo-container:after {
    content: '\2192'; /* Right arrow character */
    font-size: 24px; /* Adjust the font size as needed */
    position: absolute;
    top: 50%;
    left: 80%;
    transform: translateY(-50%);
    cursor: pointer;
    margin-left: 5px; /* Adjust the margin as needed */
    color: #007bff; /* Set the arrow color */
    /*
    width: 0;
    height: 0;
    border-top: 10px solid transparent; 
    border-bottom: 10px solid transparent; 
    border-left: 15px solid #007bff; 
    */
}

/* Change arrow color on hover */
.bopomofo-container:hover:after {
    color: #0056b3; /* Set the hover color */
}

#new-dynamic-list-container .list-item-row .bopomofo-container:after {
    display: none;
}

/* Hide the arrow in the .bopomofo-container for this specific template */
.cb-dynamic-list-container .list-item-row .bopomofo-container:after {
    display: none;
}

.arrow {
    border: solid black;
    border-width: 0 3px 3px 0;
    display: inline-block;
    padding: 3px;
  }
  
  .right {
    transform: rotate(-45deg);
    -webkit-transform: rotate(-45deg);
  }

#csvSection {
    background: aliceblue;
    padding: 10px;
}

#csvSection .csv-upload-row {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}

#csvSection .csv-upload-input {
    flex: 0 0 33%;
    max-width: 33%;
    width: 100%;
    margin-bottom: 0;
}

#csvSection .csv-help-btn {
    flex: 0 0 auto;
    padding: 6px 10px;
    font-size: 0.9rem;
}

#csvSection button {
    margin-top: 0;
}

#csvSection .csv-upload-row button {
    align-self: center;
}

@media (max-width: 576px) {
    #csvSection .csv-upload-row {
        flex-direction: column;
        align-items: stretch;
    }

    #csvSection .csv-upload-input {
        flex: 1 1 auto;
        max-width: 100%;
    }

    #csvSection .csv-upload-row button {
        align-self: flex-end;
        margin-top: 12px;
    }

    #csvSection .csv-help-btn {
        margin-top: 12px;
        width: fit-content;
    }

}

.class-signup-details {
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    width: 361px;
    align-items: flex-start;
    background: bisque;
    padding: 10px;
    border-radius: 7px;
}


.pinyin-zhuyin-toggle {
    display: inline-flex;
    align-items: center;
    gap: clamp(2px, 0.8vw, 6px);
    padding: clamp(2px, 0.6vw, 4px);
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid #d4dce7;
    min-width: clamp(120px, 36vw, 180px);
    max-width: clamp(150px, 42vw, 205px);  /* Increased from 190px to 205px to accommodate Zhuyin */
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
    flex-shrink: 0;
}

.pinyin-zhuyin-toggle .toggle-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: clamp(4px, 0.9vw, 8px) clamp(9px, 2vw, 18px);
    font-weight: 600;
    font-size: clamp(0.8rem, 1vw + 0.45rem, 0.95rem);
    font-family: 'Inter', 'SF Pro Display', 'Segoe UI', sans-serif;
    color: #39465a;
    letter-spacing: 0.01em;
    cursor: pointer;
    user-select: none;
    border-radius: 999px;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.pinyin-zhuyin-toggle .toggle-option:hover {
    background: rgba(13, 110, 253, 0.08);
    color: #0b5ed7;
}

.pinyin-zhuyin-toggle .toggle-option.bopomofo-selected {
    background: linear-gradient(135deg, #0d6efd, #2263ff);
    color: #ffffff;
    box-shadow: 0 6px 14px rgba(13, 110, 253, 0.22);
}

/* Force Pinyin text to move left when selected */
.pinyin-zhuyin-toggle .pinyin-label.bopomofo-selected {
    padding-left: clamp(10px, 2vw, 13px) !important;
    padding-right: clamp(16px, 3vw, 23px) !important;
}

/* Force phantom header row to be visible */
/* Removed debug CSS that was adding red border to first list item */


.pinyin-zhuyin-toggle .toggle-option:focus-visible {
    outline: 3px solid rgba(59, 130, 246, 0.35);
    outline-offset: 2px;
}

.signup-status {
    display: flex;
    align-items: center;
    padding: 10px;
}

.signup-status p {
    padding-left: 2rem;
    text-align: left;
}

.signup-status i.fa-times-circle {
    color: red;
}

.signup-status i.fa-check-circle {
    color: green;
}

.signup-status i.fa-clock {
    color: blue;
}

.signup-status i {
    font-size: 50px;
}

.btn-xs {
    font-size: 10px;
}

#pendingSignupsModal button {
    margin-right: 10px;    
}

.pending-signups-cell {
    background: silver;
    border-radius: 4px;
    border: solid 3px black;
    max-height: 35px;
}

/* Class Detail */

.accordion-renamed-content table{
    border-collapse: collapse;
    width: 100%;
}
.accordion-renamed-content thead{
    background: #2691d9;
    color: #fff;
    font-size: 18px;
}
.accordion-renamed-content thead th{
    padding: 15px 0;
    text-align: center;
}
.accordion-renamed-content td{
    font-size: 15px;
}
.accordion-renamed-content th, .accordion-renamed-content td{
    text-align: center;
    padding: 15px 0;
}
.accordion-renamed-content tbody tr:nth-child(even){
    background: #4e6270;
    color: #fff;
}
.no-students-yet {
    width: 800px;
    /* border: 2px solid grey; */
    border-radius: 5px;
    margin-top: 24px;
    /* text-align: center; */
}
.no-students-yet span {
    border: 1px solid grey;
    border-radius: 2px;
    width: 80px;
    padding: 0px 6px;
    margin-top: 8px;
}

/* .dark-bg {
    background-color: #999; 
    color: white;
} */

/* .teacher-tab {
    background-color: #007bff; 
    color: #fff; 
} */

/* .student-tab {
    background-color: #6c757d;
    color: #fff;
} */

.edit-student i, .cancel-edit i {
    font-size: x-large;
}

@media screen and (max-width: 640px) {
    .dataTables_wrapper .dataTables_filter {
        margin: 1.5em;
    }
}

@media (max-width: 576px) {
    #new-list-title-form-group .row {
        flex-wrap: nowrap;
        align-items: center;
        gap: clamp(0.4rem, 1.2vw, 0.65rem);
    }

    #new-list-title-form-group .col-md-7,
    #new-list-title-form-group .col-md-5 {
        flex: 0 0 auto;
        width: auto;
        max-width: none;
    }

    #new-list-title-form-group .col-md-7 {
        flex: 1 1 auto;
        min-width: 0;
    }

    #new-list-title-form-group .col-md-5 {
        display: flex;
        justify-content: flex-end;
        flex: 0 1 clamp(140px, 42vw, 200px);
        min-width: 0;
    }

    #newListTitle {
        font-size: clamp(0.85rem, 3.5vw, 0.95rem);
    }

    #new-list-title-form-group .col-md-5 .pinyin-zhuyin-toggle {
        flex: 1 1 auto;
        max-width: 100%;
    }
}

@media (max-width: 460px) {
    /* Apply styles only on screens smaller than 768px (typically mobile devices) */
    .modal-dialog {
      max-width: 100%;
      margin: 0;
    }
  }

  td.actual-quiz a {
    padding: 3px;
    border-radius: 3px;
    color: white !important;
    background-color: #0dcaf0 !important;
  }

  td.practice-quiz a {
    padding: 3px;
    border-radius: 3px;
    color: white !important;
    background-color: #0d6efd !important;
  }

  .quiz-class-td {
    position: relative;
    max-width:80px;
  }

  #teacherLogin, #studentLogin {
    margin-top: 20px;
  }

  .signup_link {
    color:#0d6efd;
    background: gainsboro;
    padding:4px;
  }

  #refreshButton, #updateMessage {
    position: fixed;
    bottom: 20px;
    left: 20px;
    max-width: calc(100vw - 40px);
    word-wrap: break-word;
  }

  #refreshButton {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Center the refresh icon perfectly */
  #refresh-quiz-scores-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
  }

  #refresh-quiz-scores-btn i {
    margin: 0 0 0 12px !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  #refreshButton:not(.show) {
    display: none;
  }

#image-container, .image-container {
  overflow-x: scroll; 
  white-space: nowrap;
  position: relative;
  background-color: black;
  height: clamp(72px, 14vw, 100px);
}
.image-container{
  overflow-y: hidden;
  overflow-x: scroll;
  white-space: nowrap;
  position: relative;
  background-color: black;
  margin-left: clamp(4px, 1.5vw, 10px);
  margin-right: clamp(4px, 1.5vw, 13px);
  /* width: 70%; */
}


.list-img-thumb {
  max-height: clamp(72px, 14vw, 100px);
  background-size: cover;
  cursor: pointer;
  object-fit: cover;
  width: auto;
}
 /* absolutely positioned image:
    width: 24%;
    height: 118px;
    background-size: cover;
    position: absolute;
    right: 7px;
    top: 6px;
    z-index: 100;
    border-radius: 6px;
  */

.selectable-image {
    height: clamp(72px, 14vw, 100px);
    margin-right: clamp(6px, 1.5vw, 10px);
    cursor: pointer;
    object-fit: cover;
    width: auto;
}
 
.card-img-top-container {
    width: 100%;
    height: 200px; /* Adjust the height as needed */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}
.card-img-top {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.list-image-container-toggle-btn {
    position: absolute;
    right: 10px;
    top: 54px;
    width: 25px;
    height: 25px;
    color: rgb(255, 255, 255);
    background: grey;
    border: none;
    border-radius: 50%;
    text-align: center;
    line-height: 25px;
    cursor: pointer;
    z-index: 1000;
}

#quizzes-table_filter {
    margin-bottom: 10px;
}

.close-i-c {
    position: absolute;
    top: 16px;
    left: 53px;
    z-index: 100;
    color: white;
    background: red;
    border-radius: 10px;
    padding: 4px;
    opacity: 0.6;
    cursor: pointer;
    width: 18px;
    height: 22px;
    text-align: center;
    font-size: 10px;
    font-weight: bold;
    display: none;
}

.teacher-names-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.teacher-names-wrapper .row {
    display: flex;
    align-items: center;
}

.teacher-names-wrapper .col-form-label {
    text-align: right;
}

.teacher-names-wrapper .form-control {
    margin-left: 5px;
}

.active-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: green; /* Use a color that matches your design */
    margin-left: 5px; /* Adjust as needed for spacing */
}

.unique-code {
    font-size: 0.9em; /* Smaller font size */
    color: gray; /* Subtle color */
    margin-top: -10px; /* Adjust as needed for spacing */
}

.unique-code span {
    text-decoration: underline; /* Optional: to indicate it's important */
    cursor: help; /* Change cursor to indicate there's a tooltip */
}
img.exam-status-img {
    width: 30px;
}

.login-logo-fixed {
    max-width: 150px;
    height: auto;
}

.question-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    text-align: center;
}

.prompt-box {
    width: 100%;
    margin-bottom: 10px;
}

.inner-content-box {
    width: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.prompt {
    width: auto;
}

.content-box {
    align-items: center;
}

#progress-tracker {
    font-size: 2em;
}

.create-quiz-btn {
    margin-top: 15px;
    margin-bottom: 15px;
}

/* tr th.dtfc-fixed-start, tr th.dtfc-fixed-end {
    background: #333333 !important;
} */

.new-btn {
    border-radius: 50%;
    height: 50px;
    width: 50px;
    margin-left: 1em;
}

/* Force blue color for createButton specifically */
#createButton,
#createButton.btn.btn-info,
button#createButton.btn.btn-info.new-btn {
    background-color: #0d6efd !important;
    background-image: none !important;
    border-color: #0d6efd !important;
    color: white !important;
}

#createButton:hover,
#createButton.btn.btn-info:hover,
button#createButton.btn.btn-info.new-btn:hover {
    background-color: #0a58ca !important;
    background-image: none !important;
    border-color: #0a58ca !important;
    color: white !important;
}

#createButton:focus,
#createButton:active,
#createButton.btn.btn-info:focus,
#createButton.btn.btn-info:active,
button#createButton.btn.btn-info.new-btn:focus,
button#createButton.btn.btn-info.new-btn:active {
    background-color: #0a58ca !important;
    background-image: none !important;
    border-color: #0a58ca !important;
    color: white !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

/* Fix broken image handling */
img {
    image-rendering: auto;
    image-rendering: crisp-edges;
    image-rendering: -webkit-optimize-contrast;
}

/* Hide broken images and show fallback */
img:not([src]),
img[src=""],
img[src="#"],
img[src="None"],
img[src="null"] {
    display: none !important;
    opacity: 0;
}

/* Handle image loading errors with JavaScript fallback */
.card-img-top-container {
    position: relative;
    background-color: #f8f9fa;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-img-top-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.card-img-top-container::after {
    content: "📋";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: #6c757d;
    display: none;
    z-index: 2;
}

.card-img-top-container.show-fallback::before {
    display: flex;
}

.card-img-top-container.show-fallback::after {
    display: block;
}

.card-img-top {
    position: relative;
    z-index: 3;
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* Force fallback images to be visible for templates tab */
#content2 .card-img-top-container {
    background-image: url("/static/assets/images/Character_Coach_M.816ec2941c4d.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

#content2 .card-img-top[style*="display: none"],
#content2 .card-img-top:not([src]),
#content2 .card-img-top[src=""],
#content2 .card-img-top[src="#"],
#content2 .card-img-top[src="None"],
#content2 .card-img-top[src="null"] {
    display: none !important;
}

/* Show the container background when image is hidden */
#content2 .card-img-top-container:has(.card-img-top[style*="display: none"]) {
    background-image: url("/static/assets/images/Character_Coach_M.816ec2941c4d.png");
}

/* List image thumbnails fallback */
.list-img-thumb {
    background-color: #f8f9fa;
    border: 2px solid #dee2e6;
    min-width: 60px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.list-img-thumb:not([src]),
.list-img-thumb[src=""],
.list-img-thumb[src="#"],
.list-img-thumb[src="None"],
.list-img-thumb[src="null"] {
    display: flex !important;
    opacity: 1 !important;
}

.list-img-thumb:not([src])::before,
.list-img-thumb[src=""]::before,
.list-img-thumb[src="#"]::before,
.list-img-thumb[src="None"]::before,
.list-img-thumb[src="null"]::before {
    content: "🖼️";
    font-size: 1.5rem;
    color: #6c757d;
}

#updateMessage {
    z-index: 100;
}

button.option-button {
    box-sizing: border-box;
}

button.option-button:disabled:not(.correct-answer) {
    background: #59b25c !important;
    color: rgb(211, 211, 211) !important;
    cursor: not-allowed;
    opacity: 0.7;
}

.correct-answer {
    /* border: 3px solid rgb(128, 0, 11); */
    outline: 2px solid rgb(36, 129, 47);
    background-color: #32a857; /* Light green background to highlight */
    color: white;
    font-weight: bold;
}

table.dataTable thead tr > .dtfc-fixed-start, table.dataTable thead tr > .dtfc-fixed-end, table.dataTable tfoot tr > .dtfc-fixed-start, table.dataTable tfoot tr > .dtfc-fixed-end {
    /* background-color: rgba(215, 215, 215) !important; */
}

.reward-badge {
    display: grid;
    justify-items: center;
    background-color: #f0f9ff; /* Light blue background for reward */
    color: #28a745; /* Success green color */
    padding: 10px 20px;
    border: 2px solid #28a745; /* Green border */
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    font-weight: bold;
    font-size: 1.2em;
    margin: 20px auto; /* Center the element horizontally */
    width: fit-content; /* Prevent it from stretching to 100% */
  }

  #bonus-points {
    margin-top: 5px;
    font-size: 1.5em;
    color: #155724; /* Darker shade for emphasis */
  }

  #countdown {
    text-align: center;
    margin-top: 2em;
    font-size: smaller;
  }

  #daily-limit-reached {
    text-align: center;
    color: red;
    font-size: 20px;
  }

.material-symbols-outlined {
  font-variation-settings:
  'FILL' 0,
  'wght' 400,
  'GRAD' 0,
  'opsz' 24
}

/* Dimming effect for unselected elements */
.dimmed {
    opacity: 0.5;
    pointer-events: none;
}

/* Highlight for selected cards */
.card.selected {
    border: 2px solid #007bff;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
}

/* Overlay for dimming the background */
.dim-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
    z-index: 10; /* Ensures it covers everything but the cards */
    display: none; /* Initially hidden */
  }

  /* Keep the list cards above the overlay */
.card-wrapper {
    position: relative;
    z-index: 20;
  }

.combine-lists-instructions-panel {
    z-index: 20;
    position: relative;
    display: inline-block;
    background: white;
    padding: 10px;
    text-align: center;
    margin: 0 auto;
}

.fix-display-and-add-blue-border {
    position: fixed;
    border: 2px solid #007bff;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
    z-index: 50;
}

.close-list-btn {
    width: 25px;
    background: lightgray;
    color: grey;
    border-radius: 4px;
    position: absolute;
    top: 15px;
}

.freq-lock {
    margin-top: 5px;
    cursor: pointer;
}

.lock-border {
    border: 2px solid red;
    border-radius: 4px;
    padding: 2px;
}

.red-border {
    border: solid 1px red;
}

.total-attempts-container {
    max-height: 200px;
    overflow-y: auto;
    margin: 10px 0;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.total-attempts-table {
    width: 100%;
    border-collapse: collapse;
}

.total-attempts-table th,
.total-attempts-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.total-attempts-table th {
    background-color: #f5f5f5;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.total-attempts-table tr:last-child td {
    border-bottom: none;
}

.toggle-details-link {
    margin-left: 5px;
    color: #6c757d;
    text-decoration: none;
}

.toggle-details-link:hover {
    color: #495057;
}

.progress-label {
    display: flex;
    align-items: center;
}

/* Ensure the table looks good */
.table-responsive {
    max-height: 200px;
    overflow-y: auto;
}

.table th {
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    z-index: 1;
}

/* Updated styles for student indicators with initials */
.student-attempts-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
    padding: 5px;
}

.student-attempt-indicator {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 14px;
    text-shadow: 0 0 2px rgba(0,0,0,0.5);
}

/* Make the indicators slightly larger for better readability */
.student-attempt-indicator {
    width: 30px;
    height: 30px;
}

.legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 5px;
}

/* Progress legend with better spacing */
.progress-legend {
    display: flex;
    gap: 15px;
    margin-top: 8px;
}

/* Style for progress text outside the bar */
.progress-text {
    display: block;
    margin-top: 5px;
    color: #6c757d;
}

/* Ensure the progress bar has a minimum height */
.progress {
    height: 10px;
    margin-bottom: 5px;
}

.form-check-input{
    margin-left: 0px !important;
}
.form-check-label{
    margin-top: -4px !important;
}

/* Fix frequency input width to ensure numbers are visible */
.frequency {
    min-width: 75px !important;
    width: 75px !important;
}

/* Fix positioning of delete button next to frequency input */
.list-item-row .col-sm-1:nth-last-child(1) {
    margin-left: 10px;
    flex: 0 0 auto;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* Center the X button vertically for character deletion */
.remove-word-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px !important;  /* 20% smaller than 30px */
    height: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 50% !important;
    font-size: 12px !important;
    line-height: 1 !important;
    white-space: nowrap;
    background-color: #dc3545 !important;
    border: 1px solid #dc3545 !important;
    color: white !important;
    flex-shrink: 0;
}

/* Ensure the list item row doesn't wrap */
.list-item-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
}

/* Make sure frequency column container has proper flex properties */
.list-item-row .col-sm-1:nth-last-child(2) {
    flex: 0 0 75px;
    width: 75px;
    max-width: 75px;
}

/* Make sure delete button column doesn't take extra space */
.list-item-row .col-sm-1:nth-last-child(1) {
    margin-left: 10px;
    flex: 0 0 30px;
    width: 30px;
    max-width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-buttons {
    display: flex;
    gap: 5px;
}

.action-buttons .btn {
    padding: 4px 8px;
}

.menu-section {
    font-weight: bold;
    color: #666;
    padding: 8px 16px;
    border-bottom: 1px solid #eee;
}

/* Make the options menu wider */
.mdl-menu {
    min-width: 200px;
}

/* Add these styles to your existing style block */
.list-details-table td {
    max-width: 200px;
    white-space: normal !important;
    word-wrap: break-word;
}

/* Override MDL's default nowrap */
.list-details-table .mdl-data-table__cell--non-numeric {
    white-space: normal !important;
}

/* Make action buttons always visible */
.actions-cell .btn-icon,
.actions-cell .custom-dropdown button,
.options-button,
.btn-icon {
    background-color: #f0f0f0 !important; /* Light gray background */
    border: 1px solid #ddd !important;
    cursor: pointer !important;
    padding: 0 !important; /* Remove padding */
    border-radius: 50% !important;
    display: flex !important; /* Use flex for centering */
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
    width: 40px !important;
    height: 40px !important;
    margin: 0 auto !important; /* Center horizontally if needed */
}

.actions-cell .btn-icon i,
.actions-cell .custom-dropdown button i,
.options-button i,
.btn-icon i {
    font-size: 24px !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important; /* Change to block */
    color: #333 !important; /* Dark color for contrast */
    margin: 0 !important; /* Remove any margins */
    padding: 0 !important; /* Remove any padding */
    line-height: 1 !important; /* Set line height to 1 */
    text-align: center !important; /* Center text */
}

/* Center the button in its container */
.custom-dropdown {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

/* Add a darker background color on hover for better UX */
.actions-cell .btn-icon:hover,
.actions-cell .custom-dropdown button:hover,
.options-button:hover,
.btn-icon:hover {
    background-color: #e0e0e0 !important;
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 1000;
    min-width: 10rem;
    padding: 0.5rem 0.5rem !important;
    margin: 0.125rem 0 0;
    background-color: #fff;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
}

/* Remove dropdown arrows */
.btn-icon::after,
.options-button::after,
.dropdown-toggle::after {
    display: none !important;
}

/* Update navbar styles to use flexbox for proper alignment */
.navbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
  }
  
  .menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  
  .menu li {
    margin-right: 20px;
  }
  
  .menu li:last-child {
    margin-right: 0;
  }
  
  /* User Dropdown Styles */
  .user-dropdown {
    position: relative;
  }
  
  .user-dropdown-toggle {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    padding: 8px 12px;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.2s;
  }
  
  .user-dropdown-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
  }
  
  .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 8px;
    background-color: #4285f4;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .user-initials {
    color: white;
    font-weight: 600;
    font-size: 16px;
  }
  
  .user-name {
    margin: 0 8px;
    font-weight: 500;
  }
  
  .dropdown-menu {
    padding: 0.5rem 0;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    min-width: 240px;
  }
  
  .dropdown-header {
    padding: 1rem 1rem 0.5rem;
  }
  
  .dropdown-item {
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
  }
  
  .dropdown-item:hover {
    background-color: rgba(0, 0, 0, 0.03);
  }
  
  .dropdown-item i {
    width: 20px;
    text-align: center;
    opacity: 0.7;
  }
  
  .dropdown-divider {
    margin: 0.5rem 0;
  }
  
  /* Responsive adjustments */
  @media (max-width: 767.98px) {
    .user-dropdown-toggle {
      padding: 8px;
    }
    
    .user-avatar {
      margin-right: 0;
    }
    
    /* Ensure menu and dropdown stay aligned on mobile */
    .navbar {
      flex-wrap: wrap;
    }
    
    .menu {
      order: 1;
      margin-bottom: 10px;
      flex-wrap: wrap;
    }
    
    .user-dropdown {
      order: 2;
      margin-left: auto;
    }
  }

/* Force primary color to #0070FF - override any purple styling */
:root {
  --bs-primary: #0070FF !important;
  --bs-primary-rgb: 0, 112, 255 !important;
  --modern-gradient: linear-gradient(135deg, #0070FF, #0058CC);
  --modern-shadow: 0 20px 40px rgba(0, 112, 255, 0.15);
  --modern-border-radius: 16px;
}

/* Modern Modal Styling */
.modern-modal-content {
  border: none !important;
  border-radius: var(--modern-border-radius) !important;
  box-shadow: var(--modern-shadow) !important;
  background: linear-gradient(145deg, #ffffff, #f8f9fa) !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 3rem);
}

#newListModal {
  --list-modal-base-width: 860px;
  --list-modal-base-height: 640px;
}

#newListModal .modal-dialog {
  --list-modal-scale-width: calc((100vw - 32px) / var(--list-modal-base-width));
  --list-modal-scale-height: calc((100vh - 32px) / var(--list-modal-base-height));
  --list-modal-scale: clamp(0.35, min(1, var(--list-modal-scale-width), var(--list-modal-scale-height)), 1);
  max-width: none !important;
  width: calc(var(--list-modal-base-width) * var(--list-modal-scale));
  margin: calc(1.5rem * var(--list-modal-scale)) auto;
}

#newListModal .modern-modal-content {
  font-size: clamp(0.9rem, 0.8rem + 0.4vw, 1rem);
  padding: 0;
  overflow: visible;
  background: transparent !important;
  box-shadow: none !important;
}

#newListModal .list-modal-scale {
  width: var(--list-modal-base-width);
  max-height: var(--list-modal-base-height);
  transform: scale(var(--list-modal-scale));
  transform-origin: top center;
  margin-left: calc((var(--list-modal-base-width) * (1 - var(--list-modal-scale))) / -2);
  margin-right: calc((var(--list-modal-base-width) * (1 - var(--list-modal-scale))) / -2);
  border-radius: var(--modern-border-radius);
  box-shadow: var(--modern-shadow);
  background: linear-gradient(145deg, #ffffff, #f8f9fa);
  display: flex;
  flex-direction: column;
}

#newListModal .list-modal-scale .modal-header,
#newListModal .list-modal-scale .modal-footer,
#newListModal .list-modal-scale .modal-body {
  transform: none;
}

#newListModal .list-modal-scale .modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 2rem !important;
}

.modern-modal-header {
  background: var(--modern-gradient) !important;
  border: none !important;
  padding: 2rem 2rem 1.5rem 2rem !important;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.modal-header-content {
  flex: 1;
}

.modern-modal-title {
  color: white !important;
  font-size: clamp(1.35rem, 2vw + 0.9rem, 1.75rem) !important;
  font-weight: 700 !important;
  margin: 0 !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.modern-modal-subtitle {
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: clamp(0.8rem, 1.4vw + 0.45rem, 0.95rem) !important;
  margin: 0.5rem 0 0 0 !important;
  font-weight: 400;
}

.modern-close-btn {
  background: rgba(255, 255, 255, 0.15) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: white !important;
  width: clamp(32px, 6vw, 40px);
  height: clamp(32px, 6vw, 40px);
  border-radius: 50% !important;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  font-size: clamp(0.9rem, 1.2vw + 0.4rem, 1.1rem);
  position: absolute;
  top: clamp(12px, 2vw, 20px);
  right: clamp(12px, 2vw, 20px);
  z-index: 1001;
}

.modern-close-btn:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  transform: rotate(90deg);
  color: white !important;
}

.modal-header-image {
  position: relative;
  margin-right: clamp(32px, 8vw, 60px); /* Ensure clearance for close button */
}

.modern-img-thumb {
  width: clamp(48px, 10vw, 60px) !important;
  height: clamp(48px, 10vw, 60px) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2) !important;
  border: 3px solid rgba(255, 255, 255, 0.3) !important;
  object-fit: cover;
}

.modern-modal-footer {
  background: #f8f9fa !important;
  border: none !important;
  padding: clamp(1rem, 1.5vw + 0.75rem, 1.5rem) clamp(1.25rem, 2.25vw + 0.5rem, 2rem) !important;
  border-bottom-left-radius: var(--modern-border-radius) !important;
  border-bottom-right-radius: var(--modern-border-radius) !important;
}

.modal-footer-actions {
  display: flex;
  gap: clamp(0.5rem, 1vw, 0.9rem);
  align-items: center;
}

.modern-add-btn {
  background: linear-gradient(135deg, #198754, #157347) !important;
  border: none !important;
  border-radius: 10px !important;
  padding: clamp(0.5rem, 1vw + 0.25rem, 0.75rem) clamp(1rem, 2vw + 0.5rem, 1.5rem) !important;
  font-weight: 600 !important;
  font-size: clamp(0.85rem, 1vw + 0.55rem, 1rem) !important;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
}

.modern-add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(25, 135, 84, 0.4) !important;
  background: linear-gradient(135deg, #1e7e34, #155724) !important;
}

.modern-secondary-btn {
  background: #6c757d !important;
  border: none !important;
  border-radius: 10px !important;
  padding: clamp(0.5rem, 1vw + 0.25rem, 0.75rem) clamp(1rem, 2vw + 0.5rem, 1.5rem) !important;
  font-weight: 500 !important;
  font-size: clamp(0.85rem, 1vw + 0.55rem, 0.95rem) !important;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.2);
}

.modern-secondary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(108, 117, 125, 0.3) !important;
  background: #5c636a !important;
}

.modern-primary-btn {
  background: var(--modern-gradient) !important;
  border: none !important;
  border-radius: 10px !important;
  padding: clamp(0.55rem, 1.1vw + 0.3rem, 0.75rem) clamp(1.25rem, 2.5vw + 0.75rem, 2rem) !important;
  font-weight: 600 !important;
  font-size: clamp(0.9rem, 1vw + 0.6rem, 1.05rem) !important;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 112, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.modern-primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 112, 255, 0.4) !important;
  background: linear-gradient(135deg, #0058CC, #004399) !important;
}

.modern-primary-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.modern-primary-btn:hover::before {
  left: 100%;
}

/* Enhanced button icons */
.modern-add-btn i,
.modern-primary-btn i {
  margin-right: 0.5rem;
  font-size: 0.9em;
}

/* Modern modal body enhancements */
.modern-modal-content .modal-body {
  padding: clamp(1.25rem, 2.5vw, 2rem) !important;
  background: white;
  flex: 1 1 auto;
  overflow-y: auto;
}

/* Modern form inputs within the modal */
.modern-modal-content .form-control {
  border-radius: 10px !important;
  border: 2px solid #e9ecef !important;
  padding: clamp(0.5rem, 1vw + 0.35rem, 0.75rem) clamp(0.75rem, 1.5vw + 0.5rem, 1rem) !important;
  transition: all 0.3s ease;
  font-size: clamp(0.85rem, 1vw + 0.55rem, 0.95rem);
}

.modern-modal-content .form-control:focus {
  border-color: #0070FF !important;
  box-shadow: 0 0 0 0.2rem rgba(0, 112, 255, 0.15) !important;
  transform: translateY(-1px);
}

/* Modern collapse button styling */
.modern-modal-content .btn-link {
  color: #0070FF !important;
  text-decoration: none !important;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.modern-modal-content .btn-link:hover {
  background: rgba(0, 112, 255, 0.1) !important;
  color: #0058CC !important;
}

/* Error section styling */
.modern-modal-content .error-section {
  border-radius: 8px !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
}

/* Enhanced textarea */
.modern-modal-content textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* File input styling */
.modern-modal-content input[type="file"] {
  padding: 0.5rem;
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  width: 100%;
  transition: all 0.3s ease;
}

.modern-modal-content input[type="file"]:hover {
  border-color: #0070FF;
  background: rgba(0, 112, 255, 0.05);
}

/* Additional button fixes to ensure #0070FF color */
.modern-warning-btn {
  background: #ffc107 !important;
  border-color: #ffc107 !important;
  color: #212529 !important;
}

.modern-danger-btn {
  background: #dc3545 !important;
  border-color: #dc3545 !important;
  color: white !important;
}

.modern-secondary-btn {
  background: #6c757d !important;
  border-color: #6c757d !important;
  color: white !important;
}

.modern-primary-btn {
  background: #0070FF !important;
  border-color: #0070FF !important;
  color: white !important;
}

@media (max-width: 992px) {
  .modal-dialog.modal-lg {
    max-width: min(92vw, 900px);
    margin: 1.5rem auto;
  }

  .modern-modal-header {
    padding: 1.75rem 1.75rem 1.25rem 1.75rem !important;
  }

  .modern-modal-footer {
    padding: 1.25rem 1.75rem !important;
  }
}

@media (max-width: 576px) {
  .modal-dialog.modal-lg {
    max-width: calc(100vw - 1.5rem);
    margin: 0.75rem auto;
  }

  .modern-modal-content {
    max-height: calc(100vh - 1.5rem);
  }

  .modern-modal-header {
    flex-direction: row;
    align-items: center;
    gap: clamp(0.5rem, 1.5vw, 0.75rem);
    padding: 1.25rem clamp(1rem, 2vw, 1.25rem) 1rem clamp(1rem, 2vw, 1.25rem) !important;
  }

  .modal-header-image {
    margin-right: clamp(16px, 5vw, 32px);
  }

  .modern-img-thumb {
    width: clamp(44px, 10vw, 52px) !important;
    height: clamp(44px, 10vw, 52px) !important;
  }

  .modern-modal-title {
    font-size: clamp(1.25rem, 4vw + 0.6rem, 1.5rem) !important;
    line-height: 1.2;
  }

  .modern-modal-subtitle {
    font-size: clamp(0.75rem, 2.5vw + 0.35rem, 0.9rem) !important;
  }

  .modern-close-btn {
    top: clamp(10px, 2vw, 12px);
    right: clamp(10px, 2vw, 12px);
  }

  .modern-modal-content .modal-body {
    padding: 1.25rem !important;
  }

  .modern-modal-footer {
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: clamp(0.5rem, 1.5vw, 0.75rem);
    padding: 1rem clamp(1rem, 2vw, 1.25rem) !important;
  }

  .modern-modal-footer > div:first-child {
    display: flex;
    align-items: center;
    gap: clamp(0.4rem, 1.2vw, 0.6rem);
  }

  .modal-footer-actions {
    display: flex;
    align-items: center;
    gap: clamp(0.4rem, 1.2vw, 0.6rem);
  }

  .modal-footer-actions .btn,
  .modern-modal-footer .btn {
    min-width: 0;
    flex: 0 1 auto;
  }

  .pinyin-zhuyin-toggle {
    justify-content: center;
  }

  .pinyin-zhuyin-toggle .toggle-option {
    padding: clamp(4px, 1vw, 6px) clamp(8px, 2vw, 12px);
    font-size: clamp(0.78rem, 2.4vw, 0.9rem);
  }

  #image-container,
  .image-container {
    margin-left: clamp(2px, 1vw, 6px);
    margin-right: clamp(2px, 1vw, 6px);
  }

  #new-dynamic-list-container {
    overflow-x: visible;
  }

  #new-dynamic-list-container .list-item-row,
  #new-dynamic-list-container .phantom-header {
    flex-wrap: wrap !important;
    gap: clamp(0.5rem, 2vw, 0.75rem);
  }

  #new-dynamic-list-container .list-item-row > [class*="col-sm-"],
  #new-dynamic-list-container .phantom-header > [class*="col-sm-"] {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  #new-dynamic-list-container .list-item-row > .col-sm-1,
  #new-dynamic-list-container .phantom-header > .col-sm-1 {
    flex: 0 0 auto !important;
    max-width: none !important;
    width: auto !important;
  }

  #new-dynamic-list-container .list-item-row > [class*="col-sm-"] .form-control,
  #new-dynamic-list-container .list-item-row > [class*="col-sm-"] .btn {
    font-size: clamp(0.8rem, 2.2vw, 0.95rem);
    padding: clamp(0.4rem, 1.8vw, 0.6rem) clamp(0.5rem, 2vw, 0.75rem);
  }

  #newListModal .modal-body {
    overflow: auto;
  }
}

/* --- Responsive overrides for Create List modal --- */
#newListModal .modal-dialog {
  width: min(960px, calc(100vw - 16px));
  margin: 8px auto;
}

#newListModal .modern-modal-content {
  max-height: calc(100vh - 16px);
  display: flex;
  flex-direction: column;
  background: linear-gradient(145deg, #ffffff, #f8f9fa) !important;
  box-shadow: var(--modern-shadow) !important;
}

#newListModal .list-modal-scale {
  width: 100% !important;
  max-height: 100%;
  transform: none !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
}

#newListModal .list-modal-scale .modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: clamp(1rem, 1.5vw + 0.75rem, 2rem) !important;
}

#newListModal .modern-modal-header,
#newListModal .modern-modal-footer {
  padding-left: clamp(1rem, 1.5vw + 0.75rem, 2rem) !important;
  padding-right: clamp(1rem, 1.5vw + 0.75rem, 2rem) !important;
}

#newListModal .responsive-toggle {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
}

#newListModal .responsive-toggle .toggle-option {
  min-width: 0;
}

#newListModal .new-list-title-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
}

#newListModal .new-list-title-row > .col-md-7,
#newListModal .new-list-title-row > .col-md-5 {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
}

#newListModal .new-list-title-row > .col-md-7 {
  flex: 1 1 auto;
  min-width: 0;
}

#newListModal .new-list-title-row > .col-md-5 {
  flex: 0 1 clamp(180px, 32vw, 260px);
  min-width: 0;
}

#newListModal .new-list-scroll {
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

#newListModal .new-list-scroll > .list-container {
  min-width: clamp(640px, 80vw, 900px);
  transition: min-width 0.2s ease;
}

#newListModal .list-item-row {
  margin-bottom: 3px;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
}

/* Add 3px margin between character rows in HSK list containers */
.hsk-dynamic-list-container .list-item-row {
  margin-bottom: 3px;
}

/* Add 3px margin between character rows in My Lists containers */
.dynamic-list-container .list-item-row {
  margin-bottom: 3px;
}

/* Add 3px margin between character rows in Chinese Buddy containers */
.cb-dynamic-list-container .list-item-row {
  margin-bottom: 3px;
}

@media (max-width: 576px) {
  #new-list-title-form-group .row {
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.75rem;
  }

  #new-list-title-form-group .col-md-7,
  #new-list-title-form-group .col-md-5 {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
  }

  #new-list-title-form-group .col-md-7 {
    flex: 1 1 auto;
    min-width: 0;
  }

  #new-list-title-form-group .col-md-5 {
    flex: 0 1 200px;
    min-width: 0;
  }

  #newListModal .responsive-toggle {
    gap: 6px;
    padding: 4px;
  }

  #newListModal .responsive-toggle .toggle-option {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  #newListModal .new-list-scroll {
    overflow-x: visible;
  }

  #newListModal .new-list-scroll > .list-container {
    min-width: 100%;
  }

  #newListModal .modern-modal-content {
    border-radius: 0 !important;
  }

  #newListModal .list-item-row,
  #newListModal .phantom-header {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    column-gap: 0.65rem;
    row-gap: 0.45rem;
    align-items: start;
  }

  #newListModal .list-item-row > div,
  #newListModal .phantom-header > div {
    padding: 0;
  }

  #newListModal .list-item-row > div:nth-child(1),
  #newListModal .phantom-header > div:nth-child(1) {
    grid-row: 1 / span 5;
    grid-column: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0;
  }

  #newListModal .list-item-row > div:nth-child(2),
  #newListModal .list-item-row > div:nth-child(3),
  #newListModal .list-item-row > div:nth-child(4),
  #newListModal .list-item-row > div:nth-child(5),
  #newListModal .list-item-row > div:nth-child(6),
  #newListModal .phantom-header > div:nth-child(2),
  #newListModal .phantom-header > div:nth-child(3),
  #newListModal .phantom-header > div:nth-child(4),
  #newListModal .phantom-header > div:nth-child(5),
  #newListModal .phantom-header > div:nth-child(6) {
    grid-column: 2;
    width: 100%;
  }

  #newListModal .list-item-row > div:nth-child(6) {
    display: flex;
    justify-content: flex-end;
  }

  #newListModal .phantom-header {
    padding-bottom: 0.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }
}

@media (max-width: 420px) {
  #newListModal .modern-modal-title {
    font-size: 1.25rem !important;
  }

  #newListModal .modern-modal-subtitle {
    font-size: 0.8rem !important;
  }

  #newListModal .responsive-toggle {
    gap: 4px;
    padding: 3px;
  }

  #newListModal .responsive-toggle .toggle-option {
    padding: 4px 8px;
    font-size: 0.75rem;
  }

  #newListTitle {
    font-size: 0.85rem;
  }

  #newListModal .new-list-scroll > .list-container {
    min-width: 100%;
  }

  #new-dynamic-list-container .list-item-row > [class*="col-sm-"] .form-control,
  #new-dynamic-list-container .list-item-row > [class*="col-sm-"] .btn {
    font-size: 0.75rem;
  }
}

/* Fix toggle button jumping at 767px with high specificity */
@media (max-width: 767px) {
  /* Target the specific containers and prevent any Bootstrap overrides */
  .modal-dialog .modal-body .form-group .row,
  .modal-dialog .modal-content .modal-body .form-group .row,
  .modal-content .modal-body #hsk-list-title-form-group .row,
  .modal-content .modal-body #new-list-title-form-group .row {
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: clamp(0.5rem, 1.6vw, 0.9rem) !important;
  }

  /* Keep the toggle snug against the title without jumping to the far edge */
  .modal-dialog .modal-body .col-md-4.d-none.d-sm-block,
  .modal-content .modal-body .col-md-4.d-none.d-sm-block {
    flex: 0 0 42% !important;
    max-width: 42% !important;
    margin-left: 0 !important;
    display: flex !important;
    justify-content: flex-end;
  }

  /* Allow the title column to retain majority width */
  .modal-dialog .modal-body .col-md-6,
  .modal-content .modal-body .col-md-6 {
    flex: 0 0 58% !important;
    max-width: 58% !important;
    min-width: 0 !important;
  }
}

@media (max-width: 600px) {
  .modal-dialog .wordForm {
    overflow-x: visible !important;
    padding-bottom: clamp(0.5rem, 2vw, 0.75rem) !important;
  }

  .modal-dialog .list-container,
  .modal-dialog .dynamic-list-container,
  .modal-dialog .cb-dynamic-list-container,
  .modal-dialog .hsk-dynamic-list-container {
    min-width: 0 !important;
    width: 100%;
  }

  .modal-dialog .phantom-header {
    display: none !important;
  }

  .modal-dialog .list-item-row {
    min-width: 0 !important;
    flex-wrap: wrap !important;
    gap: clamp(0.5rem, 2vw, 0.75rem) !important;
    padding: clamp(0.75rem, 2.2vw, 1rem) !important;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  }

  .modal-dialog .list-item-row > [class*='col-sm-'] {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .modal-dialog .list-item-row > .col-sm-1 {
    flex: 0 0 auto !important;
    max-width: none !important;
    width: auto !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .modal-dialog .list-item-row > .col-sm-1:nth-last-child(2),
  .modal-dialog .list-item-row > .col-sm-1:nth-last-child(1) {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    justify-content: flex-start;
    margin-top: 0.25rem;
  }

  .modal-dialog .list-item-row .handle {
    order: -1;
  }

  .modal-dialog .list-item-row .frequency {
    min-width: 0 !important;
    width: 100% !important;
  }

  .modal-dialog .list-item-row .form-control {
    font-size: clamp(0.85rem, 2.4vw, 1rem) !important;
    padding: clamp(0.4rem, 1.8vw, 0.6rem) clamp(0.55rem, 2.4vw, 0.75rem) !important;
  }

  .modal-dialog .list-item-row .btn {
    font-size: clamp(0.75rem, 2.1vw, 0.9rem) !important;
    padding: clamp(0.35rem, 1.6vw, 0.5rem) clamp(0.5rem, 2vw, 0.7rem) !important;
  }
}

@media (max-width: 425px) {
  .modal-dialog .list-item-row {
    gap: clamp(0.4rem, 3vw, 0.6rem) !important;
  }

  .modal-dialog .list-item-row > .col-sm-1:nth-last-child(1) {
    justify-content: flex-end;
  }

  .modal-dialog .list-item-row .btn {
    white-space: nowrap !important;
  }
}
@media (max-width: 768px) {
    #quiz-body {
        padding: 1rem 0;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-header {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .quiz-card-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 1.5rem;
    }
    
    .quiz-card-body {
        padding: 1.5rem;
    }
    
    .quiz-nav-tabs {
        padding: 0.25rem;
    }
    
    .quiz-nav-tabs .nav-link {
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
        margin: 0;
    }
    
    .quiz-content-card .dataTables_wrapper {
        padding: 1rem;
    }
}

/* Add margin between list item rows */
.new-list-item-row {
    margin-bottom: 2px;
}

/* Optimize profile picture loading - make it instant and snappy */
.profile-picture-sidebar,
.user-avatar img {
    /* Prevent any loading delay or animation */
    transition: none !important;
    animation: none !important;
    /* Set background color while image loads */
    background-color: #4285f4;
    /* Ensure image renders immediately */
    image-rendering: -webkit-optimize-contrast;
    will-change: auto;
}

/*
=============================================================================
BOOTOAST CUSTOM STYLING - Modern toast notifications
==============================================================================
*/

/* Hide ALL original Bootoast icons (glyphicons, font awesome, etc) */
.bootoast .glyphicon,
.bootoast > .fas,
.bootoast > .far,
.bootoast > .fab,
.bootoast > .fa,
.bootoast > i:first-child {
    display: none !important;
}

.bootoast {
    font-family: 'WorkSans', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif !important;
    border: none !important;
    border-radius: 16px !important;
    padding: 16px 20px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    letter-spacing: 0.01em !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    min-width: 200px !important;
    max-width: 380px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Success toast - fresh green */
.bootoast.alert-success {
    background: rgba(16, 185, 129, 0.95) !important;
    color: white !important;
    border-left: 4px solid #059669 !important;
}

.bootoast.alert-success::before {
    content: '✓' !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    height: 20px !important;
    background: rgba(255, 255, 255, 0.25) !important;
    border-radius: 50% !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    flex-shrink: 0 !important;
    margin-right: 4px !important;
}

/* Danger/Error toast - clean red */
.bootoast.alert-danger {
    background: rgba(239, 68, 68, 0.95) !important;
    color: white !important;
    border-left: 4px solid #dc2626 !important;
}

.bootoast.alert-danger::before {
    content: '✕' !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    height: 20px !important;
    background: rgba(255, 255, 255, 0.25) !important;
    border-radius: 50% !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    flex-shrink: 0 !important;
    margin-right: 4px !important;
}

/* Warning toast */
.bootoast.alert-warning {
    background: rgba(245, 158, 11, 0.95) !important;
    color: white !important;
    border-left: 4px solid #d97706 !important;
}

.bootoast.alert-warning::before {
    content: '!' !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    height: 20px !important;
    background: rgba(255, 255, 255, 0.25) !important;
    border-radius: 50% !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    flex-shrink: 0 !important;
    margin-right: 4px !important;
}

/* Info toast */
.bootoast.alert-info {
    background: rgba(59, 130, 246, 0.95) !important;
    color: white !important;
    border-left: 4px solid #2563eb !important;
}

.bootoast.alert-info::before {
    content: 'i' !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    height: 20px !important;
    background: rgba(255, 255, 255, 0.25) !important;
    border-radius: 50% !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    font-style: italic !important;
    flex-shrink: 0 !important;
    margin-right: 4px !important;
}

/* Hide close button - toast auto-dismisses */
.bootoast .close {
    display: none !important;
}

/* Container positioning */
.bootoast-container {
    z-index: 10000 !important;
}

.bootoast-container.top-center {
    top: 24px !important;
}
