/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  min-height: 100%;
}
body {
  font-family: Arial, sans-serif;
  background-color: #f8f9fa;
  color: #333;
  line-height: 1.6;
  margin-top: 0;
  min-height: 100vh
}

/* App Container */
#app {
  max-width: 600px;
  margin: 0px auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  padding-top: 10px;
}

/* Tabs Navigation */
.tabs {
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 100; /* Ensures it stays above other content */
    background-color: white; /* Matches the background color */
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1); /* Adds a subtle shadow */
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.tabs-content {
  display: flex;
  justify-content: space-around;
  width: 100%;
  /* margin-bottom: 20px; */
}

.tabs .tab-button {
  background-color: #046bd2;
  color: #fff;
  border: none;
  cursor: pointer;
  margin-bottom: 0;
  height: 80px;
  border-radius: 0px;
}

.tab-button.active {
  background-color: #034c91;
}

.tab-content {
  display: none;
  margin-bottom: 80px;
}

.tab-content.active {
  display: block;
}

/* Form Elements */
input,
textarea,
button {
  width: 100%;
  margin-bottom: 5px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

button {
  background-color: #046bd2;
  color: #fff;
  border: none;
  cursor: pointer;
}

button:hover {
  background-color: #034c91;
}

h1 {
  margin-bottom: 10px;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: flex-start;
  z-index: 1000;
  overflow-y: auto;
}

.modal-content {
  background-color: #fff;
  padding: 20px;
  border-radius: 5px;
  max-width: 500px;
  text-align: center;
  width: 100%;
  min-height: 100%;
  position: relative;
}

.modal-content h2 {
  margin-bottom: 20px;
}

.modal-content ul {
  text-align: left;
  margin: 20px 0;
}

.modal-content button {
  padding: 10px 20px;
  /* margin: 10px; */
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.modal-content button:hover {
  background-color: #0056b3;
}

/* Vocabulary List Styles */
#filters {
  margin-bottom: 15px;
}

/* Common styles for action buttons (both vocab and word items) */
.vocab-actions,
.word-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
}

/* Common button styles */
.edit-vocab-btn,
.remove-vocab-btn,
.edit-word-btn,
.delete-word-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
  width: auto !important;
  min-width: auto !important;
}

/* Hover effects */
.edit-vocab-btn:hover,
.remove-vocab-btn:hover,
.edit-word-btn:hover,
.delete-word-btn:hover {
  background: #f0f0f0;
}

/* Button colors */
.edit-vocab-btn,
.edit-word-btn {
  color: #046bd2;
}

.remove-vocab-btn,
.delete-word-btn {
  color: #dc3545;
}

/* Container positioning */
.vocab-item,
.word-item {
  position: relative;
  padding: 15px;
  background: white;
  border-radius: 8px;
  margin-bottom: 10px;
}

/* Remove old styles */
.vocab-content {
  /* Remove padding-right since it's handled by the container */
}

.vocab-item img {
  display: block;
  margin-top: 10px;
}

hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 10px 0;
}

.speak-icon {
  cursor: pointer;
}

/* Fixed Button */
.fixed-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #046bd2;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.fixed-button:hover {
  background-color: #034c91;
}

/* Button Container */
.button-container {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.button-container button {
  padding: 10px 20px;
  font-size: 14px;
  color: white;
  background-color: #046bd2;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.button-container button:hover {
  background-color: #034c91;
}

/* Learning Container */
#learning-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
  position: relative;
}

/* Top Button (Stop Review) */
.top-button {
  position: absolute;
  top: 5px;
  right: 10px;
  padding: 5px 10px !important;
  background-color: #d9534f !important;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  width: auto;
  margin: 0 !important;
  margin-left: 2px !important;
  margin-right: -5px !important;
}

.top-button:hover {
  background-color: #c9302c;
}

/* Progress Bar */
#progress-bar-container {
  width: 100%;
  background-color: #e9ecef;
  border-radius: 5px;
  margin: 20px 0;
  position: relative;
}

#progress-bar {
  height: 20px;
  background-color: #28a745;
  width: 0;
  border-radius: 5px;
  transition: width 0.3s ease;
}

#progress-text {
  position: absolute;
  width: 100%;
  top: 0;
  left: 0;
  line-height: 20px;
  font-size: 14px;
  text-align: center;
}

/* Vocabulary Display */
#vocab-image-container img {
  max-width: 100px;
  margin: 10px auto;
  display: block;
}

#vocab-textt {
  font-size: 20px;
  font-weight: bold;
  margin: 15px 0 10px;
}

#vocab-descriptionn {
  text-align: left;
  white-space: pre-line;
  padding-top: 15px;
  border-top: 1px solid #e9ecef;
  margin-bottom: 20px;
}

/* Answer Options Container - Base Styles */
#answer-options {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  gap: 15px;
}

/* Multiple Choice Grid Layout */
#answer-options.multiple-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Text Input Layout */
#answer-options.text-input,
#answer-options.word-completion {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Answer Button Styles */
.answer-btn {
  width: 100%;
  padding: 12px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  /* font-size: 1rem; */
  transition: all 0.2s ease;
}

.answer-btn:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.answer-btn.selected {
  background-color: #28a745 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Submit Button */
#submit-answer-btn {
  /* margin-top: 20px; */
  padding: 10px 20px;
  background-color: #ffc107;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
}

#submit-answer-btn:hover {
  background-color: #e0a800;
}

/* Voice Selector Container */
#voice-selector-container {
  margin-bottom: 15px;
}

#voice-selector {
  width: auto;
  padding: 5px;
  margin-left: 10px;
}


/* Popup styling */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.popup-content {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  text-align: center;
}

.hidden {
  display: none;
}

.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 20px;
  cursor: pointer;
}
#vocabTextarea {
  overflow: auto;
}


/* -------------------------------------------------------------------------- */
/*                                   Lesson                                   */
/* -------------------------------------------------------------------------- */
/* Lesson Modal Styles */
.modal-lession {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  
}

.modal-lession.show {
  display: flex; /* Make modal visible */
}

.modal-lession .modal-content {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  position: relative;
  max-height: 90%;
  overflow: auto;
}

.modal-content-btn {
  display: flex;
}

/* .modal-content-btn > div {
  width: 50%;
} */

.modal-lession .modal-content h2 {
  margin-bottom: 20px;
}

.modal-lession .modal-content ul {
  text-align: left;
  margin: 20px 0;
  padding-left: 20px;
}

.modal-lession .modal-content ul li {
  margin-bottom: 10px;
}

.modal-lession .modal-content button {
  padding: 10px 20px;
  margin: 10px;
  background-color: #046bd2;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.modal-lession .modal-content button:hover {
  background-color: #034c91;
}

.modal-lession .lesson-top-button:hover {
  color: #000;
}
.modal-lession .lesson-top-button {
  width: 30%;
}

.lesson-item {
  margin: 10px 0;
  padding: 10px;
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 5px;
}

.lesson-item h3 {
  margin-bottom: 5px;
}

.lesson-item p {
  margin-bottom: 10px;
}

.view-lesson-btn {
  background-color: #046bd2;
  color: #fff;
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
}

.view-lesson-btn:hover {
  background-color: #034c91;
}

.hidden {
  display: none;
}

/* -------------------------------------------------------------------------- */
/*                                 Fixed menu                                 */
/* -------------------------------------------------------------------------- */
.fixed-menu {
  position: fixed;
  bottom: 85px;
  right: 20px;
}

/* -------------------------------------------------------------------------- */
/*                                    badge                                   */
/* -------------------------------------------------------------------------- */

/* Badge Style */
.practice-badge {
  /* position: fixed; */
  /* bottom: 60px; */
  /* right: 20px; */

  /* position: absolute;
  bottom: 0;
  right: 0; */
display: none;
  background-color: #ff6347;
  color: white;
  font-size: 24px;
  font-weight: bold;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  animation: shake 1s ease-in-out infinite;
  /* z-index: 1000; */
  opacity: 0.9;
}

/* Rounded button styling */
.fixed-add-button {
  background-color: #046bd2; /* Blue background */
  color: white; /* White text/icon */
  font-size: 24px; /* Size of the icon */
  font-weight: bold; /* Bold icon */
  border-radius: 50%; /* Fully rounded */
  width: 60px; /* Fixed width */
  height: 60px; /* Fixed height */
  display: flex; /* Flexbox for centering */
  align-items: center; /* Center icon vertically */
  justify-content: center; /* Center icon horizontally */
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2); /* Subtle shadow */
  cursor: pointer; /* Pointer cursor on hover */
  opacity: 0.9; /* Slight transparency */
  transition: all 0.3s ease; /* Smooth hover effect */
}

/* Hover effects */
.fixed-add-button:hover {
  opacity: 1; /* Full opacity on hover */
  box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.3); /* More prominent shadow */
}

/* Badge Number Style */
.review-count {
  position: absolute;
  top: -10px;
  right: -10px;
  background-color: #ff4500;
  color: white;
  font-size: 14px;
  font-weight: bold;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
}

/* Shake Animation */
@keyframes shake {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(3deg);
  }
  50% {
    transform: rotate(-3deg);
  }
  75% {
    transform: rotate(3deg);
  }
}

/* Overview Card Styling */
.overview-card {
  width: 350px;
  border-radius: 10px;
  background: linear-gradient(135deg, #4c96d7, #7ab8f5);
  color: white;
  text-align: center;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
  padding: 20px;
  margin: 20px auto;
  margin-top: 0px;
  font-family: Arial, sans-serif;
}

/* Card Header */
.card-header h2 {
  font-size: 1.5rem;
  margin: 0;
}

.card-header .total-vocab {
  font-size: 2.5rem;
  font-weight: bold;
  margin: 10px 0;
}

/* Card Footer */
.card-footer {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 15px;
}

/* Horizontal Word Level Table */
.word-level-table table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.word-level-table th,
.word-level-table td {
  padding: 8px;
  text-align: center;
  font-size: 0.9rem;
  color: #ffffff;
}

.word-level-table th {
  background-color: rgba(255, 255, 255, 0.2);
  font-weight: bold;
}

.word-level-table td {
  background-color: rgba(255, 255, 255, 0.1);
}


/* Button Styling */
.start-learning-btn {
  display: inline-block;
  margin: 20px auto;
  padding: 10px 20px;
  font-size: 1.2rem;
  font-weight: bold;
  color: #fff;
  background: linear-gradient(135deg, #00c853, #64dd17);
  border: none;
  border-radius: 25px;
  cursor: pointer;
  text-align: center;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

/* Hover Effects */
.start-learning-btn:hover {
  background: linear-gradient(135deg, #64dd17, #00c853);
  transform: translateY(-3px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
}

/* Active State */
.start-learning-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Info Icon Styling */
.info-icon {
  /* font-size: 0.8rem; */
  color: #ffffff;
  cursor: pointer;
  /* margin-left: 5px; */
  display: inline-block;
  position: relative;
  display: flex;
}

.info-icon small {
  font-size: 7px;
  position: absolute;
  top: 0;
  right: 5px;
  
}
.info-icon:hover,
.info-icon:focus {
  color: #ffcc00;
}

/* Tooltip Styling */
.tooltip {
  display: none;
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 100;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}

.info-icon:hover .tooltip,
.info-icon:focus .tooltip {
  display: block;
}


/* -------------------------------------------------------------------------- */
/*                                     PWA                                    */
/* -------------------------------------------------------------------------- */
.update-banner {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: #4caf50;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  font-size: 0.9rem;
}

.update-banner button {
  margin-left: 10px;
  background: white;
  color: #4caf50;
  border: none;
  padding: 5px 10px;
  border-radius: 3px;
  cursor: pointer;
  font-weight: bold;
}

.update-banner button:hover {
  background: #d4ffd7;
}


.version-display {
  position: fixed;
  bottom: 5px;
  left: 10px;
  font-size: 0.75rem;
  color: #333;
  font-family: Arial, sans-serif;
}

/* -------------------------------------------------------------------------- */
/*                                   Reload                                   */
/* -------------------------------------------------------------------------- */
#app-version {
  position: fixed;
  bottom: 80px;
  left: 0px;
  font-size: 0.75rem;
  color: #333;
  font-family: Arial, sans-serif;
}
/* Reload Button Styling */
.reload-btn {
  position: fixed;
  width: 30px;
  height: 30px;
  bottom: 95px;
  left: 5px;
  font-size: 2em; /* Smaller font size */
  color: #fff;
  border: none;
  font-family: Arial, sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: unset;
  opacity: 0.8;
}

/* Icon Styling */
.reload-btn i {
  margin-right: 5px;
}


/* Learning Levels Info */
#level-info__section {
  margin-top: 20px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #f9f9f9;
  font-size: 16px;
}

#level-info__section h3 {
  display: flex;
  align-items: center;
  font-size: 18px;
}

.level-info__icon {
  margin-left: 8px;
  cursor: pointer;
  font-size: 18px;
  color: #007bff;
}

/* Modal Styles */
.level-info__modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  width: 90%; /* Ensure it fits within mobile screens */
  max-width: 500px; /* Set a maximum width for larger screens */
  max-height: 80%; /* Prevent overflow on shorter screens */
  overflow-y: auto; /* Enable scrolling if content exceeds modal height */
}

.level-info__modal-content {
  text-align: left;
}

.level-info__modal h2 {
  margin-bottom: 10px;
}

.level-info__modal ul {
  list-style: disc;
  padding-left: 20px;
}

.level-info__modal button {
  margin-top: 20px;
  padding: 8px 12px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.level-info__modal button:hover {
  background-color: #0056b3;
}

/* Close Button Styling */
.level-info__close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #ff4d4f !important; /* Red background */
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0; /* Center the 'X' inside the button */
}

.level-info__close-button:hover {
  background-color: #d9363e; /* Darker red on hover */
}
/* Add a backdrop for better visibility */
.level-info__modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 999;
}

/* Remember Level Selector */
.remember-level-container {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background-color: #f8f9fa;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.remember-level-title {
  font-size: 0.85rem;
  color: #495057;
  font-weight: 500;
  margin-bottom: 8px;
  text-align: center;
}

.remember-level-options {
  display: flex;
  gap: 6px;
  justify-content: stretch;
  width: 100%;
}

.level-btn-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.remember-level-btn {
  width: 100%;
  padding: 4px 8px !important;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  color: white;
  transition: all 0.2s ease;
  transform: scaleY(0.9);
}

.level-info-icon {
  position: absolute;
  top: -8px;
  right: -4px;
  font-size: 12px;
  cursor: pointer;
  opacity: 0.7;
  padding: 4px;
  transition: opacity 0.2s ease;
}

.level-info-icon:hover {
  opacity: 1;
}

.level-label {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 1;
}

.level-label.active {
  opacity: 1;
  visibility: visible;
}

.remember-level-btn:hover {
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.remember-level-btn.selected {
  transform: translateY(-1px) scale(1.15);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  z-index: 1;
}

/* Level Colors with Gradients */
.remember-level-1 {
  background: linear-gradient(145deg, #ff4d4d, #ff3333);
}

.remember-level-2 {
  background: linear-gradient(145deg, #ff9933, #ff8000);
}

.remember-level-3 {
  background: linear-gradient(145deg, #ffcc00, #ffbb00);
  color: #000;
}

.remember-level-4 {
  background: linear-gradient(145deg, #99cc33, #88bb22);
}

.remember-level-5 {
  background: linear-gradient(145deg, #2eb82e, #229922);
}

/* Active state */
.remember-level-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* Show label on both hover and info icon click */
.level-btn-wrapper:hover .level-label,
.level-label.active {
  opacity: 1;
  visibility: visible;
}

/* Search and Filter Controls */
.vocab-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: center;
}

.search-container {
  position: relative;
  flex: 1;
}

.search-input {
  width: 100%;
  padding: 8px 35px 8px 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.search-input:focus {
  border-color: #046bd2;
  outline: none;
}

.search-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  pointer-events: none;
}

/* Pagination Controls */
.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 20px;
  padding: 10px 0;
}

.pagination-btn {
  background-color: #046bd2;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
}

.pagination-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

#page-info {
  color: #666;
  font-size: 0.9rem;
  white-space: nowrap;
  display: inline-block;
}

/* Settings Styles */
.settings-section {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.settings-section h2 {
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

.setting-item {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.setting-item label {
  min-width: 120px;
  font-weight: 500;
}

.setting-item select {
  flex: 1;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
}

.setting-item select:focus {
  border-color: #046bd2;
  outline: none;
}

.speech-rate-control {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.speech-rate-control input[type="range"] {
  flex: 1;
  height: 4px;
  background: #ddd;
  border-radius: 2px;
  appearance: none;
  -webkit-appearance: none;
}

.speech-rate-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: #046bd2;
  border-radius: 50%;
  cursor: pointer;
}

.speech-rate-control input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #046bd2;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

#speech-rate-value {
  min-width: 45px;
  color: #666;
  font-size: 0.9rem;
}

.storage-info {
  margin: 20px 0;
  padding: 15px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.storage-bar {
  width: 100%;
  height: 20px;
  background: #eee;
  border-radius: 10px;
  overflow: hidden;
  margin: 10px 0;
}

.storage-progress {
  height: 100%;
  background: #046bd2;
  width: 0%;
  transition: width 0.3s ease;
}

#storage-text {
  font-size: 0.9rem;
  color: #666;
  text-align: right;
}

.edit-vocab-modal {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.edit-vocab-modal.closing {
  opacity: 0;
}

.edit-vocab-modal .modal-content {
  position: relative;
  background: white;
  margin: 20px auto;
  padding: 20px;
  width: 90%;
  max-width: 500px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.edit-vocab-modal form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.edit-vocab-modal input,
.edit-vocab-modal textarea {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

.edit-vocab-modal textarea {
  min-height: 100px;
  resize: vertical;
}

.modal-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 15px;
}

.save-btn {
  background: #046bd2;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
}

.cancel-btn {
  background: #f44336;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
}

.vocab-actions {
  display: flex;
  gap: 2px;
  margin-top: 0px;
  margin-right: -25px;
  opacity: 0.9;
  flex-direction: column;
}

.edit-vocab-btn {
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

.edit-vocab-btn:hover {
  background: #e0e0e0;
}

/* Update the lesson styles */
.lesson-category {
  margin: 20px 0;
  padding: 15px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.lesson-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: linear-gradient(135deg, #4c96d7, #7ab8f5);
  color: white;
  border-radius: 6px;
  cursor: pointer;
}

.lesson-category-header h2 {
  margin: 0;
  font-size: 1.3rem;
}

.lesson-category-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  padding: 15px 0;
}

.sub-lesson-card {
  position: relative;  /* Add this to make absolute positioning work */
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 15px;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.sub-lesson-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.sub-lesson-card h3 {
  margin: 0 0 10px 0;
  color: #046bd2;
}

.sub-lesson-card p {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
}

.lesson-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.8rem;
  color: #888;
}

/* Vocabulary list in sub-lesson details */
.vocab-list {
  margin-top: 15px;
}

.vocab-item {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 10px;
}

.vocab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.vocab-header-left {
  display: flex;
  gap: 10px;
  align-items: center;
}

.add-vocab-btn {
  background: #046bd2;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  width: auto;
  transition: all 0.2s ease;
}

.add-vocab-btn:hover {
  background: #034c91;
}

.add-vocab-btn.added {
  background: #28a745;
  cursor: default;
}

.plus-icon {
  font-size: 1.2rem;
  font-weight: bold;
  line-height: 1;
}

.vocab-text {
  font-weight: 500;
  cursor: pointer;
}

.vocab-translation {
  color: #666;
  font-size: 0.9rem;
}

.vocab-description {
  font-size: 0.9rem;
  color: #444;
  white-space: pre-line;
}

/* Back button and title container */
.lesson-header {
  /* display: flex; */
  /* align-items: center; */
  /* gap: 15px; */
  margin-bottom: 20px;
}

/* Back button */
.back-button {
  background: linear-gradient(135deg, #4c96d7, #7ab8f5);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  min-width: 120px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(4, 107, 210, 0.2);
  margin: 0;
}

.back-button:hover {
  background: linear-gradient(135deg, #3a7ab8, #6aa5e4);
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(4, 107, 210, 0.3);
}

.back-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(4, 107, 210, 0.2);
}

/* Update title styles */
.lesson-header h1 {
  margin: 0;
  flex: 1;
}

.lesson-controls {
  margin: 1rem 0;
  display: flex;
  justify-content: flex-end;
}

.show-learned-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #666;
  font-size: 0.9rem;
  width: 100%;
}
.show-learned-toggle > input[type="checkbox"] {
  width: auto;
}

.lesson-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.lesson-checkbox {
  position: absolute;
  top: 0px;
  right: 0px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #666;
  background: rgba(255, 255, 255, 0.9);
  padding: 4px 8px;
  border-radius: 4px;
}

.sub-lesson-card.learned {
  opacity: 0.7;
  background-color: #f8f9fa;
}

.mark-learned-checkbox {
  cursor: pointer;
}

.lesson-detail-header {
  position: relative;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 20px;
}

.lesson-detail-header p {
  margin: 0;
  padding-right: 40px; /* Make room for checkbox */
}

.lesson-detail-header .lesson-checkbox {
  top: 10px;
  right: 10px;
}

.lesson-detail-checkbox {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding: 8px 12px;
  background: white;
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.lesson-detail-checkbox span {
  font-size: 0.9rem;
  font-weight: 500;
  color: #333;
}

.lesson-checkbox-hint {
  font-size: 0.75rem;
  color: #666;
  font-style: italic;
}

.lesson-detail-checkbox input[type="checkbox"] {
  margin-right: 8px;
}

/* Lesson card checkbox (in grid view) */
.lesson-checkbox {
  position: absolute;
  top: 0px;
  right: 0px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #666;
  background: rgba(255, 255, 255, 0.9);
  padding: 4px 8px;
  border-radius: 4px;
}

/* Lesson detail completion status */
.detail-completion-status {
  margin: 20px 0;
  width: 100%;
}

.detail-completion-status label {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 12px 16px;
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Container for checkbox and main text */
.detail-completion-status label > div:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-completion-status span {
  font-size: 0.9rem;
  font-weight: 500;
  color: #333;
}

.completion-hint {
  font-size: 0.75rem;
  color: #666;
  font-style: italic;
  margin-top: 4px;
  margin-left: 24px;
}

.detail-completion-status input[type="checkbox"] {
  margin: 0;
  width: auto;
}

/* Add these styles */
.settings-btn {
  background-color: #6c757d !important;
  padding: 5px 10px !important;
  z-index: 1001;
}

.learning-settings-container {
  position: absolute;
  top: 40px;
  right: 10px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 1000;
}

.answer-mode-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 200px;
}

.answer-mode-toggle .mode-btn {
  text-align: left;
  padding: 12px 16px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  color: #212529;
  border-radius: 6px;
  transition: all 0.2s;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.answer-mode-toggle .mode-btn:hover {
  background: #e9ecef;
  transform: translateX(2px);
}

.answer-mode-toggle .mode-btn.active {
  background: #0d6efd;
  color: white;
  border-color: #0d6efd;
}

/* Update hint text styles */
.hint-text {
  font-size: 0.8rem;
  color: #6c757d;
  margin-top: 8px;
  font-style: italic;
  text-align: center;
  padding: 0 4px;
}

/* Update text input styles */
.text-input-container {
  position: relative;
  margin: 20px auto;
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.answer-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  background: #f8f9fa;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.answer-input:focus {
  outline: none;
  border-color: #046bd2;
  background: #fff;
  box-shadow: 0 4px 8px rgba(4,107,210,0.1);
}

.answer-input::placeholder {
  color: #adb5bd;
  font-size: 1rem;
}

/* Style for completion mode */
.completion-container {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

/* Add animation for focus state */
@keyframes input-focus {
  0% { box-shadow: 0 2px 4px rgba(4,107,210,0.1); }
  100% { box-shadow: 0 4px 8px rgba(4,107,210,0.15); }
}

.answer-input:focus {
  animation: input-focus 0.3s ease forwards;
}

/* Word Completion Comparison Styles */
.comparison-box {
  margin-bottom: 15px;
  min-height: 45px;
  font-family: monospace;
  font-size: 1.8rem;
  letter-spacing: 4px;
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 8px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.comparison-box .char {
  width: 32px;
  height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-weight: 500;
  text-transform: lowercase;
}

/* Update the colors to be more vibrant */
.comparison-box .char.correct {
  background-color: #d4edda;
  color: #0a5c1d;
  border: 1px solid #c3e6cb;
}

.comparison-box .char.wrong {
  background-color: #ffe3e3;
  color: #e12d39;
  border: 1px solid #ffa4a4;
}

.comparison-box .char.masked {
  background-color: #e9ecef;
  color: #495057;
  border: 1px solid #dee2e6;
}

/* Make input match comparison box style */
.completion-container .answer-input {
  font-family: monospace;
  font-size: 1.4rem;
  letter-spacing: 2px;
  text-align: center;
  padding: 12px 16px;
}

/* Update translation comparison styles */
.text-input-container .comparison-box {
  margin-bottom: 15px;
  min-height: 45px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1.4rem;
  letter-spacing: 1px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.text-input-container .comparison-box .char {
  min-width: max-content;
  height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-weight: 500;
  padding: 0 12px;
}

/* Specific styles for translation mode */
.text-input .comparison-box .char.correct {
  background-color: #d4edda;
  color: #0a5c1d;
  border: 1px solid #c3e6cb;
}

.text-input .comparison-box .char.wrong {
  background-color: #ffe3e3;
  color: #e12d39;
  border: 1px solid #ffa4a4;
}

.text-input .comparison-box .char.masked {
  background-color: #e9ecef;
  color: #495057;
  border: 1px solid #dee2e6;
  font-size: 1.2rem;
  font-style: italic;
}

/* Make translation input match comparison box */
.text-input .answer-input {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.5px;
  text-align: center;
  padding: 12px 16px;
}

/* Add pattern hint styles */
.pattern-hint {
  font-family: monospace;
  font-size: 1.2rem;
  color: #6c757d;
  margin-bottom: 8px;
  letter-spacing: 2px;
  min-height: 25px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Update translation display styles */
.word-completion-display .translation {
  font-size: 1.6rem;
  font-weight: 500;
  color: #212529;
  /* margin: 15px 0; */
  padding: 12px 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

#skip-answer-btn {
  display: none; /* Hidden by default */
  padding: 6px 12px;
  margin-top: 8px;
  font-size: 0.85rem;
  color: #666;
  background-color: transparent;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#skip-answer-btn:hover {
  background-color: #f5f5f5;
  border-color: #ccc;
}

#skip-answer-btn.show {
  display: block;
}

.practice-learning-btn {
  display: inline-block;
  margin: 10px auto;
  padding: 8px 16px;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg, #ff9933, #ff8000);
  border: none;
  border-radius: 20px;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.practice-learning-btn:hover {
  background: linear-gradient(135deg, #ff8000, #ff9933);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
}

.practice-learning-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#performance-breakdown li {
  margin: 8px 0;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 6px;
  font-size: 0.9rem;
  list-style-type: none;
}

#performance-breakdown li.incorrect {
  background: #fff5f5;
  border-left: 3px solid #e53e3e;
}

#performance-breakdown li.incorrect .word-level {
  color: #e53e3e;
}

#performance-breakdown .word-translations {
  color: #666;
  font-style: italic;
  padding-left: 5px;
}

.skipped-word {
  background: #fff3e0 !important;
  border-left: 3px solid #ff9800 !important;
}

.skipped-word .word-level {
  color: #ff9800 !important;
  font-style: italic;
}

/* Overview Modal Styles */
.overview-header {
  position: sticky;
  top: 0;
  background: white;
  z-index: 1;
  padding-top: 12px;
  margin-top: -12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f0f0f0;
}

.overview-header h2 {
  margin: 0;
  color: #2c3e50;
  font-size: 1.8rem;
}

.session-time {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  color: #666;
  background: #f8f9fa;
  padding: 8px 16px;
  border-radius: 20px;
}

.time-icon {
  font-size: 1.2rem;
}

.stats-grid {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 10px;
  margin-top: 10px;
  flex-wrap: nowrap;
}

.stat-card {
  flex: 1;
  background: white;
  border-radius: 12px;
  padding: 5px;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
  border: 1px solid #f0f0f0;
  min-width: 80px; /* Ensure minimum width */
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.1);
}

.stat-icon {
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 4px 0;
}

.stat-label {
  font-size: 0.5rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}


/* Specific stat card colors */
.stat-card:nth-child(1) .stat-value {
  color: #3498db;
}

.stat-card:nth-child(2) .stat-value {
  color: #2ecc71;
}

.stat-card:nth-child(3) .stat-value {
  color: #e74c3c;
}

.stat-card:nth-child(4) .stat-value {
  color: #f1c40f;
}

/* Performance breakdown section */
#performance-breakdown {
  margin-top: 24px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.performance-title {
  font-size: 1.4rem;
  color: #2c3e50;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f0f0f0;
}

/* Back to Home Button Styles */
#back-to-home {
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: white;
  background: linear-gradient(135deg, #046bd2, #0056b3);
  border: none;
  border-radius: 25px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(4, 107, 210, 0.2);
  width: auto;
}

#back-to-home::before {
  content: "←";
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

#back-to-home:hover {
  background: linear-gradient(135deg, #0056b3, #046bd2);
  transform: translateX(-3px);
  box-shadow: 0 4px 12px rgba(4, 107, 210, 0.3);
}

#back-to-home:hover::before {
  transform: translateX(-3px);
}

#back-to-home:active {
  transform: translateX(-1px);
  box-shadow: 0 2px 4px rgba(4, 107, 210, 0.2);
}

.notification-settings {
  margin: 20px 0;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.notification-settings h3 {
  margin-bottom: 15px;
  color: #333;
}

.notification-buttons {
  display: flex;
  gap: 10px;
}

.notification-buttons button {
  flex: 1;
  padding: 10px;
}

.notification-buttons button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

.notification-warning {
  margin-top: 10px;
  padding: 10px;
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
  border-radius: 4px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.notification-warning.hidden {
  display: none;
}

.notification-info {
  margin: 10px 0;
  padding: 10px;
  background-color: #e7f3fe;
  color: #004085;
  border: 1px solid #b8daff;
  border-radius: 4px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.notification-status {
  margin: 10px 0;
  padding: 12px;
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  border-radius: 4px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.notification-status.hidden {
  display: none;
}

.notification-warning ol {
  margin: 8px 0 0 20px;
  font-size: 0.85rem;
}

.notification-warning li {
  margin: 4px 0;
}

/* Update prompt message */
.notification-prompt {
  margin: 10px 0;
  padding: 12px;
  background-color: #e7f3fe;
  color: #004085;
  border: 1px solid #b8daff;
  border-radius: 4px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.notification-message {
  margin: 10px 0;
  padding: 12px;
  border-radius: 4px;
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* Status variants */
.notification-message.status-enabled {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.notification-message.status-prompt {
  background-color: #e7f3fe;
  color: #004085;
  border: 1px solid #b8daff;
}

.notification-message.status-denied {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}

.notification-message.status-denied ol {
  margin: 8px 0 0 20px;
  font-size: 0.85rem;
}

.notification-message.status-denied li {
  margin: 4px 0;
}

