﻿.parent {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(20px);
    min-width: 140px;
    max-width: 200px;
    padding: 12px 16px;
    background: #198754;
    color: #fff;
    text-align: center;
    border-radius: 10px;
    z-index: 1;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    margin: 0 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px; /* đồng bộ */
    line-height: 1.4;
}
.child-box {
    position: absolute;
    background: #6c757d;
    color: #fff;
    border-radius: 8px;
    padding: 12px 16px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: normal;
    word-wrap: break-word;
    max-width: 160px;
    min-width: 100px;
    min-height: 45px;
    font-size: 14px; /* đồng bộ */
    line-height: 1.4;
}
/* Box "own idea" */
.own-idea {
    position: absolute;
    min-width: 120px;
    max-width: 160px;
    padding: 12px 16px;
    background: #ffc107;
    color: #000;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    z-index: 1;
    font-size: 14px; /* đồng bộ */
    line-height: 1.4;
}
.line-svg {
    position: relative;
    top: 0;
    left: 0%;
    width: 500px;
    height: 350px;
    z-index: 0;
}

.diagram {
    left: -50px;
    position: relative;
    display: block;
    width: fit-content;
    height: 100%;
    margin: 0 auto;
}

    .diagram .center {
        margin: 0 80px; /* tăng khoảng cách hai bên */
    }


.audio-player {
    width: 250px; /* thu nhỏ audio */
    max-width: 100%;
}

.icon-btn i {
    font-size: 1.5rem; /* tăng kích thước icon nếu muốn */
}

.icon-btn {
    width: 40px;
    height: 40px;
    font-size: 1.5rem; /* icon lớn */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.3s ease;
}

/* Hover: đổi background và màu icon */
#record.icon-btn:hover {
    background-color: #0d6efd; /* màu primary nền */
    color: #fff; /* màu icon */
}

#stop.icon-btn:hover {
    background-color: #dc3545; /* màu danger nền */
    color: #fff;
}

#submitBtn.icon-btn:hover {
    background-color: #198754; /* màu success nền */
    color: #fff;
}

.wave-canvas {
    max-width: 100%;
    height: auto;
}

@media (max-width: 767.98px) {
    .wave-canvas {
        width: 300px !important; /* gọn lại khi mobile */
    }
    .warning-text {
        transform: scale(0.7); /* thu nhỏ toàn bộ */
    }
}
@media (max-width: 800px) { /* áp dụng cho tablet/mobiles */
    .diagram {
        transform: scale(0.7); /* hoặc 0.6 nếu cần nhỏ hơn */
        transform-origin: top center;
        left: 0%;
    }

    .line-svg {
    
        height: 100%;
        width: 100%;
    }
    line {
        stroke: white;
    }
    .parent {
        margin: 0 !important;
        justify-content: flex-end;
        left: 55% !important;
    }
    #child-1{
        margin-top: 25%;
        left: 30% !important;
    }
    #child-2 {
        top: 35% !important;
        left: -27% !important;
    }
    #child-3 {
        margin-top: -6% !important;
        left: 30% !important;
    }
    #child-4 {
        top: 35% !important;
        left: 90% !important;
    }
}

.language-box {
    border: 2px solid orange; /* viền xanh */
    padding: 5px;
    border-radius: 10px;
    background-color: #f0f8ff; /* nền xanh nhạt */
    max-width: 200px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.container {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

#scroll-timer.fixed {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    background-color: transparent;
    border-radius: 5px;
}

.warning-box p {
    margin: 2px 0; /* thu hẹp khoảng cách giữa 2 dòng */
    line-height: 1.3; /* giảm line-height */
    text-align: center;
}

.warning-text {
    color: #b22222; /* đỏ đậm hơn */
    font-weight: bold; /* in đậm */
    font-size: 1.05rem; /* hơi to hơn */
}

.hint-text {
    color: #333; /* màu chữ bình thường */
    font-style: italic; /* in nghiêng để phân biệt */
    font-size: 0.95rem;
}
.simple-line {
    border: none; /* bỏ style mặc định */
    border-top: 1px solid #000; /* 1 đường line ngang */
    margin: 0; /* không margin */
    padding: 0; /* không padding */
}

.language-box {
    width: auto; /* cho nhỏ gọn lại giống button */
    padding: 6px 12px; /* giảm padding bên trong */
    border: 1px solid darkblue; /* màu viền giống btn-outline-success */
    border-radius: 0.375rem;
    background-color: #fff;
    color: darkblue;
    font-weight: 500;
    text-align: center;
    min-width: 140px;
}

    .language-box:focus {
        border-color: orangered;
        box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
    }

#languageSelect + label {
    margin-top: 6px; /* giảm khoảng cách giữa select và label */
    margin-bottom: 0;
    font-size: 0.9rem;
}

.answer-sample-title{
    color: darkred;
}