/* Dictionary Hero */
.dict-hero { text-align: center; padding: 70px 24px 40px; }
.dict-hero h1 { font-family: var(--heading-font); font-size: 48px; font-weight: 400; color: var(--text); margin-bottom: 4px; }
.dict-hero > p { color: var(--text-muted); font-size: 16px; }
.dict-count { margin-top: 8px; }
.dict-count strong { font-family: var(--mono-font); color: var(--text-secondary); font-size: 18px; }
.dict-hero.compact { padding: 24px 24px 16px; }
.dict-hero.compact h1 { font-size: 28px; }
.dict-hero.compact > p, .dict-hero.compact .dict-count { display: none; }

.dict-search {
  max-width: 500px; margin: 28px auto 0; display: flex; align-items: center;
  border: 2px solid var(--border); border-radius: 28px; padding: 4px 6px 4px 18px;
  background: var(--bg); transition: border-color 0.2s, box-shadow 0.2s;
}
.dict-search:focus-within { border-color: #8b5cf6; box-shadow: 0 2px 16px rgba(139,92,246,0.15); }
.dict-search .search-icon { color: var(--text-muted); margin-right: 10px; flex-shrink: 0; }
.dict-search input { flex: 1; border: none; outline: none; font-size: 18px; padding: 12px 4px; background: transparent; color: var(--text); font-family: var(--heading-font); }
.dict-search input::placeholder { color: var(--text-muted); font-family: var(--body-font); font-size: 15px; }
.dict-search button {
  background: #8b5cf6; color: #fff; border: none; padding: 10px 24px;
  border-radius: 22px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.2s;
}
.dict-search button:hover { background: #7c3aed; }

/* Letter Grid */
.letter-section { max-width: 700px; margin: 0 auto; padding: 10px 24px 50px; }
.letter-section h2 { font-family: var(--heading-font); font-size: 20px; font-weight: 400; text-align: center; margin-bottom: 16px; color: var(--text-secondary); }
.letter-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.letter-btn {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg);
  font-family: var(--heading-font); font-size: 20px; font-weight: 600; color: var(--text);
  cursor: pointer; transition: all 0.2s; text-decoration: none;
}
.letter-btn:hover { background: #8b5cf6; color: #fff; border-color: #8b5cf6; transform: translateY(-2px); text-decoration: none; }

/* Search Results */
.search-results { max-width: 700px; margin: 0 auto; padding: 20px 24px 50px; }
.search-results h2 { font-family: var(--heading-font); font-size: 22px; font-weight: 400; margin-bottom: 16px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.results-grid { display: flex; flex-direction: column; gap: 8px; }
.result-item {
  padding: 14px 20px; border-radius: 10px; cursor: pointer; transition: all 0.2s;
  background: var(--bg); border: 1px solid var(--border);
}
.result-item::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #8b5cf6; opacity: 0; transition: opacity 0.2s; border-radius: 4px 0 0 4px; }
.result-item { position: relative; }
.result-item:hover { border-color: #8b5cf6; transform: translateX(4px); }
.result-item:hover::before { opacity: 1; }
.result-item h3 { font-family: var(--heading-font); font-size: 20px; font-weight: 600; color: var(--text); }
.result-item:hover h3 { color: #8b5cf6; }
.result-item p { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* Word View */
.word-layout { max-width: 750px; margin: 0 auto; padding: 32px 24px 80px; }
#word-article { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 40px 48px; min-height: 300px; }
.breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.breadcrumb a { color: #8b5cf6; text-decoration: none; }
#word-title { font-family: var(--heading-font); font-size: 36px; font-weight: 400; color: var(--text); margin-bottom: 20px; padding-bottom: 8px; border-bottom: 2px solid #8b5cf6; }
#word-body { font-size: 15px; line-height: 1.8; }
#word-body p { margin-bottom: 12px; }
#word-body h2 { font-family: var(--heading-font); font-size: 22px; font-weight: 400; border-bottom: 1px solid var(--border); padding-bottom: 4px; margin: 28px 0 12px; color: #8b5cf6; }
#word-body h3 { font-size: 17px; font-weight: 600; margin: 18px 0 8px; }

/* Translations Grid */
.trans-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px 24px; margin: 8px 0 16px; }
.trans-row { display: flex; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--border-light); font-size: 13px; }
.trans-lang { font-weight: 600; color: var(--text-secondary); min-width: 120px; flex-shrink: 0; }
.trans-word { color: var(--text); font-style: italic; }

/* Word Pills (synonyms, antonyms) */
.word-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 16px; }
.word-pill {
  display: inline-block; padding: 4px 12px; font-size: 13px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: 16px; color: var(--text); transition: all 0.2s; cursor: default;
}
.word-pill:hover { border-color: #8b5cf6; color: #8b5cf6; }

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

/* Footer */
#footer { background: var(--bg-secondary); border-top: 1px solid var(--border); padding: 28px; text-align: center; margin-top: 50px; }
.footer-inner p { font-size: 13px; color: var(--text-muted); }
.footer-inner a { color: #8b5cf6; text-decoration: none; }
.small { font-size: 11px; margin-top: 4px; }

@media (max-width: 600px) {
  .dict-hero h1 { font-size: 32px; }
  #word-article { padding: 24px; }
  #word-title { font-size: 28px; }
  .letter-btn { width: 36px; height: 36px; font-size: 16px; }
}
