/* game.page.scss */
.game-container {
  --background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
  padding-top: 12px;
}

/* 情绪状态卡片 */
.mood-card {
  display: flex;
  background: white;
  border-radius: 16px;
  margin: 0 16px 20px;
  box-shadow: 0 4px 12px rgba(192, 108, 132, 0.1);
  overflow: hidden;
  
  .mood-visual {
    width: 30%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    
    .mood-score {
      font-size: 24px;
      font-weight: bold;
      color: white;
      text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
  }
  
  .mood-info {
    width: 70%;
    padding: 12px;
    
    h3 {
      margin: 0 0 8px;
      color: #495057;
      font-size: 16px;
    }
    
    p {
      margin: 0 0 8px;
      color: #6c757d;
      font-size: 14px;
    }
    
    ion-chip {
      height: 24px;
      font-size: 12px;
      margin: 4px 4px 0 0;
    }
  }
}

/* 游戏卡片列表 */
.game-cards {
  padding: 0 16px;
}

.game-card {
  background: white;
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  
  &:active {
    transform: scale(0.98);
  }
  
  .game-preview {
    height: 120px;
    position: relative;
    overflow: hidden;
  }
  
  /* 捏泡泡预览效果 */
  .bubble-preview {
    background: linear-gradient(45deg, #f6f7f9 0%, #e9ecef 100%);
    
    .bubble {
      position: absolute;
      border-radius: 50%;
      background: rgba(192, 108, 132, 0.6);
      animation: float 4s infinite ease-in-out;
      
      @for $i from 1 through 8 {
        &:nth-child(#{$i}) {
          width: 20px + random(30);
          height: 20px + random(30);
          left: random(80) + '%';
          top: random(80) + '%';
          animation-delay: $i * 0.5s;
          background: rgba(192 - $i*10, 108 + $i*5, 132 - $i*3, 0.6);
        }
      }
    }
  }
  
  /* 沙画预览效果 */
  .sand-preview {
    background: #f8f9fa;
    
    .sand-trail {
      position: absolute;
      width: 80%;
      height: 3px;
      background: #d4b483;
      top: 50%;
      left: 10%;
      border-radius: 3px;
      
      &::before, &::after {
        content: '';
        position: absolute;
        width: 60%;
        height: 3px;
        background: inherit;
        border-radius: inherit;
      }
      
      &::before {
        top: -20px;
        left: 20%;
        transform: rotate(20deg);
      }
      
      &::after {
        top: 20px;
        left: 10%;
        transform: rotate(-15deg);
      }
    }
  }
  
  /* 雨滴预览效果 */
  .raindrop-preview {
    background: linear-gradient(180deg, #e0f7fa 0%, #b2ebf2 100%);
    position: relative;
    
    .raindrop {
      position: absolute;
      width: 6px;
      height: 12px;
      background: linear-gradient(180deg, rgba(255,255,255,0.8) 0%, rgba(178,235,242,0.6) 100%);
      border-radius: 50% 50% 60% 60%;
      animation: fall 3s linear infinite;
      
      @for $i from 1 through 6 {
        &:nth-child(#{$i}) {
          left: 15% + $i * 12%;
          top: -20px;
          animation-delay: $i * 0.3s;
        }
      }
    }
    
    .ripple {
      position: absolute;
      border: 1px solid rgba(255,255,255,0.6);
      border-radius: 50%;
      animation: spread 2s ease-out infinite;
      
      @for $i from 1 through 3 {
        &:nth-child(#{$i + 6}) {
          width: 10px * $i;
          height: 10px * $i;
          left: 40%;
          top: 70%;
          animation-delay: $i * 0.5s;
        }
      }
    }
  }
  
  @keyframes fall {
    0% { transform: translateY(-20px) scale(0.8); opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 0.8; }
    100% { transform: translateY(120px) scale(0.9); opacity: 0; }
  }
  
  @keyframes spread {
    0% { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(3); opacity: 0; }
  }
  .game-info {
    padding: 12px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(
        to top, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.85) 50%,
        rgba(255, 255, 255, 0.9) 100%
    );

    h3 {
      margin: 0 0 4px;
      color: #343a40;
      font-size: 18px;
    }
    
    p {
      margin: 0 0 8px;
      color: #6c757d;
      font-size: 14px;
    }
    
    .game-meta {
      display: flex;
      justify-content: space-between;
      align-items: center;
      
      .duration {
        font-size: 12px;
        //color: #adb5bd;
      }
    }
  }
}

/* 浮动推荐 */
.floating-recommendation {
  position: fixed;
  bottom: 80px;
  left: 16px;
  right: 16px;
  background: white;
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  
  p {
    margin: 0;
    color: #495057;
    font-size: 14px;
    
    strong {
      color: #c06c84;
    }
  }
}

/* 动画 */
@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.05); }
}