/* Reset cơ bản */
body, h1, h2, p, table {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  color: #333;
  background: #f7f9fc;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}


/* Header */
header {
  text-align: center;
  margin-bottom: 20px;
}

header h1 {
  font-size: 36px;
  font-weight: bold;
  color: #3b82f6;
}

/* Typography for Headings */
h1, h2, h3 {
  font-family: 'Poppins', sans-serif;
  color: #3b82f6;
  margin-bottom: 10px;
  text-align: center;
}

h1 {
  font-size: 36px;
  font-weight: bold;
}

h2 {
  font-size: 30px;
  font-weight: 600;
}

h3 {
  font-size: 24px;
  font-weight: 500;
}


/* Main Layout */
main {
  width: 100%;
  max-width: 1024px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Input File */
input[type="file"] {
  display: none;
}

.fileLabel {
  display: inline-block;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  color: white;
  padding: 10px 20px;
  margin: 10px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.3s, transform 0.2s;
}

.fileLabel:hover {
  background: linear-gradient(90deg, #2563eb, #1e3a8a);
  transform: translateY(-2px);
}

.fileLabel:active {
  background: #1e3a8a;
  transform: translateY(0);
}

/* Video Section */
#videoSection {
  text-align: center;
}

#videoSection video {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

#currentTime {
  margin-top: 10px;
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
}

/* Subtitle Section */
#subtitleSection {
  text-align: center;
}

#subtitleWrapper {
  height: 200px;
  margin-top: 10px;
  margin-bottom: 30px;
  background: #fef9c3;
  border-radius: 8px;
  padding: 10px 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#subtitleArea {
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 20px;
  border-radius: 8px;
  margin: 20px auto;
  font-size: 24px;
  animation: fadeIn 0.5s ease-in-out;
}

#secondarySubtitleArea {
  color: #4a4b4c;
  font-size: 20px;
  margin-top: 8px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* User Input */
#userInput {
  margin-top: 10px;
  padding: 10px;
  width: 95%;
  font-size: 18px;
  border: 2px solid #ddd;
  border-radius: 8px;
  background-color: #ffffff;
  color: #333;
  text-align: center;
  transition: border-color 0.3s ease;
  display: none;
}

#userInput:focus {
  border-color: #3b82f6;
  outline: none;
  box-shadow: 0 0 5px rgba(59, 130, 246, 0.5);
}

/* History Section */
#historySection {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #ccc;
  padding: 10px;
  background-color: #f9f9f9;
  border-radius: 8px;
}

#historyTable {
  width: 100%;
  border-collapse: collapse;
}

#historyTable th, #historyTable td {
  text-align: center;
  padding: 10px;
  border: 1px solid #ddd;
}

#historyTable th {
  background-color: #3b82f6;
  color: white;
}

#historyTable tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

#historyTable tbody tr:hover {
  background-color: #e3f2fd;
  cursor: pointer;
}

/* Subtitle Table */
#subtitleTable {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

#subtitleTable th, #subtitleTable td {
  padding: 12px;
  text-align: center;
  border: 1px solid #ddd;
}

#subtitleTable th {
  background-color: #2563eb;
  color: #fff;
  font-weight: bold;
  position: sticky;
  top: 0;
  z-index: 1;
}

#subtitleTable tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

#subtitleTable tbody tr:hover {
  background-color: #e3f2fd;
}

#subtitleTable tbody td:first-child {
  color: #2563eb;
  cursor: pointer;
}

#subtitleTable tbody td:first-child:hover {
  color: #1e3a8a;
}

/* Buttons */
button {
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

button:hover {
  background: linear-gradient(90deg, #2563eb, #1e3a8a);
  transform: scale(1.05);
}

button:active {
  background: #1e3a8a;
  transform: scale(1);
}

/* Statistics Section */
#statisticsSection {
  text-align: center;
}

#statistics {
  font-size: 16px;
  margin: 10px;
  padding: 10px;
  background: #eef6ff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#statsTable {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

#statsTable th, #statsTable td {
  padding: 10px;
  text-align: center;
  border: 1px solid #ddd;
}

#statsTable th {
  background: #2563eb;
  color: white;
}

/* Spider Chart */
#spiderChart {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
}

/* Responsive */
@media (max-width: 768px) {
  #videoSection video {
    width: 100%;
    height: auto;
  }

  #subtitleArea {
    font-size: 18px;
  }

  button {
    font-size: 12px;
    padding: 8px 16px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ... các CSS khác ... */

body.minimized-mode header, 
body.minimized-mode #statisticsSection, 
body.minimized-mode #historySection, 
body.minimized-mode #learningStatsSection,
body.minimized-mode #currentTime,
body.minimized-mode #spiderChartSection,
body.minimized-mode #weeklyStats,
body.minimized-mode #subtitleTable,
body.minimized-mode #allSubtitlesTab,
body.minimized-mode #gameArea,
body.minimized-mode .tabs,
body.minimized-mode .fileLabel {
  display: none;
}

body.minimized-mode {
 background: linear-gradient(180deg, #000, #9b6b2d);

}


body.minimized-mode {
  background-color: #000; 
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* Canh giữa theo chiều dọc */
  height: 100vh; /* Chiếm toàn bộ chiều cao cửa sổ trình duyệt */
  margin: 0; /* Loại bỏ margin mặc định */
  overflow: hidden; /* Ẩn nội dung tràn ra ngoài */
}


/* Nút loa trong bảng phụ đề */
.play-audio-button {
  border: none;
  background: none;
  cursor: pointer;
  margin-left: 10px;
  color: #3b82f6; /* Màu xanh giống các nút khác */
  font-size: 18px;
  transition: transform 0.2s, color 0.3s;
}

.play-audio-button:hover {
  color: #2563eb; /* Tô đậm màu xanh khi hover */
  transform: scale(1.2); /* Phóng to nhẹ khi hover */
}
/* Tìm kiếm phụ đề */
#subtitleSearch {
  width: 100%;
  max-width: 600px;
  padding: 10px;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  background-color: #ffffff;
  color: #333;
  margin-bottom: 10px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#subtitleSearch:focus {
  border-color: #3b82f6;
  outline: none;
  box-shadow: 0 0 5px rgba(59, 130, 246, 0.5);
}

/* Kết quả tìm kiếm */
#searchResults {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 600px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

#searchResults li {
  padding: 10px;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#searchResults li:hover {
  background-color: #e3f2fd;
}

#searchResults li:last-child {
  border-bottom: none;
}

/* Phụ đề chính và phụ */
.search-primary {
  font-weight: bold;
  color: #333;
}

.search-secondary {
  color: #555;
  font-size: 0.9em;
}

/* Nút loa */
.search-speaker-button {
  background: none;
  border: none;
  color: #3b82f6;
  font-size: 20px;
  cursor: pointer;
  transition: transform 0.2s, color 0.3s;
}

.search-speaker-button:hover {
  color: #2563eb;
  transform: scale(1.2);
}

.search-speaker-button:active {
  color: #1e3a8a;
  transform: scale(1);
}


.play-audio-button:active {
  color: #1e3a8a; /* Màu tối hơn khi nhấn */
  transform: scale(1); /* Quay lại kích thước bình thường */
}

/* Định dạng bảng phụ đề với nút loa */
#allSubtitlesTable {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#allSubtitlesTable th, #allSubtitlesTable td {
  padding: 12px;
  text-align: left;
  border: 1px solid #ddd;
}

#allSubtitlesTable th {
  background-color: #2563eb;
  color: #fff;
  font-weight: bold;
  position: sticky;
  top: 0;
  z-index: 1;
}

#allSubtitlesTable tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

#allSubtitlesTable tbody tr:hover {
  background-color: #e3f2fd;
}
/* Tên File Phụ Đề */
#allSubtitlesTable thead th {
  font-size: 18px;
  font-weight: bold;
  color: #1e40af; /* Màu xanh đậm hơn để nổi bật */
  background-color: #e0f2fe; /* Nền xanh nhạt */
  border-bottom: 2px solid #3b82f6; /* Đường viền nổi bật */
}

/* Hàng Tên File Phụ Đề */
#allSubtitlesTable tbody tr:first-child td {
  font-size: 16px;
  font-weight: bold;
  color: #2563eb; /* Màu xanh đậm */
  background-color: #f0f9ff; /* Nền xanh nhạt */
  text-align: left;
  padding: 10px 15px;
  border: none;
}
/* CSS cho hàng tên file phụ đề */
.file-name-row {
  font-size: 18px; /* Font chữ lớn hơn để nổi bật */ 
  color: #2563eb; /* Màu xanh đậm */
  background-color: #f0f9ff; /* Nền xanh nhạt */
  text-align: left; /* Căn chỉnh trái */
  padding: 10px 15px; /* Thêm khoảng cách trong ô */
  border: none; /* Loại bỏ viền */
  text-align: center;
}
/* Tabs Navigation */
.tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  gap: 10px;
}

.tab-button {
  padding: 10px 20px;
  font-size: 16px;
  font-weight: bold;
  border: 2px solid #2563eb;
  background-color: #fff;
  color: #cad3e5;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}

.tab-button:hover {
  background-color: #2563eb;
  color: #fff;
}

.tab-button.active {
  background-color: #2563eb;
  color: #fff;
  cursor: default;
}

/* Tabs Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}
/* Tiêu đề */


/* Dropdown chọn giọng nói */
#voiceSelect {
  width: 100%;
  max-width: 400px;
  padding: 10px;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  background-color: #ffffff;
  color: #333;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23333' d='M6 8l4 4 4-4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  margin-bottom: 15px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#voiceSelect:focus {
  border-color: #3b82f6;
  outline: none;
  box-shadow: 0 0 5px rgba(59, 130, 246, 0.5);
}

#voiceSelect:hover {
  border-color: #2563eb;
}

#voiceSelect option {
  font-size: 16px;
  color: #333;
  background-color: #fff;
}

/* Nút Test & lưu giọng nói */
button#testVoice {
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

button#testVoice:hover {
  background: linear-gradient(90deg, #2563eb, #1e3a8a);
  transform: translateY(-2px);
}

button#testVoice:active {
  background-color: #1e3a8a;
  transform: translateY(0);
}
.category-select {
  padding: 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-right: 5px;
}

.add-category-button {
  background: none;
  border: none;
  color: #3b82f6;
  font-size: 18px;
  cursor: pointer;
}

.add-category-button:hover {
  color: #2563eb;
}
#categoryLinks {
  margin-bottom: 20px;
}

#categoryList {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#categoryList li {
  background-color: #3b82f6;
  padding: 8px 15px;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#categoryList li:hover {
  background-color: #2563eb;
}

#categoryList li.active {
  background-color: #1e3a8a;
}
#gameArea {

  padding: 20px;
    background: #f4f7fc;
    border-radius: 12px;
    margin: 20px auto;
    width: 90%;
    max-width: 900px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    text-align: center;
	margin-bottom: 100px;
}

#secondarySubtitleDisplay {
	padding: 20px;
  margin-bottom: 20px;
  font-style: italic;
  font-size: 1.2em;
  color: #555;
}

#userInput1 {
  width: 90%;
  padding: 10px;
  margin-bottom: 20px;
  font-size: 1em;
}

button {
  padding: 10px 20px;
  margin: 10px;
  font-size: 1em;
  cursor: pointer;
  border: none;
  border-radius: 5px;
}

#checkButton {
  background-color: #007bff;
  color: white;
}

#checkButton:disabled {
  background-color: #ddd;
  cursor: not-allowed;
}

#gameStats {
  margin-top: 20px;
  font-size: 1.1em;
  font-weight: bold;
}
#playAudioButton {
  background: none;
  border: none;
  color: #3b82f6;
  font-size: 18px;
  cursor: pointer;
  margin-left: 10px;
  transition: transform 0.2s, color 0.3s;
}

#playAudioButton:hover {
  color: #2563eb;
  transform: scale(1.2);
}

#playAudioButton:active {
  color: #1e3a8a;
  transform: scale(1);
}
/* Section lịch sử phiên chơi */
#gameHistory {
  margin-top: 30px;
 
  background-color: #f4f7fb;
  border-radius: 10px;
  
  width: 100%;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Tiêu đề lịch sử phiên chơi */
#gameHistory h2 {
  font-size: 24px;
  font-weight: bold;
  color: #3b82f6;
  text-align: center;
  margin-bottom: 20px;
}

/* Bảng lịch sử phiên chơi */
#gameHistoryTable {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

#gameHistoryTable th, #gameHistoryTable td {
  padding: 12px;
  text-align: center;
  border: 1px solid #ddd;
  font-size: 16px;
}

/* Định dạng tiêu đề cột */
#gameHistoryTable th {
  background-color: #3b82f6;
  color: white;
  font-weight: bold;
}

/* Định dạng hàng bảng */
#gameHistoryTable tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

#gameHistoryTable tbody tr:hover {
  background-color: #e3f2fd;
}

#gameHistoryTable tbody td {
  color: #333;
}

/* Hiệu ứng hover cho các ô bảng */
#gameHistoryTable tbody tr:hover td {
  cursor: pointer;
  background-color: #e3f2fd;
}

/* Responsive cho màn hình nhỏ */
@media (max-width: 768px) {
  #gameHistory {
    padding: 15px;
  }

  #gameHistory h2 {
    font-size: 20px;
  }

  #gameHistoryTable th, #gameHistoryTable td {
    font-size: 14px;
    padding: 8px;
  }
}
.edit-button, 
.delete-button, 
.save-button {
  background: none;
  border: none;
  color: #ccc;
  font-size: 18px;
  cursor: pointer;
}
/* ... (các style khác) */

.subtitle-container {
  display: flex;
  align-items: center;
}

.subtitle-container button {
  margin-right: 5px; /* Điều chỉnh khoảng cách giữa các nút và span */
}

.subtitle-container .primary-subtitle,
.subtitle-container .secondary-subtitle {
  order: 1; /* Đặt span ra sau các nút */
}

.subtitle-container .edit-button,
.subtitle-container .save-button {
  order: 0; /* Đặt nút "Sửa" và "Lưu" ra trước span */
}
#skipButton {

}
/* Thống kê học tập */
#subtitleStatsBody {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

#subtitleStatsBody th, #subtitleStatsBody td {
  padding: 12px;
  text-align: center;
  border: 1px solid #ddd;
}

#subtitleStatsBody th {
  background-color: #2563eb;
  color: #fff;
  font-weight: bold;
}

#subtitleStatsBody tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

#subtitleStatsBody tbody tr:hover {
  background-color: #e3f2fd;
}

#subtitleStatsBody tbody tr:last-child {
  font-weight: bold;
  background-color: #eaf4fe;
}
p#resultMessage {
  color: black;
    font-weight: bold;
    margin: 10px 0px;
    font-size: 30px;
}
