/**
 * Qvis 全站按钮与控件 — 统一触感、焦点与层次
 * 各页在 :root 中可覆盖 --btn-* 变量以适配主题
 */
.lang-menu {
  position: relative;
}

:root {
  --btn-ring: rgba(168, 197, 255, 0.52);
  --btn-glass: rgba(17, 24, 42, 0.78);
  --btn-glass-line: rgba(150, 182, 255, 0.34);
  --btn-radius: 14px;
  --btn-radius-sm: 12px;
  --btn-ease: cubic-bezier(0.33, 1, 0.68, 1);
  --btn-primary-fg: #081327;
  --btn-muted-fg: #e5edff;
}

/* —— 语言切换 —— */
.lang-toggle {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: var(--btn-radius-sm);
  border: 1px solid var(--btn-glass-line);
  background: var(--btn-glass);
  color: #e8eeff;
  font-size: 16px;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    0 10px 26px rgba(1, 6, 18, 0.48);
  transition:
    transform 0.2s var(--btn-ease),
    border-color 0.2s ease,
    box-shadow 0.22s ease,
    background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.lang-toggle:hover {
  transform: translateY(-2px);
  border-color: rgba(178, 206, 255, 0.58);
  background: rgba(22, 32, 56, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 14px 32px rgba(2, 8, 24, 0.55);
}

.lang-toggle:active {
  transform: translateY(0) scale(0.97);
}

.lang-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--btn-ring), inset 0 1px 0 rgba(255, 255, 255, 0.11);
}

.lang-toggle svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  opacity: 0.95;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 128px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--btn-radius-sm);
  background: rgba(10, 14, 25, 0.97);
  padding: 6px;
  display: none;
  z-index: 50;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
}

.lang-dropdown.open {
  display: block;
}

.lang-option {
  width: 100%;
  border: 0;
  background: transparent;
  color: #a8b8d8;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: background 0.18s ease, color 0.18s ease;
}

.lang-option:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #e5edff;
}

.lang-option.active {
  color: var(--btn-primary-fg);
  background: linear-gradient(180deg, #f4f8ff 0%, #cfe0ff 100%);
  box-shadow: 0 8px 20px rgba(122, 162, 255, 0.28);
}

.lang-option:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--btn-ring);
}

/* —— 主按钮体系 —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--btn-radius);
  border: 1px solid var(--btn-glass-line);
  background: var(--btn-glass);
  color: var(--btn-muted-fg);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  font-family: inherit;
  cursor: pointer;
  position: relative;
  isolation: isolate;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 26px rgba(1, 6, 18, 0.42);
  transition:
    transform 0.2s var(--btn-ease),
    box-shadow 0.24s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0));
  opacity: 0.5;
  pointer-events: none;
  z-index: -1;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--btn-ring);
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  pointer-events: none;
}

.btn-primary {
  color: var(--btn-primary-fg);
  background: linear-gradient(180deg, #f8faff 0%, #d8e6ff 100%);
  border-color: rgba(255, 255, 255, 0.75);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 12px 28px rgba(5, 10, 22, 0.34),
    0 0 0 1px rgba(145, 178, 255, 0.22);
}

.btn-primary::before {
  opacity: 0.55;
}

.btn-primary:hover {
  border-color: rgba(255, 255, 255, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 18px 38px rgba(5, 10, 22, 0.42),
    0 0 0 1px rgba(176, 204, 255, 0.32);
}

.btn-primary:active {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 8px 20px rgba(5, 10, 22, 0.28);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--btn-glass-line);
  color: var(--btn-muted-fg);
  background: var(--btn-glass);
  min-height: 40px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: var(--btn-radius-sm);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 10px 26px rgba(1, 6, 18, 0.46);
  transition:
    transform 0.2s var(--btn-ease),
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn.btn-ghost {
  min-height: 48px;
  padding: 0 20px;
  font-size: 14px;
  border-radius: var(--btn-radius);
}

.btn-ghost::before {
  opacity: 0.35;
}

.btn-ghost:hover {
  background: rgba(22, 32, 56, 0.9);
  border-color: rgba(177, 205, 255, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    0 14px 32px rgba(1, 8, 22, 0.52);
}

.btn-ghost:active {
  transform: translateY(0) scale(0.98);
}

.btn-ghost:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--btn-ring);
}

/* Lock / 次级操作 */
.btn-link,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: var(--btn-radius-sm);
  border: 1px solid var(--btn-glass-line);
  background: var(--btn-glass);
  color: var(--btn-muted-fg);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  font-family: inherit;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 8px 22px rgba(1, 6, 18, 0.42);
  transition:
    transform 0.2s var(--btn-ease),
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-link:hover,
.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: rgba(177, 205, 255, 0.55);
  background: rgba(22, 32, 56, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    0 12px 28px rgba(1, 8, 22, 0.5);
}

.btn-link:active,
.btn-secondary:active {
  transform: translateY(0) scale(0.98);
}

.btn-link:focus-visible,
.btn-secondary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--btn-ring);
}

.switch-btn {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--btn-glass-line);
  border-radius: var(--btn-radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: #c8d6f5;
  font-weight: 700;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition:
    transform 0.2s var(--btn-ease),
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.switch-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(177, 205, 255, 0.45);
  background: rgba(20, 30, 53, 0.65);
  color: #e8eeff;
}

.switch-btn:active {
  transform: translateY(0) scale(0.99);
}

.switch-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--btn-ring);
}

.switch-btn.active {
  color: #f2f6ff;
  border-color: rgba(177, 205, 255, 0.55);
  background: rgba(26, 38, 66, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 20px rgba(122, 162, 255, 0.18);
}

/* 报表页分段开关 */
.switch {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--btn-glass-line);
  border-radius: var(--btn-radius-sm);
  background: rgba(6, 10, 22, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.switch button {
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #9fb3d9;
  padding: 10px 16px;
  min-height: 40px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  font-family: inherit;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s var(--btn-ease);
  -webkit-tap-highlight-color: transparent;
}

.switch button:hover {
  color: #dce6ff;
  background: rgba(255, 255, 255, 0.06);
}

.switch button:active {
  transform: scale(0.98);
}

.switch button.active {
  color: var(--btn-primary-fg);
  background: linear-gradient(180deg, #f6f9ff 0%, #d8e6ff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 4px 16px rgba(6, 10, 24, 0.28);
}

.switch button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--btn-ring);
}

/* 报表「刷新」等与 .btn 同形 */
.report-toolbar .btn,
.toolbar .btn {
  min-height: 40px;
  padding: 0 18px;
  font-size: 13px;
  border-radius: var(--btn-radius-sm);
}

.toolbar .btn:not(.btn-primary) {
  color: var(--btn-muted-fg);
  background: var(--btn-glass);
  border: 1px solid var(--btn-glass-line);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 8px 22px rgba(1, 6, 18, 0.42);
}

.toolbar .btn:not(.btn-primary):hover {
  transform: translateY(-2px);
  border-color: rgba(177, 205, 255, 0.55);
  background: rgba(22, 32, 56, 0.88);
}

.toolbar .btn:not(.btn-primary):active {
  transform: translateY(0) scale(0.98);
}

/* 主 CTA 在 lock 弹层内全宽 */
.btn.btn-usdt {
  width: 100%;
  margin-top: 12px;
}

/* 弹层关闭 */
.flow-modal-close {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  border-radius: var(--btn-radius-sm);
  border: 1px solid rgba(142, 172, 255, 0.38);
  background: rgba(142, 172, 255, 0.12);
  color: #e5edff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.2s var(--btn-ease),
    background 0.2s ease,
    border-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.flow-modal-close:hover {
  transform: translateY(-2px);
  background: rgba(160, 188, 255, 0.18);
  border-color: rgba(178, 206, 255, 0.5);
}

.flow-modal-close:active {
  transform: scale(0.95);
}

.flow-modal-close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--btn-ring);
}

/* X 分享 — 轻量主色 */
.btn-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--btn-radius-sm);
  border: 1px solid rgba(178, 201, 251, 0.4);
  background: linear-gradient(180deg, #f0f5ff 0%, #c8dcff 100%);
  color: #15264e;
  font-size: 13px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 24px rgba(10, 24, 52, 0.22);
  transition:
    transform 0.2s var(--btn-ease),
    box-shadow 0.2s ease,
    border-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-x:hover {
  transform: translateY(-2px);
  border-color: rgba(200, 220, 255, 0.65);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 14px 30px rgba(10, 24, 52, 0.28);
}

.btn-x:active {
  transform: translateY(0) scale(0.98);
}

.btn-x:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--btn-ring);
}

/* 首页轮播 */
.carousel-nav {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: var(--btn-radius-sm);
  border: 1px solid var(--btn-glass-line);
  background: var(--btn-glass);
  color: #e5edff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 10px 26px rgba(1, 6, 18, 0.48);
  transition:
    transform 0.2s var(--btn-ease),
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.carousel-nav:hover {
  transform: translateY(-2px);
  border-color: rgba(177, 205, 255, 0.55);
  background: rgba(22, 32, 56, 0.88);
}

.carousel-nav:active {
  transform: scale(0.96);
}

.carousel-nav:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--btn-ring);
}

.carousel-dots {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.carousel-dot {
  width: 11px;
  height: 9px;
  border-radius: 999px;
  border: 0;
  background: rgba(197, 214, 255, 0.28);
  cursor: pointer;
  transition: transform 0.22s var(--btn-ease), background 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.carousel-dot:hover {
  background: rgba(220, 230, 255, 0.45);
}

.carousel-dot.active {
  background: linear-gradient(180deg, #ffffff 0%, #d4e4ff 100%);
  transform: scale(1.25);
  box-shadow: 0 0 16px rgba(163, 196, 255, 0.85);
}

.carousel-dot:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--btn-ring);
}

@media (max-width: 720px) {
  .btn {
    min-height: 46px;
    padding: 0 18px;
    font-size: 13px;
  }
}

@media (max-width: 520px) {
  .btn.btn-ghost {
    padding: 0 14px;
  }

  .switch-btn {
    min-height: 42px;
    font-size: 12px;
  }
}
