/* WordWise — Dictionary App styles */
body { font-family: 'Cairo', 'Inter', sans-serif; }
#result, #result * { font-family: 'Inter', 'Cairo', sans-serif; }

.hero {
  background: linear-gradient(135deg, #1e1b4b 0%, #4338ca 50%, #6366f1 100%);
}

.sample-word {
  cursor: pointer;
  font-weight: 700;
  color: #4338ca;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.dark .sample-word { color: #a5b4fc; }
.sample-word:hover { color: #6366f1; }

.history-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eef2ff;
  color: #4338ca;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 9999px;
  cursor: pointer;
  border: 1px solid #c7d2fe;
  transition: transform .15s, background .15s;
}
.history-chip:hover { transform: translateY(-1px); background: #e0e7ff; }
.dark .history-chip { background: rgba(99,102,241,.15); color: #c7d2fe; border-color: rgba(99,102,241,.35); }
.dark .history-chip:hover { background: rgba(99,102,241,.25); }

.pos-badge {
  display: inline-block;
  font-style: italic;
  font-weight: 700;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: #fef3c7;
  color: #92400e;
}
.dark .pos-badge { background: rgba(146,64,14,.25); color: #fcd34d; }

.synonym-chip, .antonym-chip {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9999px;
  margin: 2px;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.synonym-chip { background: #dcfce7; color: #166534; }
.synonym-chip:hover { background: #bbf7d0; transform: translateY(-1px); }
.antonym-chip { background: #fee2e2; color: #991b1b; }
.antonym-chip:hover { background: #fecaca; transform: translateY(-1px); }
.dark .synonym-chip { background: rgba(22,101,52,.25); color: #86efac; }
.dark .antonym-chip { background: rgba(153,27,27,.25); color: #fca5a5; }

.audio-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #4338ca;
  color: white;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 9999px;
  cursor: pointer;
  border: none;
  transition: background .15s, transform .15s;
}
.audio-btn:hover { background: #6366f1; transform: translateY(-1px); }
.audio-btn:disabled { background: #94a3b8; cursor: not-allowed; transform: none; }

.definition-block {
  border-right: 3px solid #6366f1;
  padding: 8px 14px 8px 0;
  margin: 8px 0;
}
[dir="ltr"] .definition-block { border-right: none; border-left: 3px solid #6366f1; padding: 8px 0 8px 14px; }
.dark .definition-block { border-color: #818cf8; }

.example-text {
  color: #475569;
  font-style: italic;
  font-size: 14px;
  margin-top: 4px;
}
.dark .example-text { color: #94a3b8; }

.spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 3px solid #c7d2fe;
  border-top-color: #4338ca;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
