/* ==================== 全局变量与基础重置 ==================== */
:root {
  /* 24小时渐变色节�?*/
  --color-dawn: #E6F0F5;
  --color-noon: #F8F4ED;
  --color-dusk: #F5E6DC;
  --color-night: #2A3447;

  /* 动态渐变色 */
  --bg-primary: var(--color-noon);
  --text-primary: #8B9AA3;
  --text-secondary: #B8C4CC;

  /* 时间与动�?*/
  --transition-slow: 0.8s;
  --ease-smooth: ease-in-out;
  --transition-card: 0.6s;

  /* 字号 */
  --font-size-base: 14px;
  --font-size-small: 12px;
  --font-size-large: 16px;

  /* === CG级缓动曲线库 === */
  --cg-ease-smooth: cubic-bezier(0.45, 0.05, 0.55, 0.95);
  --cg-ease-enter: cubic-bezier(0.16, 1, 0.3, 1);
  --cg-ease-exit: cubic-bezier(0.7, 0, 0.84, 0);
  --cg-ease-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
  --cg-ease-dramatic: cubic-bezier(0.87, 0, 0.13, 1);
  --cg-ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);

  /* 过渡时长分级 */
  --cg-duration-instant: 0.15s;
  --cg-duration-fast: 0.3s;
  --cg-duration-normal: 0.6s;
  --cg-duration-slow: 0.8s;
  --cg-duration-dramatic: 1.2s;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: var(--font-size-base);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 10s var(--ease-smooth);
}

body {
  min-height: 100vh;
  min-height: -webkit-fill-available;
}

* {
  touch-action: manipulation;
}

/* ==================== 开屏CG光效页 ==================== */
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #F5F0E8;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 1.2s var(--cg-ease-smooth);
  overflow: hidden;
}

.splash-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.splash-screen.hidden {
  display: none;
}

.splash-aura {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.splash-aura-deep {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(230,240,245,0.12) 0%, transparent 70%);
  filter: blur(60px);
  animation: auraDeepExpand 2.5s var(--cg-ease-enter) forwards;
}

.splash-aura-mid {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(230,240,245,0.2) 0%, transparent 60%);
  filter: blur(40px);
  animation: auraMidPulse 2s var(--cg-ease-enter) forwards;
}

.splash-core {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: rgba(230, 240, 245, 0.2);
  animation: coreBreathe 3s var(--cg-ease-smooth) infinite;
  position: relative;
  z-index: 2;
}

.splash-particles {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 3;
}

.splash-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230,240,245,0.8) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  animation: particleBurst var(--duration, 2s) var(--cg-ease-smooth) forwards;
}

.splash-text-sequence {
  position: absolute;
  display: flex;
  align-items: baseline;
  gap: 4px;
  z-index: 4;
  bottom: 28%;
}

.splash-text-line {
  font-size: 24px;
  font-weight: 300;
  color: #8B9AA3;
  letter-spacing: 8px;
  opacity: 0;
  transform: translateY(12px);
  filter: blur(4px);
}

.splash-text-line.animate {
  animation: textReveal 0.8s var(--cg-ease-enter) forwards;
}

.splash-text-sub {
  font-size: 12px;
  letter-spacing: 3px;
  color: #B8C4CC;
  margin-left: 4px;
}

@keyframes auraDeepExpand {
  0% { transform: scale(0.3); opacity: 0; filter: blur(60px); }
  40% { opacity: 0.15; }
  100% { transform: scale(2.5); opacity: 0.08; filter: blur(120px); }
}

@keyframes auraMidPulse {
  0% { transform: scale(0.5); opacity: 0; filter: blur(40px); }
  30% { opacity: 0.25; }
  60% { transform: scale(1.4); opacity: 0.15; }
  100% { transform: scale(1.6); opacity: 0; filter: blur(60px); }
}

@keyframes coreBreathe {
  0%, 100% {
    transform: scale(1);
    opacity: 0.3;
    box-shadow: 0 0 30px rgba(230, 240, 245, 0.2),
                0 0 60px rgba(230, 240, 245, 0.1),
                0 0 100px rgba(230, 240, 245, 0.05);
  }
  50% {
    transform: scale(1.3);
    opacity: 0.5;
    box-shadow: 0 0 40px rgba(230, 240, 245, 0.3),
                0 0 80px rgba(230, 240, 245, 0.15),
                0 0 140px rgba(230, 240, 245, 0.08);
  }
}

@keyframes particleBurst {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  20% { opacity: 0.8; }
  100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}

@keyframes textReveal {
  0% { opacity: 0; transform: translateY(12px); filter: blur(4px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* ==================== 主页布局 ==================== */
.main-page {
  position: relative;
  width: 100%;
  height: 100vh;
  height: -webkit-fill-available;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 1.2s var(--ease-smooth);
}

.main-page.visible {
  opacity: 1;
}

/* 顶部日期�?*/
.header {
  padding: 40px 24px 16px;
  text-align: center;
}

.date-display {
  font-size: var(--font-size-base);
  font-weight: 300;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 1s var(--ease-smooth) 0.3s forwards;
}

/* ==================== 卡片滑动区域 ==================== */
.card-carousel {
  flex: 1;
  position: relative;
  overflow: visible;
  padding: 24px;
  perspective: 1000px;
}

.card-track {
  display: flex;
  height: 100%;
  transition: transform var(--transition-card) var(--ease-smooth);
  will-change: transform;
}

.card {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transform: scale(0.96);
  opacity: 0.6;
  transition: transform 0.6s var(--ease-smooth), opacity 0.6s var(--ease-smooth), box-shadow 0.6s var(--ease-smooth);
}

.card.active {
  transform: scale(1);
  opacity: 1;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.card.prev {
  transform: scale(0.96) translateX(-10%);
}

.card.next {
  transform: scale(0.96) translateX(10%);
}

.card:active {
  transform: scale(0.98);
  transition: transform 0.1s;
}

.new-user-guide {
  position: absolute;
  pointer-events: none;
  z-index: 50;
  color: rgba(0, 0, 0, 0.25);
  animation: guidePulse 2s ease-in-out infinite;
}

.new-user-guide svg {
  width: 24px;
  height: 24px;
}

.swipe-guide {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.longpress-guide {
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
}

@keyframes guidePulse {
  0%, 100% {
    opacity: 0.25;
  }
  50% {
    opacity: 0.4;
  }
}

/* ==================== 1. 风物影像�?==================== */
.landscape-card {
  background: #E8D5C4;
}

.landscape-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: blur(12px) saturate(0.9);
  transform: scale(1.1);
  transition: filter 0.3s var(--ease-smooth), background-image 0.5s var(--ease-smooth), transform 0.6s var(--ease-smooth);
}

.card.active .landscape-image {
  transform: scale(1.05);
}

/* 图片加载中的占位渐变 */
.landscape-image[data-image="mountain"] {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%), url('https://picsum.photos/seed/mountain/800/600');
}

.landscape-image[data-image="ocean"] {
  background: linear-gradient(135deg, #2193b0 0%, #6dd5ed 100%);
}

.landscape-image[data-image="forest"] {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.landscape-image[data-image="autumn"] {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.landscape-image[data-image="lake"] {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.landscape-image[data-image="sunset"] {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.landscape-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.landscape-caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--font-size-small);
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 2px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 1.2s var(--ease-smooth);
  white-space: nowrap;
}

.landscape-caption.visible {
  opacity: 1;
}

.landscape-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: var(--font-size-small);
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 2px;
  transition: opacity 0.8s var(--ease-smooth);
}

.landscape-hint.hidden {
  opacity: 0;
}

/* ==================== 微光视角提示 ==================== */
.light-guide {
  position: absolute;
  bottom: 12px;
  left: 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.15);
  letter-spacing: 1px;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.8s var(--ease-smooth);
}

/* ==================== 2. 短诗便签�?==================== */
.poetry-card {
  background: linear-gradient(145deg, #F5F0E8 0%, #EDE6DA 100%);
}

.poetry-paper {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

.poetry-lines {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
}

.poetry-line {
  font-size: var(--font-size-large);
  font-weight: 300;
  color: var(--text-primary);
  letter-spacing: 3px;
  line-height: 1.8;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 1s var(--ease-smooth), transform 1s var(--ease-smooth);
}

.poetry-line.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==================== 3. 自然声景�?==================== */
.soundscape-card {
  background: linear-gradient(145deg, #2A3447 0%, #1A2030 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.soundscape-visual {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.sound-wave {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  transition: all 0.8s var(--ease-smooth);
}

.sound-wave::before,
.sound-wave::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: soundPulse 4s var(--ease-smooth) infinite;
}

.sound-wave::before {
  width: 80px;
  height: 80px;
}

.sound-wave::after {
  width: 100px;
  height: 100px;
  animation-delay: 0.5s;
}

@keyframes soundPulse {
  0%, 100% {
    opacity: 0.3;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1.05);
  }
}

.soundscape-card.playing .sound-wave {
  border-color: rgba(255, 255, 255, 0.25);
}

.soundscape-card.playing .sound-wave::before,
.soundscape-card.playing .sound-wave::after {
  border-color: rgba(255, 255, 255, 0.15);
}

.soundscape-label {
  margin-top: 32px;
  font-size: var(--font-size-small);
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 3px;
}

.soundscape-hint {
  margin-top: 12px;
  font-size: var(--font-size-small);
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: 2px;
  opacity: 0.6;
  transition: opacity 0.8s var(--ease-smooth);
}

.soundscape-card.playing .soundscape-hint {
  opacity: 0;
}

.soundscape-layer-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.15);
  letter-spacing: 1px;
  opacity: 0;
  transition: opacity 0.8s var(--ease-smooth);
}

.soundscape-card.playing .soundscape-layer-hint {
  opacity: 0.6;
}

.soundscape-card.layered .soundscape-layer-hint {
  opacity: 0;
}

.sound-wave-2 {
  animation-delay: 0.8s;
  opacity: 0;
  transition: opacity 0.8s var(--ease-smooth);
}

.soundscape-card.layered .sound-wave-2 {
  opacity: 0.5;
}

/* ==================== 4. 语录卡片 ==================== */
.quote-card {
  background: linear-gradient(145deg, #F5F0E8 0%, #EDE8DD 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 32px;
}

.quote-content {
  text-align: center;
}

.quote-text {
  font-size: 18px;
  font-weight: 300;
  color: #6B757D;
  line-height: 1.8;
  letter-spacing: 2px;
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 1s var(--ease-smooth);
}

.card.active .quote-text {
  opacity: 1;
  transform: translateY(0);
}

.quote-author {
  font-size: var(--font-size-small);
  color: rgba(107, 117, 125, 0.4);
  letter-spacing: 3px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 1s var(--ease-smooth) 0.3s;
}

.card.active .quote-author {
  opacity: 1;
  transform: translateY(0);
}

/* ==================== 5. 天气卡片 ==================== */
.weather-card {
  background: linear-gradient(145deg, #E6F0F5 0%, #D4E5F7 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.weather-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.8s var(--ease-smooth);
}

.card.active .weather-icon {
  opacity: 1;
  transform: scale(1);
}

.weather-icon svg {
  width: 100%;
  height: 100%;
}

.weather-temp {
  font-size: 48px;
  font-weight: 200;
  color: #5A6B78;
  letter-spacing: -2px;
  margin-bottom: 8px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 1s var(--ease-smooth) 0.2s;
}

.card.active .weather-temp {
  opacity: 1;
  transform: translateY(0);
}

.weather-desc {
  font-size: var(--font-size-large);
  color: rgba(90, 107, 120, 0.6);
  letter-spacing: 2px;
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 1s var(--ease-smooth) 0.4s;
}

.card.active .weather-desc {
  opacity: 1;
  transform: translateY(0);
}

.weather-hint {
  font-size: 10px;
  color: rgba(90, 107, 120, 0.25);
  letter-spacing: 1px;
}

/* ==================== 6. 节气卡片 ==================== */
.solar-card {
  background: linear-gradient(145deg, #F5E6DC 0%, #E8D5C4 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 32px;
}

.solar-name {
  font-size: 32px;
  font-weight: 300;
  color: #8B7355;
  letter-spacing: 8px;
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 1s var(--ease-smooth);
}

.card.active .solar-name {
  opacity: 1;
  transform: translateY(0);
}

.solar-poem {
  font-size: var(--font-size-base);
  color: rgba(139, 115, 85, 0.6);
  line-height: 2;
  letter-spacing: 2px;
  text-align: center;
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 1s var(--ease-smooth) 0.3s;
}

.card.active .solar-poem {
  opacity: 1;
  transform: translateY(0);
}

.solar-hint {
  font-size: 10px;
  color: rgba(139, 115, 85, 0.3);
  letter-spacing: 1px;
}

/* ==================== 随息模式设置面板 ==================== */
.breath-settings {
  position: fixed;
  top: 120px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.8s var(--ease-smooth);
  z-index: 150;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 16px 24px;
  border-radius: 24px;
}

.breath-settings.visible {
  opacity: 0.3;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.breath-settings.visible:hover {
  opacity: 0.5;
}

.breath-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.breath-toggle-text {
  font-size: var(--font-size-small);
  color: var(--text-secondary);
  letter-spacing: 1px;
}

.breath-toggle-indicator {
  width: 32px;
  height: 16px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  position: relative;
  transition: background 0.5s var(--ease-smooth);
}

.breath-toggle-indicator::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  transition: transform 0.5s var(--ease-smooth);
}

.breath-toggle.active .breath-toggle-indicator {
  background: rgba(0, 0, 0, 0.2);
}

.breath-toggle.active .breath-toggle-indicator::after {
  transform: translateX(16px);
}

/* 随息呼吸动画 */
@keyframes breathCycle {
  0% { opacity: 0.95; }
  40% { opacity: 1; }
  100% { opacity: 0.95; }
}

body.breath-mode .main-page {
  animation: breathCycle 10s ease-in-out infinite;
}

/* 低性能设备：关闭随息模�?*/
body.low-performance.breath-mode {
  animation: none;
}

/* ==================== 指尖漫行轨迹�?==================== */
.finger-trail-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 500;
  opacity: 0;
  transition: opacity 0.5s var(--ease-smooth);
}

.finger-trail-canvas.active {
  opacity: 1;
}

/* 低性能设备：关闭指尖漫�?*/
body.low-performance .finger-trail-canvas {
  display: none;
}

/* ==================== 散焦护眼引导�?==================== */
.blur-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 600;
  opacity: 0;
  transition: opacity 2s var(--ease-smooth);
}

.blur-overlay.active {
  opacity: 1;
}

.distant-point {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 2s var(--ease-smooth);
}

.blur-overlay.active .distant-point {
  opacity: 0.4;
}

/* 散焦效果 */
body.blur-mode .main-page {
  filter: blur(0px);
  transition: filter 120s var(--ease-smooth);
}

body.blur-mode.blur-max .main-page {
  filter: blur(6px);
}

body.pre-blur .main-page {
  filter: blur(1.5px);
  transition: filter 2s var(--ease-smooth);
}

/* 低性能设备：散焦降级为亮度降低 */
body.low-performance.blur-mode .main-page {
  filter: brightness(0.85);
  transition: filter 60s var(--ease-smooth);
}

body.low-performance.blur-mode.blur-max .main-page {
  filter: brightness(0.75);
}

body.low-performance.pre-blur .main-page {
  filter: brightness(0.95);
  transition: filter 2s var(--ease-smooth);
}

/* ==================== 底部收藏入口 ==================== */
.footer {
  padding: 16px 24px 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.collection-line {
  width: 60px;
  height: 1px;
  background-color: var(--text-secondary);
  opacity: 0.3;
  border-radius: 1px;
  transition: all 0.8s var(--ease-smooth);
  cursor: pointer;
}

.collection-line:hover,
.collection-line:active {
  width: 80px;
  opacity: 0.5;
}

.collection-entry {
  position: fixed;
  bottom: 24px;
  right: 24px;
  font-size: var(--font-size-small);
  color: var(--text-secondary);
  opacity: 0.25;
  letter-spacing: 1px;
  cursor: pointer;
  transition: opacity 0.8s var(--ease-smooth);
}

.collection-entry:hover,
.collection-entry:active {
  opacity: 0.4;
}

/* ==================== 光晕容器 ==================== */
.glow-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  transition: all 10s var(--ease-smooth);
}

.glow-top-left {
  top: -150px;
  left: -150px;
  width: 400px;
  height: 400px;
  background: var(--color-dawn);
}

.glow-bottom-right {
  bottom: -150px;
  right: -150px;
  width: 350px;
  height: 350px;
  background: var(--color-dusk);
}

/* ==================== 动画关键�?==================== */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== 响应式适配 ==================== */
@media screen and (max-width: 375px) {
  .header {
    padding: 32px 20px 12px;
  }

  .card-carousel {
    padding: 8px 16px;
  }

  .poetry-paper {
    padding: 24px;
  }

  .poetry-line {
    font-size: var(--font-size-base);
    letter-spacing: 2px;
  }
}

@media screen and (min-height: 800px) {
  .header {
    padding-top: 60px;
  }

  .footer {
    padding-bottom: 60px;
  }

  .card-carousel {
    padding: 16px 24px;
  }
}

/* ==================== 收藏按钮闪烁动画 ==================== */
.collection-line.flash {
  animation: lineFlash 0.6s var(--ease-smooth);
}

@keyframes lineFlash {
  0%, 100% {
    opacity: 0.3;
    width: 60px;
  }
  50% {
    opacity: 0.8;
    width: 90px;
  }
}

/* ==================== 收藏页面 ==================== */
.collection-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: -webkit-fill-available;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-primary);
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  transition: opacity 0.8s var(--ease-smooth);
}

.collection-page.visible {
  opacity: 1;
  pointer-events: auto;
}

/* 收藏页头�?*/
.collection-header {
  padding: 40px 24px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.back-btn {
  width: 40px;
  height: 1px;
  background-color: var(--text-secondary);
  opacity: 0.3;
  border-radius: 1px;
  cursor: pointer;
  position: relative;
  transition: all 0.8s var(--ease-smooth);
}

.back-btn::before,
.back-btn::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 1px;
  background-color: var(--text-secondary);
  transition: all 0.8s var(--ease-smooth);
}

.back-btn::before {
  left: 0;
  top: -3px;
  transform: rotate(-45deg);
  transform-origin: right center;
}

.back-btn::after {
  left: 0;
  top: 3px;
  transform: rotate(45deg);
  transform-origin: right center;
}

.back-btn:hover,
.back-btn:active {
  opacity: 0.5;
  width: 50px;
}

/* 收藏卡片展示�?*/
.collection-content {
  flex: 1;
  padding: 20px 24px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.collection-card {
  width: 100%;
  height: 100%;
  max-height: 400px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 1s var(--ease-smooth), transform 1s var(--ease-smooth);
}

.collection-card.visible {
  opacity: 1;
  transform: scale(1);
}

/* 收藏卡片内容样式 */
.collection-card .landscape-image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.collection-card .poetry-paper {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 32px;
}

.collection-card .soundscape-visual {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.collection-card .soundscape-label {
  margin-top: 24px;
}

/* ==================== 响应式适配 ==================== */
@media screen and (max-width: 375px) {
  .collection-content {
    padding: 16px 16px;
  }

  .collection-card {
    max-height: 350px;
  }

  .collection-card .poetry-paper {
    padding: 20px;
  }
}

@media screen and (min-height: 800px) {
  .collection-header {
    padding-top: 60px;
  }

  .collection-card {
    max-height: 500px;
  }
}

/* ==================== 辅助�?==================== */
.hidden {
  display: none !important;
}

/* ==================== 长停留微光提示层 ==================== */
.stay-glow-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
  opacity: 0;
  transition: opacity 2s ease-in-out;
  background: radial-gradient(
    ellipse at center,
    rgba(245, 230, 220, 0.08) 0%,
    rgba(245, 230, 220, 0.05) 40%,
    transparent 70%
  );
}

/* ==================== 亮度软引导层 ==================== */
.brightness-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 49;
  opacity: 0;
  transition: opacity 3s ease-in-out;
  background-color: rgba(0, 0, 0, 0.08);
}

/* ==================== 四级反向劝退衰减 ==================== */
.card-carousel.decay-1 .card {
  opacity: 1;
}

.card-carousel.decay-2 .card {
  opacity: 1;
}

.card-carousel.decay-3 .card {
  opacity: 0.7;
}

.card-carousel.decay-4 .card {
  opacity: 0.3;
}

.card-carousel.decay-5 .card {
  opacity: 0;
}

.decay-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--font-size-small);
  color: var(--text-secondary);
  letter-spacing: 1px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 1.5s var(--ease-smooth);
  pointer-events: none;
  text-align: center;
  max-width: 80%;
  line-height: 1.6;
}

.decay-hint.visible {
  opacity: 0.1;
}

.decay-hint.decay-2 {
  opacity: 0.15;
}

.decay-hint.decay-4 {
  opacity: 0.25;
}

.decay-hint.decay-5 {
  opacity: 0.35;
}

.rest-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #F5F0E8 0%, #E8E0D5 50%, #DCD4C8 100%);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: restFadeIn 1s ease-out;
}

.rest-breath {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.2) 70%, transparent 100%);
  animation: breathPulse 4s ease-in-out infinite;
  box-shadow: 0 0 60px rgba(255, 255, 255, 0.4);
}

@keyframes restFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes breathPulse {
  0%, 100% {
    transform: scale(0.8);
    opacity: 0.4;
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.3);
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
    box-shadow: 0 0 80px rgba(255, 255, 255, 0.5);
  }
}

/* ==================== 每周时光感知报告 ==================== */
.weekly-report {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--font-size-small);
  color: var(--text-secondary);
  letter-spacing: 1px;
  text-align: center;
  max-width: 85%;
  line-height: 1.8;
  opacity: 0;
  pointer-events: none;
  z-index: 60;
  transition: opacity 1.5s var(--ease-smooth);
}

.weekly-report.visible {
  opacity: 0.25;
}

.weekly-report.fade-out {
  opacity: 0;
}

/* ==================== 青少年模式样�?==================== */

/* 模式切换按钮 */
.mode-toggle {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 30;
  opacity: 0.15;
  transition: opacity 0.8s var(--ease-smooth);
  cursor: pointer;
  padding: 8px;
}

.mode-toggle:hover {
  opacity: 0.3;
}

.mode-toggle-text {
  font-size: var(--font-size-small);
  color: var(--text-secondary);
  letter-spacing: 1px;
}

.install-pwa-btn {
  position: fixed;
  top: 56px;
  right: 12px;
  z-index: 30;
  opacity: 0.15;
  transition: opacity 0.8s var(--ease-smooth);
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  color: var(--text-secondary);
}

.install-pwa-btn:hover {
  opacity: 0.3;
}

.install-pwa-btn svg {
  width: 20px;
  height: 20px;
}

/* 课间30秒入�?*/
.break-entry {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s var(--ease-smooth);
}

.break-entry.visible {
  opacity: 0.2;
}

.break-entry span {
  font-size: var(--font-size-small);
  color: var(--text-secondary);
  letter-spacing: 1px;
  cursor: pointer;
  padding: 10px 20px;
  border: 1px solid var(--text-secondary);
  border-radius: 20px;
}

/* 本地数据标注 */
.local-data-note {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--text-secondary);
  opacity: 0;
  letter-spacing: 0.5px;
  pointer-events: none;
}

/* ==================== 课间30秒页�?==================== */
.break-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: -webkit-fill-available;
  background-color: #FDF8F0;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  z-index: 200;
  transition: opacity 1.5s var(--ease-smooth);
}

.break-page.visible {
  opacity: 1;
  pointer-events: auto;
}

.break-page.ended {
  background-color: #F8F4ED;
}

.break-page.ended .break-clouds {
  opacity: 0;
}

.break-page.ended .break-hint {
  opacity: 0.15;
}

/* 云朵容器 */
.break-clouds {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  transition: opacity 1.5s var(--ease-smooth);
}

/* 云朵样式 */
.cloud {
  position: absolute;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(240, 240, 245, 0.7) 100%);
  border-radius: 50%;
  filter: blur(2px);
}

.cloud::before,
.cloud::after {
  content: '';
  position: absolute;
  background: inherit;
  border-radius: 50%;
}

.cloud-1 {
  width: 100px;
  height: 40px;
  top: 15%;
  left: -120px;
  animation: cloudFloat1 20s linear infinite;
}

.cloud-1::before {
  width: 50px;
  height: 50px;
  top: -20px;
  left: 15px;
}

.cloud-1::after {
  width: 60px;
  height: 60px;
  top: -25px;
  left: 45px;
}

.cloud-2 {
  width: 120px;
  height: 45px;
  top: 25%;
  left: -150px;
  animation: cloudFloat2 25s linear infinite;
  animation-delay: -8s;
}

.cloud-2::before {
  width: 55px;
  height: 55px;
  top: -22px;
  left: 20px;
}

.cloud-2::after {
  width: 70px;
  height: 65px;
  top: -28px;
  left: 55px;
}

.cloud-3 {
  width: 80px;
  height: 35px;
  top: 35%;
  left: -100px;
  animation: cloudFloat3 18s linear infinite;
  animation-delay: -15s;
}

.cloud-3::before {
  width: 45px;
  height: 45px;
  top: -18px;
  left: 10px;
}

.cloud-3::after {
  width: 50px;
  height: 50px;
  top: -20px;
  left: 35px;
}

@keyframes cloudFloat1 {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(100vw + 150px)); }
}

@keyframes cloudFloat2 {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(100vw + 180px)); }
}

@keyframes cloudFloat3 {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(100vw + 130px)); }
}

/* 课间结束提示 */
.break-hint {
  position: absolute;
  bottom: 30%;
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  letter-spacing: 2px;
  opacity: 0;
  transition: opacity 2s var(--ease-smooth);
  white-space: nowrap;
}

/* ==================== 视距提醒�?==================== */
.distance-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 300;
  opacity: 0;
  transition: opacity 2s var(--ease-smooth);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.distance-overlay.active {
  opacity: 1;
}

.distance-hint {
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  letter-spacing: 2px;
  opacity: 0.3;
}

/* ==================== 氛围图全屏展示层 ==================== */
.atmosphere-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 400;
  opacity: 0;
  transition: opacity 2s var(--ease-smooth);
}

.atmosphere-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.atmosphere-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: background 3s var(--ease-smooth);
}

.atmosphere-noise {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.03;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: cover;
}

/* 低性能设备：移除噪�?*/
body.low-performance .atmosphere-noise {
  display: none;
}

/* ==================== 青少年模式全局覆盖 ==================== */
body.teen-mode {
  --font-size-base: 16px;
  --font-size-small: 14px;
  --font-size-large: 18px;
}

body.teen-mode .card {
  filter: saturate(0.8);
}

body.teen-mode .glow-container {
  opacity: 0.3;
}

body.teen-mode .stay-glow-overlay {
  display: none;
}

body.teen-mode .brightness-overlay {
  display: none;
}

/* ==================== 时光回响 - 时光胶囊 ==================== */
.capsule-hint {
  position: absolute;
  font-size: clamp(10px, 0.8vw, 14px);
  color: rgba(0, 0, 0, 0.3);
  pointer-events: none;
  animation: fadeInOut 0.5s ease-out;
  z-index: 100;
}

.capsule-input {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 320px;
  height: 120px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 16px;
  padding: 20px;
  font-size: clamp(14px, 0.9vw, 18px);
  color: rgba(0, 0, 0, 0.6);
  text-align: center;
  outline: none;
  resize: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 200;
  animation: fadeIn 0.3s ease-out;
}

.capsule-input::placeholder {
  color: rgba(0, 0, 0, 0.2);
}

.capsule-float {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(14px, 0.9vw, 18px);
  color: rgba(0, 0, 0, 0.3);
  pointer-events: none;
  animation: floatUp 0.8s ease-out forwards;
  z-index: 150;
}

.capsule-flash {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(16px, 1vw, 22px);
  color: rgba(0, 0, 0, 0.4);
  pointer-events: none;
  opacity: 0;
  animation: flashIn 0.5s ease-out;
  z-index: 200;
}

.capsule-flash.paused {
  animation: none;
  opacity: 0.5;
}

@keyframes fadeInOut {
  0% { opacity: 0; }
  20% { opacity: 0.3; }
  80% { opacity: 0.3; }
  100% { opacity: 0; }
}

@keyframes fadeIn {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes floatUp {
  0% { opacity: 0.3; transform: translate(-50%, -50%) translateY(0); }
  100% { opacity: 0; transform: translate(-50%, -50%) translateY(-100px); }
}

@keyframes flashIn {
  0% { opacity: 0; transform: translate(-50%, -100px); }
  30% { opacity: 0.4; }
  70% { opacity: 0.4; }
  100% { opacity: 0; transform: translate(-50%, -200px); }
}

/* ==================== 时光回响 - 心情指纹 ==================== */
.fingerprint-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 200;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  animation: fadeInOut 1s ease-out forwards;
}

.fingerprint-overlay img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

/* ==================== 时光回响 - 时光碎片 ==================== */
.time-fragment-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 200;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.25);
  animation: fadeInOut 2s ease-out forwards;
}

.fragment-trails {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.fragment-info {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.fragment-date,
.fragment-solar,
.fragment-quote,
.fragment-capsule {
  font-size: clamp(10px, 0.7vw, 12px);
  color: rgba(0, 0, 0, 0.25);
  margin-bottom: 4px;
}

/* ==================== 时光回响 - 偶遇卡片 ==================== */
.encounter-card {
  position: relative;
}

.encounter-marker {
  position: absolute;
  bottom: 20px;
  right: 20px;
  font-size: clamp(12px, 0.8vw, 16px);
  color: rgba(0, 0, 0, 0.15);
  transition: opacity 0.3s ease;
}

.encounter-card:hover .encounter-marker,
.encounter-card:active .encounter-marker {
  opacity: 0.3;
}

.encounter-card .atmosphere-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 32px;
  text-align: center;
}

.encounter-card .atmosphere-title {
  font-size: clamp(20px, 1.2vw, 28px);
  color: rgba(0, 0, 0, 0.6);
  margin-bottom: 16px;
}

.encounter-card .atmosphere-desc {
  font-size: clamp(14px, 0.9vw, 18px);
  color: rgba(0, 0, 0, 0.3);
}

/* ==================== 时光回响 - 隐藏主题 ==================== */
.theme-unlock-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(14px, 0.8vw, 18px);
  color: rgba(0, 0, 0, 0.3);
  animation: fadeInOut 1s ease-out forwards;
  z-index: 200;
}

.theme-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.theme-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.theme-option.unlocked {
  opacity: 1;
}

.theme-option.locked {
  opacity: 0.2;
}

.theme-preview {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.theme-name {
  font-size: clamp(12px, 0.7vw, 14px);
  color: rgba(0, 0, 0, 0.4);
}

.theme-hint {
  font-size: clamp(10px, 0.6vw, 12px);
  color: rgba(0, 0, 0, 0.2);
  margin-top: 4px;
}

/* ==================== 时光回响 - 我的痕迹 ==================== */
.my-traces-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 300;
  padding: 60px 20px 20px;
  overflow-y: auto;
  display: none;
  flex-direction: column;
  animation: fadeIn 0.3s ease-out;
}

.my-traces-panel.visible {
  display: flex;
}

.traces-section {
  margin-bottom: 32px;
}

.traces-title {
  font-size: clamp(16px, 0.9vw, 20px);
  color: rgba(0, 0, 0, 0.4);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.traces-empty {
  font-size: clamp(14px, 0.7vw, 16px);
  color: rgba(0, 0, 0, 0.2);
  text-align: center;
  padding: 20px;
}

.capsule-item {
  background: rgba(0, 0, 0, 0.02);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.capsule-text {
  font-size: clamp(14px, 0.8vw, 16px);
  color: rgba(0, 0, 0, 0.5);
  margin-bottom: 8px;
}

.capsule-date {
  font-size: clamp(12px, 0.6vw, 14px);
  color: rgba(0, 0, 0, 0.2);
}

.encounter-item {
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  font-size: clamp(14px, 0.8vw, 16px);
  color: rgba(0, 0, 0, 0.5);
  text-align: center;
}

.fingerprint-item {
  margin-bottom: 16px;
}

.fingerprint-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  opacity: 0.5;
}

.fingerprint-date {
  font-size: clamp(12px, 0.6vw, 14px);
  color: rgba(0, 0, 0, 0.2);
  text-align: center;
  margin-top: 8px;
}

.clear-traces-btn {
  width: 100%;
  padding: 16px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  text-align: center;
  font-size: clamp(14px, 0.7vw, 16px);
  color: rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: background 0.3s ease;
}

.clear-traces-btn:active {
  background: rgba(0, 0, 0, 0.1);
}

body.teen-mode .splash-screen .breath-circle {
  animation-duration: 6s 8s;
}

body.teen-mode .card-carousel .card {
  transition: opacity 1.2s var(--ease-smooth), filter 1.2s var(--ease-smooth);
}

body.teen-mode .decay-hint {
  font-size: 14px;
}

body.teen-mode .break-entry {
  opacity: 0.25;
}

body.teen-mode .break-entry.visible {
  opacity: 0.35;
}

body.teen-mode .local-data-note {
  opacity: 0.25;
}

body.teen-mode .collection-entry {
  opacity: 0.15;
}

body.teen-mode .collection-page .glow-container {
  display: none;
}

/* 青少年模式内容卡�?*/
body.teen-mode .card.teen-card .landscape-image {
  background: linear-gradient(135deg, #FFE4C4 0%, #FFDAB9 50%, #FFD700 100%) !important;
}

body.teen-mode .card.teen-card .poetry-paper {
  background: #FFF8E7 !important;
}

body.teen-mode .card.teen-card .soundscape-label {
  font-size: 16px !important;
}

/* ==================== 低性能设备降级 ==================== */
body.low-performance .glow-container {
  display: none;
}

body.low-performance .landscape-mask {
  display: none;
}

body.low-performance .landscape-image {
  filter: none;
}

body.low-performance .stay-glow-overlay,
body.low-performance .brightness-overlay {
  display: none;
}

body.low-performance .cloud {
  animation-duration: 30s;
}

body.low-performance .breath-circle {
  animation-duration: 8s 10s;
}

body.low-performance .card {
  transition: none;
}

/* ==================== iOS Safari 适配 ==================== */
body.ios-safari {
  height: calc(var(--vh, 1vh) * 100);
}

body.ios-safari .splash-screen,
body.ios-safari .main-page,
body.ios-safari .collection-page,
body.ios-safari .break-page {
  height: calc(var(--vh, 1vh) * 100);
}

body.ios-safari .card {
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

body.ios-safari .card-carousel {
  -webkit-overflow-scrolling: touch;
}

body.ios-safari .header {
  padding-top: env(safe-area-inset-top, 0);
}

body.ios-safari .footer {
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* ==================== 红绿色弱模式 ==================== */
body.color-blind-mode {
  --color-dawn: #EBEBF5;
  --color-noon: #F5F5F0;
  --color-dusk: #F0F0E5;
  --color-night: #32373A;
}

body.color-blind-mode .landscape-image {
  filter: grayscale(0.3) saturate(0.7);
}

body.color-blind-mode .glow {
  background: linear-gradient(135deg, rgba(200, 200, 210, 0.1) 0%, transparent 70%);
}

body.color-blind-mode .card {
  filter: grayscale(0.2) saturate(0.8);
}

body.color-blind-mode .poetry-paper {
  background: #F5F5F0;
}

body.color-blind-mode .soundscape-visual {
  background: rgba(200, 200, 210, 0.1);
}

/* ==================== 响应式适配 - 平板 ==================== */
@media screen and (min-width: 768px) and (max-width: 1024px) {
  :root {
    --font-size-base: 16px;
    --font-size-small: 14px;
    --font-size-large: 18px;
  }

  .card {
    max-width: 400px;
    max-height: 500px;
  }

  .header {
    padding-top: 24px;
  }

  .footer {
    padding-bottom: 24px;
  }

  .breath-circle {
    width: 120px;
    height: 120px;
  }

  .date-display {
    font-size: 16px;
  }

  .collection-entry {
    font-size: 14px;
    padding: 12px 16px;
  }

  .break-entry span {
    font-size: 14px;
    padding: 12px 24px;
  }

  .cloud-1 {
    width: 150px;
    height: 60px;
  }

  .cloud-2 {
    width: 180px;
    height: 70px;
  }

  .cloud-3 {
    width: 120px;
    height: 50px;
  }
}

/* ==================== 响应式适配 - 大屏 ==================== */
@media screen and (min-width: 1024px) {
  :root {
    --font-size-base: 18px;
    --font-size-small: 16px;
    --font-size-large: 20px;
  }

  .card-carousel {
    justify-content: center;
  }

  .card-track {
    max-width: 500px;
  }

  .card {
    max-width: 500px;
    max-height: 600px;
    border-radius: 24px;
  }

  .header {
    padding-top: 32px;
  }

  .footer {
    padding-bottom: 32px;
  }

  .breath-circle {
    width: 160px;
    height: 160px;
  }

  .mode-toggle {
    top: 24px;
    right: 24px;
  }

  .mode-toggle-text {
    font-size: 14px;
  }
}

/* ==================== 无障碍焦点样�?==================== */
*:focus {
  outline: 2px solid rgba(139, 154, 163, 0.5);
  outline-offset: 2px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

*:focus-visible {
  outline: 2px solid rgba(139, 154, 163, 0.6);
  outline-offset: 3px;
}

[role="button"]:focus-visible {
  outline: 2px solid rgba(139, 154, 163, 0.7);
  outline-offset: 4px;
}

/* ==================== 屏幕阅读器隐藏装饰元�?==================== */
/* 注意：aria-hidden 应在 HTML 中设置，此处仅作视觉隐藏辅助 */

/* ==================== CG动画升级 - 背景环境 ==================== */
.ambient-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.ambient-particles[data-layer="back"] { z-index: -2; }
.ambient-particles[data-layer="mid"] { z-index: -1; }
.ambient-particles[data-layer="front"] { z-index: 0; }

.particle-dust {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, transparent 70%);
  opacity: var(--opacity);
  animation: dustFloat var(--duration) var(--cg-ease-smooth) infinite;
  animation-delay: var(--delay);
  will-change: transform, opacity;
}

@keyframes dustFloat {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: var(--opacity); }
  25% { transform: translate(var(--drift-x), -20px) scale(1.1); opacity: calc(var(--opacity) * 1.3); }
  50% { transform: translate(calc(var(--drift-x) * 0.5), -40px) scale(0.9); opacity: calc(var(--opacity) * 0.7); }
  75% { transform: translate(calc(var(--drift-x) * -0.3), -20px) scale(1.05); opacity: calc(var(--opacity) * 1.1); }
}

.depth-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}
.depth-layer-far {
  background: radial-gradient(ellipse at 30% 70%, var(--color-dawn) 0%, transparent 60%);
  opacity: 0.08;
  filter: blur(60px);
  animation: depthShift 30s ease-in-out infinite alternate;
}
.depth-layer-near {
  background: radial-gradient(ellipse at 70% 30%, var(--color-dusk) 0%, transparent 50%);
  opacity: 0.06;
  filter: blur(40px);
  animation: depthShift 25s ease-in-out infinite alternate-reverse;
}
@keyframes depthShift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -15px) scale(1.05); }
  100% { transform: translate(-10px, 10px) scale(0.95); }
}

.light-orbits {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}
.light-orbit {
  position: absolute;
  border-radius: 50%;
  filter: blur(var(--blur));
  opacity: var(--opacity);
  animation: orbitDrift var(--duration) var(--cg-ease-smooth) infinite alternate;
}
.light-orbit-1 {
  width: 200px; height: 200px;
  top: 10%; left: 10%;
  --blur: 80px; --opacity: 0.1; --duration: 30s;
  --start-x: 0; --start-y: 0; --end-x: 60px; --end-y: 40px;
}
.light-orbit-2 {
  width: 150px; height: 150px;
  top: 60%; right: 15%;
  --blur: 60px; --opacity: 0.08; --duration: 25s;
  --start-x: 0; --start-y: 0; --end-x: -40px; --end-y: -30px;
}
.light-orbit-3 {
  width: 100px; height: 100px;
  bottom: 20%; left: 40%;
  --blur: 50px; --opacity: 0.06; --duration: 20s;
  --start-x: 0; --start-y: 0; --end-x: 30px; --end-y: -20px;
}
@keyframes orbitDrift {
  0% { transform: translate(var(--start-x), var(--start-y)) scale(1); }
  100% { transform: translate(var(--end-x), var(--end-y)) scale(1.15); }
}

/* ==================== CG卡片3D升级 ==================== */
.card-carousel {
  perspective: 1200px;
  perspective-origin: 50% 50%;
  transform-style: preserve-3d;
}
.card-track {
  transform-style: preserve-3d;
  transition: transform 0.7s var(--cg-ease-spring);
}
.card {
  transform-style: preserve-3d;
  backface-visibility: hidden;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.02),
    0 4px 8px rgba(0, 0, 0, 0.03),
    0 8px 16px rgba(0, 0, 0, 0.03),
    0 16px 32px rgba(0, 0, 0, 0.02);
  transition:
    transform 0.7s var(--cg-ease-spring),
    opacity 0.6s var(--cg-ease-enter),
    box-shadow 0.6s var(--cg-ease-smooth),
    filter 0.6s var(--cg-ease-smooth);
  will-change: transform, opacity, filter;
}
.card.active {
  transform: scale(1) translateZ(40px) rotateY(0deg);
  opacity: 1;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.03),
    0 8px 16px rgba(0, 0, 0, 0.04),
    0 16px 32px rgba(0, 0, 0, 0.04),
    0 32px 64px rgba(0, 0, 0, 0.03);
  filter: blur(0);
}
.card.prev {
  transform: scale(0.92) translateZ(-20px) translateX(-8%) rotateY(8deg);
  opacity: 0.5;
  filter: blur(2px);
}
.card.next {
  transform: scale(0.92) translateZ(-20px) translateX(8%) rotateY(-8deg);
  opacity: 0.5;
  filter: blur(2px);
}
.card.far-prev {
  transform: scale(0.85) translateZ(-60px) translateX(-15%) rotateY(12deg);
  opacity: 0.2;
  filter: blur(4px);
}
.card.far-next {
  transform: scale(0.85) translateZ(-60px) translateX(15%) rotateY(-12deg);
  opacity: 0.2;
  filter: blur(4px);
}
.card.active::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 40%, transparent 60%, rgba(255,255,255,0.05) 100%);
  opacity: 0;
  transition: opacity 0.6s var(--cg-ease-smooth);
  pointer-events: none;
  z-index: 2;
}
.card.active:hover::before, .card.active:active::before { opacity: 1; }
.card.active:active {
  transform: scale(0.97) translateZ(30px) rotateY(0deg);
  transition: transform 0.15s var(--cg-ease-elastic);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 8px rgba(0,0,0,0.05), 0 8px 16px rgba(0,0,0,0.05);
}

/* ==================== CG全局微交互 ==================== */
[role="button"], button, .collection-line, .collection-entry, .mode-toggle, .breath-toggle {
  transition: transform var(--cg-duration-instant) var(--cg-ease-elastic), opacity var(--cg-duration-fast) var(--cg-ease-smooth), box-shadow var(--cg-duration-fast) var(--cg-ease-smooth);
}
[role="button"]:active, button:active, .collection-line:active, .collection-entry:active { transform: scale(0.94); }
.collection-line:active { transform: scaleX(1.15); opacity: 0.6; }
.mode-toggle:hover, .install-pwa-btn:hover, .collection-entry:hover { text-shadow: 0 0 12px rgba(139, 154, 163, 0.15); }

.main-page {
  opacity: 0;
  transform: translateY(8px) scale(0.99);
  transition: opacity var(--cg-duration-dramatic) var(--cg-ease-enter), transform var(--cg-duration-dramatic) var(--cg-ease-enter), filter var(--cg-duration-slow) var(--cg-ease-smooth);
  filter: blur(2px);
}
.main-page.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}
.collection-page {
  transform: translateY(10px);
  transition: opacity var(--cg-duration-slow) var(--cg-ease-smooth), transform var(--cg-duration-slow) var(--cg-ease-enter), filter var(--cg-duration-slow) var(--cg-ease-smooth);
  filter: blur(4px);
}
.collection-page.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
.collection-card {
  transform: scale(0.95) translateY(20px) rotateX(5deg);
  transition: opacity var(--cg-duration-slow) var(--cg-ease-enter), transform var(--cg-duration-slow) var(--cg-ease-enter), box-shadow var(--cg-duration-slow) var(--cg-ease-smooth);
  box-shadow: 0 4px 12px rgba(0,0,0,0.04), 0 16px 40px rgba(0,0,0,0.04);
}
.collection-card.visible {
  opacity: 1;
  transform: scale(1) translateY(0) rotateX(0deg);
  box-shadow: 0 4px 12px rgba(0,0,0,0.04), 0 16px 40px rgba(0,0,0,0.06), 0 32px 80px rgba(0,0,0,0.04);
}

/* ==================== CG辉光与光效 ==================== */
.soundscape-card.playing .sound-wave {
  box-shadow: 0 0 10px rgba(255,255,255,0.05), 0 0 30px rgba(255,255,255,0.03), inset 0 0 10px rgba(255,255,255,0.02);
  animation: soundWaveGlow 2s var(--cg-ease-smooth) infinite;
}
@keyframes soundWaveGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(255,255,255,0.05), 0 0 30px rgba(255,255,255,0.03); }
  50% { box-shadow: 0 0 20px rgba(255,255,255,0.08), 0 0 50px rgba(255,255,255,0.05); }
}
.weather-icon { filter: drop-shadow(0 0 8px rgba(90, 107, 120, 0.1)); }
.solar-name { text-shadow: 0 0 20px rgba(139, 115, 85, 0.08), 0 0 40px rgba(139, 115, 85, 0.04); }
.glow {
  filter: blur(100px);
  opacity: 0.2;
  animation: ambientGlowBreathe 15s var(--cg-ease-smooth) infinite;
}
@keyframes ambientGlowBreathe {
  0%, 100% { opacity: 0.15; transform: scale(1); }
  50% { opacity: 0.25; transform: scale(1.1); }
}

/* ==================== CG毛玻璃增强 ==================== */
.glass-panel {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 16px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.5);
}
.breath-settings {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(24px) saturate(1.1);
  -webkit-backdrop-filter: blur(24px) saturate(1.1);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 32px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.5);
  transition: opacity 0.8s var(--cg-ease-smooth), transform 0.8s var(--cg-ease-enter), box-shadow 0.6s var(--cg-ease-smooth);
}
.capsule-input {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(30px) saturate(1.2);
  -webkit-backdrop-filter: blur(30px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08), 0 24px 64px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.6);
}

/* ==================== CG胶片颗粒 ==================== */
.film-grain {
  position: fixed;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  animation: grainShift 0.5s steps(10) infinite;
}
@keyframes grainShift {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-2%, -2%); }
  20% { transform: translate(2%, 1%); }
  30% { transform: translate(-1%, 3%); }
  40% { transform: translate(3%, -1%); }
  50% { transform: translate(-2%, 2%); }
  60% { transform: translate(1%, -3%); }
  70% { transform: translate(-3%, 0%); }
  80% { transform: translate(2%, 2%); }
  90% { transform: translate(-1%, -2%); }
}

/* ==================== CG风物影像卡揭示增强 ==================== */
.landscape-image {
  transition: filter 0.5s var(--cg-ease-smooth), transform 0.8s var(--cg-ease-enter), scale 0.8s var(--cg-ease-smooth);
}
.card.active .landscape-image { transform: scale(1.05); filter: blur(0) saturate(1.1); }
.landscape-image.revealed { filter: blur(0) saturate(1); animation: revealGlow 2s var(--cg-ease-smooth); }
@keyframes revealGlow {
  0% { filter: blur(0) saturate(1) brightness(1); }
  30% { filter: blur(0) saturate(1.05) brightness(1.02); }
  100% { filter: blur(0) saturate(1) brightness(1); }
}

/* ==================== CG短诗便签卡逐行 ==================== */
.poetry-line {
  transition: opacity 0.8s var(--cg-ease-enter), transform 0.8s var(--cg-ease-enter), filter 0.8s var(--cg-ease-enter);
  filter: blur(2px);
}
.poetry-line.visible { opacity: 1; transform: translateY(0); filter: blur(0); }

/* ==================== CG语录卡引号动画 ==================== */
.quote-card .quote-text::before {
  content: '"';
  font-size: 48px;
  line-height: 1;
  color: rgba(107, 117, 125, 0.1);
  position: absolute;
  top: -10px; left: -10px;
  opacity: 0;
  transform: scale(0.5) rotate(-10deg);
  transition: all 1s var(--cg-ease-spring) 0.2s;
}
.card.active .quote-text::before { opacity: 1; transform: scale(1) rotate(0deg); }

/* ==================== CG性能降级 ==================== */
body.low-performance .ambient-particles, body.low-performance .depth-layer, body.low-performance .light-orbits, body.low-performance .film-grain { display: none !important; }
body.low-performance .card { transform: none !important; box-shadow: 0 2px 8px rgba(0,0,0,0.03) !important; }
body.low-performance .card.prev, body.low-performance .card.next, body.low-performance .card.far-prev, body.low-performance .card.far-next { filter: none !important; }
body.low-performance .glow { animation: none !important; opacity: 0.1 !important; }
body.low-battery .ambient-particles, body.low-battery .depth-layer, body.low-battery .light-orbits, body.low-battery .film-grain { display: none !important; }
body.low-battery .card { transform: none !important; box-shadow: 0 2px 8px rgba(0,0,0,0.03) !important; }
body.low-battery .card.prev, body.low-battery .card.next, body.low-battery .card.far-prev, body.low-battery .card.far-next { filter: none !important; }
body.low-battery .glow { animation: none !important; opacity: 0.1 !important; }
body.ios-safari .card { -webkit-transform-style: preserve-3d; }

/* ==================== 青少年模式CG降级 ==================== */
body.teen-mode .ambient-particles,
body.teen-mode .depth-layer,
body.teen-mode .light-orbits,
body.teen-mode .film-grain {
  display: none !important;
}
body.teen-mode .card {
  transform: none !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03) !important;
}
body.teen-mode .card.prev,
body.teen-mode .card.next,
body.teen-mode .card.far-prev,
body.teen-mode .card.far-next {
  filter: none !important;
}
body.teen-mode .glow {
  animation: none !important;
  opacity: 0.1 !important;
}
body.teen-mode .splash-aura,
body.teen-mode .splash-particles {
  display: none !important;
}
