@tailwind base;
@tailwind components;
@tailwind utilities;

/* 现代全平台字体栈，无需外网请求，国内秒开 */
body {
  background-color: #050505;
  background-image: radial-gradient(
      circle at 15% 50%,
      rgba(55, 0, 150, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 85% 30%,
      rgba(0, 160, 255, 0.15) 0%,
      transparent 50%
    );
  background-attachment: fixed;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #e2e8f0;
  margin: 0;
  padding: 0;
}

/* 增加科技感网点背景叠加层 */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.04) 1px,
    transparent 1px
  );
  background-size: 24px 24px;
  z-index: -1;
  pointer-events: none;
}

/* 高级玻璃拟态容器 */
.glass {
  background: rgba(15, 20, 30, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

/* 数据小方块微交互 */
.neo-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.neo-box:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.4);
  box-shadow: 0 0 20px rgba(96, 165, 250, 0.15);
}

/* 整体卡片浮动效果 */
.status-card {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.status-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.12);
}

/* 流光炫彩按钮 */
.btn-primary {
  background-size: 200% auto;
  background-image: linear-gradient(
    to right,
    #3b82f6 0%,
    #8b5cf6 50%,
    #3b82f6 100%
  );
  transition: 0.5s;
}
.btn-primary:hover {
  background-position: right center;
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.5);
}

.loading-spin {
  animation: spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

#progress-bar {
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 自定义滚动条美化 */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* =========================================
   补充 Tailwind 中被剔除的缺失颜色类，恢复动态变色
========================================= */
.text-yellow-400 {
  color: #facc15 !important;
}
.text-red-400 {
  color: #f87171 !important;
}
.text-red-500 {
  color: #ef4444 !important;
}
