/* Transcription Page Specific Styles */

/* Transcription Overview */
.transcription-overview {
  padding: 3rem 0;
}

.transcription-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.stat-card {
  background: var(--bg-primary);
  padding: 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.transcription-guide {
  margin-top: 2rem;
}

.guide-card {
  background: var(--bg-primary);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary-color);
}

.guide-card h3 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.guide-description {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-weight: 600;
}

.guide-list {
  list-style: none;
  padding: 0;
}

.guide-list li {
  padding: 0.5rem 0;
  color: var(--text-secondary);
  position: relative;
  padding-left: 1.5rem;
}

.guide-list li::before {
  content: "•";
  color: var(--primary-color);
  font-weight: bold;
  position: absolute;
  left: 0;
}

/* Interactive Transcription */
.interactive-transcription {
  padding: 4rem 0;
  background: var(--bg-secondary);
}

.sounds-filter {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.filter-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.filter-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.transcription-table-container {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.transcription-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

.transcription-table th {
  background: var(--bg-secondary);
  padding: 1.25rem 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-color);
}

.transcription-table td {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}

.transcription-table tr:hover {
  background: var(--bg-secondary);
}

.transcription-symbol {
  font-family: monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-align: center;
  min-width: 60px;
  position: relative;
}

.sound-btn {
  background: var(--success-color);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: block;
  margin: 0.5rem auto 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sound-btn:hover {
  background: var(--success-color);
  transform: scale(1.1);
}

.sound-btn.playing {
  background: var(--primary-color);
  animation: pulse 1s infinite;
}

.sound-icon {
  font-size: 1rem;
}

.pronunciation-cell {
  text-align: center;
  min-width: 100px;
}

.pronounce-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 120px;
  justify-content: center;
}

.pronounce-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

.pronounce-btn.playing {
  background: var(--success-color);
  animation: pulse 2s infinite;
}

.examples-cell {
  color: var(--text-secondary);
  line-height: 1.6;
}

.example-word {
  font-weight: 600;
  color: var(--text-primary);
}

.example-transcription {
  font-family: monospace;
  color: var(--primary-color);
  margin-left: 0.5rem;
}

.description-cell {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Pronunciation Guide */
.pronunciation-guide {
  padding: 4rem 0;
}

.guide-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.guide-card {
  background: var(--bg-primary);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.guide-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.guide-card h3 {
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-size: 1.25rem;
}

.guide-card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Practice Section */
.practice-section {
  padding: 4rem 0;
  background: var(--bg-secondary);
}

.practice-exercise {
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-primary);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.exercise-controls {
  text-align: center;
  margin-bottom: 2rem;
}

.exercise-controls .btn {
  margin: 0 auto;
  display: block;
}

.quiz-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
}

.quiz-interface {
  text-align: center;
}

.question-container {
  margin-bottom: 2rem;
}

.question-text {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.play-question-audio {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  min-width: 200px;
  justify-content: center;
}

.play-question-audio:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: scale(1.05);
}

.play-question-audio:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.play-question-audio.playing {
  background: var(--success-color);
  animation: pulse 2s infinite;
}

.audio-icon {
  font-size: 1.2rem;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.option-btn {
  padding: 1.5rem 1rem;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.2s ease;
  font-family: monospace;
}

.option-btn:hover:not(:disabled) {
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.option-btn.correct {
  background: var(--success-color);
  color: white;
  border-color: var(--success-color);
}

.option-btn.incorrect {
  background: var(--error-color);
  color: white;
  border-color: var(--error-color);
}

.option-btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.quiz-feedback {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-align: center;
}

.quiz-feedback.correct {
  background: var(--bg-secondary);
  border: 1px solid var(--success-color);
  padding: 1.5rem;
}

.quiz-feedback.incorrect {
  background: var(--bg-secondary);
  border: 1px solid var(--error-color);
  padding: 1.5rem;
}

.feedback-correct,
.feedback-incorrect {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.feedback-correct {
  color: var(--success-color);
}

.feedback-incorrect {
  color: var(--error-color);
}

.feedback-word-info {
  background: rgba(255, 255, 255, 0.7);
  padding: 1rem;
  border-radius: var(--radius-md);
  margin: 1rem 0;
  border-left: 4px solid var(--primary-color);
}

.feedback-word-info strong {
  color: var(--text-primary);
}

.feedback-explanation {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.quiz-actions {
  text-align: center;
  margin-top: 1rem;
}

/* Related Topics */
.related-topics {
  padding: 4rem 0;
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.topic-card {
  background: var(--bg-primary);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.topic-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.topic-card h3 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.topic-card p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.topic-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.topic-link:hover {
  color: var(--primary-dark);
}

.topic-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.topic-links .topic-link {
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.topic-links .topic-link:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Animation for table rows */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.transcription-table tbody tr {
  animation: fadeInUp 0.5s ease forwards;
}

/* Responsive Design */
@media (max-width: 768px) {
  .transcription-table {
    font-size: 0.9rem;
  }

  .transcription-table th,
  .transcription-table td {
    padding: 0.75rem 0.5rem;
  }

  .transcription-symbol {
    font-size: 1.25rem;
  }

  .pronounce-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    min-width: 100px;
  }

  .sounds-filter {
    flex-direction: column;
    align-items: center;
  }

  .filter-btn {
    width: 100%;
    max-width: 200px;
  }

  .guide-content {
    grid-template-columns: 1fr;
  }

  .options-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .practice-exercise {
    padding: 1.5rem;
  }

  .play-question-audio {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    min-width: 180px;
  }
}

@media (max-width: 480px) {
  .transcription-table-container {
    overflow-x: auto;
  }

  .transcription-table {
    min-width: 500px;
  }

  .options-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 1.5rem;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .guide-card {
    padding: 1.5rem;
  }
}

/* Print Styles */
@media print {

  .pronounce-btn,
  .sounds-filter,
  .practice-section,
  .quiz-interface {
    display: none !important;
  }

  .transcription-table {
    break-inside: avoid;
  }
}