/* ============================================================
   崔彦斌的游戏空间 · 基础样式
   纯静态、零外部依赖
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #080a12;
  --bg-soft: #0d1120;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-strong: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.17);
  --text: #eef1ff;
  --muted: #98a2c0;
  --muted-soft: #6f7896;
  --brand: #7c5cff;
  --brand-2: #22d3ee;
  --pink: #ff6ba8;
  --green: #5ee6a8;
  --yellow: #ffd166;
  --red: #ff6b6b;
  --radius: 20px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", ui-monospace, "JetBrains Mono", Menlo, Consolas,
    monospace;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}

input {
  font: inherit;
  color: inherit;
}

canvas,
img,
svg {
  display: block;
  max-width: 100%;
}

::selection {
  background: rgba(124, 92, 255, 0.45);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    background 0.18s ease, border-color 0.18s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

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

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn.primary {
  color: #0a0c14;
  background: linear-gradient(135deg, var(--brand-2), #8be9ff 45%, #c4b5fd);
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.22),
    0 2px 0 rgba(255, 255, 255, 0.25) inset;
}

.btn.primary:hover {
  box-shadow: 0 14px 36px rgba(34, 211, 238, 0.32),
    0 2px 0 rgba(255, 255, 255, 0.25) inset;
}

.btn.ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  border-color: var(--line-strong);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.09);
}

.btn.small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  transition: background 0.18s ease, border-color 0.18s ease,
    transform 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--line-strong);
}

.icon-btn:active {
  transform: scale(0.94);
}

/* ---------- 轻提示 ---------- */

.cyb-toast-wrap {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}

.cyb-toast {
  max-width: min(86vw, 420px);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: #0a0c14;
  background: linear-gradient(135deg, #8be9ff, #c4b5fd);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  animation: cyb-toast-in 0.24s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.cyb-toast.is-out {
  animation: cyb-toast-out 0.24s ease forwards;
}

@keyframes cyb-toast-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
}

@keyframes cyb-toast-out {
  to {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* ---------- 动效偏好 ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
