/* ═══════════════════════════════════════════════
   FLASHCARDS — Raffaella's World
   Stili specifici di flashcards/index.html
   ═══════════════════════════════════════════════ */

/* Contenitore più stretto: studio su singola colonna */
.wrap { max-width: 680px; }

/* ── Piano di oggi ── */
.today-plan {
  padding: 16px 20px;
  margin-bottom: 18px;
  opacity: 0;
  animation: fadeUp 0.8s 0.5s ease forwards;
}
.tp-title {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 10px;
}
.plan-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(181, 216, 224, 0.35);
  font-size: 0.85rem;
}
.plan-row:last-child { border-bottom: none; }
.plan-bnum {
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--bark);
  width: 22px;
}
.plan-info { flex: 1; font-size: 0.82rem; color: var(--text-light); }
.plan-info.due   { color: var(--c-green); font-weight: 700; }
.plan-info.new   { color: var(--c-red);   font-weight: 700; }
.plan-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 10px;
  letter-spacing: 0.04em;
}
.badge-due  { background: rgba(58, 138, 117, 0.14); color: var(--c-green); }
.badge-wait { background: rgba(60, 143, 168, 0.08); color: var(--text-light); }
.badge-new  { background: rgba(193, 86, 79, 0.12);  color: var(--c-red); }

/* ── Riga scatole ── */
.boxes-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s 0.6s ease forwards;
}
.box-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.7);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 10px 13px;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
  min-width: 80px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.box-pill:hover  { border-color: var(--rose); transform: translateY(-2px); }
.box-pill.active { border-color: var(--rose); background: rgba(181, 216, 224, 0.32); box-shadow: 0 4px 14px rgba(29, 90, 120, 0.12); }
.box-num {
  font-family: "Playfair Display", serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--bark);
}
.box-lbl {
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: var(--text-light);
  text-transform: uppercase;
  margin-top: 2px;
  text-align: center;
  font-weight: 700;
}
.box-cnt  { font-size: 0.72rem; font-weight: 700; color: var(--rose); margin-top: 3px; }
.box-due  {
  font-size: 0.66rem;
  font-weight: 700;
  margin-top: 4px;
  padding: 2px 7px;
  border-radius: 10px;
}
.box-due.today { background: rgba(58, 138, 117, 0.14); color: var(--c-green); }
.box-due.wait  { background: rgba(60, 143, 168, 0.08); color: var(--text-light); }
.box-due.new   { background: rgba(193, 86, 79, 0.12);  color: var(--c-red); }

/* ── Progress ── */
.prow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.plbl {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 0.88rem;
  color: var(--text-light);
}
.pcnt { font-weight: 700; font-size: 0.85rem; color: var(--bark); }
.pbg {
  width: 100%;
  height: 6px;
  background: rgba(181, 216, 224, 0.45);
  border-radius: 10px;
  margin-bottom: 18px;
  overflow: hidden;
}
.pf {
  height: 100%;
  background: linear-gradient(90deg, var(--rose), var(--sage));
  border-radius: 10px;
  transition: width 0.4s;
}

/* ── Card flashcard (flip) ── */
.card-area { perspective: 1200px; margin-bottom: 18px; }
.card-inner {
  position: relative;
  width: 100%;
  height: 240px;
  transform-style: preserve-3d;
  transition: transform 0.6s;
  cursor: pointer;
}
.card-inner.flipped { transform: rotateY(180deg); }
.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  text-align: center;
  box-shadow: 0 6px 24px rgba(29, 90, 120, 0.14);
}
.card-front {
  background: rgba(255, 255, 255, 0.82);
  border: 1.5px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.card-back {
  background: linear-gradient(135deg, var(--deep-rose), #0e2836);
  transform: rotateY(180deg);
  color: var(--cream);
  box-shadow: 0 6px 28px rgba(14, 40, 54, 0.35);
}

.cat-tag {
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 11px;
  border-radius: 20px;
  margin-bottom: 12px;
  font-weight: 700;
}
.cat-grammar  { background: rgba(42, 94, 152, 0.12);  color: var(--c-blue); }
.cat-vocab    { background: rgba(58, 138, 117, 0.14); color: var(--c-green); }
.cat-idiom    { background: rgba(78, 95, 174, 0.12);  color: var(--c-purple); }
.cat-false    { background: rgba(193, 86, 79, 0.12);  color: var(--c-red); }
.cat-spelling { background: rgba(200, 138, 62, 0.14); color: var(--c-orange); }

.cq {
  font-family: "Playfair Display", serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--bark);
  line-height: 1.3;
}
.cans {
  font-family: "Playfair Display", serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--cream);
  line-height: 1.4;
  margin-bottom: 10px;
}
.cnote {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 0.9rem;
  color: rgba(238, 244, 247, 0.78);
  line-height: 1.5;
}
.flip-hint {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 16px;
}

/* ── Bottoni azione card ── */
.card-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.btn-flip {
  background: var(--bark);
  color: var(--cream);
  padding: 10px 22px;
  font-size: 0.85rem;
  border-radius: 50px;
}
.btn-wrong {
  background: rgba(193, 86, 79, 0.1);
  color: var(--c-red);
  border: 1.5px solid rgba(193, 86, 79, 0.38);
  padding: 10px 22px;
  font-size: 0.85rem;
  border-radius: 50px;
}
.btn-right {
  background: rgba(58, 138, 117, 0.12);
  color: var(--c-green);
  border: 1.5px solid rgba(58, 138, 117, 0.38);
  padding: 10px 22px;
  font-size: 0.85rem;
  border-radius: 50px;
}
.btn-again {
  background: linear-gradient(135deg, var(--rose), var(--deep-rose));
  color: #fff;
  padding: 10px 22px;
  font-size: 0.85rem;
  border-radius: 50px;
  box-shadow: 0 4px 14px rgba(29, 90, 120, 0.28);
}

/* ── Stato vuoto / completato ── */
.empty-state, .done-state {
  background: rgba(255, 255, 255, 0.5);
  border: 2px dashed var(--border);
  border-radius: 18px;
  padding: 34px 24px;
  text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.es-icon { font-size: 2.5rem; margin-bottom: 12px; }
.es-title {
  font-family: "Playfair Display", serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--bark);
  margin-bottom: 6px;
}
.es-title em { font-style: italic; color: var(--rose); }
.es-sub {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* ── Azioni in basso ── */
.actions-row {
  display: flex;
  justify-content: center;
  margin-top: 14px;
  flex-wrap: wrap;
  gap: 10px;
}
.btn-reset {
  background: transparent;
  color: var(--c-orange);
  border: 1.5px solid rgba(200, 138, 62, 0.42);
}

/* ── Footer override ── */
footer { padding: 22px; margin-top: 16px; }

/* ── Mobile ── */
@media (max-width: 520px) {
  .card-inner { height: 220px; }
  .cq  { font-size: 1.2rem; }
  .cans { font-size: 1.15rem; }
  .box-pill { min-width: 70px; padding: 9px 10px; }
  .box-num  { font-size: 1.2rem; }
}
