.part {margin: 20px 0;padding: 20px;background-color: #fff;border-left: 5px solid #4CAF50;box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.part h2 {color: #4CAF50;}
.part p {margin: 10px 0;}
.example {background-color: #e9f7e9;padding: 10px;border-radius: 5px;border-left: 5px solid #4CAF50;}
/* Tạo lớp overlay phủ toàn bộ trang */
#quizOverlay {display: none; position: fixed;top: 0;left: 0;width: 100%;height: 100%;background: rgba(0, 0, 0, 0.5);z-index: 1000;}
/* CSS cho khối quiz modal */
#quizContainer {position: fixed;top: 50%;left: 50%;transform: translate(-50%, -50%);z-index: 1001;background: #fff;padding: 30px;width: 90%;max-width: 600px;
    border-radius: 10px;box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);overflow-y: auto; /* nếu nội dung dài */
    max-height: 80%; /* tránh modal vượt quá màn hình */
    display: none; /* ban đầu ẩn đi */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Một số style bổ sung cho nội dung quiz */
#quizContainer h2 {
margin-top: 0;
text-align: center;
color: #4CAF50;
}

.question-block {
margin-bottom: 20px;
}

.question-block p {
margin-bottom: 10px;
font-weight: bold;
}

.question-block label {
cursor: pointer;
margin-right: 10px;
}

/* Modal overlay phủ toàn trang */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5); /* nền mờ */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Hộp modal */
.modal-box {
    background: #fff;
    padding: 20px 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.modal-box h2 {
margin-top: 0;
color: #4CAF50;
}

.modal-box p {
margin: 20px 0;
}

.modal-buttons button {
padding: 10px 20px;
margin: 0 10px;
font-size: 16px;
border: none;
border-radius: 5px;
cursor: pointer;
}

.modal-buttons button:first-child {
background-color: #4CAF50;
color: white;
}

.modal-buttons button:last-child {
background-color: #f44336;
color: white;
}

.submit-btn {
    display: block;
    margin: 20px auto;
    background-color: #4CAF50;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.submit-btn:hover {
background-color: #45a049;
transform: translateY(-2px);
}
#verbInput{
    padding: 8px;
    width: 300px;
    font-size: 16px;
    margin-bottom: 10px;
}
.result {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ccc;
    background-color: #fff;
    width: fit-content;
}
.not-found {
    color: red;
}
.wrap{max-width:99%;}
.player{background:var(--card);border-radius:12px;box-shadow:0 10px 30px rgba(11,18,32,.08);overflow:hidden}
.stage{height:auto;min-height: 450px;background:linear-gradient(180deg,#0a4c85 0%,#fff 100%);padding:5px;display:flex;flex-direction:column;gap:1px}
.slide{flex:1;border-radius:10px;border:1px solid rgba(11,18,32,.04);padding:1x;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:10px;position:relative}
      
.meta{font-size:13px;color:#5b6b7a;margin-bottom:6px}
.controls{display:flex;gap:8px;padding:12px;border-top:1px solid rgba(11,18,32,.03);align-items:center}
.btn{background:#0b1220;color:#fff;border:none;padding:10px 12px;border-radius:8px;cursor:pointer}
.btn.secondary{background:#eef2ff;color:#0b1220}
.row{display:flex;gap:8px;align-items:center}
.progress_1{flex:1;height:8px;background:#e6eef9;border-radius:10px;overflow:hidden}
.bar_1{height:100%;width:0;background:linear-gradient(90deg,#60a5fa,#7c3aed)}
.small{
    font-size:13px;color:#475569;
    font-Family : Roboto, Arial, sans-serif;
    text-Shadow : 1px 1px 2px rgba(0,0,0,0.3)

}
.speaker-label{font-weight:700}
.speed{width:110px}
.footer{padding:12px;font-size:50px;color:#64748b;display:flex;justify-content:space-between;align-items:center}
/* Khung label */
label.small {
    font-size: 14px;
    font-weight: 600;
    margin-right: 6px;
    color: #444;
}
.small_1{
    border:none;
    cursor: pointer;
    font-size:15px;
    border-radius: 5px;
}

/* Select box chung */
select.small {
    appearance: none;            /* bỏ style mặc định */
    -webkit-appearance: none;
    -moz-appearance: none;
    background: #ffffff url("data:image/svg+xml;charset=UTF-8,%3Csvg width='16' height='16' fill='gray' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 10px center;
    background-size: 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 6px 30px 6px 10px; /* chừa chỗ cho icon */
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Hover */
select.small:hover {
border-color: #0077cc;
box-shadow: 0 0 4px rgba(0,119,204,0.4);
}

/* Focus */
select.small:focus {
outline: none;
border-color: #005fa3;
box-shadow: 0 0 6px rgba(0,95,163,0.5);
}

/* Option trong select */
select.small option {
font-size: 14px;
padding: 4px 8px;
}        
#userSpeechResult { font-style: normal; color:#333; }
#recognizedText { color:#0b1220; }
#matchPercent { color:#0b7a12; }
.control-group {
display: flex;
align-items: center;
gap: 8px;
margin: 4px 8px;
}

/* Label canh trái gọn */
.control-group label {
white-space: nowrap;  /* không xuống hàng */
font-weight: 600;
color: #444;
}

/* Input/select chiếm phần còn lại */
.control-group input,
.control-group select {
flex: 1;
}


    .speakerMeta {
    font-size: 14px;
    font-weight: bold;
    color: #666;
    margin-bottom: 4px;
    }

    
    #name_lesson{
        
        color: #0c21db;
        font-family : Roboto, Arial, sans-serif; 
        text-Shadow: 1px 1px 2px rgba(0,0,0,0.3); 
    }
    
    .controls .btn {
        flex: 0 0 50px;    /* tất cả nút rộng 50px */
        height: 50px;      /* cao bằng nhau */
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 18px;   /* biểu tượng vừa vặn */
        border-radius: 8px;
        border: none;
        cursor: pointer;
        transition: all 0.2s ease;
        box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    }

    .controls .btn:hover {
        transform: translateY(-2px);
        opacity: 0.9;
    }

    /* màu sắc */
    .controls .btn {
        background: #0b1220;
        color: #fff;
    }
    .controls .btn.secondary {
        background: #eef2ff;
        color: #0b1220;
        font-size: 30px;
    }

    /* ========== Responsive chỉnh cho điện thoại ========== */
    @media (max-width: 768px) {
        /* Thu gọn khung tổng */
        .wrap {
            width: 100%;
            max-width: 100%;
            padding: 0 6px;
        }

        .stage {
            
            height:auto;
            min-height: 250px;
            padding: 12px;
        }

      
        /* Bubble co giãn rộng hơn, chữ nhỏ hơn */     

        /* Thanh điều khiển xếp hàng dọc khi chật */
        .controls {
        flex-wrap: wrap; 
            gap: 6px;
            justify-content: center;
        }
        #btnPrev{
            max-width: 50px;
        }
        #btnPlay{
            max-width: 50px;
        }
        #btnNext{
            max-width: 50px;
        }
        #btnPause{
            max-width: 50px;
        }
        #btnReplay{
            max-width: 50px;
        }                 
    

        .speed {
            width: 100%;
        }

        /* Phụ đề */
        #subtitleVN {
            font-size: 13px;
            margin-top: 4px;
        }

        /* Footer chữ nhỏ hơn */
        
        
        .control-group {
            flex: 1 1 100%;
        }
    }

@media (max-width: 480px) {            
    
    .controls .btn {
        font-size: 12px;
        padding: 6px;
    }

    .controls label.small,
    .controls select.small {
        font-size: 12px;
    }
    #micMode { width:120px; font-size:12px; }

    #userSpeechResult { font-size:12px; }
}  
.mic {
cursor: pointer;
font-size: 18px;
margin-left: 6px;
}
.mic.listening {
color: red;
animation: blink 1s infinite;
}
.listening-icon {
font-size: 20px;
color: red;
animation: blink 1s infinite;
}
@keyframes blink {
0% { opacity: 1; }
50% { opacity: 0.3; }
100% { opacity: 1; }
}
.status {
    font-size: 14px;
    color: gray;
    margin-left: 10px;
}
.result1 {
    font-size: 16px;
    margin-left: 10px;
}
.blinking {
    animation: blinkingText 1s infinite;
}

@keyframes blinkingText {
    0%   { opacity: 1; }
    50%  { opacity: 0; }
    100% { opacity: 1; }
}
#mark_speak{
    font-size: 16px;
  
    font-family : Roboto, Arial, sans-serif; 
    text-Shadow: 1px 1px 2px rgba(0,0,0,0.3); 
    color: white;
}
.btn-score {
    background: linear-gradient(135deg, #4cafef, #dd04d2);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 8px 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: default; /* không cho click */
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.2s;
    margin-bottom: 10px;
    text-align: center;
    margin-left: 100px;
}
.btn_1 {
    background: linear-gradient(135deg, #2b6185, #a93d70);
    min-width: 50px;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 8px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.2s;
    margin-bottom: 10px;
    text-align: center;
    cursor: pointer;
      
    }
    .bubble-en {
        background: linear-gradient(135deg, #6a11cb, #2575fc);
        color: white;
        font-weight: bold;
        font-size: 18px;
        padding: 6px 14px;
        border-radius: 20px;
        text-align: center;
        margin-top: 8px;
        display: inline-block;
    }
    @keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
    }
    
    /* Container */
    #slide {
        display: flex;
        justify-content: center;   /* căn giữa ngang */
        align-items: center;       /* căn giữa dọc */
        min-height: 350px;         /* tạo chiều cao tối thiểu cho khung */
        text-align: center;  
    }

    /* Mỗi slide */
    .slide-content {
        opacity: 0;
        transform: rotateX(15deg) scale(0.8);
        transform-origin: bottom;
        animation: flyIn 0.8s ease forwards;
        }

        @keyframes fadeInUp {
        0% { opacity: 0; transform: translateY(30px) scale(0.9); }
        100% { opacity: 1; transform: translateY(0) scale(1); }
        }

        @keyframes fadeInLeft {
        0% { opacity: 0; transform: translateX(-50px) scale(0.95); }
        100% { opacity: 1; transform: translateX(0) scale(1); }
        }

        @keyframes fadeInRight {
        0% { opacity: 0; transform: translateX(50px) scale(0.95); }
        100% { opacity: 1; transform: translateX(0) scale(1); }
        }

        @keyframes flyIn {
        0% { opacity: 0; transform: rotateX(15deg) scale(0.8); transform-origin: bottom; }
        100% { opacity: 1; transform: rotateX(0) scale(1); }
        }

        @keyframes zoomIn {
        0% { opacity: 0; transform: scale(0.7); }
        100% { opacity: 1; transform: scale(1); }
        }

        /* Class hiệu ứng */
        .effect-fadeUp   { animation: fadeInUp 0.7s ease forwards; }
        .effect-fadeLeft { animation: fadeInLeft 0.7s ease forwards; }
        .effect-fadeRight{ animation: fadeInRight 0.7s ease forwards; }
        .effect-flyIn    { animation: flyIn 0.8s ease forwards; }
        .effect-zoomIn   { animation: zoomIn 0.6s ease forwards; }