body {
    font-family: "Sour Gummy", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    font-variation-settings:
        "wdth"100;
}

.header {
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    padding: 20px;
    background-color: #008DDA;
    color: white;
    border-bottom: 4px solid #0056b3;
}

.container-custom {
    margin-top: 20px;
    max-width: 1440px;
}

input[type="file"] {
    display: block;
    width: 70%;
    padding: 8px;
    margin-bottom: 10px;
    margin-left: -5px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.file-input,
.btn,
.camera-button {
    background-color: #007bff;
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    height: 45px;
}

.result-images {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.result-image {
    width: 100%;
    height: 250px;
    margin-top: 20px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-weight: bold;
}

.warning-text {
    font-size: 18px;
    color: red;
}

.instruction-image {
    max-width: 100%;
    margin-top: 10px;
}

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-text {
    color: #ffffff;
    font-size: 50px;
}

.loading-gif {
    width: 50px;
    height: 50px;
}

/* Responsive image popup styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 100%;
    max-height: 100vh;
}

.modal-content img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 80vh;
    margin: 10% auto;
    display: block;
}

/* Add Animation */
.modal-content,
#caption {
    -webkit-animation-name: zoom;
    -webkit-animation-duration: 0.6s;
    animation-name: zoom;
    animation-duration: 0.6s;
}

@-webkit-keyframes zoom {
    from {
        -webkit-transform: scale(0)
    }

    to {
        -webkit-transform: scale(1)
    }
}

@keyframes zoom {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

/* The Close Button */
.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #ff0000;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    z-index: 1;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* 100% Image Width on Smaller Screens */
@media only screen and (max-width: 700px) {
    .modal-content img {
        max-height: 60vh;
    }
}

/* CSS cho modal camera */
#cameraStreamModal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
}

#cameraStreamModal .modal-content {
    margin: auto;
    display: block;
    max-width: 100%;
    max-height: 100vh;
}

#cameraStreamModal video {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    margin: 5% auto;
    display: block;
}

#cameraStreamModal button {
    display: block;
    margin: 0 auto;
    padding: 10px 20px;
    background-color: #007bff;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#cameraStreamModal button:hover {
    background-color: #0056b3;
}

#cameraModal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
}

#cameraModal .modal-content {
    margin: auto;
    display: block;
    max-width: 100%;
    max-height: 100vh;
}

#cameraModal video {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    margin: 5% auto;
    display: block;
}

#cameraModal button {
    display: block;
    margin: 0 auto;
    padding: 10px 20px;
    background-color: #007bff;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#cameraModal button:hover {
    background-color: #0056b3;
}


/* CSS cho input "image-upload" */
#image-upload {
    display: inline-block;
    /* Hiển thị input cùng dòng với button */
    margin-top: 5px;
    /* Thêm khoảng cách phía trên */
}


.button-container {
    display: flex;
    /* Sử dụng Flexbox */
    justify-content: center;
    /* Căn giữa theo chiều ngang */
    margin-top: 15px;
    /* Khoảng cách 15px từ phía trên */
}

.button-container button {
    margin: 0 7.5px;
    /* Khoảng cách 7.5px giữa các nút (tổng cộng 15px) */
}

/* Đảm bảo rằng video được hiển thị đúng trong các thiết bị di động */
#userVideo,
#predicted-video {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Thêm viền và góc bo tròn cho video */
#userVideo,
#predicted-video {
    border: 2px solid #ccc;
    border-radius: 10px;
}

/* Thêm khoảng cách giữa video và các phần khác trong container */
.result-container {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

/* Tùy chỉnh kích thước video container trên thiết bị di động */
@media (max-width: 768px) {
    .result-container {
        flex-direction: column;
    }
}

/* Tùy chỉnh các nút và nội dung liên quan đến video */
.button-container {
    text-align: center;
    margin-top: 10px;
}

/* Định dạng nút */
.button-container button {
    background-color: #007BFF;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    cursor: pointer;
    margin-right: 10px;
}

.button-container button:hover {
    background-color: #0056b3;
}

/* Định dạng nút "Dừng Stream" */
#stopStreamButton {
    background-color: #ff4d4d;
}

#stopStreamButton:hover {
    background-color: #e53935;
}