/* ============================================
   UI Components
   ============================================ */
/* ---- Scroll to Top ---- */
#scrollToTopBtn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 10;
}

#scrollToTopBtn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--text-tertiary);
}

#scrollToTopBtn.show { opacity: 1; visibility: visible; }

.arrow-up {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid currentColor;
}

/* ---- Symbol Selector ---- */
.symbol-selector {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  vertical-align: middle;
}

.symbol-selector select {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 4px 24px 4px 10px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-mono);
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23848e9c' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
}

.symbol-selector select:hover { border-color: var(--text-tertiary); }
.symbol-selector select:focus { border-color: var(--blue); }

.symbol-selector select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 8px;
}

/* ---- Refresh Button ---- */
.refresh-btn {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.refresh-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--text-tertiary);
}

.refresh-btn:active {
  transform: rotate(180deg);
  transition: transform 0.3s ease;
}

/* ---- Language Switch ---- */
.lang-switch { display: flex; align-items: center; }

.lang-btn {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-mono);
}

.lang-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

/* ---- Info Panel (unused but kept) ---- */
.info-panel {
  margin-top: 20px;
  padding: 15px;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-md);
}

.position { font-weight: bold; color: var(--blue); }

/* ---- Footer ---- */
footer {
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  bottom: 0;
  width: 100%;
  background-color: var(--bg-primary);
}

footer a { color: var(--blue); }

/* ---- Toast ---- */
#toast-container {
  position: fixed;
  top: 50px;
  right: 16px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 13px;
  line-height: 1.5;
  min-width: 200px;
  max-width: 360px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: auto;
}

.toast.show { opacity: 1; transform: translateX(0); }
.toast.error { border-left: 3px solid var(--red); }
.toast.warn { border-left: 3px solid var(--orange); }
.toast.success { border-left: 3px solid var(--green); }
