:root {
  --success: var(--ok);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.flashcards-header .nav {
  padding: 18px 20px;
}

.flashcards-layout {
  flex: 1;
  display: flex;
  justify-content: center;
  padding-top: 38px;
  padding-bottom: 64px;
}

.flashcards-panel {
  width: min(760px, 100%);
  background: var(--paper);
  border: 1px solid rgba(40, 50, 70, 0.08);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
  padding: clamp(28px, 5vw, 48px);
  display: flex;
  flex-direction: column;
  gap: clamp(22px, 4vw, 32px);
}

.panel-header .kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(233, 168, 107, 0.22);
  color: #8a5e2f;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  margin-bottom: 10px;
}

.panel-header h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.1;
}

.panel-header .muted {
  margin-top: 12px;
  line-height: 1.6;
}

.session-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.info-block {
  background: rgba(47, 72, 88, 0.08);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-block.soft {
  background: rgba(26, 157, 87, 0.16);
  border: 1px solid rgba(26, 157, 87, 0.22);
}

.info-block .label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
}

.info-block .value {
  font-size: 24px;
  font-weight: 700;
  color: var(--brand-2);
}

.card-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 260px;
}

.flashcard {
  width: min(540px, 100%);
  min-height: 240px;
  position: relative;
  perspective: 1000px;
  transform-style: preserve-3d;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid rgba(40, 50, 70, 0.08);
  background: #fdfaf5;
  box-shadow: 0 22px 48px rgba(25, 35, 55, 0.18);
  transition: transform 0.7s ease;
}

.flashcard.revealed {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  padding: clamp(26px, 5vw, 40px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  backface-visibility: hidden;
  border-radius: inherit;
}

.card-label {
  position: absolute;
  top: clamp(16px, 4vw, 24px);
  right: clamp(16px, 4vw, 24px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(47, 72, 88, 0.12);
  color: var(--brand-2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.card-front {
  font-size: clamp(28px, 5vw, 44px);
  color: var(--ink);
}

.card-back {
  transform: rotateY(180deg);
  background: #ffffff;
  border: 1px solid rgba(233, 168, 107, 0.45);
  font-size: clamp(26px, 4.6vw, 42px);
  font-weight: 700;
  color: var(--brand-2);
}

.card-title,
.card-translation {
  margin: 0;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(22, 24, 29, 0.54);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}

.overlay.hidden {
  display: none;
}

.overlay__card {
  background: var(--paper);
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(28px, 5vw, 42px);
  max-width: 520px;
  text-align: center;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.overlay__card h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: clamp(26px, 3vw, 34px);
}

.overlay__card p {
  margin-bottom: 22px;
  color: var(--muted);
  line-height: 1.6;
}

.overlay__actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.overlay .btn {
  min-width: 180px;
}

@media (max-width: 680px) {
  .info-block .value {
    font-size: 20px;
  }

  .flashcard {
    min-height: 200px;
  }
}

@media (max-width: 520px) {
  .session-info {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
  .overlay .btn {
    width: 100%;
  }
}

.flashcard.transitioning-out {
  animation: cardExit 0.45s ease forwards;
}

.flashcard.transitioning-in {
  animation: cardEnter 0.45s ease forwards;
}

@keyframes cardExit {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(-120%); }
}

@keyframes cardEnter {
  from { opacity: 0; transform: translateX(120%); }
  to { opacity: 1; transform: translateX(0); }
}



.cta-panel-simple {
  background: linear-gradient(135deg, #fdfbf7, #f9f6f1);
  border: 2px solid rgba(233, 168, 107, 0.3);
  border-radius: calc(var(--radius) + 2px);
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: center;
  box-shadow: 0 2px 8px rgba(233, 168, 107, 0.08);
}

.cta-panel-simple .cta-icon {
  font-size: 48px;
  flex-shrink: 0;
  line-height: 1;
}

.cta-panel-simple .cta-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cta-panel-simple .cta-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.cta-panel-simple .cta-text {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.4;
}

.cta-panel-simple .btn {
  align-self: center;
  min-width: 200px;
}

@media (max-width: 540px) {
  .cta-panel-simple {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }

  .cta-panel-simple .btn {
    align-self: stretch;
    width: 100%;
  }
}

.back-link-container {
  margin-top: 24px;
  text-align: center;
}

.back-link {
  display: inline-block;
  font-size: 15px;
  color: var(--brand-2);
  text-decoration: none;
  padding: 10px 16px;
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.back-link:hover {
  color: var(--brand);
  background: rgba(233, 168, 107, 0.1);
}


.dual-display {
  position: absolute;
  inset: 0;
  display: none;
  padding: clamp(28px, 6vw, 44px);
  gap: clamp(18px, 5vw, 28px);
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  background: linear-gradient(135deg, #ffffff, #f9f6f1);
  border: 1px solid rgba(47, 72, 88, 0.18);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: 0 18px 36px rgba(25, 35, 55, 0.18);
  z-index: 2;
}

.dual-display.visible {
  display: flex;
  animation: dualFade 0.3s ease;
}

.dual-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.dual-text {
  margin: 0;
  font-size: clamp(26px, 4.2vw, 34px);
  font-weight: 500;
  color: var(--brand-2);
  text-align: center;
}





@keyframes dualFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.dual-display.hidden {
  display: none;
}

.flashcard.dual-mode .card-face {
  visibility: hidden;
}


.dual-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 4vw, 24px);
}




.dual-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(47, 72, 88, 0.14);
  color: var(--brand-2);
  font-size: 13px;
  font-weight: 500;
}



