/* ============================================================
   兔子管家 · 设计 Tokens 与基础样式
   来源：ref-index / ref-login / ref-register / ref-user-center
   ============================================================ */

:root {
  /* 品牌渐变 */
  --grad: linear-gradient(135deg, #06b6d4 0%, #3b82f6 50%, #8b5cf6 100%);
  --grad-cyan: #06b6d4;
  --grad-blue: #3b82f6;
  --grad-purple: #8b5cf6;
  --grad-soft: #eef2ff;

  /* 文本 */
  --t-primary: #1a1d29;
  --t-secondary: #64748b;
  --t-muted: #94a3b8;
  --white: #ffffff;
  --dark: #0d1117;

  /* 表面 / 边框 */
  --bg-page: #f4f6fb;
  --bg-soft: #f7f9fe;
  --border: #e5eaf3;
  --border-input: #e2e8f0;
  --placeholder: #b0bccf;

  /* 状态 */
  --success: #10b981;
  --success-bg: #ecfdf5;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --warning: #f59e0b;
  --info: #3b82f6;

  /* 圆角 */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 22px;

  /* 阴影 */
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 12px 32px rgba(59, 130, 246, 0.12);
  --shadow-btn: 0 4px 14px rgba(59, 130, 246, 0.3);
  --shadow-hero: 0 20px 50px rgba(59, 130, 246, 0.18);

  --ease-bounce: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family:
    'Inter', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui,
    sans-serif;
  color: var(--t-primary);
  background: #ffffff;
  line-height: 1.6;
  font-weight: 500;
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
  overflow-x: hidden;
}

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

ul,
ol {
  list-style: none;
}

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

input {
  font-family: inherit;
}

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

::selection {
  background: rgba(59, 130, 246, 0.18);
  color: var(--grad-blue);
}

/* 滚动条 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.28);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.45);
}

/* ---------- 通用工具 ---------- */
.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.container-x {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.mono {
  font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
}

/* ---------- 通用动画 ---------- */
@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-18px);
  }
}

@keyframes pulseGlow {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.08);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes spin-slow {
  to {
    transform: rotate(360deg);
  }
}

@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
