/* ===== GLOBAL STYLES ===== */
* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fafafa;
  margin: 0;
}

/* ===== HEADER STYLES ===== */
header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  border-radius: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

header h2 {
  margin: 0 0 10px 0;
  font-size: 2em;
}

header p {
  margin: 0;
  opacity: 0.95;
  font-size: 0.95em;
}

/* ===== CONTAINER STYLES ===== */
.dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 20px 28px;
}

.section-container {
  background: white;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-left: 4px solid #667eea;
}

.section-container h3 {
  margin-top: 0;
  color: #333;
  font-size: 1.4em;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f0f0f0;
}

/* ===== BUTTON STYLES ===== */
button, .class-button, .class-action-btn {
  margin: 8px 8px 8px 0;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 0.95em;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  min-height: 42px;
}

/* Default button styling */
button {
  background-color: #0078d4;
  color: white;
}

button:hover {
  background-color: #005a9e;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
}

button:disabled {
  background-color: #ccc;
  color: #666;
  cursor: not-allowed;
  transform: none;
}

button:focus-visible,
.class-button:focus-visible,
.class-action-btn:focus-visible {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

.class-action-btn {
  background-color: #f0f0f0;
  border: 1px solid #ddd;
  color: #333;
}

.class-action-btn:hover {
  background-color: #e8eaff;
  color: #667eea;
  border-color: #667eea;
  transform: translateY(-2px);
}

.class-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
}

.class-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}
/* ===== CLASS STYLES ===== */
.classes-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.class-card {
  background: white;
  border: 2px solid #f0f0f0;
  border-radius: 12px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.class-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.class-card:hover::before {
  transform: scaleX(1);
}

/* Teacher-owned classes with salmon accent */
.class-card.teacher-owned {
  border-left: 5px solid #ff9a76;
}

.class-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
  border-color: #667eea;
}

.class-card h4 {
  margin: 0 0 8px 0;
  color: #333;
  font-size: 1.1em;
  line-height: 1.35;
}

.class-card p {
  margin: 5px 0;
  color: #666;
  font-size: 0.9em;
  line-height: 1.5;
}

.class-placeholder {
  width: 100%;
  text-align: center;
  cursor: pointer;
  border: 2px dashed #ddd;
  border-radius: 12px;
  padding: 30px 20px;
  background-color: #fafafa;
  box-shadow: none;
  transition: all 0.2s;
  margin-bottom: 15px;
}

.class-placeholder:hover {
  border-color: #667eea;
  background-color: #f5f7ff;
  transform: translateY(-2px);
}

.class-placeholder h3 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 1.2em;
}

.class-placeholder p {
  margin: 5px 0;
  color: #666;
  font-size: 0.9em;
}

/* ===== STUDENT/PODCAST CONTAINER STYLES ===== */
#students-container, #podcasts-container, #quizzes-container {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: none;
}

#students-container.active, #podcasts-container.active, #quizzes-container.active {
  display: block;
}

#podcasts-series-container img,
#public-podcast-series img,
#podcast-series img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

/* ===== PODCAST STYLES ===== */
.podcast-item {
  background: white;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.podcast-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(102, 126, 234, 0.2);
  border-color: #667eea;
}

.podcast-item h4 {
  margin: 0 0 10px 0;
  font-size: 1.15em;
  color: #333;
}

.podcast-item p {
  margin: 8px 0;
  color: #666;
  font-size: 0.95em;
}

.podcast-item button {
  margin: 10px 8px 0 0;
  padding: 8px 14px;
  background-color: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9em;
  transition: all 0.2s;
}

.podcast-item button:hover {
  background-color: #764ba2;
  transform: translateY(-2px);
}

/* ===== PODCAST DETAIL VIEW ===== */
.podcast-detail {
  background: white;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.podcast-detail h3 {
  color: #333;
  font-size: 1.8em;
  margin: 0 0 15px 0;
  padding-bottom: 15px;
  border-bottom: 3px solid #667eea;
}

.podcast-detail .details-section {
  margin: 20px 0;
  padding: 15px;
  background-color: #f8f9ff;
  border-radius: 8px;
  border-left: 4px solid #667eea;
}

.podcast-detail .details-section p {
  margin: 8px 0;
  color: #555;
}

.podcast-detail audio {
  width: 100%;
  margin: 20px 0;
  display: block;
}

/* ===== QUIZ REPORTS STYLING ===== */
#quizzes-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.quiz-report-card {
  background: white;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.quiz-report-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(102, 126, 234, 0.2);
  border-color: #667eea;
}

.quiz-report-header {
  margin-bottom: 12px;
}

.quiz-report-header h4 {
  margin: 0;
  color: #333;
  font-size: 1.1em;
}

.quiz-report-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.quiz-score, .quiz-date {
  display: flex;
  flex-direction: column;
}

.score-label, .date-label {
  font-weight: 600;
  color: #667eea;
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.score-value, .date-value {
  color: #333;
  font-size: 1.05em;
  margin-top: 4px;
}

.quiz-report-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

/* ===== MATCHING QUIZ STYLES ===== */.matching-container {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  margin-top: 20px;
}

.terms, .definitions {
  width: 48%;
  background-color: #f8f9ff;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  border: 2px solid #e8e8e8;
}

.terms h5, .definitions h5 {
  margin: 0 0 15px 0;
  text-align: center;
  font-size: 1.1em;
  color: #333;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid #667eea;
}

.matching-term, .matching-definition {
  padding: 12px;
  margin: 8px 0;
  border: 2px solid #ddd;
  border-radius: 6px;
  background-color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.matching-term:hover, .matching-definition:hover {
  background-color: #e8eaff;
  border-color: #667eea;
  transform: translateX(4px);
}

.selected-term {
  background-color: #c8e6c9;
  border-color: #388e3c;
  font-weight: 600;
}

.selected-definition {
  background-color: #fff59d;
  border-color: #fbc02d;
  font-weight: 600;
}

.matched {
  background-color: #e1bee7;
  border-color: #7b1fa2;
}

.matching-term.disabled,
.matching-definition.disabled {
  pointer-events: none;
  opacity: 0.5;
  cursor: not-allowed;
}

.quiz-feedback {
  margin-top: 15px;
  padding: 12px;
  border-radius: 6px;
  font-weight: 600;
  background-color: #f0f0f0;
}

.quiz-score {
  margin-top: 20px;
  font-size: 1.5em;
  font-weight: bold;
  text-align: center;
  padding: 15px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 8px;
}

/* ===== STUDENT LIST STYLES ===== */
#students-list {
  background: white;
  border-radius: 10px;
  padding: 15px;
  margin-top: 15px;
}

#students-list h3 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 1.2em;
}

.student-item {
  background: white;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 12px;
  margin: 8px 0;
  display: flex;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s;
}

.student-item:hover {
  background-color: #f8f9ff;
  border-color: #667eea;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.15);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .dashboard-container {
    padding: 16px;
  }

  .section-container {
    padding: 18px;
    margin-bottom: 18px;
  }

  .matching-container {
    flex-direction: column;
  }
  
  .terms, .definitions {
    width: 100%;
  }
  
  .classes-list {
    grid-template-columns: 1fr;
  }
  
  header h2 {
    font-size: 1.5em;
  }
  
  button, .class-button, .class-action-btn {
    padding: 8px 12px;
    font-size: 0.9em;
    width: 100%;
    margin-right: 0;
  }

  .quiz-report-body {
    align-items: flex-start;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .dashboard-container {
    padding: 10px;
  }
  
  .section-container {
    padding: 15px;
    margin-bottom: 15px;
  }
  
  header {
    padding: 12px;
    margin-bottom: 12px;
  }
  
  header h2 {
    font-size: 1.2em;
  }
}
