/* 通用样式 */
body {
  font-family: 'Inter', sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* 锚点跳转样式 */
html {
  scroll-behavior: smooth;
}

/* 为锚点跳转添加偏移，避免被导航栏遮挡 */
[id] {
  scroll-margin-top: 80px;
}

/* 导航栏样式 */
header {
  transition: background-color 0.3s ease;
}

#theme-toggle i {
  transition: transform 0.3s ease;
}

#theme-toggle:hover i {
  transform: rotate(360deg);
}

/* 概览卡片样式 */
.card-shadow {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.card-shadow-dark {
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.05);
}

.hover-scale {
  transition: transform 0.3s ease;
}

/* 站点监控列表样式 */
table thead tr {
  position: sticky;
  top: 0;
  background-color: #F2F3F5;
  z-index: 1;
}

.dark table thead tr {
  background-color: #272E3B;
}

table tbody tr:hover {
  background-color: rgba(22, 93, 255, 0.1);
}

.dark table tbody tr:hover {
  background-color: rgba(22, 93, 255, 0.2);
}

/* 状态点动画样式 */
@keyframes shadow-pulse-danger {
  0% {
      box-shadow: 0 0 0 0 rgba(245, 63, 63, 0.7);
  }
  70% {
      box-shadow: 0 0 12px 8px rgba(245, 63, 63, 0.3);
  }
  100% {
      box-shadow: 0 0 0 0 rgba(245, 63, 63, 0.0);
  }
}

.shadow-pulse-danger {
  animation: shadow-pulse-danger 1.5s infinite;
}

@keyframes shadow-pulse-success {
  0% {
      box-shadow: 0 0 0 0 rgba(0, 180, 42, 0.7);
  }
  70% {
      box-shadow: 0 0 12px 8px rgba(0, 180, 42, 0.3);
  }
  100% {
      box-shadow: 0 0 0 0 rgba(0, 180, 42, 0.0);
  }
}

.shadow-pulse-success {
  animation: shadow-pulse-success 1.5s infinite;
}

@keyframes shadow-pulse-warning {
  0% {
      box-shadow: 0 0 0 0 rgba(255, 125, 0, 0.7);
  }
  70% {
      box-shadow: 0 0 12px 8px rgba(255, 125, 0, 0.3);
  }
  100% {
      box-shadow: 0 0 0 0 rgba(255, 125, 0, 0.0);
  }
}

.shadow-pulse-warning {
  animation: shadow-pulse-warning 1.5s infinite;
}

/* 复制按钮样式 */
.copy-url.copying {
  pointer-events: none; /* 在复制状态时禁用点击 */
  opacity: 0.7;
  user-select: none; /* 只在复制状态时防止文字被选中 */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.copy-btn {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.copy-btn.copying {
  pointer-events: none;
  opacity: 0.7;
}

/* 隐藏滚动条但保持滚动功能 */
.scrollbar-hide {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;  /* Chrome, Safari and Opera */
}

/* 全局隐藏滚动条但保持滚动功能 */
body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

body::-webkit-scrollbar-track {
  background: transparent;
}

body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

body::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

.dark body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

.dark body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}