:root {
  /* 调整为更纯粹的颜色 */
  --primary-02: #ff0f0f;
  --primary-16: #00aaff;
  --primary-15: #4488ff;
  --primary-556: #ffcc00;
  --primary-056: #3ddc97;
  --primary-666: #b65cff;
  --primary-326: #ff4fa6;
  --primary-214: #ff8a2a;
  --primary-390: #00c2a8;
  --primary-196: #a56bff;
  --primary-703: #7aa7ff;
  --primary-001: #ff2f5f;
  --primary-ape: #cfd8dc;
  --primary-default: #7aa7ff;

  --bg-dark: #050505;
  --panel-bg: rgba(20, 20, 25, 0.9);
  --border-color: rgba(255, 255, 255, 0.15);
}

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

body {
  background-color: var(--bg-dark);
  font-family: 'Rajdhani', system-ui, sans-serif;
  overflow-x: hidden;
  color: #eeeeee;
  position: relative;
}

/* 粒子层保持，但降低透明度 */
#particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.5;
}

.particle {
  position: absolute;
  background: white;
  /* 改为方形粒子，更具科技感 */
  border-radius: 0;
  opacity: 0;
  animation: floatUp linear forwards;
  will-change: transform, opacity;
}

@keyframes floatUp {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }

  20% {
    opacity: 0.4;
  }

  100% {
    transform: translateY(-10vh) scale(1);
    opacity: 0;
  }
}

section {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* 背景层处理：降低对比度，使其更像背景 */
.bg-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 0;
  transition: transform 0.5s ease-out;
  filter: brightness(0.4) grayscale(0.3);
  /* 降低饱和度，突出前景 */
}

/* 简单的网格线，去除动态移动，保持稳重 */
.bg-layer::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 100px 100px;
  opacity: 0.3;
}

.s1 .bg-layer {
  background-image: url('../img/img3.png');
  background-attachment: fixed;
}

.s2 .bg-layer {
  background-image: url('../img/img3.png');
  background-attachment: fixed;
}

.s3 .bg-layer {
  background-image: url('../img/莓-1.jpg');
  background-attachment: fixed;
}

.s4 .bg-layer {
  background-image: url('../img/img4.png');
  background-attachment: fixed;
}

/* 布局辅助类 */
.section-right {
  justify-content: flex-end;
  padding-right: 10%;
}

.section-right .card-wrapper {
  text-align: right;
}

.section-right .accent-bar {
  margin-left: auto;
}

.section-right .giant-code {
  right: -5%;
  text-align: right;
}

.section-left {
  justify-content: flex-start;
  padding-left: 10%;
}

.section-left .card-wrapper {
  text-align: left;
}

.section-left .giant-code {
  left: -5%;
}

@media (max-width: 768px) {

  .section-right,
  .section-left {
    justify-content: center;
    padding: 0;
    text-align: center;
  }

  .section-right .card-wrapper,
  .section-left .card-wrapper {
    text-align: left;
    /* 移动端保持左对齐阅读体验更好 */
  }

  .section-right .accent-bar {
    margin-left: 0;
  }
}
