/* WORD RANGE DISPLAY */
.word-range-display {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.range-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

.range-value {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  min-height: 1.3em;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.range-arrow {
  color: var(--text-dim);
  font-size: 1.2rem;
}

/* WORD BROWSER */
.word-browser {
  background: var(--surface);
  border-radius: var(--radius);
  max-height: 35dvh;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.word-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--surface2);
  cursor: pointer;
  transition: background 0.1s;
  gap: 8px;
}

.word-item:last-child { border-bottom: none; }
.word-item:active { background: var(--surface2); }

.word-item .source {
  font-weight: 600;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.word-item .target {
  color: var(--text-dim);
  text-align: right;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.word-item.in-range {
  background: rgba(250, 204, 21, 0.08);
}

.word-item.is-from {
  background: rgba(250, 204, 21, 0.2);
  border-left: 3px solid var(--accent);
}

.word-item.is-to {
  background: rgba(167, 139, 250, 0.2);
  border-left: 3px solid var(--accent2);
}

.word-item .word-num {
  color: var(--text-dim);
  font-size: 0.75rem;
  min-width: 28px;
}

/* JOIN SECTION */
.join-section {
  margin-top: 0;
  margin-bottom: 40px;
  padding: 20px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 2px solid var(--surface2);
  position: relative;
}

.join-section p {
  color: var(--text-dim);
  margin-bottom: 12px;
  font-size: 0.9rem;
  text-align: center;
}

.code-input-row {
  display: flex;
  gap: 10px;
}

.code-input-row .code-input {
  flex: 2;
  min-width: 0;
}

.code-input-row .btn-small {
  flex: 1;
  min-width: 90px;
  white-space: nowrap;
}

/* DIVIDER */
.divider {
  position: relative;
  text-align: center;
  margin: 32px 0;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--surface2) 20%, var(--surface2) 80%, transparent);
}

.divider-text {
  position: relative;
  display: inline-block;
  background: var(--bg);
  padding: 0 16px;
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
}