/* ==========================================================================
   放大直播視窗 — 左側「溫室動植物生態橫幅 v2（全體小動物夥伴活潑互動版）」
   整合角色：農遊小精靈、小鴨、小兔、小雞、小羊、授粉小蜜蜂、小蝴蝶、小瓢蟲
   特色：純內嵌 SVG + CSS 動畫、零外部圖檔請求、只動 transform/opacity 不卡直播、
        動態清楚活潑但不搶上方直播焦點、支援 prefers-reduced-motion
   ========================================================================== */

.lm-eco-banner {
  position: relative;
  width: 100%;
  height: 98px;
  border-radius: 16px;
  border: 1px solid #DFECE2;
  background: linear-gradient(180deg, #F1F9F3 0%, #FAFDF7 62%, #E8F5EA 100%);
  overflow: hidden;
  display: flex;
  align-items: stretch;
  user-select: none;
  flex-shrink: 0;
}

.lm-eco-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.lm-eco-tag {
  position: absolute;
  left: 10px;
  top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2.5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(203, 224, 208, 0.9);
  color: #2E6844;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  pointer-events: none;
}

.lm-eco-tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38A160;
}

/* ==================== 活潑且輕量的溫室生態動畫 ==================== */

/* 1. 陽光緩緩旋轉光芒與呼吸 */
@keyframes lmSunSpin {
  0%   { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(180deg) scale(1.08); }
  100% { transform: rotate(360deg) scale(1); }
}

/* 2. 微風明顯滑過溫室拱棚 */
@keyframes lmBreezeGlide {
  0%   { transform: translateX(-34px); opacity: 0; }
  20%  { opacity: 0.8; }
  80%  { opacity: 0.7; }
  100% { transform: translateX(64px); opacity: 0; }
}

/* 3. 草莓植株自然搖曳 */
@keyframes lmPlantSwayA {
  0%, 100% { transform: rotate(-2.5deg); }
  50%      { transform: rotate(3.2deg); }
}
@keyframes lmPlantSwayB {
  0%, 100% { transform: rotate(2.8deg); }
  50%      { transform: rotate(-2.6deg); }
}

/* 4. 晨露水滴晶亮落下彈跳 */
@keyframes lmDewDrop {
  0%, 100% { transform: translateY(0px) scale(1); opacity: 0.85; }
  55%      { transform: translateY(6px) scale(0.92); opacity: 1; }
  80%      { transform: translateY(10px) scale(0.6); opacity: 0; }
  81%      { transform: translateY(-2px) scale(0.8); opacity: 0; }
}

/* 5. 小鴨：溫室走道搖擺來回漫步 */
@keyframes lmDuckStroll {
  0%   { transform: translate(0px, 0px) rotate(-4deg); }
  12%  { transform: translate(11px, -4px) rotate(4deg); }
  25%  { transform: translate(22px, 0px) rotate(-4deg); }
  37%  { transform: translate(33px, -4px) rotate(4deg); }
  50%  { transform: translate(42px, 0px) rotate(-3deg); }
  62%  { transform: translate(31px, -4px) rotate(4deg); }
  75%  { transform: translate(20px, 0px) rotate(-4deg); }
  87%  { transform: translate(10px, -4px) rotate(4deg); }
  100% { transform: translate(0px, 0px) rotate(-4deg); }
}

/* 6. 小兔：從草莓叢後面探頭 → 開心跳起 → 微微回縮再探頭 */
@keyframes lmRabbitPeek {
  0%, 100% { transform: translateY(9px) rotate(-2deg); }
  22%      { transform: translateY(-6px) rotate(3deg); }
  36%      { transform: translateY(-10px) rotate(-2deg); }
  52%      { transform: translateY(-4px) rotate(2deg); }
  74%      { transform: translateY(9px) rotate(-2deg); }
}

/* 7. 農遊小精靈：優雅 S 型巡園盤旋 */
@keyframes lmFairyFly {
  0%   { transform: translate(0px, 0px) rotate(-3deg); }
  25%  { transform: translate(22px, -8px) rotate(4deg); }
  50%  { transform: translate(40px, 2px) rotate(-2deg); }
  75%  { transform: translate(18px, 7px) rotate(-5deg); }
  100% { transform: translate(0px, 0px) rotate(-3deg); }
}

/* 8. 小雞：開心地一跳一跳小碎步 */
@keyframes lmChickHop {
  0%, 100% { transform: translate(0px, 0px) rotate(0deg); }
  18%      { transform: translate(-10px, -9px) rotate(-7deg); }
  34%      { transform: translate(-20px, 0px) rotate(3deg); }
  52%      { transform: translate(-10px, -8px) rotate(6deg); }
  68%      { transform: translate(0px, 0px) rotate(-3deg); }
  84%      { transform: translate(6px, -6px) rotate(5deg); }
}

/* 9. 小羊：溫和晃頭打招呼 */
@keyframes lmGoatWave {
  0%, 100% { transform: translateY(0px) rotate(-3deg); }
  35%      { transform: translateY(-4px) rotate(4deg); }
  65%      { transform: translateY(-1px) rotate(-2deg); }
}

/* 10. 授粉小蜜蜂：大弧線橫跨花叢採蜜 */
@keyframes lmBeeCruise {
  0%   { transform: translate(0px, 0px) rotate(-5deg); }
  25%  { transform: translate(42px, -14px) rotate(6deg); }
  50%  { transform: translate(86px, 4px) rotate(-4deg); }
  75%  { transform: translate(40px, 11px) rotate(-7deg); }
  100% { transform: translate(0px, 0px) rotate(-5deg); }
}

@keyframes lmWingBuzz {
  0%, 100% { transform: scaleY(1); }
  50%      { transform: scaleY(0.32); }
}

/* 11. 彩蝶：在右側草莓花間輕盈飛舞拍翅 */
@keyframes lmButterflyFlight {
  0%   { transform: translate(0px, 0px) rotate(5deg); }
  28%  { transform: translate(-38px, -12px) rotate(-8deg); }
  56%  { transform: translate(-74px, 3px) rotate(4deg); }
  80%  { transform: translate(-34px, 10px) rotate(9deg); }
  100% { transform: translate(0px, 0px) rotate(5deg); }
}

@keyframes lmButterflyFlap {
  0%, 100% { transform: scaleX(1); }
  50%      { transform: scaleX(0.38); }
}

/* 12. 小瓢蟲：沿草莓葉緣來回爬行 */
@keyframes lmLadybugCrawl {
  0%, 100% { transform: translate(0px, 0px) rotate(-4deg); }
  50%      { transform: translate(18px, -5px) rotate(8deg); }
}

.lm-eco-sun-rays {
  transform-box: fill-box;
  transform-origin: center;
  animation: lmSunSpin 18s linear infinite;
}

.lm-eco-breeze-1 { animation: lmBreezeGlide 5.6s ease-in-out infinite; }
.lm-eco-breeze-2 { animation: lmBreezeGlide 6.8s ease-in-out 2.1s infinite; }

.lm-eco-plant-a {
  transform-box: fill-box;
  transform-origin: bottom center;
  animation: lmPlantSwayA 3.8s ease-in-out infinite;
}
.lm-eco-plant-b {
  transform-box: fill-box;
  transform-origin: bottom center;
  animation: lmPlantSwayB 4.4s ease-in-out infinite;
}
.lm-eco-plant-c {
  transform-box: fill-box;
  transform-origin: bottom center;
  animation: lmPlantSwayA 4.1s ease-in-out 0.8s infinite;
}

.lm-eco-dew       { animation: lmDewDrop 3.4s ease-in-out infinite; }
.lm-eco-dew-delay { animation: lmDewDrop 3.9s ease-in-out 1.5s infinite; }

.lm-char-duck {
  transform-box: fill-box;
  transform-origin: bottom center;
  animation: lmDuckStroll 6.4s ease-in-out infinite;
}
.lm-char-rabbit {
  transform-box: fill-box;
  transform-origin: bottom center;
  animation: lmRabbitPeek 4.6s ease-in-out infinite;
}
.lm-char-fairy {
  transform-box: fill-box;
  transform-origin: center;
  animation: lmFairyFly 5.8s ease-in-out infinite;
}
.lm-char-chick {
  transform-box: fill-box;
  transform-origin: bottom center;
  animation: lmChickHop 3.8s ease-in-out infinite;
}
.lm-char-goat {
  transform-box: fill-box;
  transform-origin: bottom center;
  animation: lmGoatWave 4.8s ease-in-out infinite;
}

.lm-eco-bee {
  animation: lmBeeCruise 6.2s ease-in-out infinite;
}
.lm-eco-wing {
  transform-box: fill-box;
  transform-origin: bottom center;
  animation: lmWingBuzz 0.22s ease-in-out infinite;
}

.lm-eco-butterfly {
  animation: lmButterflyFlight 6.8s ease-in-out infinite;
}
.lm-eco-bf-wings {
  transform-box: fill-box;
  transform-origin: center;
  animation: lmButterflyFlap 0.42s ease-in-out infinite;
}

.lm-eco-ladybug {
  transform-box: fill-box;
  transform-origin: center;
  animation: lmLadybugCrawl 5.2s ease-in-out infinite;
}

/* 手機版精簡高度，不佔過多垂直空間 */
@media (max-width: 960px) {
  .lm-eco-banner {
    height: 68px;
    border-radius: 12px;
  }
  .lm-eco-tag {
    left: 8px;
    top: 6px;
    font-size: 10px;
    padding: 2px 7px;
  }
}

/* 尊重系統「減少動態效果」偏好 */
@media (prefers-reduced-motion: reduce) {
  .lm-eco-sun-rays,
  .lm-eco-breeze-1,
  .lm-eco-breeze-2,
  .lm-eco-plant-a,
  .lm-eco-plant-b,
  .lm-eco-plant-c,
  .lm-eco-dew,
  .lm-eco-dew-delay,
  .lm-char-duck,
  .lm-char-rabbit,
  .lm-char-fairy,
  .lm-char-chick,
  .lm-char-goat,
  .lm-eco-bee,
  .lm-eco-wing,
  .lm-eco-butterfly,
  .lm-eco-bf-wings,
  .lm-eco-ladybug {
    animation: none !important;
  }
}
