:root {
  --bg-card: #02040a;
  --bg-inner: #02040a;
  --bg-input: #050816;
  --border: #111827;
  --border-soft: #1f2937;
  --text-main: #f9fafb;
  --text-soft: #9ca3af;
  --text-mute: #6b7280;
  --error: #f87171;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
    "SF Pro Text", "Segoe UI", sans-serif;
  background: transparent;
  color: var(--text-main);
  padding: 8px;
}

.widget {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  background: var(--bg-card);
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 10px;
}

/* Header */

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

.title {
  font-size: 14px;
  font-weight: 600;
  margin-left: 5px;
  margin-top: 3px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #4b5563;
}

/* Search row */

.search-row {
  display: flex;
  gap: 6px;
  gap: 10px;
  margin: 15px 0 12px;
}

.input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--bg-input);
  border: 1px solid var(--border-soft);
}

.input-wrap span {
  font-size: 14px;
  color: var(--text-mute);
}

input[type="text"] {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-main);
  font-size: 13px;
}

input::placeholder {
  color: var(--text-mute);
}

button {
  border: 1px solid var(--border-soft);
  cursor: pointer;
  padding: 10px 18px;
  font-size: 12px;
  border-radius: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: #050816;
  color: var(--text-main);
  transition: border-color 0.12s ease, background 0.12s ease;
}

button:hover {
  border-color: #4b5563;
  background: #070b15;
}

button:active {
  transform: translateY(1px);
}

/* Status + content */

.status {
  font-size: 11px;
  color: var(--text-mute);
  min-height: 14px;
  margin-bottom: 10px;
}

.content {
  background: var(--bg-inner);
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  padding: 14px 14px;
  max-height: 330px; /* more room for text */
  overflow-y: auto;
  font-size: 12px;
  line-height: 1.45;

  /* hide scrollbar, keep scroll */
  scrollbar-width: none;
}

.content::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.placeholder {
  color: var(--text-soft);
}

/* Word header */

.word-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 10px;
}

.word-main {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.word {
  font-size: 16px;
  font-weight: 600;
  text-transform: lowercase;
}

.phonetic {
  font-size: 11px;
  color: var(--text-soft);
}

.audio-btn {
  background: none;
  border: none;
  color: var(--text-soft);
  cursor: pointer;
  font-size: 14px;
  padding: 0;
}

.audio-btn:hover {
  color: var(--text-main);
}

/* Sections */

.section-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-mute);
  margin-top: 6px;
  margin-bottom: 3px;
}

/* Part of speech blocks */

.pos-block {
  margin-top: 14px;
}

.pos-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-soft);
  margin-bottom: 2px;
}

.sense-list {
  list-style: decimal;
  padding-left: 16px;
}

.sense-item {
  margin-bottom: 10px;
}

.sense-def {
  color: var(--text-main);
}

.sense-example {
  font-size: 11px;
  color: var(--text-soft);
  font-style: italic;
  margin-top: 4px;
}

.sense-synonyms {
  font-size: 11px;
  margin-top: 2px;
}

.sense-synonyms-label {
  color: var(--text-mute);
  margin-right: 4px;
}

/* Synonym chips */

.chips-inline {
  display: inline;
}

.chip {
  display: inline-block;
  padding: 2px 6px;
  margin: 0 3px 0 0;
  font-size: 11px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: #050816;
  color: #d1d5db;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.chip:hover {
  border-color: #4b5563;
  background: #070b15;
  color: var(--text-main);
}

/* Source / Google link */

.section-google {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-mute);
}

.section-google a {
  color: var(--text-soft);
  text-decoration: none;
}

.section-google a:hover {
  text-decoration: underline;
}

/* Error */

.error {
  color: var(--error);
  line-height: 1.5;
}
