
label {
        display: block;
        border: 1px solid #ddd;
        border-radius: 5px;
        padding: 12px 15px;
        margin: 8px 0;
        cursor: pointer;
        /*transition: all 0.3s ease;*/
        background: white;
    }
      header {
        background-color: #5abe37;
        color: white;
        /*padding: 20px 0;*/
        /*position: fixed;*/
        width: 100%;
        top: 0;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        text-align: center;
    }
.header-wrapper {
            max-width: 950px;
            margin: 0 auto;
            /*padding: 0 20px;*/
            display: flex;
        
        }
        .container {
            display: flex;
            /*max-width: 85%;*/
            margin: 20px auto;
            font-family: Arial, sans-serif;
        }
        .container1 {
            display: flex;
            /*max-width: 85%;*/
            margin: 20px auto;
            font-family: Arial, sans-serif;
        }
        
        .left-column {
            flex: 4;
            padding-right: 20px;
            text-align: center;
        }

        .right-column {
            flex: 6;
            padding-left: 20px;
            text-align: center;
        }

        .school-name {
            border-bottom: 1px solid black;
            display: inline-block;
            padding-bottom: 3px;
            margin: 10px 0;
        }

        .test-title {
            text-transform: uppercase;
            font-weight: bold;
            /*margin-bottom: 10px;*/
        }

        .score-box {
            height: 160px;
            border: 1px solid black;
            padding: 20px;
            width: 300px; /* Tăng kích thước */
            font-size: 20px; /* Tăng cỡ chữ */
            text-align: center;
            margin: 0; /* Bỏ margin top */
        }

        .comment-box {
            border: 1px solid black;
            padding: 20px;
            width: 90%; /* Tăng kích thước */
            font-size: 20px; /* Tăng cỡ chữ */
            text-align: center;
            margin: 0; /* Bỏ margin top */
        }

html, body {
    height: auto;
    overflow: auto;
}
body {
    /*display: flex;*/
    justify-content: center;
    align-items: center;
    /*height: 100vh;*/
    margin: 0;
    background-color: #f8f9fa;
    font-family: Arial, sans-serif;
}

/* Ẩn option đã chọn trong dropdown */
select.smart-select option[data-selected="true"] {
    display: none !important;
}

/* Style cho select khi đã chọn */
select.smart-select:not([data-default]) {
    color: #007bff;
    font-weight: bold;
}
.arithmetic-table {
    width: 100%;
    border-collapse: collapse;
    /*margin: 20px 0;*/
}

.arithmetic-problem {
    padding: 15px;
    border: 1px solid cadetblue;
    /*margin: 35px;*/
    /*margin-left: 35px;*/
    margin-right: 35px;
    /*background: #f9f9f9;*/
}

.calculation-grid {
    display: grid;
    gap: 5px;
    margin-top: 10px;
}

.number-row {
    display: flex;
    gap: 2px;
    justify-content: flex-end;
}

.operator-row {
    /*text-align: right;*/
    padding-right: 10px;
    font-size: 1.3em;
}

.divider {
    border-bottom: 2px solid #000;
    margin: 5px 0;
}
/* Đảm bảo công thức không bị co lại */
.MathJax_SVG, .MathJax_SVG_Display {
    max-width: 100% !important;
    overflow-x: visible !important;
}

/* Tăng kích thước font mặc định */
.MathJax_SVG {
    font-size: 1.1em !important;
}

/* Toast message */
#toast {
  position: fixed;
  top: 32px;
  right: 32px;
  z-index: 999999;
}

.toast {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 2px;
  padding: 20px 0;
  min-width: 400px;
  max-width: 450px;
  border-left: 4px solid;
  box-shadow: 0 5px 8px rgba(0, 0, 0, 0.08);
  transition: all linear 0.3s;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(calc(100% + 32px));
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
  }
}

.toast--dung {
  border-color: #47d864;
}

.toast--dung .toast__icon {
  color: #47d864;
}

.toast--sai {
  border-color: #ff623d;
}

.toast--sai .toast__icon {
  color: #ff623d;
}

.toast__icon {
  font-size: 24px;
}

.toast__icon,
.toast__close {
  padding: 0 16px;
}

.toast__body {
  flex-grow: 1;
}

.toast__title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.toast__msg {
  font-size: 14px;
  color: #888;
  margin-top: 6px;
  line-height: 1.5;
}

.arrow-container {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  font-family: Arial, sans-serif;
}

.arrow-row {
 margin-bottom: 15px;
  margin-top: 15px;    
  display: flex;
  align-items: center;
}

/* Ô vuông chứa số */
.box {
  width: 50px;
  height: 50px;
  /*background-color: lightgray;*/
  border: 2px solid #999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
}

.box1 {
  width: 50px;
  height: 50px;
  /*background-color: lightgray;*/
  border: 2px solid #999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
  margin-left: 10px;
}

.box2 {
  width: 50px;
  height: 50px;
  border: 2px solid #999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
  margin-left: 10px;
  border-radius: 50%; /* Biến thành hình tròn */
}

/* Nhóm giá trị và mũi tên */
.arrow-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 40px;
}

/* Giá trị (ví dụ: -25) */
.value {
  font-size: 18px;
  color: black;
  font-weight: bold;
  /*margin-bottom: 3px;*/
}

/* Mũi tên */
.arrow-right {
  position: relative;
  width: 90px;
  height: 2px;
  background-color: black;
  font-size: 18px;
}

.arrow-right::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: -10px;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 10px solid black;
}
/*input[type="text"] {*/
/*    text-align: center;*/
/*    padding: 3px;*/
/*    border: 1px solid #ccc;*/
/*    border-radius: 3px;*/
/*    font-size: 16px;*/
/*}*/

#container_sapxeptieng {
    /*border: 1px dashed black;*/
    display: flex;
    flex-wrap: wrap;
    /*height: 10em;*/
    gap: 10px;
    margin-bottom: 20px;
}
.container_sapxeptieng1 {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}
/*#container_sapxeptieng1 {*/
    /*border: 1px dashed black;*/
/*    display: flex;*/
/*    flex-wrap: wrap;*/
    /*height: 10em;*/
/*    gap: 10px;*/
/*    margin-bottom: 20px;*/
/*}*/

.category-box.drag-over {
    background-color: #e3f2fd;
    border-color: #2196F3;
}

/*.draggable-word.dragging {*/
/*    opacity: 0.5;*/
/*    transform: scale(0.95);*/
/*}*/

.count-badge {
    font-size: 14px; text-decoration: none;
}
.draggable-word.dragging {
    /*opacity: 0.5;*/
    transform: scale(0.95);
    transition: all 0.2s;
}

.category-box.drag-over {
    background-color: #e3f2fd;
    border-color: #2196F3;
    transition: all 0.3s;
}
.dragging {
    z-index: 1 !important; /* Phải cao hơn mọi phần tử khác */
}
.draggable-word.clone {
    position: fixed;
    pointer-events: none;
    z-index: 1000;
    transform: translate(-50%, -50%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.word {
    background-color: #4CAF50;
    color: white;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: move;
    user-select: none;
    touch-action: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    font-size: 18px;
}
.question.hidden {
  display: none;
}
.hidden {
    display: none;
}
.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  position: sticky;
  top: 0;
  z-index: 1;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-btn {
  padding: 8px 16px;
  border: 1px solid #007bff;
  border-radius: 5px;
  background: #fff;
  color: #007bff;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-btn:hover:not(:disabled) {
  background: #007bff;
  color: #fff;
}

.nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: #6c757d;
}

#questionCounter {
  font-weight: 500;
  color: #495057;
  font-size: 0.9em;
}
/*CSS kéo thả nhóm từ */
.dropped {
    /*background: #c8e6c9 !important;*/
    border-color: #4CAF50 !important;
    cursor: pointer;
    transition: all 0.2s;
}

.dropped:hover {
    /*transform: scale(1.05);*/
    /*box-shadow: 0 2px 6px rgba(0,0,0,0.2);*/
}
.drag-drop-container {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.word-bank {
    width: 97%;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-box {
    position: relative;
    /*width: 250px;*/
    min-height: 150px;
    border: 2px dashed #52b700;
    border-radius: 8px;
    padding: 15px;
    background: #f8f9fa;
}
.draggable-word {
    padding: 8px 15px;
    background: #e3f2fd;
    border: 1px solid #52b700;
    border-radius: 5px;
    cursor: move;
    transition: all 0.2s;
    user-select: none;
    text-align: center; /* Căn giữa nội dung */
    height: 40px; /* Chiều cao cố định */
    min-width: 100px; /* Độ rộng tối thiểu */
    max-width: 100%; /* Ngăn tràn khỏi container */
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box; /* Đảm bảo padding không ảnh hưởng kích thước */
    touch-action: none; /* Ngăn chặn scroll khi kéo trên mobile */
    user-select: none; /* Ngăn chọn text khi kéo */
}
/*.draggable-word {*/
/*    padding: 8px 15px;*/

/*}*/

.draggable-word:hover {
    transform: none; /* Bỏ hiệu ứng di chuyển */
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.category-title {
    font-weight: bold;
    color: #52b700;
    margin-bottom: 10px;
    text-align: center;
}
.category-box > div:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-content: flex-start; /* Căn từ trên xuống */
    overflow-y: auto; /* Thêm thanh cuộn nếu cần */
    height: calc(100% - 40px); /* Trừ phần title */
}
/* CSS mới cho phần kéo thả */
.drag-drop-container {
  display: grid;
  /*grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));*/
  grid-template-columns: repeat(2, 1fr); /* Luôn hiển thị 2 cột */
  gap: 20px;
  margin: 20px 0;
}

.question-image {
  grid-column: 1/-1; /* Ảnh chiếm full width */
  max-width: 60%;
  /*margin: 0 auto 20px;*/
}

.word-bank {
  grid-column: 1/-1; /* Word bank chiếm full width */
  display: flex;
  /*flex-wrap: nowrap;*/
  /*overflow-x: auto;*/
  gap: 10px;
  /*padding: 15px 10px;*/
  /*background: #f8f9fa;*/
  border-radius: 8px;
  /*margin-bottom: 20px;*/
}

.draggable-word {
  flex-shrink: 0; /* Ngăn không bị co lại */
  /* Giữ nguyên các style khác */
}

.category-box {
  min-height: 200px;
  /* Thêm style cho grid item */
}


.match-container {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
}

.match-column {
    width: 40%;
}

.match-item {
    padding: 15px;
    margin: 10px;
    border: 1px solid #ccc;
    cursor: pointer;
    transition: background-color 0.3s;
    position: relative;
    
     /* Thêm các thuộc tính mới cho text không bị chờm ra ngoài ô*/
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    word-break: break-word;
    min-width: 0; /* Quan trọng cho flex container */
}

.match-item.active {
    background-color: #e3f2fd;
}
#q12-container {
    position: relative;
    min-height: 200px;
}

/*.match-item {*/
/*    position: relative;*/
/*    z-index: 2;*/
/*    background: white;*/
/*}*/

.line {
    position: absolute;
    background: #007bff;
    height: 2px;
    transform-origin: left center;
    pointer-events: none;
    z-index: 1;
}
/*.line {*/
/*    transition: all 0.3s;*/
/*    cursor: pointer;*/
/*    z-index: 1;*/
/*}*/

.line:hover {
    background: #ff4444;
    height: 3px;
}
#quiz-container {
    margin: 0 auto;
    width: 60%;
    max-width: 800px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}
#quiz-container, .dropzone, .box, p, button, input, option {
    font-size: 18px; /* Đảm bảo tất cả thành phần chính có kích thước chữ giống nhau */
}

/*Dạng câu hỏi số 8 Bảng đúng/sai*/
.tf-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-family: Arial, sans-serif;
}

.tf-table td {
  padding: 10px;
  border: 1px solid #4caf50;
}

.tf-table tr:nth-child(odd),
.tf-table tr:nth-child(even) {
  background-color: #f9fff9;
}

/* Ô lớn (click được) */
.tf-cell {
  width: 100px;
  /*height: 60px;*/
  text-align: center;
  cursor: pointer;
  user-select: none;
  position: relative;
  background-color: #fcf8e3;
  transition: background-color 0.2s;
}

/* Ô nhỏ Đ/S nằm giữa */
/* Ô chứa Đ/S */
.inner-state {
  width: 32px;
  height: 32px;
  line-height: 32px;
  border-radius: 50%;
  font-weight: bold;
  text-align: center;
  margin: 0 auto;
  border: 1px solid #ccc;           /* viền nhạt cho trạng thái ban đầu */
  background-color: #f9f9f9;        /* màu nền nhạt ban đầu */
  color: transparent;               /* ẩn chữ ban đầu */
  transition: background-color 0.2s, color 0.2s;
}

/* Khi Đúng */
.tf-cell[data-state="true"] .inner-state {
  background-color: #c8e6c9;
  color: #2e7d32;
  border: 1px solid #4caf50;
}

/* Khi Sai */
.tf-cell[data-state="false"] .inner-state {
  background-color: #ffcdd2;
  color: #c62828;
  border: 1px solid #e53935;
}

/* Hover ô lớn */
.tf-cell:hover {
  background-color: #f0f4c3;
}

.tf-cell {
  position: relative;
  width: 100px;
  height: 40px;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  font-weight: bold;
  background-color: lemonchiffon;
  color: #555;
}

.tf-cell[data-state="true"] {
  background-color: #c8e6c9;
  color: #2e7d32;
}

.tf-cell[data-state="false"] {
  background-color: #ffcdd2;
  color: #c62828;
}

.tf-mark {
  display: inline-block;
  width: 28px;
  height: 28px;
  line-height: 28px;
  border-radius: 50%;
  background: white;
  border: 2px solid #ccc;
  vertical-align: middle;
}

.tf-cell[data-state="true"] .tf-mark::after {
  content: "Đ";
}

.tf-cell[data-state="false"] .tf-mark::after {
  content: "S";
}



h2 {
    color: #333;
}

button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background-color: #0056b3;
}

#quiz {
    text-align: left;
}

p {
    margin-bottom: 10px;
}

input[type="text"] {
    border: 1px solid #ccc;
    border-radius: 5px;
    text-align: center;
    padding: 6px 0px;
    margin-bottom: 10px;
}
.container {
    display: flex;
    justify-content: space-between; /* Căn đều khoảng cách */
}

#leftColumn, #rightColumn {
    width: 48%; /* Mỗi cột chiếm gần 50% chiều rộng */
    display: flex;
    flex-direction: column; /* Sắp xếp các phần tử theo cột */
    gap: 10px; /* Khoảng cách giữa các phần tử */
}

.dropzone {
    width: 70%; /* Chiếm gần nửa chiều rộng để tạo hai cột */
    border: 2px dashed #007bff;
    padding: 10px;
    text-align: center;
    border-radius: 5px;
}

.box {
    /*padding: 10px;*/
    /*background: #f0f0f0;*/
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: grab;
    /*margin: 5px 0;*/
}

#result {
    font-weight: bold;
    margin-top: 30px;
}
/* Thêm CSS cho các lựa chọn thơ */
.poem-options label {
    display: block;
    margin: 12px 0;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    /*transition: all 0.2s;*/
}

.poem-options label:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
}

.poem-options input[type="radio"] {
    margin-right: 10px;
    /*transform: scale(1.2);*/
}

.question-image {
    max-width: 100%;    /* Giới hạn chiều rộng tối đa */
    height: auto;       /* Tự động điều chỉnh chiều cao */
    border: 2px solid #eee;
    border-radius: 8px;
    /*margin: 10px 0;*/
    display: block;     /* Đảm bảo hình không bị lệch */
    /*margin-left: auto;*/
    /*margin-right: auto;*/
    transition: transform 0.3s ease-in-out;
}
.question-image:hover {
    transform: scale(1.05);
}


/* Thêm vào CSS */
#quizForm .form-loading {
    position: relative;
    min-height: 200px;
}

#quizForm .form-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-radius: 50%;
    border-top: 4px solid #3498db;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}


footer {
    background-color: #e1e1e1;
    color: #444;
    text-align: center;
    padding: 15px;
    /*position: fixed;*/
    bottom: 0;
    /*width: 100%;*/
}
.radio-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    /*justify-content: center;*/
    padding: 10px;
  }
  
  .radio-item {
    position: relative;
    width: 150px;
    height: 160px; /* Tăng chiều cao để chứa text */
    cursor: pointer;
    border-radius: 12px;
    padding: 4px;
    transition: all 0.3s ease;
  }
  
  .radio-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
  }
  
  .radio-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
  }
  
  /* Hiệu ứng khi chọn */
  .radio-item input:checked ~ .content-container {
    border: 3px solid #2196F3;
    box-shadow: 0 0 15px rgba(33,150,243,0.3);
  }
  
  .content-container {
    height: 100%;
    border: 3px solid transparent;
    border-radius: 8px;
    padding: 4px;
    transition: all 0.2s ease;
  }
  
  .option-text {
    display: block;
    text-align: center;
    padding: 5px 0;
    font-weight: 500;
    color: #333;
  }
  
#timer {
    font-family: 'Arial', sans-serif;
    text-align: center;
    /*margin: 15px 0;*/
    /*padding: 8px 12px;*/
    background: #f0f0f0;
    border-radius: 8px;
    display: inline-block;
    color: #333;
    border: 1px solid #ddd;
}

.clock {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 1.2em;
    font-weight: 500;
}

.digit-box {
    background: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    min-width: 50px;
    text-align: center;
    border: 1px solid #ccc;
}

.colon {
    margin: 0 2px;
}

/* Hiệu ứng khi sắp hết giờ */
#timer.low-time {
    background: #ffe6e6;
    border-color: #ff9999;
    animation: none;
}

#timer.low-time .digit-box {
    background: #ffebeb;
    border-color: #ff9999;
}
.watermark {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        pointer-events: none;
        opacity: 0.2; /* Điều chỉnh độ mờ */
        z-index: 9999;
    }
    
/* Sorting từ ngắn - hàng ngang */
.sorting-word {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
}

.word-item {
    background: #f0f8ff;
    border: 1px dashed #87cefa;
    padding: 10px 10px;
    /*border-radius: 15px;*/
    white-space: nowrap;
    min-width: fit-content;
}

/* Sorting đoạn văn - hàng dọc */
.sorting-paragraph {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.paragraph-item {
    background: azure;
    border: 1px solid lightslategrey;
    padding: 10px;
    border-radius: 8px;
    line-height: 1.4;
}

/* Hiệu ứng chung */
.sort-item {
    transition: transform 0.2s ease;
    cursor: move;
}

.sort-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ghost {
    opacity: 0.6;
    background: #f8f8f8 !important;
}
.submit-btn {
    background: #2196F3;
    color: white;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 25px;
    margin: 20px auto;
    display: block;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: #1976D2;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.para_2 {
    font-size: 19.2px;
}

.clock2-container {
    display: flex;
    margin: 10px 0;
}

.clock2 {
    position: relative;
    width: 200px;
    height: 200px;
    border: 10px solid green;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 70%, #eee);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1), 0 5px 10px rgba(0,0,0,0.2);
    box-sizing: border-box;
}

.clock2-number {
    position: absolute;
    transform: translate(-50%, -50%);
    font-weight: bold;
    font-size: 19px;
    color: #333;
}

.clock2-tick {
    position: absolute;
    width: 2px;
    height: 6px;
    top: 0;
    left: 50%;
    transform-origin: center 90px;
}

.clock2-hour-mark {
    height: 6px;
    background: #000;
}

.clock2-minute-mark {
    background: #999;
}

.clock2-hour-hand {
    position: absolute;
    bottom: 50%;
    left: 49%;
    width: 5px;
    height: 45px;
    background: #2ecc71;
    border-radius: 5px;
    transform-origin: bottom center;
    z-index: 5;
}

.clock2-minute-hand {
    position: absolute;
    bottom: 50%;
    left: 49%;
    width: 5px;
    height: 55px;
    background: #8e44ad;
    border-radius: 5px;
    transform-origin: bottom center;
    z-index: 4;
}

.clock2-center-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #333;
    border: 2px solid #fff;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.clock2-label {
    position: absolute;
    top: calc(30% + 60px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: #333;
    opacity: 0.4;
    font-style: italic;
    z-index: 1;
}


@keyframes dropEffect {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.calculation-grid {
    font-family: 'Courier New', monospace;
}
.blank-select {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 10px;
    margin: 0 5px;
    background-color: #f8f8f8;
    transition: all 0.3s ease;
}

.blank-select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 5px rgba(76,175,80,0.3);
}
.select-blank-wrapper {
    /*white-space: pre-line;*/
    line-height: 1.5;
    margin: 15px 0;
}

.select-group {
    display: inline-block;
    margin: 0 5px;
    position: relative;
}

.blank-select {
    padding: px 3px;
    border-radius: 4px;
    border: 1px solid #ced4da;
    min-width: 50px;
    background-color: white;
    appearance: none;
    height: 40px;
    font-size: 18px;
    color: black;
    margin-right: 8px;
    line-height: 1.7;
}
.blank-select {
    color: gray;
}
.blank-select:valid {
    color: black;
    margin-bottom: 10px;
}
.blank-select option[disabled] {
    display: none;
}
.select-group::after {
    content: "▼";
    position: absolute;
    right: 10px;
    top: 45%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #666;
    font-size: 0.8em;
}
.select-blank-container {
    line-height: 1.6;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin: 10px 0;
}
/*.number-row {*/
/*    white-space: nowrap;*/
/*    margin: 2px 0;*/
/*}*/

.calculation-grid input {
    text-align: center;
    vertical-align: top;
    padding: 2px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.decimal-comma {
    display: inline-block;
    width: 10px;
    text-align: center;
    font-weight: bold;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.6);
}

.close-btn {
  float: right;
  font-size: 24px;
  cursor: pointer;
}
#retry-btn {
  margin-top: 15px;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  background-color: #007bff;
  color: white;
  cursor: pointer;
}
#retry-btn:hover {
  background-color: #0056b3;
}
#retry-btn1 {
  margin-top: 15px;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  background-color: #007bff;
  color: white;
  cursor: pointer;
}
#retry-btn1:hover {
  background-color: #0056b3;
}
.home {
  margin-top: 15px;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  background-color: #007bff;
  color: white;
  cursor: pointer;
  
}
.home:hover {
    background-color: #0056b3;
    transition: all 0.3s ease;
}
#review-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
  }

  /* Hộp nội dung */
  .modal-content1 {
    background: #fff;
    border-radius: 12px;
    padding: 24px 32px;
    width: 320px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    text-align: center;
    font-family: Arial, sans-serif;
  }

  .modal-content1 h2 {
    margin-bottom: 16px;
    font-size: 1.5em;
    color: #333;
  }

  .modal-content1 p {
    margin: 12px 0;
    font-size: 1em;
    color: #555;
    text-align: left;
  }

  .modal-content1 p strong {
    color: #222;
  }

  /* Ô nhận xét */
  .modal-content1 .feedback {
    margin-top: 20px;
    padding: 12px;
    background: #f9f9f9;
    border-left: 4px solid #4CAF50;
    color: #333;
    text-align: left;
    border-radius: 4px;
  }

  /* Nút luyện tập lại */
  .modal-content1 button#retry-btn {
    width: 100%;
    margin-top: 20px;
    padding: 10px 20px;
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s;
  }
  .modal-content1 button#retry-btn:hover {
    background: #43A047;
  }

  /* Link xem lại */
  .modal-content1 #retry-btn1 {
    width: 87%;
    display: inline-block;
    margin-top: 12px;
    font-size: 0.95em;
    text-decoration: none;
    transition: color 0.2s;
  }
  .modal-content1 #retry-btn1:hover {
  }
  @media (max-device-width: 768px) {

  .blank-select {
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid #ced4da;
    min-width: 180px;
    background-color: white;
    appearance: none;
    height: 60px;
    font-size: 1.5rem;
    color: black;
}}
/* Container xếp sao */
.star-container {
  margin: 12px 0;
  text-align: center;
}

/* Mỗi ngôi sao */
.star-container span {
  font-size: 1.6em;
  color: #FFD700;       /* vàng */
  margin: 0 2px;
}
.chart-wrapper {
    width: 250px;
    height: 250px;
}
.pie_chart {
    width: 250px;
    height: 250px;
}
.readonly-answer {
  color: black !important;
  background: white;
  font-weight: bold;
  min-width: 60px;
  height: 2.2em;
  padding: 2px 6px;
  border: 1px solid #ccc;
  pointer-events: none;
}


    .manual-object-container {
      /*text-align: center;*/
      /*margin-top: 100px;*/
      /*margin-bottom: 100px;*/
      font-size: 18px;
    }
    .manual-object-container .blank {
      display: inline-block;
      min-width: 1ch;
      text-align: center;
      vertical-align: baseline;
      cursor: pointer;
      padding: 0 4px;
      white-space: nowrap;
    }
    .manual-object-container .blank.active {
      outline: 2px dashed #f90;
    }
    .options-container {
        display: flex;
        margin-top: 15px;
         gap: 10px; 
        margin-bottom: 15px;
    }
    .options {
      display: flex;
      flex-wrap: wrap;            /* cho phép xuống dòng tự động */
      justify-content: center;    /* căn giữa các nút trên mỗi hàng */
      align-items: center;
      gap: 10px;                  /* khoảng cách giữa các nút */
      padding: 10px;              /* đệm xung quanh */
      background: #e0f7fa;        /* nền nhạt cho thanh chọn */
      border-radius: 6px;
    }
    .option-btn {
      type: button;
      flex: 0 1 auto;
      padding: 8px 14px;
      border: 1px dashed #028090;        /* xanh đậm */
      border-radius: 6px;
      background: #e0f7fa;              /* xanh nhạt nền */
      color: #004d40;                   /* xanh rêu chữ */
      cursor: pointer;
      font-size: 18px;
      line-height: 1.2;
      transition: background 0.2s, color 0.2s, border-color 0.2s;
      white-space: normal;
      gap: 15px; 
    }
    
    .option-btn:hover {
      background: #b2ebf2;              /* xanh nhạt hơn */
      border-color: #02666d;
    }
    
    .option-btn.selected {
      /*background: #b2ebf2;              */
      /*color: #ffffff;*/
      border-color: #014f57;
      border: 1px solid #014f57;
      margin-top: 5px;
    }







/* Responsive cho mobile */
@media (max-device-width: 768px) {
    .question {
        /*font-size: 26px;*/
    }
  .drag-drop-container {
    grid-template-columns: repeat(2, 1fr); /* Luôn hiển thị 2 cột */
  }
  .blank-select {
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid #ced4da;
    min-width: 150px;
    background-color: white;
    appearance: none;
    height: 70px;
    font-size: 2.5rem;
    color: black;
}
  .word-bank {
    padding: 10px 5px;
  }
  
  .draggable-word {
    /*font-size: 14px;*/
    /*padding: 6px 12px;*/
  }
}
@media (max-width: 768px) {
    .sorting-word {
        flex-direction: column;
    }
    
    .word-item {
        width: 100%;
        text-align: center;
    }
}
@media (max-width: 480px) {
    .clock {
        font-size: 1em;
    }
    .digit-box {
        min-width: 40px;
        padding: 3px 8px;
    }
.para_2 {
    font-size: 23px;
}
}

@media only screen  and (max-device-width : 600px) {
#quiz-container {
    width: 100%;
    max-width: 96%;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    
}
#quiz-container, .dropzone, .box, p, button, input, option, label {
    /*font-size: 18px; */
}
.para_2 {
    font-size: 23px;
}
.question-image {
        max-width: 50%; /* Chiếm gần hết chiều rộng màn hình */
        
    }
}
     
 @media only screen  and (min-device-width : 601px) {
    #quiz-container {
    width: 100%;
    max-width: 900px;
    background: white;
    border-radius: unset;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    
}
.question-image {
        max-width: 50%; /* Giảm kích thước tối đa trên desktop */
        max-height: 300px; /* Giới hạn chiều cao */
        margin-bottom: 15px;
    }
}



@media only screen and (max-device-width: 600px) {
    .chart-wrapper {
    margin-top: 50px;
    margin-bottom: 30px;
    width: 350px;
    height: 350px;
}
    .pie_chart {
    margin-top: 20px;
    margin-bottom: 50px;
    width: 350px;
    height: 350px;
}
      .star-container span {
    font-size: 2em;
  }
    #quiz-container {
        /*font-size: 28px;*/
        min-height: 100vh;
    }
    p {
        font-size: 28px;
    }
    #quizForm {
        /*min-height: 65vh;*/
    }
    .question {
        font-size: 28px;
    }
    .question-text {
        /*font-size: 28px;*/
    }
    .nav-btn1 {
    width: 55px;
    height: 55px;
    font-size: 24px;
}
.submit-btn {
    font-size: 28px;
}
input[type="text"] { 
    font-size: 28px;
}
    .question-image {
        width: 90%;         /* Chiếm 80% chiều rộng màn hình */
        height: auto;       /* Tự điều chỉnh chiều cao để giữ tỷ lệ ảnh */
        display: block;     /* Giúp căn giữa nếu dùng margin */
    }
    .modal-content {
        max-width: 50vw;      /* Cho phép modal gần full chiều ngang */
        padding: 25px;
        font-size: 28px;      /* Tăng cỡ chữ trong modal nếu cần */
        border-radius: 10px;
    }
    .modal-content1 {
        width: 450px;
    }
    .modal-content p { 
        font-size: 28px;
    }
    button { 
        font-size: 28px;
    }
    .close-button { 
        font-size: 28px;
    }
    header { 
        font-size: 28px;
    }
    .auth-buttons .dropdown-content {
        min-width: 250px;
        font-size: 25px;
    }
    #retry-btn { 
        font-size: 28px;
        margin-bottom: 20px;
    }
    #retry-btn1 {
        font-size: 28px;
        margin-top: 10px;
    }
    h2 { 
        font-size: 35px;
    }
    /* Toast message */
#toast {
  position: fixed;
  top: 32px;
  right: 32px;
  z-index: 999999;
}

.toast {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 2px;
  padding: 20px 0;
  min-width: 400px;
  max-width: 450px;
  border-left: 4px solid;
  box-shadow: 0 5px 8px rgba(0, 0, 0, 0.08);
  transition: all linear 0.3s;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(calc(100% + 32px));
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
  }
}

.toast--dung {
  border-color: #47d864;
}

.toast--dung .toast__icon {
  color: #47d864;
}

.toast--sai {
  border-color: #ff623d;
}

.toast--sai .toast__icon {
  color: #ff623d;
}

.toast__icon {
  font-size: 30px;
}

.toast__icon,
.toast__close {
  padding: 0 16px;
}

.toast__body {
  flex-grow: 1;
}

.toast__title {
  font-size: 24px;
  font-weight: 600;
  color: #333;
}

.toast__msg {
  font-size: 24px;
  color: #888;
  margin-top: 6px;
  line-height: 1.5;
}

.modal-content1 {
    width: 50% !important;
    padding: 24px 16px;
  }

  .modal-content1 h2 {
    font-size: 28px;
    margin-bottom: 15px;
  }

  .modal-content1 p {
    font-size: 25px;
    text-align: left;
  }

  .modal-content1 p strong {
    font-size: 25px;
  }

  .modal-content1 .feedback {
    font-size: 25px;
    padding: 16px 12px;
  }

  .modal-content1 button#retry-btn {
     font-size: 25px;
  }
  .modal-content1 #retry-btn1 {
      font-size: 25px;
  }
  
  .polyline-chart  {
    width: 750px;
    height: 250px;
  }
  
    .manual-object-container {
      font-size: 28px;
    }
    .option-btn {
        font-size: 28px;
    }
    .name_de {
        font-size: 28px;
    }
    .clock {
        font-size: 28px;
    }
    /* Tăng kích thước chữ chung cho container */
  .arrow-container {
    font-size: 28px !important;
    /* nếu muốn tăng luôn chiều cao: */
    /* height: auto !important; */
  }

  /* Các số trong box (ví dụ “5” hay “+ 45”) */
  .arrow-container .box {
    font-size: 28px !important;
    padding: 15px 15px;          /* tăng padding cho đẹp */
  }
    
  /* Giá trị “x 8” / “+ 45” */
  .arrow-container .value {
    font-size: 26px !important;
  }
.arrow-group {
    height: 55px;
}
  /* Input blanks */
  .arrow-container .blank-input {
    font-size: 24px !important;
    width: 6ch !important;
    padding: 8px 0 !important;
  }


   /* Bảng rộng gần full */
  .arithmetic-table {
    width: 100% !important;
    font-size: 1rem; /* giữ text header ổn định */
  }

  /* Các ô input trong grid */
  .arithmetic-table .calculation-grid .number-row input {
    width: 40px !important;      /* tăng chiều ngang */
    margin: 0 2px !important;
    font-size: 1.2rem !important; /* tăng font cho rõ */
    padding: 6px 0 !important;
  }

  /* Các tiêu đề (a), (b), ... */
  .arithmetic-table .problem-header {
    font-size: 1.7em !important;
    margin-bottom: 4px;
  }

  /* Khoảng cách giữa các problem để không ép nhau */
  .arithmetic-table td {
    padding: 8px 4px !important;
  }
  
  .tf-table-container {
    font-size: 1.1rem;
  }
  .tf-statement {
    padding: 12px 16px;
    font-size: 28px;
  }
  .tf-cell {
    width: 60px !important;
    height: 60px !important;
  }
  .tf-inner {
    /* Giữ dấu ✓/✗ nằm giữa ô to hơn */
  }
  .tf-mark {
    font-size: 1.8rem !important;
  }
  /* Instruction text (“Nhấp chuột vào ô...”) */
  .tf-table-container > i {
    display: block;
    margin-bottom: 8px;
    font-size: 28px;
  }
    .de-code-wrapper {
    font-size: 28px;    /* Tăng size chung */
    padding: 8px 12px;    /* Tăng padding */
  }
  .de-code-label {
    font-size: 28px;
  }
  .de-code-value {
    font-size: 28px;
  }
  .de-code-copy-btn {
    font-size: 28px;
    padding: 4px 8px;
  }
  .option-btn.selected {
  margin-top: 5px;
}
.right-column {
    font-size: 26px;
}
.left-column {
    font-size: 26px;
}
.score-box {
    font-size: 24px;
}
.comment-box {
    font-size: 24px;
}
    .login-warning {
    font-size: 28px;

}
.login-button {
    font-size: 28px;
}
    
}
