/* 
 * 背景样式 - 基于 circuit-silk-sanctum.1.json 纹理
 * 极简未来主义优雅风格，带有彩虹般流动感
 */

/* 背景基础样式 */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000; /* 纯黑色背景 */
  z-index: -2;
}

/* 流动彩虹效果层 */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(125deg, 
      rgba(0, 255, 255, 0.05) 15%, 
      rgba(255, 0, 255, 0.05) 30%, 
      rgba(255, 255, 0, 0.05) 45%, 
      rgba(255, 165, 0, 0.05) 60%, 
      rgba(0, 0, 255, 0.05) 75%);
  background-size: 300% 300%;
  animation: gradientFlow 15s ease infinite;
  z-index: -1;
  pointer-events: none;
}

/* 彩虹流动动画 */
@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* 简洁清晰的玻璃效果 - 如图2样式 */
.glass-container {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  color: #333333;
}

/* 确保glass-container内的链接在白色背景下清晰可见 */
.glass-container a {
  color: #0066cc;
}

.glass-container a:hover {
  color: #004499;
}

/* 黑夜模式下glass-container的特殊样式 */
body:not(.light-theme) .glass-container {
  background: 
    rgba(0, 0, 0, 0.8),
    linear-gradient(135deg, 
      rgba(255, 255, 255, 0.02) 0%, 
      transparent 50%, 
      rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 4px 20px 0 rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  color: #ffffff;
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  position: relative;
  overflow: hidden;
}

/* 为黑夜模式glass-container添加内部光效 */
body:not(.light-theme) .glass-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.3) 50%, 
    transparent 100%);
  z-index: -1;
}

body:not(.light-theme) .glass-container::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 20%, rgba(0, 255, 255, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 0, 255, 0.05) 0%, transparent 50%);
  opacity: 0.6;
  z-index: -1;
  pointer-events: none;
}

/* 黑夜模式下glass-container内的链接样式 */
body:not(.light-theme) .glass-container a {
  color: #00ccff;
}

body:not(.light-theme) .glass-container a:hover {
  color: #66ddff;
}

/* 彩虹高光效果 - 更柔和的版本 */
.rainbow-highlight {
  position: relative;
  overflow: hidden;
}

.rainbow-highlight::before {
  content: "";
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: radial-gradient(
    circle at center,
    rgba(0, 255, 255, 0.05) 0%,
    rgba(255, 0, 255, 0.05) 25%,
    rgba(255, 255, 0, 0.05) 50%,
    rgba(255, 165, 0, 0.05) 75%,
    rgba(0, 0, 255, 0.05) 100%
  );
  opacity: 0;
  transition: opacity 1.5s ease;
  transform-origin: center;
  animation: none;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  mix-blend-mode: screen;
}

.rainbow-highlight:hover::before {
  opacity: 1;
  animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
  0% {
    transform: scale(0.95);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.6;
  }
  100% {
    transform: scale(0.95);
    opacity: 0.4;
  }
}

/* 高对比度边缘光效 */
.edge-glow {
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
  transition: box-shadow 0.3s ease;
}

.edge-glow:hover {
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.2),
              0 0 5px rgba(0, 255, 255, 0.3),
              0 0 5px rgba(255, 0, 255, 0.3);
}

/* 黑夜模式下的边缘光效增强 */
body:not(.light-theme) .edge-glow {
  box-shadow: 
    0 0 25px rgba(255, 255, 255, 0.2),
    0 8px 32px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

body:not(.light-theme) .edge-glow:hover {
  box-shadow: 
    0 0 35px rgba(255, 255, 255, 0.3),
    0 0 15px rgba(0, 255, 255, 0.5),
    0 0 15px rgba(255, 0, 255, 0.5),
    0 12px 40px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4);
} 