/* ==================== HOME Button ==================== */
.home-btn {
  position: fixed;
  top: 1vw;
  left: 50%;
  transform: translateX(-50%);
  width: 4vw;
  aspect-ratio: 1/1;
  padding: 0;
  z-index: 2002;
  transition: opacity 0.3s ease;
}

.home-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.home-btn:active {
  opacity: 0.6;
}

/* ==================== Theme Switch ==================== */
.theme-switch {
  position: fixed;
  top: 40px;
  right: 40px;
  width: 72px;
  height: 36px;
  cursor: pointer;
  z-index: 2002;
}

.theme-switch-track {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  padding: 8px;
  background: linear-gradient(to right, #60c0b7 50%, #767676 50%);
  background-size: 200% 100%;
  background-position: 100% 0;
  position: relative;
  transition: background-position 0.3s ease;
  box-sizing: border-box;
}

.theme-switch-track::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  bottom: 8px;
  border-radius: 10px;
  background: #000;
  z-index: 0;
}

.theme-switch-track > * {
  position: relative;
  z-index: 1;
  background: transparent;
}

/* Light theme: thumb turns white */
.theme-switch-track.light::after {
  background: #fff;
}

/* 浅色模式：有 light 类，显示左侧绿色 */
.theme-switch-track.light {
  background-position: 0 0;
}

.theme-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.theme-icon.sun {
  top: 16.5px;
  left: 10px;
  color: #fff;
}

.theme-icon.moon {
  top: 16.5px;
  right: 10px;
  color: rgba(255, 255, 255);
}

.theme-switch-thumb {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
  z-index: 2;
}

/* 小球在左侧（light 类），右侧（无 light 类 = 深色默认） */
.theme-switch:not(.light) .theme-switch-thumb {
  transform: translateX(36px);
}

/* Light theme overrides */
.light-theme .theme-icon.sun {
  color: rgba(255, 255, 255, 0.6);
}

.light-theme .theme-icon.moon {
  color: #fff;
  font-size: 16px;
}

/* ==================== Language Toggle ==================== */
.lang-toggle {
  position: fixed;
  top: 10px;
  right: 45px;
  display: flex;
  z-index: 2002;
  gap: 8px;
}

.lang-btn {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.4);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-tall);
}

.lang-btn.active {
  color: #fff;
  font-weight: 700;
}

.lang-btn:hover:not(.active) {
  color: rgba(255, 255, 255, 0.7);
}

.light-theme .lang-btn {
  color: rgba(0, 0, 0, 0.4);
}

.light-theme .lang-btn.active {
  color: #000;
}

.light-theme .lang-btn:hover:not(.active) {
  color: rgba(0, 0, 0, 0.7);
}

/* ==================== Dot Navigation ==================== */
.dot-nav {
  position: fixed;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 100;
}

.dot-nav button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  position: relative;
}

.dot-nav button.active {
  background: #61bcb3;
}

.dot-nav button:hover {
  opacity: 0.7;
}

/* Tooltip label for about dots on work page */
.dot-nav button .dot-label {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: var(--news-summary-size);
  padding: 6px 12px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  text-transform: uppercase;
  letter-spacing: var(--news-summary-ls);
  font-weight: var(--news-summary-weight);
  line-height: var(--news-summary-lh);
}

.dot-nav button:hover .dot-label {
  opacity: 1;
}
