/* ===========================================================================
   USER PROGRESS PAGE STYLES - TOPICS PROGRESS TRACKING
   =========================================================================== */

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

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

.pst-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;
}

.pst-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;
}

.pst-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 */
.pst-progress-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.pst-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;
}

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

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

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

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

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

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

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

.pst-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;
}

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

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

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

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

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

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

.pst-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 */
.pst-level-a1 { background: linear-gradient(90deg, #4CAF50, #8BC34A); }
.pst-level-a2 { background: linear-gradient(90deg, #8BC34A, #CDDC39); }
.pst-level-b1 { background: linear-gradient(90deg, #2196F3, #03A9F4); }
.pst-level-b2 { background: linear-gradient(90deg, #03A9F4, #00BCD4); }
.pst-level-c1 { background: linear-gradient(90deg, #9C27B0, #673AB7); }
.pst-level-c2 { background: linear-gradient(90deg, #673AB7, #3F51B5); }

/* Style Progress Section */
.pst-style-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;
}

.pst-style-progress-item {
  margin-bottom: 1.5rem;
}

.pst-style-progress-item:last-child {
  margin-bottom: 0;
}

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

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

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

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

.pst-style-progress-bar-inner {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #3F51B5, #5C6BC0);
  transition: width 1s ease-in-out;
}

/* Recent Attempts Section */
.pst-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;
}

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

.pst-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;
}

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

.pst-attempt-topic {
  font-weight: 500;
}

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

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

.pst-attempt-topic a:hover {
  color: #4CAF50;
}

.pst-attempt-topic a:hover::after {
  width: 100%;
}

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

.pst-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;
}

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

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

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

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

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

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

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

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

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

.pst-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;
}

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

.pst-btn-primary {
  background-color: #2196F3;
  color: white;
}

.pst-btn-secondary {
  background-color: #6c757d;
  color: white;
}

.pst-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  filter: brightness(1.1);
}

/* Header Container for Topic List */
.pst-header-container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

/* Progress Widget Button */
.pst-progress-widget {
  margin-top: 10px;
  align-self: flex-end;
}

.pst-progress-btn {
  display: 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;
}

.pst-progress-btn:hover {
  background-color: #e0e0e0;
}

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

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

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

/* Filters Container */
.pst-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;
}

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

/* Filter form layout - horizontal when space permits */
.pst-filters-form {
  display: flex;
  align-items: left;
  flex-wrap: wrap;
  gap: 15px;
}

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

.pst-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 */
.pst-search-filter::before {
  content: "🔍";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #9e9e9e;
  pointer-events: none;
  z-index: 1;
}

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

.pst-search-filter .pst-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;
}

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

/* Filters group - inline on wide screens */
.pst-filters-group {
  display: flex;
  align-items: left;
  gap: 15px;
  flex-wrap: wrap;
}

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

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

/* Select inputs styling */
.pst-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;
}

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

.pst-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 */
select:not([value=""]) {
  border-left: 3px solid #4CAF50;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .pst-filters-form {
    flex-direction: column;
  }
  
  .pst-search-filter {
    max-width: none;
    width: 100%;
  }
  
  .pst-filters-group {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .pst-level-filter, .pst-style-filter, .pst-sort-filter {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }
  
  .pst-filters-group select {
    width: 100%;
  }
}

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

.pst-filters-container {
  animation: fadeIn 0.3s ease-out;
}

/* Accessibility focus indicators */
input:focus, select:focus, button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}


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

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

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

/* Badge Styles */
.pst-card-level-badge,
.pst-completed-badge, 
.pst-in-progress-badge,
.pst-premium-badge,
.pst-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);
}

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

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

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

.pst-premium-badge, .unit-premium-badge {
  background-color: #9C27B0;
  color: white;
}

.pst-free-badge, .unit-free-badge {
  background-color: #2196F3;
  color: white;
}

/* Score indicator */
.pst-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);
}

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

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

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

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

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

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

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

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

/* Progress Indicator */
.pst-progress-indicator {
  margin: 20px 0;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 8px;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  color: #495057;
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

#viewed-count {
  font-weight: 700;
  color: #4CAF50;
}

#total-units {
  font-weight: 700;
  color: #333;
}

/* Completion Modal */
.pst-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
  z-index: 1000;
  overflow: auto;
  animation: fadeIn 0.3s ease-out;
}

.pst-modal-content {
  position: relative;
  background-color: #fff;
  margin: 10% auto;
  padding: 0;
  width: 90%;
  max-width: 500px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  animation: slideDown 0.4s ease-out;
}

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

.pst-modal-close {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
  transition: color 0.2s;
}

.pst-modal-close:hover {
  color: #333;
}

.pst-modal-header {
  padding: 20px;
  border-bottom: 1px solid #f0f0f0;
  text-align: center;
}

.pst-modal-header h2 {
  margin: 0;
  color: #4CAF50;
  font-size: 24px;
  font-weight: 700;
}

.pst-modal-body {
  padding: 30px 20px;
  text-align: center;
}

.pst-score-display {
  font-size: 64px;
  font-weight: 700;
  color: #4CAF50;
  margin: 20px 0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#final-score {
  position: relative;
  display: inline-block;
}

#final-score::after {
  content: "%";
  font-size: 32px;
  position: absolute;
  top: 5px;
  right: -20px;
  opacity: 0.7;
}

.pst-modal-footer {
  padding: 15px 20px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  justify-content: center;
  gap: 15px;
}

/* Animated confetti effect for completion modal */
@keyframes confetti {
  0% { background-position: 0 0; }
  100% { background-position: 1000px 1000px; }
}

.pst-modal-content::before {
  content: '';
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%234caf50' fill-opacity='0.2'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' /%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg width='52' height='26' viewBox='0 0 52 26' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%232196f3' fill-opacity='0.15'%3E%3Cpath d='M10 10c0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6h2c0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4v2c-3.314 0-6-2.686-6-6 0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6zm25.464-1.95l8.486 8.486-1.414 1.414-8.486-8.486 1.414-1.414z' /%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: -1;
  animation: confetti 20s linear infinite;
  opacity: 0.8;
  border-radius: 12px;
}

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

.pst-level-progress-bar-inner.loading,
.pst-style-progress-bar-inner.loading {
  background-size: 200% 100%;
  animation: loadingAnimation 2s infinite;
}

.pst-level-progress-bar-inner.loading {
  background: linear-gradient(90deg, #4CAF50, #6ecd71, #4CAF50);
}

.pst-style-progress-bar-inner.loading {
  background: linear-gradient(90deg, #3F51B5, #5C6BC0, #3F51B5);
}

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

.pst-progress-overview,
.pst-level-progress,
.pst-style-progress,
.pst-recent-attempts {
  animation: fadeIn 0.5s ease-out forwards;
}

.pst-progress-overview {
  animation-delay: 0.1s;
}

.pst-level-progress {
  animation-delay: 0.3s;
}

.pst-style-progress {
  animation-delay: 0.4s;
}

.pst-recent-attempts {
  animation-delay: 0.5s;
}

.pst-attempt-item {
  opacity: 0;
  animation: fadeIn 0.3s ease-out forwards;
}

.pst-attempt-item:nth-child(1) { animation-delay: 0.6s; }
.pst-attempt-item:nth-child(2) { animation-delay: 0.7s; }
.pst-attempt-item:nth-child(3) { animation-delay: 0.8s; }
.pst-attempt-item:nth-child(4) { animation-delay: 0.9s; }
.pst-attempt-item:nth-child(5) { animation-delay: 1.0s; }



/* Viewed item indicators */
.viewed {
  position: relative;
}

.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;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Style-specific viewed indicators */
.a1.viewed::after,
.a2-card.viewed::after,
.d2-wordbox.viewed::after,
.x2-unit-section.viewed::after,
.x3-text-section.viewed::after,
.x4-unit-box.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;
}

/* Animation for the checkmark */
@keyframes checkmarkAppear {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.viewed::after {
  animation: checkmarkAppear 0.3s ease-out forwards;
}


/* Responsive styles */
@media (max-width: 768px) {
  .pst-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .pst-back-btn {
    align-self: flex-start;
  }
  
  .pst-attempt-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .pst-attempt-date,
  .pst-attempt-score {
    text-align: left;
  }
  
  .pst-attempt-score {
    margin-left: 0;
  }
  
  .pst-filters-form {
    flex-direction: column;
    width: 100%;
  }
  
  .pst-filters-group {
    flex-direction: column;
    width: 100%;
  }
  
  .pst-modal-content {
    width: 95%;
    margin: 20% auto;
  }
}

@media (max-width: 480px) {
  .pst-header-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .pst-attempt-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .pst-attempt-date,
  .pst-attempt-score {
    text-align: left;
  }
  
  .pst-attempt-score {
    margin-left: 0;
  }
}