/* ============================================================
   祈鸳的图书馆 — 环境层
   静 A：不再挂循环视频。这里只留穹顶色温与暗角。
   ============================================================ */

/* ══════════════════════════════════════════
   0. 背景图层
   ══════════════════════════════════════════ */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-color: #0a0a12;
  overflow: hidden;
  pointer-events: none;
}

.main-layout {
  position: relative;
  z-index: 1;
}


/* ══════════════════════════════════════════
   氛围层 — 只留视频、穹顶色温、暗角。烛火 / 藤蔓 / 书页 / 灰尘粒子已整撤。
   ══════════════════════════════════════════ */
.ambient-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* ══════════════════════════════════════════
   4. 穹顶天气光（Dome Weather Light）
   ══════════════════════════════════════════ */
.dome-light {
  position: absolute;
  top: 0;
  left: 25%;
  width: 50%;
  height: 35%;
  pointer-events: none;
  transition: all 60s ease-in-out; /* 60秒平滑过渡 */
  will-change: opacity, filter;
}

/* 默认状态 — 温暖烛光 */
.dome-light {
  background: radial-gradient(ellipse at 50% 0%,
    rgba(255, 220, 150, 0.08) 0%,
    rgba(255, 200, 100, 0.03) 40%,
    transparent 100%
  );
  opacity: 1;
}

/* 晴天 — 暖白光从穹顶洒入 */
.dome-light.weather-clear {
  background: radial-gradient(ellipse at 50% 0%,
    rgba(255, 245, 220, 0.15) 0%,
    rgba(255, 230, 180, 0.06) 40%,
    transparent 100%
  );
  opacity: 1;
}

/* 多云 — 柔和灰光 */
.dome-light.weather-cloudy {
  background: radial-gradient(ellipse at 50% 0%,
    rgba(180, 190, 210, 0.10) 0%,
    rgba(160, 170, 190, 0.04) 40%,
    transparent 100%
  );
  opacity: 0.8;
}

/* 雨天 — 冷蓝光，穹顶偏暗 */
.dome-light.weather-rain {
  background: radial-gradient(ellipse at 50% 0%,
    rgba(100, 130, 180, 0.12) 0%,
    rgba(80, 110, 160, 0.05) 40%,
    transparent 100%
  );
  opacity: 0.6;
}

/* 夜晚 — 深蓝紫，烛光更突出 */
.dome-light.weather-night {
  background: radial-gradient(ellipse at 50% 0%,
    rgba(40, 50, 100, 0.08) 0%,
    rgba(30, 40, 80, 0.03) 40%,
    transparent 100%
  );
  opacity: 0.4;
}

/* 暴风雨 — 偶尔闪电 */
.dome-light.weather-storm {
  background: radial-gradient(ellipse at 50% 0%,
    rgba(80, 100, 150, 0.10) 0%,
    rgba(60, 80, 130, 0.04) 40%,
    transparent 100%
  );
  opacity: 0.5;
}

.dome-light--lightning {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%,
    rgba(200, 210, 255, 0.3) 0%,
    transparent 70%
  );
  opacity: 0;
  pointer-events: none;
}

.dome-light.weather-storm .dome-light--lightning {
  animation: lightning-flash 8s ease-in-out infinite;
}

@keyframes lightning-flash {
  0%, 100% { opacity: 0; }
  92% { opacity: 0; }
  93% { opacity: 0.8; }
  94% { opacity: 0.1; }
  95% { opacity: 0.6; }
  96% { opacity: 0; }
}

/* ══════════════════════════════════════════
   5. 辅助效果
   ══════════════════════════════════════════ */

/* 底部暗角 — 增加沉浸感 */
.ambient-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%,
    transparent 50%,
    rgba(0, 0, 0, 0.3) 100%
  );
}

.dash-section {
  margin-top: 20px;
}

.dash-section-title {
  margin-bottom: 10px;
}

/* ══════════════════════════════════════════
   响应式 & 性能
   ══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .dome-light,
  .dome-light--lightning,
  .ambient-layer.is-reduced .dome-light,
  .ambient-layer.is-reduced .dome-light--lightning {
    animation: none !important;
    transition: none !important;
  }
}

.ambient-layer.is-reduced .dome-light,
.ambient-layer.is-reduced .dome-light--lightning {
  animation: none !important;
  transition: none !important;
}
