/* Web3风格增强样式 */

/* 像素爆炸背景动画 */
@keyframes pixelFloat {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.3; }
  50% { transform: translate(var(--tx), var(--ty)) scale(1.5); opacity: 0.8; }
}

@keyframes pixelPulse {
  0%, 100% { box-shadow: 0 0 5px currentColor; }
  50% { box-shadow: 0 0 20px currentColor, 0 0 30px currentColor; }
}

.web3-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0e17 0%, #1a0b2e 100%);
}

.pixel-container {
  position: absolute;
  width: 100%;
  height: 100%;
}

.pixel {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--pixel-color);
  animation: pixelFloat var(--duration) infinite ease-in-out;
  animation-delay: var(--delay);
}

/* 洗牌文字动画 */
.shuffle-text {
  display: inline-block;
  position: relative;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.shuffle-text .char {
  display: inline-block;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.shuffle-text.shuffling .char {
  animation: shuffle 0.5s ease-in-out;
}

@keyframes shuffle {
  0%, 100% { transform: translateY(0) scale(1); opacity: 1; }
  25% { transform: translateY(-10px) scale(1.2); opacity: 0.5; }
  50% { transform: translateY(10px) scale(0.8); opacity: 0.3; }
  75% { transform: translateY(-5px) scale(1.1); opacity: 0.7; }
}

/* 霓虹光效 */
.neon-border {
  position: relative;
  border: 2px solid transparent;
  background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
              linear-gradient(135deg, #667eea, #764ba2, #f093fb) border-box;
  border-radius: 0.75rem;
}

.neon-glow {
  box-shadow: 
    0 0 10px rgba(102, 126, 234, 0.3),
    0 0 20px rgba(118, 75, 162, 0.2),
    0 0 30px rgba(240, 147, 251, 0.1);
  animation: neonPulse 2s infinite;
}

@keyframes neonPulse {
  0%, 100% {
    box-shadow: 
      0 0 10px rgba(102, 126, 234, 0.3),
      0 0 20px rgba(118, 75, 162, 0.2),
      0 0 30px rgba(240, 147, 251, 0.1);
  }
  50% {
    box-shadow: 
      0 0 20px rgba(102, 126, 234, 0.5),
      0 0 40px rgba(118, 75, 162, 0.3),
      0 0 60px rgba(240, 147, 251, 0.2);
  }
}

/* 赛博朋克网格背景 - 已禁用 */
.cyber-grid {
  display: none;
}

/* Web3渐变文字 */
.gradient-text {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s ease infinite;
  background-size: 200% 200%;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* 数据流动效果 */
.data-stream {
  position: absolute;
  height: 100%;
  width: 2px;
  background: linear-gradient(to bottom, transparent, #667eea, transparent);
  animation: streamFlow var(--duration) linear infinite;
  opacity: 0.3;
}

@keyframes streamFlow {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

/* 悬浮卡片效果 */
.float-card {
  animation: cardFloat 6s ease-in-out infinite;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.float-card:hover {
  animation-play-state: paused;
  transform: translateY(-8px) scale(1.02);
}

@keyframes cardFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* 闪烁光标效果 */
.blink-cursor::after {
  content: '|';
  animation: blink 1s infinite;
  color: var(--accent-primary);
}

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

/* 能量条动画 - 已禁用 */
.energy-bar {
  display: none;
}

.energy-fill {
  display: none;
}

/* 扫描线效果 */
.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #667eea, transparent);
  animation: scan 3s linear infinite;
  opacity: 0.5;
}

@keyframes scan {
  0% { top: 0; }
  100% { top: 100%; }
}

/* 故障效果 */
.glitch {
  position: relative;
  animation: glitchAnim 5s infinite;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}

.glitch::before {
  animation: glitchBefore 3s infinite;
  color: #ff00ff;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

.glitch::after {
  animation: glitchAfter 3s infinite;
  color: #00ffff;
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}

@keyframes glitchBefore {
  0%, 90%, 100% { opacity: 0; transform: translateX(0); }
  92%, 94%, 96% { opacity: 0.7; transform: translateX(-2px); }
}

@keyframes glitchAfter {
  0%, 90%, 100% { opacity: 0; transform: translateX(0); }
  91%, 93%, 95% { opacity: 0.7; transform: translateX(2px); }
}

/* 连接线动画 */
.connection-line {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, #667eea, transparent);
  transform-origin: left;
  animation: lineExtend 2s ease-in-out infinite;
}

@keyframes lineExtend {
  0%, 100% { width: 0; opacity: 0; }
  50% { width: 100%; opacity: 1; }
}

/* 粒子效果容器 */
.particle-container {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--accent-primary);
  border-radius: 50%;
  animation: particleFloat var(--duration) infinite;
  opacity: 0;
}

@keyframes particleFloat {
  0% { 
    transform: translate(0, 0) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% { 
    transform: translate(var(--tx), var(--ty)) scale(1.5);
    opacity: 0;
  }
}

/* 发光按钮 */
.glow-button {
  position: relative;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border: none;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s;
}

.glow-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.glow-button:hover::before {
  width: 300px;
  height: 300px;
}

.glow-button:hover {
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.6);
  transform: translateY(-2px);
}

/* 数字雨效果 */
.matrix-rain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.15;
}

/* 全息效果 */
.holographic {
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.1) 0%,
    rgba(118, 75, 162, 0.1) 25%,
    rgba(240, 147, 251, 0.1) 50%,
    rgba(102, 126, 234, 0.1) 75%,
    rgba(118, 75, 162, 0.1) 100%
  );
  background-size: 400% 400%;
  animation: holographicShift 15s ease infinite;
}

@keyframes holographicShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Web3新闻卡片样式 */
.web3-news-item {
  position: relative;
  background: rgba(26, 32, 53, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.web3-news-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  opacity: 0;
  transition: opacity 0.3s;
}

.web3-news-item:hover::before {
  opacity: 1;
}

.web3-news-item:hover {
  border-color: rgba(102, 126, 234, 0.6);
  box-shadow: 
    0 8px 32px rgba(102, 126, 234, 0.2),
    0 0 0 1px rgba(102, 126, 234, 0.3);
  transform: translateX(8px) translateY(-4px);
}

/* 来源链接样式 */
.source-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 1rem;
  background: rgba(102, 126, 234, 0.1);
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-radius: 0.5rem;
  color: #60a5fa;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  height: 36px;
  box-sizing: border-box;
  line-height: 1;
}

.source-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.3), transparent);
  transition: left 0.5s;
}

.source-link:hover::before {
  left: 100%;
}

.source-link:hover {
  background: rgba(102, 126, 234, 0.2);
  border-color: rgba(102, 126, 234, 0.6);
  color: #93c5fd;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.source-link i {
  font-size: 0.875rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .pixel {
    width: 3px;
    height: 3px;
  }
  
  .web3-news-item:hover {
    transform: translateX(4px) translateY(-2px);
  }
}
