/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
		max-width: 1200px;
    margin: auto;
  font-family: Arial, sans-serif;
  background-color: #f5f7fa;
  color: #333;
  line-height: 1.6;
}

/* Header */
h1 {
  text-align: center;
  color: #4a90e2;
  margin: 20px 0;
}
h2 {
  padding: 20px;
}
/* Main Buttons */
button {
  background-color: #4a90e2;
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 5px;
  margin: 10px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #357abd;
}

/* Tab Content */
.tabContent {
  display: none;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin: 20px auto;
      width: 98%;
}

/* Form Elements */
.form label {
  font-weight: bold;
  color: #4a90e2;
  display: block;
  margin: 10px 0 5px;
}

.form input[type="text"],
.form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  margin-bottom: 10px;
  font-size: 16px;
}

.form button {
  width: 48%;
  display: inline-block;
}

#suggestions ul,
#videoSuggestions ul {
  list-style-type: none;
  padding: 0;
}

#suggestions li,
#videoSuggestions li {
  padding: 8px;
  border-bottom: 1px solid #ddd;
  cursor: pointer;
}

#suggestions li:hover,
#videoSuggestions li:hover {
  background-color: #f0f0f0;
}

/* Statistics */
#totalStats {
  background-color: #eef5fc;
  padding: 10px;
  border-radius: 5px;
  text-align: center;
  font-size: 18px;
  margin-bottom: 20px;
}

/* Tables */
table {
  width: 98%;
  border-collapse: collapse;
  margin: 10px;
}

table th,
table td {
  border: 1px solid #ddd;
  padding: 12px;
  text-align: center;
}

table th {
  background-color: #4a90e2;
  color: #fff;
}

table tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* Video Player */
#videoPlayer iframe {
  width: 100%;
  height: auto;
  border-radius: 5px;
  margin: 20px 0;
}
.video-types {
  display: flex;
  gap: 10px; /* Adds space between each radio button */
  align-items: center;
}

.video-types label {
  margin-right: 10px; /* Adds space between radio button and label */
  font-weight: normal;
  color: #333;
}
.form {
  /* Ensures form contents are well-styled */
  margin-bottom: 20px;
}

.form-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.form button {
  width: 48%; /* Adjusts button width for even spacing */
  font-size: 16px;
  padding: 10px;
}
#videoSuggestions,
#suggestions {
  background-color: #ffffff; /* White background for readability */
  border: 1px solid #ddd; /* Light border */
  border-radius: 5px;
  padding: 5px; 
  overflow-y: auto; /* Adds scroll for long lists */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */ 
  position: absolute; /* Allows it to float above other content */ 
  z-index: 100; /* Keeps it above other elements */
}

#videoSuggestions li,
#suggestions li {
    padding: 8px;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    border: 3px solid #1787f3;
    font-weight: bold;
    border-radius: 15px;
	margin: 5px;
}

#videoSuggestions li:hover,
#suggestions li:hover {
  background-color: #f0f4f8; /* Light highlight on hover */
  color: #4a90e2; /* Brighter color on hover */
}
#videoPlayer iframe {
  width: 500px; /* Set desired width */
  height: 581px; /* Maintains 16:9 aspect ratio */
  border-radius: 5px;
  margin-top: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Adds a subtle shadow for a modern look */
}
#videoPlayer {
  display: flex;
  justify-content: center; /* Centers the video horizontally */
  margin-top: 20px; /* Optional: adds space above the video */
}
#latestVideosTable table {
  width: 100%;
  border-collapse: collapse;
}

#latestVideosTable th,
#latestVideosTable td {
	max-width: 490px;
    overflow-x: auto;
    scrollbar-gutter: stable;
  padding: 10px;
  border: 1px solid #ddd;
  text-align: center;
}

#latestVideosTable th {
  background-color: #4a90e2;
  color: #fff;
}

#latestVideosTable td a {
  color: #4a90e2;
  text-decoration: none;
}

#latestVideosTable td a:hover {
  text-decoration: underline;
}
 .old-word {
    color: red;
  }
#dailyWordStatsTable table {
  width: 98%;
  border-collapse: collapse;
  margin: 10px;
}

#dailyWordStatsTable th,
#dailyWordStatsTable td {
  border: 1px solid #ddd;
  padding: 12px;
  text-align: center;
}

#dailyWordStatsTable th {
  background-color: #4a90e2;
  color: #fff;
}
/* Tạo container flashcard */
#wordDetails {
    position: relative;
    width: 90%;
    max-width: 500px;
    margin: 30px auto;
    padding: 20px;
    background: linear-gradient(135deg, #ffffff, #eef5fc);
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    text-align: center;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

/* Hiệu ứng hover cho flashcard */
#wordDetails:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

/* Tiêu đề flashcard */
#wordDetails h3 {
    font-size: 20px;
    color: #4a90e2;
    margin-bottom: 15px;
    font-weight: bold;
}

/* Nội dung từ vựng */
#wordDetails p {
    font-size: 18px;
    color: #333;
    margin: 10px 0;
}

/* Phần hình ảnh */
#wordImageContainer {
    margin-top: 20px;
    text-align: center;
}

#wordImage {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
}

/* Các nút hành động */
.word-actions {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
}

.word-actions button {
    font-size: 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    flex: 1;
    margin: 0 5px;
}

.word-actions button:hover {
    background-color: #45a049;
    transform: scale(1.05);
}

/* Từ vựng lớn hơn, nổi bật */
#selectedWord {
    font-size: 26px;
    color: #ff5733;
    font-weight: bold;
    margin: 10px 0;
}

/* Ghi chú */
#selectedNotes {
    font-size: 16px;
    color: #555;
    font-style: italic;
}

/* Chỉnh nghĩa */
#selectedMeaning {
    font-size: 18px;
    color: #4a90e2;
    margin-top: 10px;
    font-weight: 500;
}

#selectedNotes a {
  color: #4a90e2;
  cursor: pointer;
  text-decoration: underline;
}

#selectedNotes a:hover {
  color: #357abd;
}
#learnWordTabContent {
  padding: 20px;
  background: #f4f7fc;
  border-radius: 12px;
  margin: 20px auto;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  text-align: center; /* Canh giữa nội dung */
}

#randomWordGame p {
  font-size: 20px;
  color: #333;
  margin-bottom: 15px;
}

#wordMeaning {
  font-size: 18px;
  color: #666;
  font-style: italic;
  margin-top: 10px;
}


#randomWordGame {
  margin-top: 15px;
}


#randomWordGame input[type="text"] {
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 5px;
  margin-top: 10px;
}
#userGuess {
  font-size: 20px;
  padding: 12px;
  margin-top: 10px;
  border: 2px solid #ddd;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  transition: border-color 0.3s ease-in-out;
}

#userGuess:focus {
  outline: none;
  border-color: #ff5733; /* Đổi màu viền khi người dùng nhập liệu */
  box-shadow: 0 0 8px rgba(255, 87, 51, 0.5); /* Hiệu ứng ánh sáng */
}

#randomWordGame button {
  font-size: 18px;
  background: #4CAF50; /* Màu xanh lá cho nút */
  color: white;
  border: none;
  padding: 10px 20px;
  margin-top: 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

#randomWordGame button:hover {
  background: #45a049; /* Màu xanh đậm hơn khi hover */
  transform: translateY(-3px); /* Nút di chuyển nhẹ lên khi hover */
}

#gameMessage {
  font-size: 18px;
  margin-top: 20px;
  text-align: center;
  font-weight: bold;
}
#latestVideosTable img {
    width: 50px;
    height: auto;
    cursor: pointer;
}
.scrambled-word {
  font-size: 32px; /* Tăng kích thước chữ */
  letter-spacing: 12px; /* Tạo khoảng cách giữa các ký tự */
  display: inline-block;
  font-weight: bold;
  color: #ff5733; /* Màu sắc nổi bật */
  text-transform: uppercase; /* In hoa */
  padding: 10px 15px;
  background: linear-gradient(135deg, #ff9a9e, #fad0c4);
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease-in-out;
}

.scrambled-word:hover {
  transform: scale(1.1); /* Hiệu ứng phóng to khi hover */
}
.play-button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #4a90e2;
    margin-left: 8px;
}

.play-button:hover {
    color: #357abd;
    transform: scale(1.1);
}
#totalStats {
    display: flex; /* Hiển thị các phần tử con trong dòng */
    flex-wrap: wrap; /* Nếu không đủ không gian, xuống dòng */
    justify-content: space-between; /* Giãn đều các phần tử */
    align-items: center; /* Canh giữa theo chiều dọc */
    gap: 20px; /* Khoảng cách giữa các biểu đồ */
  }

  #totalStats canvas {
    flex: 1; /* Đặt kích thước tương đối để các biểu đồ tự điều chỉnh */
    max-width: 500px; /* Đảm bảo không vượt quá chiều rộng tối đa */
    height: auto; /* Chiều cao tự động theo chiều rộng */
  }
button.export-button {
  display: block; /* Để nút nằm trên một dòng riêng */
  margin: 20px auto; /* Canh giữa nút theo chiều ngang và thêm khoảng cách trên-dưới */
  background: linear-gradient(135deg, #4CAF50, #45a049); /* Gradient màu xanh lá */
  color: white; /* Màu chữ trắng */
  border: none; /* Loại bỏ viền */
  font-size: 20px; /* Tăng kích thước chữ */
  font-weight: bold; /* Chữ đậm */
  padding: 15px 30px; /* Thêm không gian bên trong nút */
  border-radius: 10px; /* Bo góc nút */
  cursor: pointer; /* Thay đổi con trỏ chuột thành hình tay khi hover */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); /* Hiệu ứng bóng nút */
  transition: all 0.3s ease; /* Hiệu ứng chuyển động */
}

button.export-button:hover {
  background: linear-gradient(135deg, #45a049, #3e8e41); /* Gradient khi hover */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); /* Tăng hiệu ứng bóng */
  transform: scale(1.05); /* Phóng to nhẹ khi hover */
}

button.export-button:active {
  transform: scale(0.98); /* Hiệu ứng nhấn */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Giảm bóng khi nhấn */
}

#videoTypeDisplay {
  margin-top: 10px;
  font-style: italic;
  color: #666;
}
/* Style for both rating forms */
#ratingForm, #paragraphRatingForm {
  background-color: #f9f9f9; /* Light background color */
  border: 1px solid #ddd; /* Subtle border */
  border-radius: 8px; /* Rounded corners */
  padding: 20px; /* Add some inner spacing */
  margin-bottom: 20px; /* Space between the form and other elements */
  width: 95%; /* Occupy most of the container width */
  max-width: 500px; /* Limit the maximum width */
}
#ratingForm,
#paragraphRatingForm {
  /* Existing styles */
  margin-left: auto;
  margin-right: auto;
}
#ratingForm h3, #paragraphRatingForm h3 {
  color: #333; /* Darker color for headings */
  margin-bottom: 15px; /* Space below the heading */
}

#ratingForm label, #paragraphRatingForm label {
  display: block; /* Labels on their own line */
  margin-bottom: 8px; /* Space between label and select */
  font-weight: bold; /* Bold labels */
}

#ratingForm select, #paragraphRatingForm select {
  width: 100%; /* Select boxes occupy full width */
  padding: 10px; /* Add some padding */
  border: 1px solid #ddd; /* Light border */
  border-radius: 5px; /* Slightly rounded corners */
  font-size: 16px; /* Readable font size */
  margin-bottom: 15px; /* Space between select boxes */
  appearance: none; /* Remove default dropdown arrow in some browsers */
  background: #fff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23333' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E") no-repeat right 10px center; /* Custom dropdown arrow */
  background-size: 8px 10px; /* Adjust arrow size */
}

#ratingForm button, #paragraphRatingForm button {
  background-color: #4a90e2; /* Blue background color */
  color: #fff; /* White text color */
  border: none; /* No border */
  padding: 10px 20px; /* Inner spacing */
  font-size: 16px; /* Readable font size */
  border-radius: 5px; /* Rounded corners */
  cursor: pointer; /* Indicate clickable */
  transition: background-color 0.3s ease; /* Smooth transition on hover */
}

#ratingForm button:hover, #paragraphRatingForm button:hover {
  background-color: #357abd; /* Darker blue on hover */
}