/* Base styles for the topic box ================================================= */
.fc-topic-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid #e0e0e0;
  padding: 0;
  margin: 20px 0;
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  -webkit-transition: box-shadow 0.3s ease;
  -moz-transition: box-shadow 0.3s ease;
  -o-transition: box-shadow 0.3s ease;
  transition: box-shadow 0.3s ease;
  max-width: 300px;
}

.fc-topic-box:hover {
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.fc-topic-title {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  font-size: 18px;
  text-overflow: ellipsis;
  text-align: center;
  margin-bottom: 15px;
  padding: 5px;
  border-bottom: 2px solid #d8d8d854;
  color: #4e4e4e;
}

.fc-topic-description {
  font-size: 13px;
  padding: 5px 15px;
  margin-bottom: 20px;
  color: #666;
}

.fc-more-btn {
  box-sizing: content-box;
  background-color: #007BFF;
  color: #fff;
  padding: 10px 20px;
  margin: 5px 10%;
  border: none;
  border-radius: 5px;
  width: 30%;
  cursor: pointer;
  -webkit-transition: background-color 0.3s ease;
  -moz-transition: background-color 0.3s ease;
  -o-transition: background-color 0.3s ease;
  transition: background-color 0.3s ease;
}

.fc-more-btn a {
  text-decoration: none;
  color: #fff;
}

/* Hover effect for the "More" button */
.fc-more-btn:hover {
  background-color: #0056b3;
}



/* the flashcards (cards by topic) ================================================= */
.fc-topics-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  padding: 0;
  margin-top: 25px;
}

.fc-cards-container {
  position: relative;
  padding: 0;
}

.fc-cards-container::before,
.fc-cards-container::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 1px solid #cfcfcf;
  border-radius: 10px;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

.fc-cards-container::before {
  top: -3px;
  bottom: 5px;
  right: 2px;
  left: -2px;
  z-index: -1;
}

.fc-cards-container::after {
  top: -5px;
  bottom: 7px;
  right: 4px;
  left: -4px;
  z-index: -2;
}

.fc-cards-container:hover::before {
  top: -7px;
  right: 5px;
  left: -5px;
  background-color: #f0f0f0;
  border: 1px solid #c5c5c5;
}

.fc-cards-container:hover::after {
  top: -11px;
  right: 8px;
  left: -8px;
  background-color: #f0f0f0;
  border: 1px solid #c5c5c5;
}

.fc-card {
  position: relative;
  width: 250px;
  height: 350px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  background-color: #f5f5f5;
  overflow: hidden;
  -webkit-transition: transform 0.1s;
  -moz-transition: transform 0.1s;
  -o-transition: transform 0.1s;
  transition: transform 0.1s;
}

.fc-card a {
  text-decoration: none;
  color: inherit;
}

.fc-card a:visited {
  color: inherit;
}

.fc-card-title {
  background-color: #f5f5f5;
  padding: 10px;
  margin: 0;
  border-bottom: 1px solid #e0e0e0;
  font-size: 1rem;
  font-family: 'Open Sans', sans-serif;
  color: #4e4e4e;
  height: 64px;
  text-align: center;
  white-space: normal;
}

.fc-card-image {
  width: 100%;
  height: auto;
  display: block;
}

.fc-noimage {
  display: block;
  width: 100%;
  height: 100px;
  background-color: #fff;
}

.fc-cards-more-btn {
  position: absolute;
  bottom: 0;
  display: block;
  width: 100%;
  height: 36px;
  padding: 10px 15px;
  background-color: #007bff;
  color: #ffffff;
  text-align: center;
  border: none;
  border-top: 1px solid #e0e0e0;
  cursor: pointer;
  -webkit-transition: background-color 0.3s ease;
  -moz-transition: background-color 0.3s ease;
  -o-transition: background-color 0.3s ease;
  transition: background-color 0.3s ease;
}

.fc-cards-more-btn:hover {
  background-color: #0056b3;
}

.fc-cards-more-btn a {
  color: #ffffff;
  text-decoration: none;
}

/* ------------------------------- */
.fcu-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px;
  font-family: Arial, sans-serif;
  height: 75vh;
}

.fcu-title {
  box-sizing: border-box;
  text-align: center;
  line-height: 2.5rem;
  margin: 10px 0 20px 0;
  padding: 15px 5px;
  width: 100%;
  font-size: calc(1rem + 0.7vw);
  text-transform: capitalize;
  color: #696969;
  text-shadow: #fff 1px 1px 1px;
  border: 1px solid #cacaca;
  border-radius: 5px;
  background-color: #e9e9e959;
}

/* ------------------------------------ */
.fcu-card-container {
  display: flex;
  flex-wrap: wrap;
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -moz-user-select: none;
  justify-content: space-around;
  width: 100%;
  height: 100%;
  min-width: 250px;
  max-width: 1080px;
}

/* ------------------------------------ */
.fcu-card {
  display: flex;
  perspective: 1000px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.242);
  border-radius: 7px;
  overflow: hidden;
  flex-direction: column;
  cursor: pointer;
  -webkit-transition: transform 0.4s ease;
  -moz-transition: transform 0.4s ease;
  -o-transition: transform 0.4s ease;
  transition: transform 0.4s ease;
}

/* Styles for the audio player */
.fcu-audio {
  flex-basis: 5%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding-left: 10px;
}

.fcu-audio-icon {
  color: #333;
  font-size: 56px;
  text-decoration: none;
  padding-left: 5px;
  opacity: 0.5;
}

.fcu-audio-icon:hover {
  color: #429dff;
  opacity: 1;
}

.fcu-audio-icon:active {
  transform: scale(0.9);
}

.fcu-card-front,
.fcu-card-back {
  backface-visibility: hidden;
  position: absolute;
  display: flex;
  flex-direction: column;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  -webkit-transition: transform 0.6s;
  -moz-transition: transform 0.6s;
  -o-transition: transform 0.6s;
  transition: transform 0.6s;
}

.fcu-card-front {
  z-index: 2;
}

.fcu-card-back {
  transform: rotateY(180deg);
}

.fcu-card.flipped .fcu-card-front {
  transform: rotateY(-180deg);
}

.fcu-card.flipped .fcu-card-back {
  transform: rotateY(0deg);
}

/* Title inside the card ----- */
.fcu-inner-title {
  position: relative;
  height: 2.2rem;
  width: 100%;
  min-height: 2rem;
  margin: 20px 0 10px 0;
}

.fcu-line {
  display: inline-block;
  position: absolute;
  border: solid 1px #ebebebb8;
  width: 100%;
  top: 50%;
}

.fcu-inner-title p {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border-radius: 7px;
  border: solid 1px #ebebebb8;
  top: 0;
  left: 10%;
  width: auto;
  height: 100%;
  color: #5e5e5e;
  font-size: 1rem;
  padding: 3px 5px 3px 15px;
  text-align: center;
  background-color: #f9f9f9;
}


/* ------------------ F1 ------------------------------ */
.fcu-card-container.f1cu {
  width: 45vh;
  max-width: 512px;
  max-height: 50vh;
}

.fcu-card.f1cu {
  width: 100%;
  height: 100%;
  min-height: 350px;
}

.f1cu-upper-txtbox {
  width: 100%;
  height: 80%;
  border-bottom: 5px solid rgba(85, 85, 85, 0.3);
  margin: 0;
}

.f1-lower-txtbox {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  height: 20%;
  margin: 0;
}

.f1cu-image-container {
  width: 100%;
  height: 100%;
}

.f1cu-image {
  width: 100%;
  height: 100%;
  object-fit: fill;
}

/* ------------------------------------- */
.f1cu-text1 {
  -webkit-flex-grow: 1;
  -ms-flex-positive: 1;
  flex-grow: 1;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-justify-content: start;
  -ms-flex-pack: start;
  justify-content: start;
  width: 100%;
  padding-left: 50px;
  text-align: left;
  font-size: calc(0.9rem + 1.3vw);
  color: #333;
  height: 100%;
}

.f1cu-text2 {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-justify-content: start;
  -ms-flex-pack: start;
  justify-content: start;
  width: 100%;
  padding-left: 25px;
  text-align: center;
  padding-left: 20px;
  padding-right: 5px;
  font-size: calc(1rem + 0.5vw);
  color: #333;
  margin: 0;
}

/* ------------------ F3 ------------------------------ */
.f3-pd {
  padding: 50px 0;
}

.fcu-card-container.f3cu {
  width: 769px;
  max-width: 992px;
  max-height: 50vh;
}

.fcu-card.f3cu {
  width: 100%;
  height: 100%;
  min-height: 350px;
}

.f3cu-upper-txtbox {
  width: 100%;
  height: 75%;
  border-bottom: 5px solid rgba(219, 219, 219, 0.871);
  margin: 0;
}

.f3-lower-txtbox {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  height: 25%;
  margin: 0;
}

.f3-half-txtbox {
  height: 50%;
  width: 100%;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-justify-content: center;
  -ms-flex-pack: center;
  justify-content: center;
  margin: 0;
}

.f3cu-image-container {
  width: 100%;
  height: 100%;
}

.f3cu-image {
  width: 100%;
  height: 100%;
  object-fit: fill;
}

/* Styles for the text below the image */
.f3cu-text1 {
  -webkit-flex-grow: 1;
  -ms-flex-positive: 1;
  flex-grow: 1;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-justify-content: flex-start;
  -ms-flex-pack: start;
  justify-content: flex-start;
  height: 100%;
}

.f3cu-text1 p {
  width: 100%;
  padding: 5px;
  text-align: center;
  font-size: calc(1.1rem + 0.7vw);
  color: #333;
  margin: 0;
}

.f3cu-text2 {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-justify-content: center;
  -ms-flex-pack: center;
  justify-content: center;
  width: 100%;
  padding: 5px 25px;
  font-size: calc(0.8rem + 0.8vw);
  color: #333;
  margin: 0;
}

.f3cu-text3,
.f3cu-text4 {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-justify-content: center;
  -ms-flex-pack: center;
  justify-content: center;
  width: 100%;
  margin: 0;
}

.f3cu-text3 p {
  width: 100%;
  padding: 5px;
  text-align: center;
  font-size: calc(1.3rem + 1vw);
  color: #333;
  margin: 0;
  padding: 0 15px;
}

.f3cu-text4 {
  position: relative;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-justify-content: center;
  -ms-flex-pack: center;
  justify-content: center;
  border: 1px solid #dcdcdc;
  border-radius: 10px;
  background-color: #dffcfc;
  margin: 25px;
}

.f3cu-text4 p {
  width: 90%;
  padding: 5px;
  text-align: center;
  font-size: calc(1rem + 0.4vw);
  color: #525252;
  text-shadow: 1px 1px 1px #ffffff;
  margin: 0;
  padding: 15px 0;
}

.tx4bdg {
  position: absolute;
  top: -15px;
  left: 25px;
  font-size: 0.8rem;
  padding: 3px 7px;
  border: 1px solid #dcdcdc;
  border-radius: 7px;
  background-color: #f3fbfb;
}



/* ------------------ F4 --------------------------------- */
.fcu-card.f4cu {
  width: 654px;
  height: 50vh;
  min-height: 350px;
}

.f4cu-upper-txtbox {
  height: 40%;
  margin: 0;
}

.f4cu-lower-txtbox {
  height: 60%;
  margin: 0;
}

.f4cu-text1-frame {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-justify-content: center;
  -ms-flex-pack: center;
  justify-content: center;
  width: 100%;
  height: calc(100% - 3rem);
  margin: 0;
}

.f4cu-text1 {
  -webkit-flex-grow: 1;
  -ms-flex-positive: 1;
  flex-grow: 1;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-justify-content: flex-start;
  -ms-flex-pack: start;
  justify-content: flex-start;
  padding-left: 25px;
  width: 100%;
  min-height: 50%;
  text-align: center;
  font-size: calc(1rem + 1.3vw);
  color: #333;
  cursor: pointer;
}

.f4cu-text2-frame {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-justify-content: center;
  -ms-flex-pack: center;
  justify-content: center;
  height: calc(90% - 3rem);
  width: 100%;
  margin: 0;
}

.f4cu-text2 {
  -webkit-flex-grow: 1;
  -ms-flex-positive: 1;
  flex-grow: 1;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-justify-content: center;
  -ms-flex-pack: start;
  justify-content: center;
  width: 100%;
  min-height: 60%;
  font-style: italic;
  font-size: calc(1rem + 0.4vw);
  color: #616161;
  padding: 0 20px;
  margin: 0;
}

.f4cu-text3 {
  -webkit-flex-grow: 1;
  -ms-flex-positive: 1;
  flex-grow: 1;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-justify-content: center;
  -ms-flex-pack: start;
  justify-content: center;
  width: 100%;
  min-height: 60%;
  font-size: calc(1rem + 0.5vw);
  color: #4e4e4e;
  padding: 0 20px;
  margin: 0;
}


/* ===========================================================================
   FLASHCARD PROGRESS TRACKING STYLES - UPDATED
   =========================================================================== */

/* Header Container - UPDATED */
.fc-header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #dee2e6;
}

/* Filters Container - UPDATED */
.fc-filters-container {
  background-color: #ffffff;
  padding: 15px 20px;
  border-radius: 12px;
  margin-bottom: 25px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: box-shadow 0.3s ease;
}

.fc-filters-container:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.fc-filters-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

/* Search filter styling - UPDATED */
.fc-search-filter {
  position: relative;
  flex: 1;
  min-width: 240px;
  max-width: 460px;
}

.fc-search-filter input {
  padding: 10px 16px;
  padding-left: 38px; /* Space for icon */
  padding-right: 80px; /* Space for button */
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.3s ease;
  width: 100%;
  color: #333;
  background-color: #f9f9f9;
}

/* Search icon */
.fc-search-filter::before {
  content: "🔍";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #9e9e9e;
  pointer-events: none;
  z-index: 1;
}

.fc-search-filter input:focus {
  border-color: #4CAF50;
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.1);
  outline: none;
}

.fc-search-filter .fc-search-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 12px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  height: 32px;
  font-size: 14px;
}

.fc-search-filter .fc-search-btn:hover {
  background-color: #3d8b40;
}

/* Filters group styling - UPDATED */
.fc-filters-group {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

/* Individual filter containers */
.fc-level-filter, .fc-sort-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 160px;
}

/* Label styling */
.fc-filters-group label {
  white-space: nowrap;
  font-weight: 500;
  color: #555;
  font-size: 14px;
  margin: 0;
}

/* Select inputs styling - UPDATED */
.fc-filters-group select {
  appearance: none;
  background-color: #f9f9f9;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  padding: 8px 30px 8px 12px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px;
  transition: all 0.3s ease;
  flex: 1;
}

.fc-filters-group select:hover {
  border-color: #bdbdbd;
}

.fc-filters-group select:focus {
  border-color: #4CAF50;
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.1);
  outline: none;
}

/* Active filter indication */
.fc-filters-group select:not([value=""]) {
  border-left: 3px solid #4CAF50;
}


/* Access filter styles */
.fc-access-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 160px;
}

/* Total count in progress cards */
.fc-progress-total {
  font-size: 0.9rem;
  color: #6c757d;
  margin-top: 5px;
  text-align: center;
}

/* Card Image Container (to position badges) */
.fc-card-image-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.fc-card-image-container img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.fc-noimage {
  height: 200px;
  background-color: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Card Badges Container */
.fc-card-badges {
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 5;
}

/* Badge Styles */
.fc-card-level-badge,
.fc-completed-badge, 
.fc-in-progress-badge,
.fc-premium-badge,
.fc-free-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.fc-card-level-badge {
  background-color: #3498db;
  color: white;
}

.fc-completed-badge {
  background-color: #4CAF50;
  color: white;
}

.fc-in-progress-badge {
  background-color: #FF9800;
  color: white;
}

.fc-premium-badge {
  background-color: #9C27B0;
  color: white;
}

.fc-free-badge {
  background-color: #2196F3;
  color: white;
}

/* Score indicator */
.fc-card-score {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.fc-card-score.high {
  background-color: #4CAF50;
  color: white;
}

.fc-card-score.medium {
  background-color: #FF9800;
  color: white;
}

.fc-card-score.low {
  background-color: #F44336;
  color: white;
}

/* Progress Widget - UPDATED */
.fc-progress-widget {
  text-align: right;
  margin-left: auto;
}

.fc-progress-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  background-color: #f5f5f5;
  border-radius: 4px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: background-color 0.2s, transform 0.2s;
  border: 1px solid #e0e0e0;
}

.fc-progress-btn:hover {
  background-color: #e0e0e0;
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.fc-progress-icon {
  margin-right: 6px;
  font-size: 16px;
}

.fc-progress-text {
  font-size: 14px;
}

.fc-progress-badge {
  margin-left: 6px;
  background-color: #4CAF50;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

/* Progress indicator (subtle) */
.fcu-progress-indicator {
  font-size: 12px;
  color: #888;
  margin-top: 8px;
  text-align: center;
}

/* Previous attempts display */
.fcu-previous-attempts {
  text-align: center;
  margin-bottom: 5px;
  font-size: 14px;
  color: #7a7a7a;
}

.fcu-attempts-score {
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 3px;
}

.fcu-attempts-score.high {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.fcu-attempts-score.medium {
  background-color: #fff3e0;
  color: #ef6c00;
}

.fcu-attempts-score.low {
  background-color: #ffebee;
  color: #c62828;
}

/* Modal Styles */
.fcu-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
  animation: fcuFadeIn 0.3s;
}

.fcu-modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  width: 80%;
  max-width: 500px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  text-align: center;
  animation: fcuSlideIn 0.3s;
}

.fcu-modal-close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.fcu-modal-close:hover {
  color: black;
}

.fcu-modal-header h2 {
  margin-top: 10px;
  color: #333;
}

.fcu-score-display {
  font-size: 48px;
  font-weight: bold;
  color: #4CAF50;
  margin: 20px 0;
}

.fcu-modal-footer {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.fcu-btn {
  padding: 10px 15px;
  border-radius: 4px;
  border: none;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
}

.fcu-btn-primary {
  background-color: #4CAF50;
  color: white;
}

.fcu-btn-primary:hover {
  background-color: #3e8e41;
}

.fcu-btn-secondary {
  background-color: #f1f1f1;
  color: #333;
}

.fcu-btn-secondary:hover {
  background-color: #e0e0e0;
}

/* Completed Card Indicator */
.fcu-card.viewed {
  position: relative;
}

.fcu-card.viewed::after {
  content: "✓";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  background-color: #4CAF50;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  z-index: 10;
}

/* Animations */
@keyframes fcuFadeIn {
  from {opacity: 0}
  to {opacity: 1}
}

@keyframes fcuSlideIn {
  from {transform: translateY(-30px); opacity: 0;}
  to {transform: translateY(0); opacity: 1;}
}

/* ===========================================================================
   USER PROGRESS PAGE STYLES - MODERN & FLUID DESIGN - UPDATED
   =========================================================================== */

/* Main Container */
.fc-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #343a40;
}

/* Header */
.fc-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #dee2e6;
}

.fc-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #343a40;
  margin: 0;
  background: linear-gradient(120deg, #4CAF50, #2196F3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
}

.fc-back-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background-color: #e9ecef;
  color: #495057;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.fc-back-btn:hover {
  background-color: #dee2e6;
  color: #212529;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Progress Overview Cards - UPDATED */
.fc-progress-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
  animation: fadeIn 0.5s ease-out forwards;
  animation-delay: 0.1s;
}

.fc-progress-card {
  position: relative;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  padding: 2rem;
  transition: all 0.3s ease;
  overflow: hidden;
  text-align: center;
}

.fc-progress-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.fc-progress-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, #4CAF50, #2196F3);
}

.fc-progress-card-title {
  font-size: 1rem;
  color: #6c757d;
  margin-bottom: 1rem;
  font-weight: 500;
}

.fc-progress-card-value {
  font-size: 3.5rem;
  font-weight: 700;
  color: #343a40;
  line-height: 1;
}

.fc-progress-card-value.percentage::after {
  content: "%";
  font-size: 1.75rem;
  vertical-align: super;
  margin-left: 0.25rem;
  opacity: 0.7;
}

/* Level Progress Section - UPDATED */
.fc-subtitle {
  font-size: 1.75rem;
  font-weight: 600;
  color: #343a40;
  margin: 2.5rem 0 1.5rem;
  display: flex;
  align-items: center;
}

.fc-subtitle::after {
  content: '';
  flex-grow: 1;
  height: 1px;
  background-color: #dee2e6;
  margin-left: 1rem;
}

.fc-level-progress {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  padding: 2rem;
  margin-bottom: 3rem;
  animation: fadeIn 0.5s ease-out forwards;
  animation-delay: 0.3s;
}

.fc-level-progress-item {
  margin-bottom: 1.5rem;
}

.fc-level-progress-item:last-child {
  margin-bottom: 0;
}

.fc-level-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.fc-level-name {
  font-weight: 600;
  color: #495057;
  font-size: 1.1rem;
}

.fc-level-stats {
  font-size: 0.9rem;
  color: #6c757d;
  background-color: #f8f9fa;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
}

.fc-level-progress-bar-outer {
  height: 12px;
  background-color: #e9ecef;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.fc-level-progress-bar-inner {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #4CAF50, #6ecd71);
  transition: width 1s ease-in-out;
}

/* Customize level-specific progress bar colors */
.fc-level-a1 { background: linear-gradient(90deg, #4CAF50, #8BC34A); }
.fc-level-a2 { background: linear-gradient(90deg, #8BC34A, #CDDC39); }
.fc-level-b1 { background: linear-gradient(90deg, #2196F3, #03A9F4); }
.fc-level-b2 { background: linear-gradient(90deg, #03A9F4, #00BCD4); }
.fc-level-c1 { background: linear-gradient(90deg, #9C27B0, #673AB7); }
.fc-level-c2 { background: linear-gradient(90deg, #673AB7, #3F51B5); }

/* Recent Attempts Section - UPDATED */
.fc-recent-attempts {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  padding: 2rem;
  margin-bottom: 3rem;
  animation: fadeIn 0.5s ease-out forwards;
  animation-delay: 0.5s;
}

.fc-attempts-list {
  display: grid;
  gap: 1rem;
}

.fc-attempt-item {
  display: grid;
  grid-template-columns: 3fr 1fr 1fr;
  align-items: center;
  padding: 1rem;
  border-radius: 0.5rem;
  background-color: #f8f9fa;
  transition: all 0.3s ease;
  opacity: 0;
  animation: fadeIn 0.3s ease-out forwards;
}

.fc-attempt-item:nth-child(1) { animation-delay: 0.6s; }
.fc-attempt-item:nth-child(2) { animation-delay: 0.7s; }
.fc-attempt-item:nth-child(3) { animation-delay: 0.8s; }
.fc-attempt-item:nth-child(4) { animation-delay: 0.9s; }
.fc-attempt-item:nth-child(5) { animation-delay: 1.0s; }
.fc-attempt-item:nth-child(6) { animation-delay: 1.1s; }
.fc-attempt-item:nth-child(7) { animation-delay: 1.2s; }
.fc-attempt-item:nth-child(8) { animation-delay: 1.3s; }
.fc-attempt-item:nth-child(9) { animation-delay: 1.4s; }
.fc-attempt-item:nth-child(10) { animation-delay: 1.5s; }

.fc-attempt-item:hover {
  background-color: #e9ecef;
  transform: translateX(5px);
}

.fc-attempt-flashcard {
  font-weight: 500;
}

.fc-attempt-flashcard a {
  color: #343a40;
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
  display: inline-block;
}

.fc-attempt-flashcard a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #4CAF50;
  transition: width 0.3s;
}

.fc-attempt-flashcard a:hover {
  color: #4CAF50;
}

.fc-attempt-flashcard a:hover::after {
  width: 100%;
}

.fc-attempt-date {
  text-align: center;
  color: #6c757d;
  font-size: 0.9rem;
}

.fc-attempt-score {
  margin-left: auto;
  font-weight: bold;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  text-align: center;
  min-width: 60px;
  position: relative;
  overflow: hidden;
}

.fc-attempt-score::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.2;
  z-index: -1;
  border-radius: inherit;
}

.fc-attempt-score.high {
  color: #4CAF50;
}

.fc-attempt-score.high::before {
  background-color: #4CAF50;
}

.fc-attempt-score.medium {
  color: #FF9800;
}

.fc-attempt-score.medium::before {
  background-color: #FF9800;
}

.fc-attempt-score.low {
  color: #F44336;
}

.fc-attempt-score.low::before {
  background-color: #F44336;
}

/* Empty State */
.fc-text {
  color: #6c757d;
  text-align: center;
  margin: 2rem 0;
  font-size: 1.1rem;
}

/* Action Buttons - UPDATED */
.fc-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.fc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.fc-btn-success {
  background-color: #4CAF50;
  color: white;
}

.fc-btn-success:hover {
  background-color: #3d8b40;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Animated loading indicator for progress bars */
@keyframes loadingAnimation {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.fc-level-progress-bar-inner.loading {
  background: linear-gradient(90deg, #4CAF50, #6ecd71, #4CAF50);
  background-size: 200% 100%;
  animation: loadingAnimation 2s infinite;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Flashcard Exit Button Styles */

.fcu-controls-row {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
  margin: 3px auto;
  width: 100%;
}

.fcu-pagination-container {
  flex-grow: 1;
  width: 100%;
  text-align: center;
}

.fcu-exit-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 15px;
  background-color: #ffffff;
  color: #4d4d4d;
  text-decoration: none;
  border-radius: 4px;
  border: 1px solid #f0f0f0;
  font-weight: 600;
  transition: all 0.2s ease;
  margin-right: 15px;
  font-size: 14px;
}

.fcu-exit-btn:hover {
  background-color: #ffffff;
  color: #444444;
  font-weight: bold;
}

.fcu-exit-btn i {
  margin-right: 5px;
}

/* Make sure the pagination wrapper properly uses the new structure */
.fcu-pagination-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
}

/* ===========================================================================
   CONSOLIDATED RESPONSIVE STYLES FOR FLASHCARD APP
   =========================================================================== */

/* Large tablets and small desktops */
@media (max-width: 1024px) {
  /* F4 card styles for tablets */
  .fcu-card.f4cu {
    width: 85vw;
    min-height: 300px;
  }
}

/* Medium tablets and small desktops */
@media (max-width: 992px) {
  /* Progress page overview cards */
  .fc-progress-overview {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
  
  .fc-progress-card-value {
    font-size: 3rem;
  }
  
  /* Updated filter styles */
  .fc-filters-form {
    flex-direction: column;
    align-items: stretch;
  }
  
  .fc-search-filter {
    max-width: none;
    width: 100%;
  }
  
  .fc-filters-group {
    width: 100%;
    justify-content: space-between;
  }
}

/* Small tablets and large smartphones */
@media (max-width: 768px) {
  .fc-access-filter {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }
  /* Card containers */
  .fcu-card.f4cu {
    width: 90vw;
    min-height: 250px;
  }

  .fcu-card-container.f3cu {
    width: 100%;
  }
  
  /* Header and filters - UPDATED */
  .fc-header-container,
  .fc-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .fc-progress-widget {
    margin-left: 0;
    align-self: flex-start;
  }
  
  .fc-level-filter, .fc-sort-filter {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }
  
  .fc-filters-group select {
    width: 100%;
  }
  
  /* Modal adjustments */
  .fcu-modal-content {
    width: 90%;
    margin: 30% auto;
  }
  
  .fcu-score-display {
    font-size: 36px;
  }
  
  /* Progress page adjustments - UPDATED */
  .fc-container {
    padding: 1.5rem;
  }
  
  .fc-back-btn {
    width: 100%;
    justify-content: center;
  }
  
  .fc-attempt-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    text-align: center;
  }
  
  .fc-attempt-date, 
  .fc-attempt-score {
    text-align: center;
  }

  .fcu-pagination-wrapper {
    margin: 0 auto;
  }
  
  /* Action buttons - UPDATED */
  .fc-actions {
    flex-direction: column;
  }
  
  .fc-btn {
    width: 100%;
  }
}

/* Small smartphones */
@media (max-width: 576px) {
  .fcu-content {
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
    margin: 0;
  }
  /* Progress page elements */
  .fc-container {
    padding: 1rem;
  }
  
  .fc-title {
    font-size: 2rem;
  }
  
  .fc-subtitle {
    font-size: 1.5rem;
  }
  
  .fc-progress-card {
    padding: 1.5rem;
  }
  
  .fc-progress-card-value {
    font-size: 2.5rem;
  }
  
  .fc-level-progress, 
  .fc-recent-attempts {
    padding: 1.5rem;
  }
  
  .fc-filters-container {
    padding: 10px;
  }
  
  .fc-search-filter,
  .fc-level-filter,
  .fc-sort-filter {
    width: 100%;
  }
}

/* Extra small smartphones */
@media (max-width: 480px) {
  /* Card containers */
  .fcu-card-container.f1cu {
    width: 100%;
  }

  .fcu-card.f4cu {
    width: 90vw;
  }
  
  /* Title adjustments */
  .fcu-title {
    text-align: center;
    line-height: 2rem;
    margin: 5px 0 5px 0;
    padding: 5px 3px;
  }
  
  .fcu-exit-btn {
    margin-right: 0;
    padding: 2px 3px;
    width: 100%;
    font-size: 1.2rem;
    color: #6b6b6b;
    justify-content: center;
  }
}

/* Dark Mode Styles */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #121212;
  }
  
  .fc-container {
    color: #e9ecef;
  }
  
  .fc-title {
    background: linear-gradient(120deg, #6ecd71, #64b5f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  
  .fc-back-btn {
    background-color: #343a40;
    color: #dee2e6;
  }
  
  .fc-back-btn:hover {
    background-color: #495057;
    color: #f8f9fa;
  }
  
  .fc-progress-card,
  .fc-level-progress,
  .fc-recent-attempts {
    background-color: #1e1e1e;
    color: #e9ecef;
  }
  
  .fc-progress-card-title {
    color: #ced4da;
  }
  
  .fc-progress-card-value {
    color: #f8f9fa;
  }
  
  .fc-level-name {
    color: #dee2e6;
  }
  
  .fc-level-stats {
    color: #ced4da;
    background-color: #212529;
  }
  
  .fc-level-progress-bar-outer {
    background-color: #343a40;
  }
  
  .fc-attempt-item {
    background-color: #212529;
  }
  
  .fc-attempt-item:hover {
    background-color: #343a40;
  }
  
  .fc-attempt-flashcard a {
    color: #e9ecef;
  }
  
  .fc-attempt-date {
    color: #ced4da;
  }
  
  .fc-text {
    color: #ced4da;
  }
  
  .fc-btn-secondary {
    background-color: #343a40;
    color: #f8f9fa;
  }
  
  .fc-btn-secondary:hover {
    background-color: #495057;
  }
  
  /* New dark mode styles for filters */
  .fc-filters-container {
    background-color: #1e1e1e;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  }
  
  .fc-search-filter input {
    background-color: #2d2d2d;
    border-color: #444;
    color: #e0e0e0;
  }
  
  .fc-search-filter input:focus {
    background-color: #333;
    border-color: #4CAF50;
  }
  
  .fc-filters-group select {
    background-color: #2d2d2d;
    border-color: #444;
    color: #e0e0e0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  }
  
  .fc-filters-group select:focus {
    background-color: #333;
  }
  
  .fc-progress-btn {
    background-color: #2d2d2d;
    color: #e0e0e0;
    border-color: #444;
  }
  
  .fc-progress-btn:hover {
    background-color: #3d3d3d;
  }
}