/**
 * 水果主题效果样式
 * 适配Emlog模板
 */

/* 水果效果容器 */
.fruit-effects-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

/* 浮动水果 */
.floating-fruit {
  position: absolute;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.6);
  animation: float linear infinite;
  transition: all 0.3s ease;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* 不同类型水果的颜色 */
.floating-fruit.apple {
  color: #ff6b35;
}

.floating-fruit.orange {
  color: #f39c12;
}

.floating-fruit.grape {
  color: #9b59b6;
}

.floating-fruit.strawberry {
  color: #e74c3c;
}

.floating-fruit.banana {
  color: #f1c40f;
}

.floating-fruit.cherry {
  color: #e91e63;
}

.floating-fruit.watermelon {
  color: #2ecc71;
}

.floating-fruit.pineapple {
  color: #f1c40f;
}

/* 浮动动画 */
@keyframes float {
  0% {
    transform: translateY(100vh) rotate(0deg);
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
  }
}

/* 背景装饰 */
.background-decoration {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.decoration-circle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: pulse 4s ease-in-out infinite;
}

.circle-1 {
  width: 200px;
  height: 200px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.circle-2 {
  width: 150px;
  height: 150px;
  top: 60%;
  right: 15%;
  animation-delay: 1.5s;
}

.circle-3 {
  width: 100px;
  height: 100px;
  bottom: 20%;
  left: 20%;
  animation-delay: 3s;
}

/* 脉冲动画 */
@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.1;
  }
}

/* 粒子效果容器 */
.fruit-particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particles-canvas {
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

/* 暗色主题适配 */
[data-theme='dark'] .decoration-circle {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
}

[data-theme='dark'] .floating-fruit {
  color: rgba(255, 255, 255, 0.4);
}

/* 响应式调整 */
@media (max-width: 768px) {
  .floating-fruit {
    font-size: 16px;
  }

  .decoration-circle {
    display: none;
  }

  .fruit-particles-container {
    display: none; /* 移动端隐藏以提升性能 */
  }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
  .fruit-effects-container {
    display: none; /* 超小屏幕完全隐藏效果 */
  }
}

/* 性能优化 - 减少动画复杂度 */
@media (prefers-reduced-motion: reduce) {
  .floating-fruit {
    animation: none;
  }

  .decoration-circle {
    animation: none;
  }

  .fruit-particles-container {
    display: none;
  }
}

/* 高对比度模式适配 */
@media (prefers-contrast: high) {
  .floating-fruit {
    opacity: 0.8;
  }

  .decoration-circle {
    display: none;
  }
}

/* 打印时隐藏效果 */
@media print {
  .fruit-effects-container,
  .fruit-particles-container {
    display: none !important;
  }
}
