/* ==================== Shared Flashcard Study Styles ==================== */
/* Used by: words, proofread_entries */

/* Study Stats Bar */
.study-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.stat-label {
  display: block;
  font-size: 14px;
  color: #7f8c8d;
  margin-bottom: 8px;
  font-weight: 500;
}

.stat-value {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: #2c3e50;
}

/* Flashcard Container */
.flashcard-container {
  max-width: 800px;
  margin: 0 auto;
}

.flashcard {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 40px;
  min-height: 400px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Flashcard Front */
.flashcard-front {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 350px;
}

.flashcard-front .word {
  font-size: 42px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 12px 0;
}

.flashcard-front .part-of-speech {
  font-size: 18px;
  color: #7f8c8d;
  margin: 0 0 30px 0;
}

.flashcard-front .context {
  max-width: 600px;
  margin: 0 0 30px 0;
}

.flashcard-front .context p {
  font-size: 18px;
  line-height: 1.6;
  color: #34495e;
  font-style: italic;
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #3498db;
}

/* Flashcard Back */
.flashcard-back {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.flashcard-back .word {
  font-size: 36px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
  text-align: center;
}

.flashcard-back .pronunciation {
  font-size: 18px;
  color: #7f8c8d;
  font-style: italic;
  text-align: center;
  margin: 0 0 20px 0;
}

.flashcard-back .pronunciation .pronunciation-audio-btn {
  background: #3498db;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  width: 26px;
  height: 26px;
  margin-left: 8px;
  vertical-align: middle;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  color: white;
  transition: box-shadow 0.2s, transform 0.1s;
}

.flashcard-back .pronunciation .pronunciation-audio-btn:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transform: scale(1.1);
}

.flashcard-back .pronunciation .pronunciation-audio-btn:active {
  transform: scale(0.95);
}

/* Assessment Form */
.assessment-form {
  width: 100%;
}

/* Assessment Questions */
.assessment-questions {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  text-align: left;
}

.question-block {
  width: 100%;
  margin-bottom: 32px;
}

.question-label {
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 8px 0;
}

.question-text {
  font-size: 15px;
  color: #34495e;
  line-height: 1.6;
  margin: 0 0 12px 0;
}

.answer-input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.answer-input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.answer-input::placeholder {
  color: #95a5a6;
}

.submit-assessment-btn {
  margin-top: 20px;
}

/* Evaluation Results */
.evaluation-section {
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 2px solid #e0e0e0;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: #7f8c8d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 20px 0;
  text-align: center;
}

.overall-summary {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
  text-align: center;
}

.summary-text {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 16px 0;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 400px;
  margin: 0 auto;
}

.score-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.score-label {
  font-size: 14px;
  color: #7f8c8d;
  font-weight: 500;
}

.score-value {
  font-size: 24px;
  font-weight: 700;
  color: #2c3e50;
}

/* Familiarity Badges */
.familiarity-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.familiarity-again {
  background-color: #fee;
  color: #c0392b;
}

.familiarity-hard {
  background-color: #fff3e0;
  color: #d68910;
}

.familiarity-good {
  background-color: #e8f5e9;
  color: #1e8449;
}

.familiarity-easy {
  background-color: #e3f2fd;
  color: #2980b9;
}

/* Answer Evaluations */
.answer-evaluations {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.answer-evaluation {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
}

.evaluation-title {
  font-size: 16px;
  font-weight: 600;
  color: #3498db;
  margin: 0 0 12px 0;
}

.user-answer {
  font-size: 15px;
  color: #34495e;
  font-style: italic;
  background: #f8f9fa;
  padding: 12px;
  border-radius: 4px;
  border-left: 4px solid #3498db;
  margin: 0 0 12px 0;
}

.evaluation-score {
  font-size: 14px;
  color: #2c3e50;
  margin: 0 0 8px 0;
}

.evaluation-feedback {
  font-size: 15px;
  color: #34495e;
  line-height: 1.6;
  margin: 0;
}

.improved-answer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #ecf0f1;
}

.improved-label {
  font-size: 14px;
  color: #7f8c8d;
  margin: 0 0 8px 0;
}

.improved-text {
  font-size: 15px;
  color: #2c3e50;
  font-style: italic;
  background: #f8f9fa;
  padding: 12px;
  border-radius: 4px;
  margin: 0 0 8px 0;
}

.improved-explanation {
  font-size: 14px;
  color: #7f8c8d;
  margin: 0;
}

/* Next Card Section */
.next-card-section {
  margin-top: 30px;
  text-align: center;
}

/* Missed Corrections (Proofreading specific but shared styling) */
.missed-corrections {
  margin-top: 20px;
  padding: 16px;
  background: #fff8e1;
  border-radius: 8px;
  border-left: 4px solid #f39c12;
}

.missed-corrections h4 {
  font-size: 14px;
  font-weight: 600;
  color: #d68910;
  margin: 0 0 12px 0;
}

.missed-corrections ul {
  margin: 0;
  padding-left: 20px;
}

.missed-corrections li {
  font-size: 14px;
  color: #34495e;
  line-height: 1.6;
  margin-bottom: 4px;
}

/* Text Comparison (Proofreading results) */
.proofreading-comparison {
  margin-bottom: 20px;
}

.text-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.comparison-block h4 {
  font-size: 14px;
  font-weight: 600;
  color: #7f8c8d;
  margin: 0 0 8px 0;
}

.comparison-block p {
  font-size: 15px;
  line-height: 1.6;
  color: #34495e;
  background: #f8f9fa;
  padding: 16px;
  border-radius: 8px;
  margin: 0;
}

.comparison-block .original-text {
  border-left: 4px solid #e74c3c;
}

.comparison-block .corrected-text {
  border-left: 4px solid #27ae60;
}

.comparison-block .user-correction-text {
  border-left: 4px solid #3498db;
}

.correct-version-block {
  margin-bottom: 20px;
}

.explanation-block {
  background: #f0f8ff;
  border-radius: 8px;
  padding: 16px;
  border-left: 4px solid #3498db;
}

.explanation-block h4 {
  font-size: 14px;
  font-weight: 600;
  color: #3498db;
  margin: 0 0 8px 0;
}

.explanation-block p {
  font-size: 15px;
  color: #34495e;
  line-height: 1.6;
  margin: 0;
}

/* Upcoming Cards Table */
.upcoming-cards {
  margin-top: 30px;
  text-align: left;
}

.upcoming-cards h3 {
  font-size: 18px;
  color: #34495e;
  margin-bottom: 12px;
  text-align: center;
}

.upcoming-cards-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.upcoming-cards-table th,
.upcoming-cards-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #ecf0f1;
}

.upcoming-cards-table th {
  font-weight: 600;
  color: #7f8c8d;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.upcoming-cards-table td {
  color: #34495e;
}

.upcoming-cards-table tr:last-child td {
  border-bottom: none;
}
