:root {
  --color-bg: #413030;
  --color-text: #ffffff;
  --color-primary: #ff3366;
  --color-secondary: #3366ff;
  --color-tertiary: #33ddff;
  --color-accent: #ffcc00;
  --color-success: #10B981;
  --color-warning: #FBBF24;
  --color-danger: #EF4444;
  --card-radius: clamp(12px, 4vw, 16px);
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.1);
  --card-shadow: 0 15px 30px -12px rgba(0, 0, 0, 0.5);
  --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --spacing-xs: clamp(0.5rem, 2vw, 0.75rem);
  --spacing-sm: clamp(1rem, 3vw, 1.25rem);
  --spacing-md: clamp(1.5rem, 4vw, 2rem);
  --spacing-lg: clamp(2rem, 6vw, 3rem);
  --text-xs: clamp(0.75rem, 2vw, 0.875rem);
  --text-sm: clamp(0.875rem, 2.5vw, 1rem);
  --text-md: clamp(1rem, 3vw, 1.25rem);
  --text-lg: clamp(1.5rem, 5vw, 2.5rem);
  --text-xl: clamp(2rem, 8vw, 4.5rem);
}

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

.background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.gradient-blob {
  position: absolute;
  border-radius: 100%;
  filter: blur(80px);
  opacity: 0.5;
  -webkit-animation: float 20s infinite alternate ease-in-out;
          animation: float 20s infinite alternate ease-in-out;
}

.gradient-blob:nth-child(1) {
  background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
  width: 60vw;
  height: 60vw;
  top: -20%;
  left: -10%;
  -webkit-animation-delay: 0s;
          animation-delay: 0s;
}

.gradient-blob:nth-child(2) {
  background: linear-gradient(to right, var(--color-tertiary), var(--color-secondary));
  width: 60vw;
  height: 60vw;
  bottom: -30%;
  right: -10%;
  -webkit-animation-delay: -5s;
          animation-delay: -5s;
}

.gradient-blob:nth-child(3) {
  background: linear-gradient(to right, var(--color-accent), var(--color-primary));
  width: 40vw;
  height: 40vw;
  top: 40%;
  left: 30%;
  -webkit-animation-delay: -10s;
          animation-delay: -10s;
}

@-webkit-keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(2%, 2%) scale(1.02);
  }
  100% {
    transform: translate(-2%, -2%) scale(0.98);
  }
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(2%, 2%) scale(1.02);
  }
  100% {
    transform: translate(-2%, -2%) scale(0.98);
  }
}
main {
  width: 100%;
  padding: var(--spacing-md) var(--spacing-sm);
  position: relative;
  z-index: 1;
  max-width: 1500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.avatar-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.3rem;
}

.avatar {
  width: clamp(80px, 20vw, 150px);
  height: clamp(80px, 20vw, 150px);
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--card-border);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  background: var(--card-bg);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

/* 主头像容器样式 */
.main-avatar-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* 主头像样式 */
.main-avatar {
  width: clamp(80px, 15vw, 120px);
  height: clamp(80px, 15vw, 120px);
  border: 3px solid var(--card-border);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  background: var(--card-bg);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

/* 主头像悬停效果 */
.main-avatar:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

/* 头像内容样式 */
.avatar-content {
  font-size: clamp(2rem, 6vw, 3rem);
  display: flex;
  justify-content: center;
  align-items: center;
}

.avatar-content span {
  display: inline-block;
  animation: pulse 3s infinite;
}

/* 头像图片样式 */
.avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

h1 {
  font-size: var(--text-xl);
  font-weight: 800;
  background: linear-gradient(90deg, #395492,#0099c0,#3dd5a8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  text-align: center;
}

.subtitle {
  font-size: var(--text-sm);
  text-align: center;
  margin-bottom: var(--spacing-xs);
  opacity: 0.8;
  color: #3dd5a8;
}

/* Footer样式 */
footer {
  width: 100%;
  padding: 2rem 0;
  text-align: center;
}

/* 页脚信息样式 */
.footer-info {
  font-size: var(--text-sm); /* 将字体调大一点 */
  color: var(--color-text);
  opacity: 0.7;
  margin: 0;
  margin-top: 0.8rem; /* 将备案号往下移动一点 */
}

/* 页脚信息中的超链接样式 */
.footer-info a {
  color: var(--color-text); /* 与父元素相同的文本颜色 */
  text-decoration: none; /* 去除下划线 */
  opacity: 1; /* 提高亮度，确保与普通文本一致 */
  display: inline; /* 确保与普通文本显示一致 */
  font-weight: inherit; /* 继承父元素字体粗细 */
  background: transparent; /* 确保没有背景色影响 */
}

/* 可滚动文本样式 */
.scrollable-text {
  display: inline-block;
  overflow-x: auto;
  white-space: nowrap;
  max-width: 100px;
  padding: 2px 4px;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE 10+ */
  position: relative;
  z-index: 1;
  transform-style: flat;
  will-change: scroll-position;
}

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

/* 移除鼠标悬停效果，保持滚动功能 */
.scrollable-text:hover {
  background-color: transparent;
  border-radius: 0;
}

.cards-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
  perspective: 1000px;
  padding: 0 var(--spacing-xs);
}




.card {
  position: relative;
  height: clamp(450px, 47vh, 460px);
  width: 100%;
  border-radius: 24px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  transform-style: preserve-3d;
  transition: var(--transition);
  cursor: pointer;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.card-content {
  position: relative;
  height: 100%;
  width: 250px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
}

.card:hover .card-content {
  transform: scale(1.03) translateZ(0);
}

/* Server Header with Country Flag */
.server-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-sm);
}

.server-header h2 {
  font-size: clamp(1.1rem, 4vw, 1.4rem);
  margin: 0;
  color: var(--color-tertiary);
  text-align: left;
  flex-grow: 1;
  transform: translateZ(20px);
}

/* 状态指示点样式 */
.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
  position: relative;
}

.status-online {
  background-color: var(--color-success);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.status-online::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-success);
  border-radius: 50%;
  opacity: 0.6;
  animation: pulse 2s infinite;
}

.status-offline {
  background-color: var(--color-danger);
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.5);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

.country-flag {
  width: 40px;
  height: 24px;
  border-radius: 4px;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transform: translateZ(15px);
}

.country-flag svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Server Information */
.server-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 0.75rem;
  margin-bottom: 0.5rem;
  transform: translateZ(15px);
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
}

.info-label {
  color: var(--color-tertiary);
  font-weight: 500;
  opacity: 0.9;
}

.info-value {
  color: var(--color-text);
  font-weight: 600;
}

/* Usage Bars */
.usage-bars {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.5rem;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 0.75rem;
  margin-bottom: 0.5rem;
  transform: translateZ(15px);
}

.usage-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.usage-label {
  font-size: var(--text-xs);
  color: var(--color-tertiary);
  width: 80px;
  text-align: left;
  opacity: 0.9;
}

.usage-progress {
  flex-grow: 1;
  height: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.usage-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-secondary), var(--color-tertiary));
  border-radius: 4px;
  transition: width 0.5s ease;
  position: relative;
}

.usage-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.usage-percentage {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text);
  width: 40px;
  text-align: right;
}

/* Network Stats */
.network-stats {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 0.75rem;
  margin-bottom: 0.5rem;
  transform: translateZ(15px);
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
}

.stat-label {
  color: var(--color-tertiary);
  font-weight: 500;
  opacity: 0.9;
}

.stat-value {
  color: var(--color-text);
  font-weight: 600;
}

.up-speed {
    color: var(--color-text);
  }

  .down-speed {
    color: var(--color-text);
  }


/* PC端优化 - 采用桌面端最佳显示效果 */
h1 {
  font-size: 4.5rem;
  display: inline-block;
}

.subtitle {
  font-size: 2.25rem;
}

/* 卡片容器 - 4列布局 */
.cards-container {
  grid-template-columns: repeat(4, 1fr);
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
  gap: var(--spacing-lg);
}

/* 卡片内容3D效果增强 */
.card h2 {
  font-size: 1.5rem;
  transform: translateZ(30px);
}

.card-tag {
  transform: translateZ(20px);
}

.card p {
  transform: translateZ(25px);
}

.card-footer {
  transform: translateZ(20px);
}

.card-button {
  margin-top: 1.5rem;
}

/* 媒体查询 - 适配手机端 (小于768px) */
@media (max-width: 767px) {
  /* 调整基础样式 */
  body {
    padding: 0;
  }
  
  main {
    padding: var(--spacing-sm);
  }
  
  /* 调整字体大小 */
  h1 {
    font-size: 2.5rem;
    text-align: center;
    display: block;
  }
  
  .subtitle {
    font-size: 1.25rem;
  }
  
  /* 调整主头像在小屏幕上的大小 */
  .main-avatar {
    width: clamp(60px, 15vw, 100px);
    height: clamp(60px, 15vw, 100px);
  }
  
  .avatar-content {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
  }
  
  /* 调整卡片容器改为1列布局 */
  .cards-container {
    grid-template-columns: 1fr;
    max-width: 100%;
    padding: 0;
    gap: var(--spacing-sm);
    width: 100%;
  }
  
  /* 调整卡片样式 */
  .card {
    height: clamp(430px, 51vh, 430px);
    border-radius: 20px;
    max-width: none; /* 移除最大宽度限制 */
    width: 95%; /* 确保卡片占满容器宽度 */
    margin: 0 auto; /* 居中显示 */
  }
  
  /* 为小屏幕设备（三星S8+和iPhone SE等）专门适配 */
  @media (max-width: 375px) {
    /* 增加卡片最小高度，确保所有内容都能显示 */
    .card {
      height: clamp(430px, 57vh, 440px);
    }
    
    /* 减小subtitle字体大小，避免在超小屏幕上换行显示 */
    .subtitle {
      font-size: 1rem; /* 从1.25rem减小到1rem，更适合344px宽度的屏幕 */
    }
    
    /* 进一步调整主头像在超小屏幕上的大小 */
    .main-avatar {
      width: clamp(50px, 15vw, 80px);
      height: clamp(50px, 15vw, 80px);
    }
    
    .avatar-content {
      font-size: clamp(1.25rem, 6vw, 2rem);
    }
    
    /* 调整进度条元素宽度，更适合小屏幕 */
    .usage-label {
      width: 70px;
      font-size: var(--text-xs);
    }
    
    .usage-percentage {
      width: 35px;
      font-size: var(--text-xs);
    }
    
    /* 调整卡片内容内边距 */
    .card-content {
      padding: 0.6rem;
    }
    
    /* 调整统计项和信息项间距 */
    .info-item,
    .stat-item,
    .usage-bar {
      gap: 0.3rem;
    }
  }
  
  /* 调整卡片内容样式 */
  .card-content {
    width: 100% !important; /* 强制卡片内容占满卡片宽度，优先级最高 */
    min-width: 0; /* 允许内容收缩 */
    max-width: none !important; /* 移除内容最大宽度限制，优先级最高 */
    padding: 0.8rem; /* 增加内边距 */
    box-sizing: border-box; /* 确保内边距不会增加元素总宽度 */
    /* 强制覆盖PC端的固定宽度250px设置 */
  
  /* 调整服务器信息样式 - 保持水平排列 */
  .server-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
  }
  
  .server-header h2 {
    font-size: clamp(1rem, 4vw, 1.2rem);
    flex-grow: 1;
  }
  
  /* 调整信息项和统计项样式 - 保持水平排列 */
  .info-item,
  .stat-item {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
  }
  
  .info-label,
  .stat-label {
    font-size: var(--text-xs);
    flex-shrink: 0; /* 防止标签被压缩 */
  }
  
  .info-value,
  .stat-value {
    font-size: var(--text-sm);
    flex-grow: 1; /* 允许值占据剩余空间 */
    text-align: right;
  }
  
  /* 调整进度条样式 - 保持水平排列 */
  .usage-bar {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
  }
  
  .usage-label {
    width: 80px;
    text-align: left;
    flex-shrink: 0;
  }
  
  .usage-percentage {
    width: 40px;
    text-align: right;
    flex-shrink: 0;
  }
  
  .usage-progress {
    flex-grow: 1;
  }
  
  /* 调整头像大小 */
  .avatar {
    width: clamp(60px, 15vw, 100px);
    height: clamp(60px, 15vw, 100px);
  }
  
  /* 调整背景渐变大小 */
  .gradient-blob {
    filter: blur(60px);
  }
  
  .gradient-blob:nth-child(1),
  .gradient-blob:nth-child(2) {
    width: 80vw;
    height: 80vw;
  }
  
  .gradient-blob:nth-child(3) {
    width: 50vw;
    height: 50vw;
  }
  
  /* 页脚样式调整 */
  footer {
    padding: 1.5rem 0;
  }
  
  .footer-info {
    font-size: var(--text-xs);
    padding: 0 var(--spacing-sm);
  }
}
}

/* 平板端媒体查询适配 (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  /* 调整基础样式 */
  body {
    padding: 0 var(--spacing-md);
  }
  
  main {
    padding: var(--spacing-md);
    max-width: 100%;
  }
  
  /* 调整字体大小 */
  h1 {
    font-size: clamp(2.5rem, 5vw, 3rem);
    text-align: center;
  }
  
  .subtitle {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    text-align: center;
  }
  
  /* 调整卡片容器为2列布局 */
  .cards-container {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    max-width: 1000px; /* 增加最大宽度 */
    margin: 0 auto;
    width: 100%;
  }
  
  /* 调整卡片样式 */
  .card {
    height: clamp(460px, 55vh, 475px); /* 增加卡片高度，确保所有信息完整显示 */
    border-radius: 20px;
    max-width: none;
    width: 100%;
    margin: 0;
    min-width: 0; /* 确保卡片可以收缩 */
  }
  
  /* 调整卡片内容样式 */
  .card-content {
    width: 100% !important;
    min-width: 0;
    max-width: none !important;
    padding: 1rem;
    box-sizing: border-box;
  }
  
  /* 调整服务器信息样式 */
  .server-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
  }
  
  .server-header h2 {
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    flex-grow: 1;
  }
  
  /* 调整信息项和统计项样式 */
  .info-item,
  .stat-item {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
  }
  
  .info-label,
  .stat-label {
    font-size: var(--text-xs);
    flex-shrink: 0;
  }
  
  .info-value,
  .stat-value {
    font-size: var(--text-sm);
    flex-grow: 1;
    text-align: right;
  }
  
  /* 调整进度条样式 */
  .usage-bar {
    flex-direction: row;
    align-items: center;
    gap: 0.8rem;
  }
  
  .usage-label {
    width: 80px;
    text-align: left;
    flex-shrink: 0;
  }
  
  .usage-percentage {
    width: 40px;
    text-align: right;
    flex-shrink: 0;
  }
  
  /* 调整头像大小 */
  .avatar {
    width: clamp(70px, 12vw, 100px);
    height: clamp(70px, 12vw, 100px);
  }
  
  /* 调整背景渐变大小 */
  .gradient-blob {
    filter: blur(70px);
  }
  
  .gradient-blob:nth-child(1),
  .gradient-blob:nth-child(2) {
    width: 60vw;
    height: 60vw;
  }
  
  .gradient-blob:nth-child(3) {
    width: 40vw;
    height: 40vw;
  }
  
  /* 页脚样式调整 */
  footer {
    padding: 2rem 0;
  }
  
  .footer-info {
    font-size: var(--text-sm);
    padding: 0 var(--spacing-md);
  }
}

/* 中大屏幕适配 (1024px - 1229px) - 解决卡片右边被挤占的问题 */
@media (min-width: 1024px) and (max-width: 1229px) {
  /* 调整卡片容器 */
  .cards-container {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    max-width: 1100px; /* 增加最大宽度以适应更多内容 */
    margin: 0 auto;
    width: 95%; /* 使用百分比宽度而非固定宽度 */
  }
  
  /* 调整卡片样式 */
  .card {
    max-width: none;
    width: 100%;
    margin: 0;
    min-width: 0; /* 确保卡片可以收缩 */
    box-sizing: border-box;
  }
  
  /* 调整卡片内容样式 */
  .card-content {
    width: 100% !important;
    min-width: 0;
    max-width: none !important;
    padding: 1rem;
    box-sizing: border-box;
  }
  
  /* 调整主内容区域 */
  main {
    padding: var(--spacing-md) var(--spacing-lg);
    max-width: 100%;
    margin: 0 auto;
  }
}
