@charset "UTF-8";


html {
    scroll-behavior: smooth;
}

body {
    font-family: "Darker Grotesque";
    height: 100%;
    font-size: 18px;
    position: absolute;
    left: 6%;
    right: 6%;
    padding-top: 20px;
    padding-bottom: 20px;
    text-align: justify;
}

.container {
    display: flex;
    flex-wrap: wrap;
}

.col2 {
    width: 48%;
    margin: 5px;
}



/* Tạo loader với icon chấm tròn */
.loader {
  display: inline-block;
  width: 80px;
  height: 80px;
  position: relative;
}

.loader::after {
  content: " ";
  display: block;
  width: 64px;
  height: 64px;
  margin: 8px;
  border-radius: 50%;
  border: 6px solid #3498db;
  border-color: #3498db transparent #3498db transparent;
  animation: loader-spin 1.2s linear infinite;
}

/* Hiệu ứng xoay */
@keyframes loader-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}



.camera {
    flex: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background-color: #f0f0f0;
    border: 2px solid #ccc;
    border-radius: 10px;
}

.camera video {
    width: 100%;
    height: auto;
    max-width: 100%;
    transform: scaleX(-1);
}

.camera canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    transform: scaleX(-1);
}


.controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #f0f0f0;
    padding: 25px;
}

.controls h1{
    text-align: center;
}



#question {
    text-align: justify;
}

.box {
    position: relative;
    font-family: courier;
    width: 30%;
    min-height: 50px;
    max-height: 200px;
    margin: 8px;
    padding: 8px;
    text-align: left;
    background-color: white;
    border-radius: 10px;
    border: 1px solid #ccc;
    white-space: pre-wrap;
    overflow: auto;
    cursor: pointer;
}


button {
    border: 1px solid;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    padding: 10px 15px;
}

button:hover {
    transform: translateY(-2px);
}

button :disabled {
    background-color: #cccccc;
    color: #666666;
    cursor: not-allowed;
}

.button-37 {
    background-color: #13aa52;
    width: 150px;
}

.button-38 {
    background-color: red;
    width: 150px;
}

.keyword {
    color: #08a4a7;
    font-size: 18px;
}



.ranking-list {
    height: 350px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    overflow: auto;
}

.ranking-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 10px 15px;
    transition: transform 0.2s;
}

.ranking-list li:hover {
    transform: scale(1.02);
    background-color: #eef6ff;
}

.ranking-list .rank {
    background-color: #007bff;
    color: #fff;
    font-weight: bold;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ranking-list .name {
    font-size: 16px;
    font-weight: bold;
    color: #555;
}

.ranking-list .score {
    font-size: 14px;
    color: #777;
}


.synchronized {
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    width: 100%;
    height: 40px;
    margin-bottom: 6px;
}

textarea {
    font-size: 18px;
    font-family: courier;
    width: 100%;
    height: 138px;
    padding: 10px;
    resize: none;
    outline: none;
    margin-bottom: 6px;
}


span {
    font-size: 14px;
    color: green;
}



@media screen and (max-width: 768px) {

    body {
        left: 6px;
        right: 6px;
    }
    .box {
        width: 100%;
    }

    .col2 {
        width: 100%;
    }

    #answerList {
        min-height: 200px;
    }

}