/* ===== VOCABULARY ENGINE ===== */

.vocab-app {
  padding-top: 60px;
  min-height: 100vh;
  background: var(--slate-bg);
}

.vocab-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* Hero */
.vocab-hero {
  text-align: center;
  padding: 48px 0 32px;
}

.vocab-title {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--dark);
  margin: 12px 0 8px;
}

.vocab-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Hero stat badges */
.vocab-hero-stats {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}

.vocab-hero-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--white);
  border: 1px solid var(--slate-border);
  border-radius: 8px;
}

.vocab-hero-stat-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
}

.vocab-hero-stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* Two-column layout */
.vocab-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: start;
}

.vocab-main {
  min-width: 0;
}

/* Sidebar */
.vocab-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 84px;
}

.vocab-sidebar-card {
  background: var(--white);
  border: 1px solid var(--slate-border);
  border-radius: 10px;
  padding: 20px;
}

.vocab-sidebar-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 14px;
}

/* Leaderboard */
.vocab-leaderboard {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.vocab-leaderboard-loading {
  font-size: 0.8rem;
  color: var(--text-soft);
  text-align: center;
  padding: 12px 0;
}

.vocab-lb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--slate-border);
}

.vocab-lb-row:last-child {
  border-bottom: none;
}

.vocab-lb-row--you {
  background: rgba(147, 51, 234, 0.06);
  margin: 0 -12px;
  padding: 10px 12px;
  border-radius: 8px;
  border-bottom: none;
}

.vocab-lb-rank {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-soft);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--slate-bg);
}

.vocab-lb-rank--gold {
  color: #fff;
  background: linear-gradient(135deg, #F59E0B, #D97706);
}

.vocab-lb-rank--silver {
  color: #fff;
  background: linear-gradient(135deg, #94A3B8, #64748B);
}

.vocab-lb-rank--bronze {
  color: #fff;
  background: linear-gradient(135deg, #D97706, #B45309);
}

.vocab-lb-avatar {
  width: 28px;
  height: 28px;
  background: var(--slate-bg);
  border: 2px solid var(--slate-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
}

.vocab-lb-row--you .vocab-lb-avatar {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.vocab-lb-name {
  flex: 1;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vocab-lb-xp {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(147, 51, 234, 0.08);
  padding: 2px 8px;
  border-radius: 10px;
}

/* Progress ring */
.vocab-progress-overview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.vocab-progress-ring {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.vocab-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.vocab-ring-bg {
  fill: none;
  stroke: #E2E8F0;
  stroke-width: 3.5;
}

.vocab-ring-fill {
  fill: none;
  stroke: url(#vocab-ring-gradient);
  stroke-width: 3.5;
  stroke-linecap: round;
  transition: stroke-dasharray 0.6s ease;
}

.vocab-ring-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent);
}

.vocab-progress-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}

.vocab-progress-detail {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.vocab-progress-detail strong {
  color: var(--dark);
}

.vocab-progress-rank {
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: 4px;
}

/* Tips */
.vocab-tips {
  list-style: none;
  padding: 0;
  margin: 0;
}

.vocab-tips li {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 6px 0;
  border-bottom: 1px solid var(--slate-border);
  line-height: 1.4;
}

.vocab-tips li:last-child {
  border-bottom: none;
}

.vocab-tips li strong {
  color: var(--accent);
}

/* Stats bar */
.vocab-stats-bar {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 16px 24px;
  background: var(--white);
  border: 1px solid var(--slate-border);
  border-radius: 8px;
  margin-bottom: 32px;
}

.vocab-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.vocab-stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
}

.vocab-stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
}

/* Tiers */
.vocab-tier {
  margin-bottom: 36px;
}

.vocab-tier-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--dark);
  margin: 0 0 6px;
}

.vocab-tier-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 16px;
}

.vocab-tier--locked {
  opacity: 0.5;
  pointer-events: none;
}

.vocab-tier--locked .vocab-tier-title {
  color: var(--text-soft);
}

.vocab-lock-icon {
  font-size: 0.85rem;
}

/* Category grid */
.vocab-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.vocab-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 22px 20px 18px;
  background: var(--white);
  border: 1px solid var(--slate-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  width: 100%;
  overflow: hidden;
}

.vocab-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--slate-border);
  transition: background 0.3s;
}

.vocab-card:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 20px rgba(147, 51, 234, 0.1);
  transform: translateY(-2px);
}

.vocab-card:hover::before {
  background: var(--accent);
}

/* Card with progress */
.vocab-card--started::before {
  background: var(--accent);
}

/* Mastered card */
.vocab-card--mastered {
  border-color: #10B981;
}

.vocab-card--mastered::before {
  background: linear-gradient(90deg, #10B981, #34D399);
}

.vocab-card--mastered::after {
  content: '👑';
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 1rem;
}

/* Locked card */
.vocab-card--locked {
  opacity: 0.55;
  cursor: not-allowed;
}

.vocab-card--locked::after {
  content: '🔒';
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 0.85rem;
}

.vocab-card--locked:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--slate-border);
}

.vocab-card-count {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
}

.vocab-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark);
  margin: 6px 0 4px;
}

.vocab-card-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0 0 14px;
  line-height: 1.4;
}

.vocab-card-progress {
  width: 100%;
  height: 5px;
  background: var(--slate-bg);
  border-radius: 3px;
  overflow: hidden;
  margin-top: auto;
}

.vocab-card-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #A855F7);
  border-radius: 3px;
  width: 0%;
  transition: width 0.4s ease;
}

/* Mastered bar */
.vocab-card--mastered .vocab-card-bar {
  background: linear-gradient(90deg, #10B981, #34D399);
}

/* Session header */
.vocab-session-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 0 20px;
}

.vocab-back-btn {
  background: none;
  border: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 4px;
  font-family: inherit;
}

.vocab-back-btn:hover {
  color: var(--dark);
  background: var(--white);
}

.vocab-session-progress {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#vocab-progress-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.vocab-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--white);
  border: 1px solid var(--slate-border);
  border-radius: 3px;
  overflow: hidden;
}

.vocab-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s ease;
}

.vocab-session-xp {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

/* Card area */
.vocab-card-area {
  background: var(--white);
  border: 1px solid var(--slate-border);
  border-radius: 12px;
  padding: 48px 32px;
  text-align: center;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.vocab-question-word {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 4px;
  display: inline;
}

.vocab-audio-btn {
  background: var(--dark);
  border: none;
  border-radius: 4px;
  width: 32px;
  height: 32px;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  vertical-align: middle;
  margin-left: 10px;
  color: #fff;
}

.vocab-audio-btn:hover {
  background: var(--accent);
}

.vocab-word-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.vocab-question-hint {
  font-size: 0.78rem;
  color: var(--text-soft);
  margin-bottom: 32px;
  font-style: italic;
}

.vocab-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  max-width: 500px;
}

.vocab-option {
  padding: 14px 18px;
  background: var(--slate-bg);
  border: 2px solid var(--slate-border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--dark);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  text-align: center;
}

.vocab-option:hover {
  border-color: var(--accent);
  background: rgba(147, 51, 234, 0.04);
}

.vocab-option:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.vocab-option--correct {
  border-color: #10B981;
  background: #ECFDF5;
  color: #065F46;
  font-weight: 600;
}

.vocab-option--wrong {
  border-color: #EF4444;
  background: #FEF2F2;
  color: #991B1B;
  font-weight: 600;
}

.vocab-option--disabled {
  pointer-events: none;
  opacity: 0.7;
}

/* Feedback */
.vocab-feedback {
  text-align: center;
  padding: 20px;
  margin-top: 16px;
  border-radius: 8px;
}

.vocab-feedback--correct {
  background: #ECFDF5;
  border: 1px solid #10B981;
}

.vocab-feedback--wrong {
  background: #FEF2F2;
  border: 1px solid #EF4444;
}

.vocab-feedback-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.vocab-feedback-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 4px;
}

.vocab-feedback-example {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

.vocab-next-btn {
  margin-top: 16px;
  padding: 10px 24px;
  background: var(--dark);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.vocab-next-btn:hover {
  background: var(--accent);
}

/* XP animation */
.vocab-xp-float {
  position: fixed;
  pointer-events: none;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  animation: xpFloat 0.8s ease-out forwards;
  z-index: 9999;
}

@keyframes xpFloat {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-40px); }
}

/* Session complete */
.vocab-view--complete {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
}

.vocab-complete-card {
  background: var(--white);
  border: 1px solid var(--slate-border);
  border-radius: 12px;
  padding: 48px 40px;
  text-align: center;
  max-width: 420px;
  width: 100%;
}

.vocab-complete-icon {
  width: 56px;
  height: 56px;
  background: #ECFDF5;
  border: 2px solid #10B981;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.5rem;
  color: #065F46;
}

.vocab-complete-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--dark);
  margin: 0 0 24px;
}

.vocab-complete-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 32px;
}

.vocab-complete-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.vocab-complete-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--dark);
}

.vocab-complete-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
}

.vocab-complete-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vocab-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.vocab-btn--primary {
  background: var(--dark);
  color: #fff !important;
}

.vocab-btn--primary:hover {
  background: var(--accent);
}

.vocab-btn--secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--slate-border);
}

.vocab-btn--secondary:hover {
  border-color: var(--dark);
  color: var(--dark);
}

/* SEO content */
.vocab-seo {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--slate-border);
}

.vocab-seo h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin: 24px 0 8px;
}

.vocab-seo h2:first-child {
  margin-top: 0;
}

.vocab-seo p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.vocab-seo details {
  border-bottom: 1px solid var(--slate-border);
  padding: 12px 0;
}

.vocab-seo summary {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
}

.vocab-seo details p {
  margin-top: 8px;
}

/* Auth modal */
.vocab-auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
}

.vocab-auth-overlay.open {
  display: flex;
}

.vocab-auth-modal {
  background: var(--white);
  border-radius: 12px;
  padding: 40px 32px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.vocab-auth-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--dark);
  margin: 0 0 8px;
}

.vocab-auth-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 24px;
  line-height: 1.5;
}

.vocab-auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vocab-auth-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--slate-border);
  border-radius: 8px;
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--dark);
  box-sizing: border-box;
}

.vocab-auth-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.08);
}

.vocab-auth-submit {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.vocab-auth-submit:hover {
  background: #7C22CB;
}

.vocab-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  font-size: 0.75rem;
  color: var(--text-soft);
}

.vocab-auth-divider::before,
.vocab-auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--slate-border);
}

.vocab-auth-social {
  display: flex;
  gap: 10px;
}

.vocab-auth-social-btn {
  flex: 1;
  padding: 12px;
  background: var(--white);
  color: var(--dark);
  border: 1px solid var(--slate-border);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.vocab-auth-social-btn:hover {
  border-color: var(--dark);
  background: var(--slate-bg);
}

.vocab-auth-toggle-text {
  font-size: 0.75rem;
  color: var(--text-soft);
  margin-top: 16px;
}

.vocab-auth-toggle-text button {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.75rem;
}

.vocab-auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-soft);
  cursor: pointer;
}

.vocab-auth-error {
  font-size: 0.8rem;
  color: #EF4444;
  margin-top: 8px;
  display: none;
}

/* ===== USER PROFILE BAR ===== */
.vocab-user-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: var(--white);
  border: 1px solid var(--slate-border);
  border-radius: 8px;
  margin-bottom: 24px;
}

.vocab-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vocab-user-avatar {
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.vocab-user-details {
  display: flex;
  flex-direction: column;
}

.vocab-user-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--dark);
}

.vocab-user-level {
  font-size: 0.7rem;
  color: var(--text-soft);
}

.vocab-user-stats {
  display: flex;
  gap: 20px;
  margin-left: auto;
}

.vocab-logout-btn {
  background: none;
  border: 1px solid var(--slate-border);
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.vocab-logout-btn:hover {
  border-color: #EF4444;
  color: #EF4444;
}

/* Guest bar */
.vocab-guest-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(147, 51, 234, 0.04);
  border: 1px solid rgba(147, 51, 234, 0.15);
  border-radius: 8px;
  margin-bottom: 24px;
}

.vocab-guest-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.vocab-guest-signin {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.vocab-guest-signin:hover {
  background: #7C22CB;
}

/* ===== MODE PICKER ===== */
.vocab-view--mode {
  padding-top: 24px;
}

.vocab-mode-card {
  background: var(--white);
  border: 1px solid var(--slate-border);
  border-radius: 16px;
  padding: 48px 36px;
  text-align: center;
  max-width: 520px;
  margin: 32px auto 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.vocab-mode-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--dark);
  margin: 0 0 8px;
}

.vocab-mode-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0 0 32px;
}

.vocab-mode-options {
  display: flex;
  gap: 16px;
}

.vocab-mode-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 20px;
  background: var(--slate-bg);
  border: 2px solid var(--slate-border);
  border-radius: 14px;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  transition: all 0.2s;
}

.vocab-mode-btn:first-child:hover {
  border-color: #3B82F6;
  background: rgba(59, 130, 246, 0.04);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.12);
}

.vocab-mode-btn:last-child:hover {
  border-color: #10B981;
  background: rgba(16, 185, 129, 0.04);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.12);
}

.vocab-mode-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 4px;
}

.vocab-mode-label {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--dark);
  display: block;
}

.vocab-mode-sublabel {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  margin-top: 4px;
  line-height: 1.4;
}

/* ===== LEARN MODE (Flashcard) ===== */
.vocab-flashcard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
}

.vocab-flashcard-word {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  font-weight: 800;
  color: var(--dark);
}

.vocab-flashcard .vocab-word-row {
  margin-bottom: 4px;
}

.vocab-flashcard .vocab-question-word {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
}

.vocab-flashcard-meta {
  font-size: 0.75rem;
  color: var(--text-soft);
  font-style: italic;
}

.vocab-flashcard-divider {
  width: 60px;
  height: 2px;
  background: var(--slate-border);
}

.vocab-flashcard-translation {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent);
}

.vocab-flashcard-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.vocab-flashcard-example {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  max-width: 400px;
  line-height: 1.5;
}

.vocab-flashcard-extra {
  font-size: 0.78rem;
  color: var(--text-soft);
}

.vocab-flashcard-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.vocab-flashcard-btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.vocab-flashcard-btn--know {
  background: #ECFDF5;
  border: 1px solid #10B981;
  color: #065F46;
}

.vocab-flashcard-btn--know:hover {
  background: #10B981;
  color: #fff;
}

.vocab-flashcard-btn--next {
  background: var(--dark);
  border: none;
  color: #fff;
}

.vocab-flashcard-btn--next:hover {
  background: var(--accent);
}

/* Session mode badge */
.vocab-session-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vocab-session-mode {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
}

/* ===== PROFILE MODAL ===== */
.vocab-profile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 24px;
}

.vocab-profile-overlay.open {
  display: flex;
}

.vocab-profile-modal {
  background: var(--white);
  border-radius: 12px;
  padding: 32px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  max-height: 90vh;
  overflow-y: auto;
}

.vocab-profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.vocab-profile-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--dark);
  margin: 0;
}

.vocab-profile-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-soft);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.vocab-profile-close:hover {
  color: var(--dark);
}

.vocab-profile-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.vocab-profile-avatar {
  width: 56px;
  height: 56px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
}

.vocab-profile-provider {
  font-size: 0.7rem;
  color: var(--text-soft);
  font-weight: 500;
}

.vocab-profile-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vocab-profile-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 8px;
}

.vocab-profile-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--slate-border);
  border-radius: 6px;
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--dark);
  box-sizing: border-box;
}

.vocab-profile-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.08);
}

.vocab-profile-input:disabled {
  background: var(--slate-bg);
  color: var(--text-soft);
  cursor: not-allowed;
}

.vocab-profile-save {
  margin-top: 12px;
  padding: 11px 20px;
  background: var(--dark);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.vocab-profile-save:hover {
  background: var(--accent);
}

.vocab-profile-save--secondary {
  background: transparent;
  color: var(--dark);
  border: 1px solid var(--slate-border);
}

.vocab-profile-save--secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
}

.vocab-profile-msg {
  font-size: 0.8rem;
  margin-top: 8px;
  display: none;
}

.vocab-profile-msg.show {
  display: block;
}

.vocab-profile-msg.success {
  color: #10B981;
}

.vocab-profile-msg.error {
  color: #EF4444;
}

.vocab-profile-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--slate-border);
}

.vocab-profile-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 12px;
}

.vocab-profile-stats {
  display: flex;
  gap: 24px;
}

.vocab-profile-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vocab-profile-stat-value {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--dark);
}

.vocab-profile-stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-soft);
}

.vocab-profile-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--slate-border);
}

.vocab-profile-logout {
  width: 100%;
  padding: 10px;
  background: transparent;
  color: #EF4444;
  border: 1px solid #FCA5A5;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.vocab-profile-logout:hover {
  background: #FEF2F2;
  border-color: #EF4444;
}

/* User name clickable */
.vocab-user-name {
  cursor: pointer;
}

.vocab-user-name:hover {
  color: var(--accent);
}

/* Responsive */
@media (max-width: 900px) {
  .vocab-layout {
    grid-template-columns: 1fr;
  }

  .vocab-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .vocab-sidebar-card {
    flex: 1;
    min-width: 200px;
  }
}

@media (max-width: 700px) {
  .vocab-grid {
    grid-template-columns: 1fr;
  }

  .vocab-options {
    grid-template-columns: 1fr;
  }

  .vocab-card-area {
    padding: 32px 20px;
  }

  .vocab-hero {
    padding: 32px 0 24px;
  }

  .vocab-user-bar {
    flex-wrap: wrap;
    gap: 12px;
  }

  .vocab-user-stats {
    margin-left: 0;
    width: 100%;
    justify-content: space-around;
    padding-top: 10px;
    border-top: 1px solid var(--slate-border);
  }

  .vocab-logout-btn {
    position: absolute;
    top: 14px;
    right: 20px;
  }

  .vocab-user-bar {
    position: relative;
  }

  .vocab-guest-bar {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .vocab-session-header {
    flex-wrap: wrap;
  }

  .vocab-complete-stats {
    gap: 20px;
  }

  .vocab-auth-modal {
    padding: 32px 24px;
  }

  .vocab-mode-card {
    padding: 32px 20px;
  }

  .vocab-flashcard-actions {
    flex-direction: column;
    width: 100%;
  }

  .vocab-flashcard-btn {
    width: 100%;
    text-align: center;
  }
}
