* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg: #f0f4ff;
  --card: #ffffff;
  --primary: #5b6ee8;
  --primary-l: #e8ebff;
  --success: #4caf82;
  --danger: #e85b5b;
  --danger-l: #ffe8e8;
  --text: #1a1a2e;
  --muted: #7a7a9a;
  --border: #ebebf5;
}

body {
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.screen {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.hidden {
  display: none !important;
}

/* ── MENU SCREEN ── */
#menuScreen {
  padding: 40px 20px 32px;
  justify-content: flex-start;
}
.menu-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -1px;
  margin-bottom: 4px;
}
.menu-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 32px;
}
.menu-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}
.menu-card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 14px;
}
.menu-random-btn {
  width: 100%;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 20px;
  border-radius: 20px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 20px rgba(91, 110, 232, 0.4);
  margin-bottom: 12px;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.menu-random-btn:active {
  opacity: 0.85;
}
.menu-random-sub {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.8;
}
.category-toggle {
  width: 100%;
  background: var(--primary-l);
  border: none;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: var(--primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
}
.category-toggle:active {
  opacity: 0.8;
}
.toggle-arrow {
  font-size: 12px;
  transition: transform 0.3s ease;
  color: var(--muted);
}
.toggle-arrow.open {
  transform: rotate(180deg);
}
.category-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease, margin 0.25s ease;
  max-height: 2000px;
  opacity: 1;
  margin-top: 12px;
}
.category-grid.hidden {
  max-height: 0;
  opacity: 0;
  margin: 0;
}
.cat-btn {
  width: 100%;
  background: var(--card);
  border: 1.5px solid var(--border);
  padding: 16px 18px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.cat-btn:active {
  background: var(--primary-l);
  border-color: var(--primary);
}
.cat-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.cat-emoji {
  font-size: 22px;
  width: 36px;
  min-width: 36px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 2px;
}
.cat-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  display: block;
  text-align: left;
}
.cat-count {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  margin-top: 1px;
  display: block;
  text-align: left;
}
.cat-progress-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.cat-known {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
}
.cat-mini-bar {
  width: 48px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.cat-mini-fill {
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
}

/* ── HEADER ── */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 10px;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.back-to-menu {
  font-size: 13px;
  color: var(--primary);
  font-weight: 700;
  background: var(--primary-l);
  border: none;
  padding: 8px 12px;
  border-radius: 16px;
  cursor: pointer;
  font-family: inherit;
}
.progress-wrap {
  display: flex;
  flex-direction: column;
}
.progress-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}
.progress-text {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}
.list-btn {
  font-size: 13px;
  color: var(--primary);
  font-weight: 700;
  background: var(--primary-l);
  border: none;
  padding: 9px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-family: inherit;
}

/* PROGRESS BAR */
.progress-bar {
  height: 5px;
  background: var(--border);
  margin: 8px 20px 0;
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 5px;
  background: linear-gradient(90deg, var(--primary), #8b9eff);
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* CARD */
.card-container {
  flex: 1;
  padding: 16px 20px;
  display: flex;
  align-items: center;
}
.card {
  background: var(--card);
  border-radius: 28px;
  padding: 28px 24px;
  width: 100%;
  box-shadow:
    0 8px 32px rgba(91, 110, 232, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.06);
}
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.card-lang {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
}
.card-category-tag {
  font-size: 10px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-l);
  padding: 3px 8px;
  border-radius: 8px;
}
.english-word {
  font-size: 46px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.05;
  margin-bottom: 24px;
  letter-spacing: -1px;
}
.divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 20px;
}

/* MIC */
.mic-btn {
  width: 100%;
  border: none;
  padding: 18px;
  border-radius: 18px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(91, 110, 232, 0.4);
  margin-bottom: 10px;
  display: block;
}
.mic-btn.listening {
  background: var(--danger);
  animation: pulse 1s infinite;
  box-shadow: 0 4px 20px rgba(232, 91, 91, 0.4);
}
.mic-btn:active {
  opacity: 0.85;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.mic-result {
  font-size: 14px;
  font-weight: 600;
  min-height: 22px;
  line-height: 1.5;
  margin-bottom: 14px;
  text-align: center;
}
.mic-result.correct {
  color: var(--success);
}
.mic-result.wrong {
  color: var(--danger);
}

/* PEEK */
.peek-btn {
  width: 100%;
  border: 1.5px dashed var(--border);
  padding: 11px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  background: transparent;
  color: var(--muted);
}
.peek-btn:active {
  background: var(--primary-l);
}
.peek-section {
  display: none;
  margin-top: 14px;
}
.peek-section.visible {
  display: block;
}
.peek-card {
  background: var(--primary-l);
  border-radius: 16px;
  padding: 16px 18px;
}
.peek-spanish {
  font-size: 34px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.peek-pronunciation {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 12px;
}
.speak-btn {
  border: none;
  padding: 9px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  background: var(--primary);
  color: #fff;
}

/* ACTION BUTTONS */
.action-buttons {
  display: flex;
  gap: 10px;
  padding: 0 20px 6px;
}
.btn-unknown,
.btn-known {
  flex: 1;
  border: none;
  padding: 16px 10px;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.3;
  text-align: center;
}
.btn-unknown {
  background: var(--danger-l);
  color: var(--danger);
}
.btn-known {
  background: var(--success);
  color: #fff;
  box-shadow: 0 4px 16px rgba(76, 175, 130, 0.35);
}
.btn-unknown:active,
.btn-known:active {
  opacity: 0.85;
}
.btn-sub {
  display: block;
  font-size: 10px;
  font-weight: 500;
  opacity: 0.75;
  margin-top: 2px;
}

.hint {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 8px 20px 24px;
}

/* SUCCESS */
#successScreen:not(.hidden) {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 48px 32px;
  min-height: 100vh;
}
.success-emoji {
  font-size: 80px;
  margin-bottom: 16px;
}
.success-title {
  font-size: 44px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -1px;
}
.success-text {
  font-size: 17px;
  color: var(--muted);
  margin-bottom: 36px;
  line-height: 1.6;
}
.success-btns {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.reset-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 18px;
  border-radius: 18px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 20px rgba(91, 110, 232, 0.4);
}
.menu-btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 16px;
  border-radius: 18px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

/* KNOWN LIST */
#listScreen:not(.hidden) {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 20px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.list-back {
  font-size: 15px;
  color: var(--primary);
  font-weight: 700;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.list-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}
.reset-small {
  font-size: 13px;
  color: var(--danger);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}
.list-content {
  flex: 1;
  overflow-y: auto;
  padding: 14px 20px;
}
.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card);
  padding: 14px 16px;
  border-radius: 14px;
  margin-bottom: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.list-english {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.list-spanish {
  font-size: 13px;
  color: var(--primary);
  margin-top: 2px;
  font-weight: 600;
}
.list-cat-tag {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}
.list-item-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.delete-word-btn {
  font-size: 16px;
  color: var(--danger);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.delete-word-btn:hover {
  opacity: 1;
}
.remove-btn {
  font-size: 18px;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s;
}
.remove-btn:hover {
  color: var(--text);
}
.empty-text {
  text-align: center;
  color: var(--muted);
  margin-top: 60px;
  font-size: 16px;
  line-height: 1.7;
}

/* ── SENTENCE MODE ── */
.menu-divider {
  height: 1px;
  background: var(--border);
  margin: 28px 0 24px;
}
.sentence-menu-btn {
  width: 100%;
  background: linear-gradient(135deg, #6b5ce7, #8b6ce8);
  color: #fff;
  border: none;
  padding: 20px;
  border-radius: 20px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 20px rgba(107, 92, 231, 0.4);
  margin-bottom: 0;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sentence-menu-btn:active {
  opacity: 0.85;
}
.sentence-menu-sub {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.8;
}


/* Tense tag on card */
.tense-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #6b5ce7;
  background: #ede8ff;
  padding: 4px 10px;
  border-radius: 10px;
  margin-bottom: 10px;
}

/* Grammar peek */
.grammar-btn {
  width: 100%;
  border: 1.5px dashed #d0c8f5;
  padding: 11px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  background: transparent;
  color: #6b5ce7;
  margin-top: 10px;
}
.grammar-btn:active {
  background: #ede8ff;
}
.grammar-section {
  display: none;
  margin-top: 14px;
}
.grammar-section.visible {
  display: block;
}
.grammar-card {
  background: #ede8ff;
  border-radius: 16px;
  padding: 16px 18px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
}

/* Sentence english text – smaller than single words */
.english-sentence {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}

/* ── STREAK BANNER ── */
.streak-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 16px 0 24px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.15);
}
.streak-fire {
  font-size: 22px;
}
.streak-text {
  font-size: 15px;
  font-weight: 700;
  color: #e65100;
}

/* ── PHRASE MODE ── */
.phrase-menu-btn {
  width: 100%;
  background: linear-gradient(135deg, #00897b, #26a69a);
  color: #fff;
  border: none;
  padding: 20px;
  border-radius: 20px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 20px rgba(0, 137, 123, 0.35);
  margin-bottom: 0;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.phrase-menu-btn:active {
  opacity: 0.85;
}
.phrase-menu-sub {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.8;
}
.phrase-note {
  margin-top: 10px;
  padding: 10px 14px;
  background: #e0f2f1;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #00695c;
  font-style: italic;
}

/* ── SWEAR MODE ── */
.swear-menu-btn {
  width: 100%;
  background: linear-gradient(135deg, #b71c1c, #e53935);
  color: #fff;
  border: none;
  padding: 20px;
  border-radius: 20px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 20px rgba(183, 28, 28, 0.35);
  margin-bottom: 0;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.swear-menu-btn:active {
  opacity: 0.85;
}
.swear-menu-sub {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.8;
}
.swear-note {
  margin-top: 10px;
  padding: 10px 14px;
  background: #fce4ec;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #b71c1c;
  font-style: italic;
}
.swear-fill {
  background: linear-gradient(90deg, #e53935, #b71c1c) !important;
}

/* Phrase & sentence success/list screen layouts */
#phraseSuccessScreen:not(.hidden),
#sentenceSuccessScreen:not(.hidden),
#swearSuccessScreen:not(.hidden) {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 48px 32px;
  min-height: 100vh;
}
#phraseListScreen:not(.hidden),
#sentenceListScreen:not(.hidden),
#swearListScreen:not(.hidden) {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── LOGIN SCREEN ── */
#loginScreen {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.login-container {
  text-align: center;
  max-width: 400px;
  width: 100%;
}
.login-title {
  font-size: 48px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
}
.login-subtitle {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 48px;
}
.google-signin-btn {
  width: 100%;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 16px 24px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(91, 110, 232, 0.4);
  transition: transform 0.2s;
}
.google-signin-btn:hover {
  transform: translateY(-2px);
}
.google-signin-btn:active {
  transform: translateY(0);
  opacity: 0.9;
}

/* ── USER PROFILE ── */
.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.user-info {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.sign-out-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  font-family: inherit;
}
.sign-out-btn:hover {
  color: var(--danger);
}

/* ── ADD WORD BUTTON ── */
.add-word-btn {
  width: 100%;
  background: var(--card);
  border: 1.5px solid var(--primary);
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  font-family: inherit;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}
.add-word-btn:hover {
  background: var(--primary-l);
}
.add-word-btn:active {
  transform: scale(0.98);
}

/* ── MANAGE WORDS BUTTON ── */
.manage-words-btn {
  width: 100%;
  background: var(--card);
  border: 1.5px solid var(--muted);
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}
.manage-words-btn:hover {
  border-color: var(--text);
  color: var(--text);
  background: var(--bg);
}
.manage-words-btn:active {
  transform: scale(0.98);
}

/* ── WORD COUNT ── */
.word-count {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

/* ── MODAL ── */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}
.modal-content {
  position: relative;
  background: var(--card);
  border-radius: 24px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 16px;
  border-bottom: 1.5px solid var(--border);
}
.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}
.modal-close:hover {
  color: var(--text);
}
.modal-body {
  padding: 24px;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.2s;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.form-textarea {
  resize: vertical;
  min-height: 80px;
}
.modal-footer {
  display: flex;
  gap: 12px;
  padding: 16px 24px 24px;
  border-top: 1.5px solid var(--border);
}
.btn-cancel {
  flex: 1;
  padding: 14px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.btn-cancel:hover {
  background: var(--bg);
}
.btn-save {
  flex: 1;
  padding: 14px;
  border: none;
  background: var(--primary);
  color: #fff;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 2px 10px rgba(91, 110, 232, 0.3);
}
.btn-save:hover {
  opacity: 0.9;
}
.btn-save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── TOAST NOTIFICATION ── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  z-index: 2000;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ── WORD NOTES ── */
.word-note {
  background: #fffde7;
  border-radius: 8px;
  padding: 12px;
  margin-top: 12px;
  font-size: 12px;
  font-style: italic;
  color: var(--text);
  line-height: 1.5;
}
.word-note::before {
  content: "💡 ";
}

/* ── EMOJI PICKER ── */
.emoji-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.emoji-opt {
  font-size: 24px;
  background: var(--bg);
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 6px;
  cursor: pointer;
  line-height: 1;
  transition: border-color 0.15s, background 0.15s;
}
.emoji-opt:hover {
  background: var(--primary-l);
}
.emoji-opt.selected {
  border-color: var(--primary);
  background: var(--primary-l);
}
.emoji-preview {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

/* ── USER-ADDED WORD TAG ── */
.user-word-tag {
  display: inline-block;
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  color: #1a1a2e;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  margin-left: 8px;
}
