@font-face {
  font-family: 'Roboto';
  src: url('/assets/webfonts/Roboto-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Merriweather';
  src: url('/assets/webfonts/Merriweather_24pt-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

#voiceSelect {
    border-radius: 15px;
}

#startSpeechReader {
  position: fixed;       /* Cho nổi lên trên */
  bottom: 50%;          /* Tránh icon-bar */
  right: 20px;           /* Gắn góc phải */
  z-index: 10000000;         /* Trên icon-bar */
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background-color: #f0f0f0;
  color: #333;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s;
}

#startSpeechReader:hover {
  background-color: #ddd;
}

#startReading.playing {
    background-color: #ffcc00; /* Vàng */
    color: #000000;            /* Đen */
    border: none;
}


#bnext {
    transform: translateY(-50%);
    background-color: #ff9900; /* Màu cam nổi bật */
    color: #fff;               /* Chữ trắng dễ đọc */
    padding: 12px 18px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 10px 0 0 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 10;
    margin-left:65%;
}

.btn {
    display: inline-block;
    margin: 10px;
    padding: 10px 18px;
    background-color: #007BFF;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    user-select: none;
    transition: background-color 0.3s;
}

.btn:hover:not(.disabled) {
    background-color: #0056b3;
}

.btn.disabled, 
.btn[aria-disabled="true"] {
    background-color: #cccccc;
    pointer-events: none;
    cursor: default;
    color: #666666;
}

.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    z-index: 1001;
}

.search-container {
display: flex;
gap: 10px; 
}

#chapterPositionInput {
flex: 1; 
width: 100%;
height: 24px;
}

a.title:visited {
color: #007BFF; /* Màu không thay đổi khi đã được click vào */
}

h1  {
text-align: center; /* Căn giữa chữ */
font-size: 20px;
margin-top: 65px;
}

h2  {
text-align: center; /* Căn giữa chữ */
font-size: 16px;
}

.content * {
font-size: inherit !important; /* Hoặc inherit nếu muốn kế thừa từ phần tử cha */
}

.content {
    margin-top: 20px;
    padding: 10px;
    border: 1px solid #ddd;
    background-color: #FDF6E3;
    color: #3C3C3C;
    position: relative;
    font-size: 18px;
    font-family: 'Times New Roman', Times, serif;
    margin-left: 50px;
    margin-right: 50px;
    border-radius: 5px;
}

.content1 * {
    font-size: inherit !important; /* Hoặc inherit nếu muốn kế thừa từ phần tử cha */
}

.content1 {
    margin-top: 20px;
    padding: 10px;
    border: 1px solid #ddd;
    background-color: #FDF6E3;
    color: #3C3C3C;
    position: relative;
    font-size: 18px;
    font-family: 'Times New Roman', Times, serif;
    margin-left: 50px;
    margin-right: 50px;
    border-radius: 5px;
}

.button-container {
display: flex;
justify-content: center; /* Căn giữa */
align-items: center; /* Căn giữa theo chiều dọc */
margin: 0px 0px; /* Khoảng cách trên và dưới */
}

button {
margin: 5px;
padding: 5px 10px; /* Giảm kích thước nút */
}

#settingsPanel {
    display: none; /* Ẩn bảng điều khiển ban đầu */
    position: fixed; /* Đặt bảng điều khiển ở vị trí cố định */
    top: 20px; /* Khoảng cách từ đầu trang */
    right: 20px;
    left:20px;
    border: 1px solid #ddd;
    background-color: white;
    padding: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    z-index: 1001; /* Đảm bảo bảng điều khiển nằm trên tất cả các phần tử khác */
}

#settingsPanel.visible {
    display: block;  /* Hiển thị khi có class 'visible' */
}

.gear-icon {
font-size: 20px; /* Kích thước biểu tượng bánh răng */
cursor: pointer;
}

.content p {
text-align:left;
}
button.toggle-button{
border:none;
font-size:30px;
cursor: pointer;
}

.icon-bar {
    display: flex; /* Sử dụng flexbox để căn chỉnh các biểu tượng */
    justify-content: space-around; /* Căn giữa các biểu tượng */
    align-items: center; /* Căn giữa theo chiều dọc */
    font-size: 24px; /* Kích thước biểu tượng */
    width: 100%; /* Độ rộng đầy đủ */
    padding: 0px; /* Khoảng cách bên trong */
    background-color: #f1f1f1; /* Màu nền cho icon bar */
    border-top: 1px solid #ccc; /* Đường viền trên cùng */
    position: fixed; /* Giữ icon bar cố định */
    bottom: 0; /* Nằm ở đáy màn hình */
    transition: transform 0.3s ease; /* Hiệu ứng chuyển động mượt mà */
    transform: translateY(0); /* Hiển thị khi có class visible */
    z-index: 999; /* Đảm bảo nằm trên các phần tử khác */
}

.icon-bar.hidden {
    transform: translateY(100%);
}

.icon-bar i {
cursor: pointer; /* Hiện con trỏ khi di chuột qua biểu tượng */
transition: color 0.3s; /* Hiệu ứng chuyển màu */
}

.icon-bar i:hover {
color: #007bff; /* Màu khi di chuột qua */
}

/* CSS cho sidebar */
.sidebar {
    position: fixed;
    left: -30%; /* Ẩn ra ngoài */
    top: 0;
    width: 25%;
    height: 100%;
    background: #f1f1f1;
    transition: left 0.3s ease;
    z-index: 1002;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.sidebar.active {
left: 0; /* Hiện sidebar */
}

.chapter-list {
list-style-type: none;
padding: 0;
margin-bottom: 15px;
margin-left: -15px;
}

.chapter-list li {
    margin: -2px 0;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
}

.chapter-list li a {
display: block;
width: 100%;  /* Chiều rộng đầy đủ */
overflow: hidden;  /* Ẩn phần tràn */
text-overflow: ellipsis;  /* Thêm dấu ba chấm */
color: #007bff;  /* Màu chữ tùy chọn */
text-decoration: none;  /* Loại bỏ gạch chân */
padding: 8px;
border-radius: 4px;
transition: background-color 0.3s ease;
}

.chapter-list li a:hover {
text-decoration: underline;
background-color: #f0f0f0;
}

.pagination {
    margin-top: -5px;
    padding-bottom: 40px;
}

.pagination button {
margin: 0 5px;
padding: 10px;
}

.highlighted-chapter {
background-color: #FFD700; /* Màu nền vàng, bạn có thể thay đổi theo ý thích */
color: #000; /* Màu chữ */
}

.highlighted-page {
background-color: #007BFF; /* Màu nền nổi bật */
color: white; /* Màu chữ nổi bật */
border: none; /* Bỏ đường viền nếu cần */
}

.tit {
margin-top: 55px;
}

.hidden {
display: none !important;
}

a.ncv {
background-color: gold;
padding: 7px;
border-radius: 6px;
}

a.ncv:hover {
background-color: greenyellow;
padding: 7px;
border-radius: 6px;
}

.no-scroll {
overflow: hidden;
}

.blurred {
filter: blur(5px); /* Điều chỉnh mức độ làm mờ */
transition: filter 0.3s ease;
}

.search-container {
display: flex;
align-items: center; /* Căn giữa các phần tử theo chiều dọc */
gap: 5px; /* Khoảng cách giữa các phần tử */
}

#scroll-buttons {
position: fixed;
right: 0px;
bottom: 60px;
display: flex;
flex-direction: column;
gap: 8px;
z-index: 9999;
}

#scroll-buttons button {
color: white;
border: none;
padding: 0px;
border-radius: 50%;
font-size: 18px;
cursor: pointer;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
transition: background-color 0.3s;
}


#scroll-buttons button:hover {
background-color: #0056b3;
}

#bgColorOptions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
}

.colorBox {
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    margin: 4px;
    border: 1px solid #ccc;
    cursor: pointer;
}



@media (max-width: 768px) { /* Áp dụng cho màn hình có chiều rộng tối đa 768px */
* {
    text-decoration: none; /* Bỏ gạch chân cho tất cả các phần tử */
}

.content1 * {
    font-size: inherit !important; /* Hoặc inherit nếu muốn kế thừa từ phần tử cha */
}

.content1 {
    margin-top: 20px;
    padding: 10px;
    border: 1px solid #ddd;
    background-color: #FDF6E3;
    color: #3C3C3C;
    position: relative;
    font-size: 18px;
    font-family: 'Times New Roman', Times, serif;
    margin-left: 3px;
    margin-right: 3px;
    border-radius: 5px;
}

.btn {
    display: inline-block;
    margin: 5px;
    padding: 5px 5px;
    background-color: #007BFF;
    color: white;
    text-decoration: none;
    text-align: center;
    border-radius: 5px;
    font-weight: 600;
    user-select: none;
    transition: background-color 0.3s;
}

.sidebar {
    position: fixed;
    left: -620px; /* Ẩn ra ngoài */
    top: 0;
    width: 70%;
    height: 97dvh;
    background: #f1f1f1;
    transition: left 0.3s ease;
    z-index: 1002;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    overflow-x: hidden;
}

.content {
    margin-top: 20px;
    padding: 10px;
    border: 1px solid #ddd;
    background-color: #FDF6E3;
    color: #3C3C3C;
    position: relative;
    font-size: 18px;
    margin-left: 0px;
    margin-right: 0px;
}

a.ncv {
    background-color: gold;
    padding: 2px;
    border-radius: 6px;
}

.pagination {
    left: 1px;
    bottom: 1px;
    width: 100vh;
    padding-top: 5px;
    margin-left: -20px;
    padding-bottom: 20px;
}
.play_audio {
    margin-left: 135px;
}
}