/* ============================================
   Banner 动画 - 火车与轨道
   ============================================ */

.banner-train-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* 轨道线 */
.track-line {
  position: absolute;
  bottom: 80px;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255,255,255,0.15);
}

.track-line::before,
.track-line::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255,255,255,0.1);
}

.track-line::before { top: -12px; }
.track-line::after { top: 14px; }

/* 枕木 */
.sleepers {
  position: absolute;
  bottom: 70px;
  left: 0;
  right: 0;
  height: 24px;
  background-image: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 28px,
    rgba(255,255,255,0.08) 28px,
    rgba(255,255,255,0.08) 44px
  );
  animation: sleeper-move 2s linear infinite;
}

@keyframes sleeper-move {
  from { background-position: 0 0; }
  to { background-position: -44px 0; }
}

/* 列车 */
.train {
  position: absolute;
  bottom: 88px;
  left: -300px;
  display: flex;
  align-items: flex-end;
  animation: train-move 20s linear infinite;
}

@keyframes train-move {
  from { transform: translateX(0); }
  to { transform: translateX(calc(100vw + 600px)); }
}

.carriage {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px 8px 4px 4px;
  position: relative;
}

.carriage-main {
  width: 180px;
  height: 50px;
  margin-right: 4px;
}

.carriage-main .window {
  position: absolute;
  top: 8px;
  left: 12px;
  right: 12px;
  height: 20px;
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
}

.carriage-main .window::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255,255,255,0.1);
}

.carriage-main .stripe {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  opacity: 0.6;
}

.carriage-head {
  width: 200px;
  height: 55px;
  border-radius: 8px 40px 4px 4px;
  background: rgba(255,255,255,0.15);
  margin-left: 4px;
}

.carriage-head .cockpit {
  position: absolute;
  top: 6px;
  right: 16px;
  width: 50px;
  height: 28px;
  background: rgba(255,255,255,0.2);
  border-radius: 4px 20px 4px 4px;
}

.carriage-head .light {
  position: absolute;
  top: 20px;
  right: 12px;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  animation: light-blink 1.5s ease-in-out infinite;
}

@keyframes light-blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 10px var(--accent); }
  50% { opacity: 0.4; box-shadow: none; }
}

.wheel {
  position: absolute;
  bottom: -10px;
  width: 16px;
  height: 16px;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  animation: wheel-spin 0.5s linear infinite;
}

@keyframes wheel-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.wheel-1 { left: 20px; }
.wheel-2 { left: 140px; }
.wheel-3 { left: 40px; }
.wheel-4 { left: 160px; }

/* 信号灯 */
.signal {
  position: absolute;
  bottom: 140px;
  right: 20%;
  width: 6px;
  height: 60px;
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
}

.signal-light {
  position: absolute;
  left: -5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #e74c3c;
  animation: signal-red 3s ease-in-out infinite;
}

.signal-light.green {
  background: #2ecc71;
  animation: signal-green 3s ease-in-out infinite;
}

.signal-light.top { top: 4px; }
.signal-light.bottom { top: 28px; }

@keyframes signal-red {
  0%, 45% { opacity: 1; box-shadow: 0 0 12px #e74c3c; }
  50%, 95% { opacity: 0.2; box-shadow: none; }
  100% { opacity: 1; box-shadow: 0 0 12px #e74c3c; }
}

@keyframes signal-green {
  0%, 45% { opacity: 0.2; box-shadow: none; }
  50%, 95% { opacity: 1; box-shadow: 0 0 12px #2ecc71; }
  100% { opacity: 0.2; box-shadow: none; }
}

/* 车站剪影 */
.station-silhouette {
  position: absolute;
  bottom: 80px;
  right: 5%;
  width: 200px;
  height: 120px;
  opacity: 0.08;
}

.station-silhouette .roof {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: #fff;
  border-radius: 60px 60px 0 0;
}

.station-silhouette .pillar {
  position: absolute;
  bottom: 0;
  width: 8px;
  height: 90px;
  background: #fff;
}

.station-silhouette .pillar:nth-child(2) { left: 20px; }
.station-silhouette .pillar:nth-child(3) { left: 96px; }
.station-silhouette .pillar:nth-child(4) { right: 20px; }

/* 粒子/星光 */
.particles {
  position: absolute;
  inset: 0;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(255,255,255,0.4);
  border-radius: 50%;
  animation: float-particle 8s ease-in-out infinite;
}

@keyframes float-particle {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.4; }
  50% { transform: translateY(-30px) scale(1.5); opacity: 0.8; }
}

/* 网格装饰 */
.grid-deco {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* 首页 Banner 特殊样式 */
.banner-home {
  min-height: 640px;
}

.banner-home .banner-content {
  padding-top: 80px;
}

/* 页头简化版（用于非首页） */
.banner-simple {
  min-height: 320px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  margin-top: 72px;
  position: relative;
  overflow: hidden;
}

.banner-simple .grid-deco {
  opacity: 0.5;
}

.banner-simple-content {
  position: relative;
  z-index: 2;
  padding: 60px 24px;
}

.banner-simple-content h1 {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.banner-simple-content p {
  opacity: 0.8;
  font-size: 1.1rem;
}
