/* --- KIDS MODE PIN MODAL --- */
#pin-modal {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

#pin-container {
    background: #1e1e1e;
    padding: 40px;
    border-radius: 12px;
    border: 2px solid #333;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

#pin-container h2 {
    color: #fff;
    margin-bottom: 30px;
    font-family: 'Oswald', sans-serif;
    letter-spacing: 2px;
}

#pin-display {
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: center;
    justify-content: center;
    margin-bottom: 30px;
}

.pin-dot + .pin-dot {
    margin-left: 15px; /* Thay thế gap bằng margin giữa các dấu chấm */
}

.pin-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #333;
    border: 2px solid #555;
    transition: all 0.2s ease;
}

.pin-dot.active {
    background: #e50914; /* Màu đỏ nổi bật khi đã nhập */
    border-color: #e50914;
    box-shadow: 0 0 10px #e50914;
}

#pin-numpad {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-justify-content: center;
    justify-content: center;
    /* Tổng chiều rộng cho 3 cột: (80px phím + 10px margin trái + 10px margin phải) * 3 */
    width: 300px; 
    margin: 0 auto;
}

/* Tìm và cập nhật .pin-btn [1, 2] */
.pin-btn {
    width: 80px;
    height: 80px;
    background: #2a2a2a;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    /* Sử dụng margin 10px để tạo khoảng cách 20px giữa các phím mà không cần 'gap' */
    margin: 10px; 
    box-sizing: border-box;
}
/* Tái sử dụng logic highlight của Tizen */
.pin-btn.focused {
    border-color: #fff;
    background: #e50914;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.5);
}

/* Ẩn các nút điều hướng không an toàn khi bật Kids Mode */
body.kids-mode-active .nav-group-left button:not(#btnKids),
body.kids-mode-active .nav-group-right {
    display: none !important;
}

/* Đảm bảo tab kids-content hiển thị giống các tab khác khi có class active */
#kids-content {
    display: none;
}
#kids-content.active {
    display: block;
}

/* Ẩn thanh cuộn cho màn hình Discover Builder và Stream Settings */
#builder-fields-container::-webkit-scrollbar,
#stream_settings-fields-container::-webkit-scrollbar,
#list-manager-content::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* (Tùy chọn) Nếu anh muốn ẩn sạch thanh cuộn của TOÀN BỘ ứng dụng luôn thì dùng dòng dưới đây: */
/*
::-webkit-scrollbar {
    display: none;
}
*/
/* Ẩn các nút không dành cho trẻ em khi bật Kids Mode */
body.kids-mode-active #btnMovies,
body.kids-mode-active #btnSeries,
body.kids-mode-active #btnContinue,
body.kids-mode-active #btnListManager,
body.kids-mode-active #btnRelated {
    display: none !important;
}
.last-watched-stream {
    border-left: 4px solid #e50914; /* Viền xanh bên trái đánh dấu */
    background: rgba(0, 230, 118, 0.1);
}
.watched-check {
    color: #e50914;
    margin-right: 5px;
    font-size: 0.9em;
}
