/* ========== 按钮系统 ========== */
.button {
  appearance: none;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel-strong) 78%, transparent);
  color: var(--text);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(14px) saturate(1.22);
  -webkit-backdrop-filter: blur(14px) saturate(1.22);
}

.button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.42), transparent 54%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.button:hover {
  border-color: color-mix(in srgb, var(--accent) 22%, var(--border));
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.button:hover::before {
  opacity: 1;
}

.button:active {
  transform: translateY(0) scale(0.98);
  box-shadow: var(--shadow-xs);
}

.button-primary {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.25), transparent 38%),
    linear-gradient(135deg, var(--accent), var(--accent-hover));
  border-color: transparent;
  color: white;
  box-shadow: var(--shadow-sm), 0 12px 28px var(--accent-glow);
}

.button-primary:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.button-primary:active {
  box-shadow: var(--shadow-sm), 0 0 12px var(--accent-glow);
}

.button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.button-ghost {
  background: color-mix(in srgb, var(--panel-strong) 36%, transparent);
  border-color: var(--border-subtle);
}

.button-ghost:hover {
  background: var(--bg-subtle);
  border-color: var(--border);
}

.button-ghost:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.button-small {
  padding: 6px 12px;
  font-size: 12px;
}

/* button-small should not override button-primary's background */
.button-primary.button-small {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border-color: transparent;
  color: white;
}

.button-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
}

/* Settings button - blue background with icon */
#settings-button {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border-color: transparent;
  color: white;
  box-shadow: var(--shadow-sm);
}

#settings-button:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

#settings-button:active {
  transform: translateY(0) scale(0.95);
  box-shadow: var(--shadow-sm), 0 0 12px var(--accent-glow);
}
