/* -------------------------------------------------------------
 * LeafBrowser - Flashcard Maker
 * Modern SaaS UI Redesign with 3D Card Animation
 * ------------------------------------------------------------- */

.leaf-fc-shortcut-hint {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 500;
}

/* ── Deck Bar ───────────────────────────────────────────────── */
.leaf-fc-deck-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.25rem 1.75rem;
  margin-bottom: 1.75rem;
}

.leaf-fc-deck-select-wrap,
.leaf-fc-deck-new-wrap {
  display: flex;
  flex-direction: column;
}

/* ── Edit Mode: Card Rows ───────────────────────────────────── */
.leaf-fc-cols-header {
  display: grid;
  grid-template-columns: 1fr 1fr 38px;
  gap: 0.85rem;
  margin-bottom: 0.5rem;
  padding: 0 0.5rem;
}

.leaf-fc-card-list {
  margin-bottom: 1.5rem;
}

.leaf-fc-card-row {
  display: grid;
  grid-template-columns: 1fr 1fr 38px;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
  align-items: flex-start;
}

.leaf-fc-card-row textarea {
  width: 100%;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.95rem;
  resize: vertical;
  min-height: 70px;
  line-height: 1.5;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-family: inherit;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.leaf-fc-card-row textarea:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

.leaf-fc-rm-card {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  margin-top: 8px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.leaf-fc-rm-card:hover {
  color: #ef4444;
  background-color: #fee2e2;
  transform: scale(1.08);
}

/* ── Review Mode: 3D Animated Flip Card ─────────────────────── */
.leaf-fc-review-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  padding: 1rem 0;
}

.leaf-fc-progress-text {
  font-size: 0.88rem;
  color: #64748b;
  font-weight: 700;
  margin-top: 0.5rem;
  text-align: center;
}

/* 3D Flip Card Container */
.leaf-fc-scene {
  width: 100%;
  max-width: 540px;
  height: 300px;
  perspective: 1200px;
  cursor: pointer;
}

.leaf-fc-card-flip {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.leaf-fc-card-flip.flipped {
  transform: rotateY(180deg);
}

.leaf-fc-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem 2.25rem;
  box-sizing: border-box;
  box-shadow: 0 16px 36px -10px rgba(15, 23, 42, 0.12), 0 0 1px 1px rgba(15, 23, 42, 0.05);
  transition: box-shadow 0.25s ease;
}

.leaf-fc-scene:hover .leaf-fc-face {
  box-shadow: 0 20px 44px -10px rgba(15, 23, 42, 0.18), 0 0 1px 1px rgba(16, 185, 129, 0.2);
}

.leaf-fc-face-front {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
}

.leaf-fc-face-back {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  color: #0f172a;
  transform: rotateY(180deg);
}

.leaf-fc-face-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.leaf-fc-face-label {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}

.leaf-fc-flip-icon {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.2);
}

.leaf-fc-face-back .leaf-fc-flip-icon {
  background: #f1f5f9;
  color: #64748b;
}

.leaf-fc-face-text {
  font-size: clamp(1.15rem, 2.8vw, 1.55rem);
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  margin: auto 0;
  max-height: 150px;
  overflow-y: auto;
}

.leaf-fc-tap-hint {
  font-size: 0.82rem;
  opacity: 0.75;
  text-align: center;
}

/* ── Review Buttons ─────────────────────────────────────────── */
.leaf-fc-controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

.leaf-fc-btn-know {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  padding: 13px 32px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.leaf-fc-btn-know:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.45);
}

.leaf-fc-btn-again {
  background: #ffffff;
  color: #dc2626;
  border: 2px solid #fca5a5;
  border-radius: 9999px;
  padding: 12px 30px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.leaf-fc-btn-again:hover {
  background: #fef2f2;
  border-color: #dc2626;
  transform: translateY(-2px);
}

.leaf-fc-btn-flip {
  background: #f8fafc;
  color: #334155;
  border: 1.5px solid #cbd5e1;
  border-radius: 9999px;
  padding: 12px 26px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.leaf-fc-btn-flip:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

/* ── Session Complete Celebration ───────────────────────────── */
.leaf-fc-complete {
  text-align: center;
  padding: 2.5rem 1.5rem;
  display: none;
  animation: leafFadeIn 0.35s ease;
}

.leaf-fc-complete.visible {
  display: block;
}

.leaf-fc-complete-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.leaf-fc-complete-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.leaf-fc-complete-sub {
  color: #64748b;
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.leaf-fc-deck-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.leaf-fc-stat-pill {
  padding: 1.25rem 1rem;
  border-radius: 16px;
  text-align: center;
}

.leaf-fc-stat-pill.green {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.leaf-fc-stat-pill.red {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.leaf-fc-stat-pill.gray {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.leaf-fc-stat-pill strong {
  font-size: 2.25rem;
  font-weight: 800;
  display: block;
  line-height: 1.1;
  margin-bottom: 4px;
}

.leaf-fc-stat-pill span {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
