:root {
  --primary: #0ff;
  --bg-color: #050510;
  --text-main: #e0e0e0;
  --glitch-1: #0ff;
  --glitch-2: #f0f;
  --font-cyber: 'Orbitron', sans-serif;
  --font-zh: 'Noto Sans SC', sans-serif;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-zh);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 粒子背景层 */
#canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

.content-wrapper {
  position: relative;
  z-index: 1; /* 确保内容在canvas之上 */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
}

/* 标题区样式与 Glitch (故障) 效果 */
.hero {
  margin-bottom: 4rem;
}

.subtitle {
  font-family: var(--font-cyber);
  color: var(--primary);
  opacity: 0.8;
  letter-spacing: 2px;
  margin-top: 10px;
  font-size: 0.9rem;
  text-transform: uppercase;
  text-shadow: 0 0 5px var(--primary);
  animation: blink 2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 0.3; }
}

.glitch {
  font-family: var(--font-zh);
  font-weight: 700;
  font-size: 4rem;
  position: relative;
  color: white;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5), 0 0 20px rgba(0, 255, 255, 0.3);
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
}

.glitch::before {
  left: 2px;
  text-shadow: -2px 0 var(--glitch-2);
  clip: rect(24px, 550px, 90px, 0);
  animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitch::after {
  left: -2px;
  text-shadow: -2px 0 var(--glitch-1);
  clip: rect(85px, 550px, 140px, 0);
  animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
  0% { clip: rect(10px, 9999px, 86px, 0); }
  20% { clip: rect(72px, 9999px, 91px, 0); }
  40% { clip: rect(6px, 9999px, 8px, 0); }
  60% { clip: rect(55px, 9999px, 98px, 0); }
  80% { clip: rect(32px, 9999px, 82px, 0); }
  100% { clip: rect(51px, 9999px, 60px, 0); }
}

@keyframes glitch-anim-2 {
  0% { clip: rect(65px, 9999px, 100px, 0); }
  20% { clip: rect(3px, 9999px, 20px, 0); }
  40% { clip: rect(34px, 9999px, 78px, 0); }
  60% { clip: rect(5px, 9999px, 5px, 0); }
  80% { clip: rect(81px, 9999px, 11px, 0); }
  100% { clip: rect(44px, 9999px, 49px, 0); }
}

/* 主内容区（含科幻按钮） */
.main-content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.action-container {
  position: relative;
}

.cyber-btn {
  display: inline-block;
  padding: 1.5rem 3rem;
  font-family: var(--font-cyber), var(--font-zh);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--bg-color);
  background-color: var(--primary);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  border: 0;
  outline: transparent;
  transition: all 0.3s ease;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%);
  box-shadow: 0 0 15px var(--primary), inset 0 0 10px rgba(255,255,255,0.5);
  cursor: pointer;
}

.cyber-btn:hover {
  background-color: white;
  color: var(--bg-color);
  box-shadow: 0 0 30px var(--primary), 0 0 50px var(--primary);
}

.cyber-btn::after {
  content: 'ACCESSING...';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--glitch-2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cyber-btn:active::after {
  opacity: 1;
}

/* 底部 ICP 备案信息 */
.footer {
  margin-top: 4rem;
  padding: 1rem;
  font-family: var(--font-zh);
  font-size: 0.85rem;
  color: #666;
  letter-spacing: 1px;
}

.footer .highlight {
  color: var(--primary);
  opacity: 0.8;
  text-shadow: 0 0 3px var(--primary);
}

/* 针对小屏幕优化 */
@media (max-width: 768px) {
  .glitch {
    font-size: 2.5rem;
  }
  .cyber-btn {
    padding: 1rem 2rem;
    font-size: 1rem;
  }
}
