/* General Page Style */
body {
    font-family: Arial, sans-serif;
    background-color: #f5f7fa; /* Light blue-gray background */
    color: #333;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Header Styles */
h2 {
    font-size: 1.8em;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}
#website-frame {
    width: 100%; 
    height: 80vh; /* Chiều cao chiếm 70% của cửa sổ trình duyệt */
    border: none;
    overflow: hidden; /* Ẩn thanh cuộn */
    display: block; /* Đảm bảo iframe được hiển thị như một khối */
}
/* Frame for interactive math sites */
#website-frame {
  

    border-radius: 8px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    background-color: white;
    overflow: hidden;
}
#website-list, #display-website-name {
    width: 100%;
   
    display: flex; 
    flex-wrap: wrap; 
    justify-content: center; 
}

#website-list a, #website-list button {
    display: block;
    padding: 8px 12px;
    margin: 5px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s;
    cursor: pointer;
}

#website-list a:hover, #website-list button:hover {
    background-color: #e0e0e0;
}
/* Countdown Timer */
#countdown-timer {
    font-size: 1.5em;
    color: #d32f2f; /* Red for urgency */
    margin-top: 10px;
}

/* Table Styles */
table {
    width: 100%;
   
    margin-top: 20px;
    border-collapse: collapse;
    background-color: white;
    border: 1px solid #ddd;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
}

/* Table Headers */
table th {
    padding: 12px;
    background-color: #f2f2f2;
    color: #333;
    font-weight: bold;
    text-align: center;
    border: 1px solid #ddd;
}

/* Table Rows */
table td {
    padding: 10px;
    text-align: center;
    border: 1px solid #ddd;
}

table tr:nth-child(even) {
    background-color: #f9f9f9;
}

table tr:hover {
    background-color: #e3f2fd; /* Light blue for row hover */
}

/* Summary Row */
table .summary-row {
    font-weight: bold;
    background-color: #f0f4c3; /* Light yellow for summary */
}

/* Correct and Incorrect Answer Buttons */
button {
    
    margin: 10px 5px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
    background-color: #4CAF50;
    color: white;
    border: solid #3fa343;
}

button#correctButton {
    background-color: #4caf50; /* Green */
    color: white;
}

button#correctButton:hover {
    background-color: #388e3c;
}

button#wrongButton {
    background-color: #f44336; /* Red */
    color: white;
}

button#wrongButton:hover {
    background-color: #d32f2f;
}
/* CSS cho nút hiện tại đang xem */
.active-button {
    font-weight: bold;
    background-color: #add8e6; /* Màu nền khác cho nút đang chọn */
}
/* CSS cho nút Học lần đầu */
button[onclick^="websiteFrame.src="]:first-of-type { /* Chọn nút Học lần đầu */
 
  border: none;
  color: white;
  padding: 5px 10px; /* Điều chỉnh padding cho nhỏ hơn */
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 12px; /* Điều chỉnh font size cho nhỏ hơn */
  margin: 4px 2px;
  cursor: pointer;
  border-radius: 5px; /* Bo tròn góc */
}

/* CSS cho nút Học lại */
button[onclick^="websiteFrame.src="]:last-of-type { /* Chọn nút Học lại */
 
  border: none;
  color: white;
  padding: 5px 10px; /* Điều chỉnh padding cho nhỏ hơn */
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 12px; /* Điều chỉnh font size cho nhỏ hơn */
  margin: 4px 2px;
  cursor: pointer;
  border-radius: 5px; /* Bo tròn góc */
}
#search-box {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s, border-color 0.3s;
    margin-bottom: 20px;
}

#search-box:focus {
    border-color: #4caf50;
    box-shadow: 0px 4px 12px rgba(76, 175, 80, 0.4);
    outline: none;
}
#search-results {
    width: 100%;
    max-height: 300px; /* Giới hạn chiều cao để tránh tràn */
    overflow-y: auto; /* Hiển thị thanh cuộn nếu quá dài */
    margin: 0 auto;
    padding: 0;
    
    border-radius: 5px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    z-index: 10; /* Đảm bảo hiển thị phía trên các phần tử khác */
    position: relative;
}

#search-results li {
    padding: 12px 16px;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

#search-results li:last-child {
    border-bottom: none; /* Bỏ đường kẻ cuối cùng */
}

#search-results li:hover {
    background-color: #e8f5e9; /* Xanh nhạt */
    color: #388e3c; /* Xanh đậm */
}
#search-results::-webkit-scrollbar {
    width: 8px;
}

#search-results::-webkit-scrollbar-thumb {
    background-color: #4caf50; /* Màu xanh lá */
    border-radius: 4px;
}

#search-results::-webkit-scrollbar-thumb:hover {
    background-color: #388e3c; /* Xanh đậm hơn khi hover */
}

#search-results::-webkit-scrollbar-track {
    background-color: #f9f9f9; /* Nền thanh cuộn */
}
