/* 设置按钮与备案信息面板 —— 独立样式，不依赖主样式表 */

.topbar-settings {
  position: absolute;
  top: clamp(20px, 3vw, 42px);
  right: clamp(12px, 2vw, 32px);
  z-index: 50;
  pointer-events: auto;
}

.settings-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 31px;
  height: 27px;
  padding: 0;
  color: rgba(255, 255, 255, .88);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(0, 0, 0, .18);
  backdrop-filter: blur(18px);
  cursor: pointer;
  transition: color .25s ease, background .25s ease, border-color .25s ease, transform .25s ease;
}

.settings-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, .28);
  background: rgba(0, 0, 0, .28);
  transform: rotate(30deg);
}

.settings-btn.is-open {
  color: #fff;
  border-color: rgba(255, 255, 255, .34);
  background: rgba(0, 0, 0, .34);
}

.settings-icon {
  width: 15px;
  height: 15px;
}

.settings-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 240px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 16px;
  background: rgba(8, 10, 14, .62);
  backdrop-filter: blur(22px) saturate(1.2);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(.96);
  transform-origin: top right;
  transition: opacity .28s ease, visibility .28s ease, transform .28s cubic-bezier(.25, .8, .25, 1);
}

.settings-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.settings-panel-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-row {
  margin: 0;
  color: rgba(255, 255, 255, .78);
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
}

.settings-row a {
  color: rgba(255, 255, 255, .78);
  text-decoration: none;
  transition: color .2s ease;
}

.settings-row a:hover {
  color: #fff;
  text-decoration: underline;
}

.switch-page-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  margin-top: 12px;
  border: 1px solid rgba(98, 238, 221, .3);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(98, 238, 221, .08), rgba(255, 107, 157, .05));
  color: rgba(255, 255, 255, .9);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  overflow: hidden;
  transition: all .3s cubic-bezier(.25, .8, .25, 1);
}

.switch-page-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(98, 238, 221, .15), transparent 50%);
  opacity: 0;
  transition: opacity .3s ease;
}

.switch-page-btn::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(98, 238, 221, .4), rgba(255, 107, 157, .3), rgba(98, 238, 221, .4));
  z-index: -1;
  opacity: 0;
  filter: blur(8px);
  transition: opacity .3s ease;
}

.switch-page-btn:hover {
  transform: translateY(-3px);
  border-color: rgba(98, 238, 221, .5);
  background: linear-gradient(135deg, rgba(98, 238, 221, .12), rgba(255, 107, 157, .08));
  box-shadow: 0 12px 36px rgba(98, 238, 221, .15);
}

.switch-page-btn:hover::before {
  opacity: 1;
}

.switch-page-btn:hover::after {
  opacity: 1;
}

.switch-page-btn:active {
  transform: translateY(-1px);
}

.switch-page-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .3s ease;
}

.switch-page-btn:hover .switch-page-icon {
  transform: rotate(90deg);
}

.switch-page-arrow {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid rgba(98, 238, 221, .8);
  transition: transform .3s ease;
}

.switch-page-btn:hover .switch-page-arrow {
  transform: translateX(4px);
}

@media (max-width: 640px) {
  .topbar-settings {
    top: 20px;
    right: 16px;
  }

  .settings-btn {
    width: 29px;
    height: 25px;
  }

  .settings-icon {
    width: 14px;
    height: 14px;
  }

  .settings-panel {
    min-width: 210px;
    padding: 12px 14px;
    border-radius: 14px;
  }

  .settings-row {
    font-size: 11px;
  }
}
