* {
    box-sizing: border-box;
}

/* CSS chung cho máy tính và điện thoại */
body {
    font-family: Arial, sans-serif;
    background-color: #181818;
    padding: 5px 0px 10px 0px;
}

.main {
    font-family: Arial, sans-serif;
    color: #fff;
    display: flex;
    margin: 0;
    padding: 20px;
    flex-wrap: wrap;
    padding-left: 20vw;
    padding-right: 20vw;
    height: 100vh;
}

#video-container {
    position: relative;
    width: 100%;

    margin: auto;
}

#video-container::before {
    content: "";
    display: block;
    padding-top: 56.25%;
    /* 16:9 = 9/16 = 56.25% */
}

#video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-container {
    position: relative;
    width: 100%;
    height: auto;
    /* max-width: 960px; */
    background-color: #282828;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transition: width 0.3s ease;
    z-index: 10;
}

/* CSS cho video */
video {
    width: 100%;
    height: auto;
}

/* Nút nhấn giống phong cách YouTube */
.control-button {
    width: 100%;
    height: 50px;
    padding: 8px 16px;
    background-color: rgba(255, 0, 0, 1);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.2s;
}

.control-button-none {
    width: 65px;
    padding: 5px;
    height: 30px;
    margin-left: 10px;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.2s;
    border: solid 1px white;
    background-color: transparent;
}

.control-button-active {
    width: 65px;
    padding: 5px;
    height: 30px;
    margin-left: 10px;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.2s;
    background-color: rgba(255, 0, 0, 1);
}

.control-button:focus {
    outline: none;
}

.control-button-pause {
    background-color: yellow !important;
    color: black !important;
}

.control-button:hover {
    background-color: #ff0000;
}

/* CSS cho khung thời gian và textarea */
.log-container {
    background-color: #202020;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.log-entry {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background-color: #282828;
    border-radius: 4px;
    margin-bottom: 8px;
    transition: transform 0.2s;
}


.timestamp {
    font-weight: bold;
    color: #ff4444;
    width: 20%;
    font-size: 1em;
    transition: transform 0.2s;
}

.timestamp:hover {
    transform: scale(1.05);
}

textarea {
    width: 100%;
    height: 50px;
    background-color: #222;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 8px;
    font-size: 14px;
    font-family: Arial, Helvetica, sans-serif;
    resize: vertical;
    min-height: 70px;
    resize: none;
}

textarea:focus {
    border: none;
    outline: none;
}

textarea::placeholder {
    color: #aaa;
}

.textarea-container {
    position: relative;
    display: inline-block;
    width: 100%;
}


.resize-handle {
    position: absolute;
    bottom: 0px;
    right: -7px;
    width: 20px;
    height: 20px;
    background-color: #aaa;
    background-size: 20px 20px;
    border-radius: 50%;
    cursor: ns-resize;
    /* Con trỏ chỉ cho phép kéo dọc */
    z-index: 10;
    touch-action: none;
    /* Cho phép hỗ trợ di chuyển trên màn hình cảm ứng */
}

.delete-button {
    width: 25px;
    height: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: -7px;
    right: -7px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
    z-index: 10;
}

.delete-button:hover {
    background-color: #d32f2f;
}



/* Đáp ứng cho màn hình nhỏ hơn, như điện thoại */
@media (max-width: 768px) {
    .main {
        font-family: Arial, sans-serif;
        color: #fff;
        display: flex;
        align-items: center;
        margin: 0;
        padding: 5px 10px 0px 10px;
        flex-wrap: wrap;
    }

    .p1 {
        width: 100% !important;
        margin-bottom: 10px;
    }

    .p2 {
        width: 100% !important;
    }

    .tieu-de {
        padding: 10px 20px 0px 20px;
        font-weight: bold;
        font-size: 1.2em !important;
    }

    .video-container {
        width: 100%;
    }

    .timestamp {
        font-weight: bold;
        color: #ff4444;
        width: 20%;
        font-size: 0.7em;
    }

    .log-container {
        width: 100%;
    }

    .resize-handle {
        position: absolute;
        bottom: 0px;
        right: -7px;
        width: 25px;
        height: 25px;
        background-color: #aaa;
        background-size: 30px 30px;
        border-radius: 50%;
        cursor: ns-resize;
        /* Con trỏ chỉ cho phép kéo dọc */
        z-index: 10;
        touch-action: none;
        /* Cho phép hỗ trợ di chuyển trên màn hình cảm ứng */
    }


}

@media (min-width: 769px) {
    .p1.p1n {
        width: 100% !important;
    }

    .p2.p2n {
        width: 100% !important;
    }
}

.p1 {
    width: 40%;
}

.p2 {
    width: 60%;
    height: 100%;
}

.feedback-title {
    color: white;
    background-color: #222;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
}

.tieu-de {
    padding: 10px 20px 0px 20px;
    font-weight: bold;
    font-size: 1.6em;
}

.dropdown {
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px;
    margin: 20px 0;
}

.toggle {
    cursor: pointer;
    color: #f44336;
    font-weight: bold;
    font-style: italic;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rotate-90 {
    transform: rotate(90deg);
    transition: transform 0.3s ease-in-out;
    /* Hiệu ứng mượt mà */
}

.content {
    width: 100%;
    overflow: hidden;
    transition: height 0.3s ease;
    /* Chuyển động mượt mà cho chiều cao */
    height: 0;
    /* Đặt chiều cao tự động */
}

.content.hidden {
    height: 0;
    /* Giấu nội dung */
}

.content.visible {
    height: auto;
    /* Hiện nội dung */
}

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    justify-content: center;
    align-items: center;
    transition: background 0.3s ease;
}


/* Khi mở popup */
.popup-overlay.active {
    display: flex;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

/* CSS cho popup */
.popup {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    width: 500px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    position: relative;
    z-index: 1001;
}

.popup-overlay.active .popup {
    opacity: 1;
    transform: translateY(0);
}

/* Ô nhập */
.popup input {
    width: 100%;
    padding: 8px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Nút thêm video */
.popup .control-button {
    background: #c00000;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
}

.button-popup {
    display: flex;
    align-items: center;
    height: 30px;
    width: 25px;
    border: none;
    border-radius: 4px;
    background-color: #a8a8a885;
    color: white;
    margin-left: 5px
}

.popup .control-button:hover {
    background: #c00000;
}

/* Nút đóng */
.popup .close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #333;
}

.popup .close-button:hover {
    color: rgb(102, 102, 102);
}

/* HTML: <div class="loader"></div> */
.loader {
    height: 30px;
    aspect-ratio: 2.5;
    --_g: no-repeat radial-gradient(farthest-side, #c00000 90%, #c00000);
    background: var(--_g), var(--_g), var(--_g), var(--_g);
    background-size: 20% 50%;
    animation: l44 1s infinite linear alternate;
}

@keyframes l44 {

    0%,
    5% {
        background-position: calc(0*100%/3) 50%, calc(1*100%/3) 50%, calc(2*100%/3) 50%, calc(3*100%/3) 50%
    }

    12.5% {
        background-position: calc(0*100%/3) 0, calc(1*100%/3) 50%, calc(2*100%/3) 50%, calc(3*100%/3) 50%
    }

    25% {
        background-position: calc(0*100%/3) 0, calc(1*100%/3) 0, calc(2*100%/3) 50%, calc(3*100%/3) 50%
    }

    37.5% {
        background-position: calc(0*100%/3) 100%, calc(1*100%/3) 0, calc(2*100%/3) 0, calc(3*100%/3) 50%
    }

    50% {
        background-position: calc(0*100%/3) 100%, calc(1*100%/3) 100%, calc(2*100%/3) 0, calc(3*100%/3) 0
    }

    62.5% {
        background-position: calc(0*100%/3) 50%, calc(1*100%/3) 100%, calc(2*100%/3) 100%, calc(3*100%/3) 0
    }

    75% {
        background-position: calc(0*100%/3) 50%, calc(1*100%/3) 50%, calc(2*100%/3) 100%, calc(3*100%/3) 100%
    }

    87.5% {
        background-position: calc(0*100%/3) 50%, calc(1*100%/3) 50%, calc(2*100%/3) 50%, calc(3*100%/3) 100%
    }

    95%,
    100% {
        background-position: calc(0*100%/3) 50%, calc(1*100%/3) 50%, calc(2*100%/3) 50%, calc(3*100%/3) 50%
    }
}

.none {
    display: none;
}

.center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.notification {
    position: fixed;
    top: 20px;
    right: 47%;
    background-color: #4CAF50;
    /* Màu xanh lá */
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-size: 16px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
    z-index: 1002;
}



.feedback-form {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

label {
    font-weight: bold;
}

.time-inputs {
    display: flex;
    gap: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.time-inputs input {
    width: 30%;
    text-align: center;
    font-size: 16px;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.feedback-form textarea,
button {
    width: 100%;
    padding: 8px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.feedback-form textarea {
    resize: none;
    height: 80px;
    background-color: #ffffff;
    color: black;
}

.feedback-form button {
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    transition: 0.3s;
}

.feedback-form button:hover {
    background-color: #45a049;
}