/* Study Mode CSS — Flashcard v4 */
.study-main { max-width: 680px; margin: 0 auto; padding: 24px; min-height: calc(100vh - 64px); }

.study-setup h1 { font-size: 2rem; font-weight: 900; margin-bottom: 8px; color: #2D3436; }
.study-setup > p { color: #636E72; margin-bottom: 24px; }
.setup-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 16px; margin-bottom: 24px; }

/* Progress bar */
.study-progress { margin-bottom: 20px; }
.study-prog-inner { display: flex; align-items: center; gap: 12px; }
.prog-bar-wrap { flex: 1; height: 8px; background: #E0E0E0; border-radius: 4px; overflow: hidden; }
.prog-bar-fill { height: 100%; background: linear-gradient(90deg,#6C5CE7,#A29BFE); border-radius: 4px; transition: width .3s ease; }
.prog-known { font-size: 13px; font-weight: 700; color: #00B894; min-width: 70px; }
#prog-count { font-size: 13px; font-weight: 700; color: #636E72; min-width: 50px; text-align: right; }

/* Flip card */
.flip-container {
  perspective: 1200px;
  width: 100%; max-width: 400px; height: 520px;
  margin: 0 auto 20px; cursor: pointer;
  transition: transform .1s;
}
.flip-container:active { transform: scale(0.98); }
.flip-container.is-known { outline: 3px solid #00B894; border-radius: 14px; }
.flip-card {
  width: 100%; height: 100%;
  position: relative; transform-style: preserve-3d;
  transition: transform .5s ease;
  border-radius: 14px;
}
.flip-card.flipped { transform: rotateY(180deg); }
.flip-front, .flip-back {
  position: absolute; inset: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 14px; padding: 28px 24px;
  display: flex; flex-direction: column; align-items: center;
  box-shadow: 0 8px 32px rgba(108,92,231,.18);
  background: #fff;
}
.flip-back { transform: rotateY(180deg); justify-content: center; }

.card-emoji { font-size: 80px; margin-bottom: 8px; }
.card-primary-word { font-size: 44px; font-weight: 900; color: #2D3436; line-height: 1.1; text-align: center; }
.card-phonetic { font-size: 18px; color: #6C5CE7; font-style: italic; margin-top: 8px; }
.card-tap-hint { position: absolute; bottom: 20px; font-size: 12px; color: #B2BEC3; }

.card-others { width: 100%; margin-top: 16px; }
.card-other-lang { display: flex; align-items: baseline; gap: 8px; padding: 6px 0;
  border-bottom: 1px solid #f0f0f0; }
.card-other-lang:last-child { border-bottom: none; }
.other-lang-name { font-size: 12px; font-weight: 700; color: #636E72; min-width: 70px; }
.other-word { font-size: 18px; font-weight: 700; color: #2D3436; }
.other-phonetic { font-size: 12px; color: #A29BFE; font-style: italic; }
.card-sentence { font-size: 12px; color: #B2BEC3; font-style: italic; margin-top: 12px; text-align: center; line-height: 1.5; }

/* Controls */
.study-controls {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}
.ctrl-btn {
  flex: 1; padding: 14px 8px; border: none; border-radius: 12px;
  font-family: 'Nunito',sans-serif; font-size: 14px; font-weight: 800;
  cursor: pointer; transition: all .2s;
}
.ctrl-unknown { background: #FFE0E0; color: #E17055; }
.ctrl-unknown:hover { background: #E17055; color: #fff; }
.ctrl-known   { background: #D4EDDA; color: #00B894; }
.ctrl-known:hover   { background: #00B894; color: #fff; }
.ctrl-center  { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ctrl-audio {
  width: 52px; height: 52px; border-radius: 50%; border: 2px solid #A29BFE;
  background: #fff; font-size: 22px; cursor: pointer; transition: all .2s;
}
.ctrl-audio:hover { background: #6C5CE7; border-color: #6C5CE7; }
.topic-badge { font-size: 11px; font-weight: 700; color: #6C5CE7; background: #E3E1FF;
  padding: 2px 8px; border-radius: 10px; }

/* Nav */
.study-nav { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
