/* ============================================================
   BLOG FLASHCARDS — styles
   ============================================================ */

.blog-flashcards,
.bfc-wrap {
  background: #FFFFFF;
  border: 2px solid #C8A97E;
  border-radius: 12px;
  padding: 24px;
  margin: 32px 0;
  font-family: 'DM Sans', 'DM Sans Fallback', -apple-system, sans-serif;
  box-shadow: 0 4px 20px rgba(15, 25, 35, 0.06);
}

.bfc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.bfc-progress-text {
  font-size: 0.95em;
  color: #4B5563;
  font-weight: 600;
}

.bfc-progress-text .bfc-known-count {
  color: #16A34A;
  font-size: 1.2em;
}

.bfc-reset-btn {
  background: transparent;
  border: 1px solid #E5E5E5;
  color: #6B7280;
  padding: 6px 12px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.85em;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.bfc-reset-btn:hover {
  background: #F5F0E6;
  border-color: #C8A97E;
  color: #0F1923;
}

.bfc-progress-bar {
  background: #F5F0E6;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 24px;
}

.bfc-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #16A34A, #22C55E);
  transition: width 0.4s ease;
  border-radius: 3px;
}

/* Card */
.bfc-stage {
  perspective: 1000px;
  min-height: 300px;
}

.bfc-card {
  width: 100%;
  height: 240px;
  cursor: pointer;
  position: relative;
  perspective: 1000px;
}

.bfc-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.bfc-card[data-flipped="true"] .bfc-card-inner {
  transform: rotateY(180deg);
}

@media (prefers-reduced-motion: reduce) {
  .bfc-card-inner { transition: none; }
}

.bfc-card-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border-radius: 16px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 2px solid #E8DFC9;
  text-align: center;
}

.bfc-card-front {
  background: linear-gradient(135deg, #FAFAF7, #F5F0E6);
  color: #0F1923;
}

.bfc-card-back {
  background: linear-gradient(135deg, #0F1923, #1A2638);
  color: #F5F0E6;
  transform: rotateY(180deg);
  border-color: #1A2638;
}

.bfc-card-text {
  font-family: 'DM Serif Display', 'DM Serif Fallback', Georgia, serif;
  font-size: 2.4em;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 12px;
}

.bfc-card-text-back {
  font-family: 'DM Serif Display', 'DM Serif Fallback', Georgia, serif;
  font-size: 2em;
  font-weight: 400;
  line-height: 1.2;
  color: #C8A97E;
  margin-bottom: 12px;
}

.bfc-card-example {
  font-size: 0.95em;
  color: rgba(245, 240, 230, 0.85);
  font-style: italic;
  max-width: 400px;
  line-height: 1.5;
  margin-top: 12px;
}

.bfc-card-hint {
  font-size: 0.85em;
  color: #9CA3AF;
  font-style: italic;
  margin-top: 16px;
}

.bfc-audio-btn {
  background: #0F1923;
  color: #F5F0E6;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-top: 12px;
  transition: background 0.15s, transform 0.1s;
}

.bfc-audio-btn:hover {
  background: #1A2638;
  transform: scale(1.05);
}

.bfc-audio-btn:active {
  transform: scale(0.95);
}

/* Actions */
.bfc-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.bfc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95em;
  cursor: pointer;
  border: 2px solid;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.bfc-btn-again {
  background: #FFFFFF;
  border-color: #FCA5A5;
  color: #B91C1C;
}

.bfc-btn-again:hover {
  background: #FEE2E2;
  border-color: #DC2626;
}

.bfc-btn-known {
  background: #FFFFFF;
  border-color: #86EFAC;
  color: #15803D;
}

.bfc-btn-known:hover {
  background: #DCFCE7;
  border-color: #16A34A;
}

.bfc-btn:active {
  transform: scale(0.97);
}

/* Complete state */
.bfc-complete {
  text-align: center;
  padding: 40px 20px;
}

.bfc-complete-icon {
  color: #C8A97E;
  margin-bottom: 12px;
}

.bfc-complete-title {
  font-family: 'DM Serif Display', 'DM Serif Fallback', Georgia, serif;
  font-size: 1.6em;
  color: #0F1923;
  margin-bottom: 12px;
}

.bfc-complete-msg {
  color: #4B5563;
  margin-bottom: 24px;
  line-height: 1.5;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.bfc-restart-btn {
  background: #0F1923;
  color: #F5F0E6;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.bfc-restart-btn:hover {
  background: #1A2638;
}

/* Mobile */
@media (max-width: 600px) {
  .blog-flashcards, .bfc-wrap {
    padding: 18px 14px;
    margin: 24px -14px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  .bfc-card {
    height: 200px;
  }
  .bfc-card-text {
    font-size: 1.8em;
  }
  .bfc-card-text-back {
    font-size: 1.5em;
  }
  .bfc-actions {
    grid-template-columns: 1fr;
  }
  .bfc-btn {
    padding: 16px;
  }
}
