/* ai.page.scss */
.input {
  border-radius: 10px;
  outline: 2px solid #FEBF00;
  border: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: #e2e2e2;
  outline-offset: 3px;
  padding: 10px 1rem;
  transition: 0.25s;
}

.input:focus {
  outline-offset: 5px;
  background-color: #fff
}
.ai-guard {
    --primary-color: #64C3D3;
    --danger-color: #FF6B6B;
    --text-color: #4A4A6A;
  
    .emotion-meter {
      height: 200px;
      background: linear-gradient(145deg, #F0F9FF, #E1F3FF);
      position: relative;
      overflow: hidden;
  
      .wave {
        position: absolute;
        bottom: 0;
        width: 200%;
        height: 100px;
        background: url('data:image/svg+xml,...波浪SVG数据...');
        animation: waveFlow 15s linear infinite;
      }
  
      .face-avatar {
        position: absolute;
        left: 50%;
        top: 30%;
        transform: translateX(-50%);
        width: 100px;
        height: 100px;
        border-radius: 50%;
        overflow: hidden;
        box-shadow: 0 8px 24px rgba(100,195,211,0.3);
  
        img {
          width: 100%;
          transition: filter 0.5s ease;
        }
  
        &:hover img {
          filter: hue-rotate(30deg);
        }
      }
    }
  
    .chat-container {
      margin-top: -40px;
      background: white;
      border-radius: 40px 40px 0 0;
      padding: 20px;
      min-height: calc(100vh - 160px);
  
      .messages {
        max-height: 60vh;
        overflow-y: auto;
  
        .message {
          margin: 12px 0;
          transition: transform 0.3s ease;
  
          &.ai {
            .bubble {
              background: #F0F9FF;
              border-radius: 20px 20px 20px 4px;
            }
          }
  
          .bubble {
            max-width: 80%;
            padding: 12px 16px;
            background: var(--primary-color);
            color: white;
            border-radius: 20px 20px 4px 20px;
  
            .meta {
              display: flex;
              align-items: center;
              gap: 8px;
              font-size: 12px;
              margin-top: 8px;
              opacity: 0.8;
            }
          }
        }
      }
  
      .input-area {
        display: flex;
        gap: 12px;
        padding: 16px;
        background: rgba(240,249,255,0.9);
        border-radius: 30px;
        margin-top: 20px;
  
        ion-textarea {
          --padding-start: 12px;
          background: white;
          border-radius: 20px;
        }
      }
    }
  
    .emergency-card {
      position: fixed;
      bottom: -200px;
      left: 20px;
      right: 20px;
      background: white;
      border-radius: 20px;
      box-shadow: 0 8px 32px rgba(255,107,107,0.2);
      transition: bottom 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  
      &.active {
        bottom: 20px;
      }
  
      .header {
        padding: 16px;
        font-weight: 500;
        color: var(--danger-color);
        border-bottom: 1px solid #eee;
      }
  
      .actions {
        padding: 16px;
        display: grid;
        gap: 12px;
      }
    }
  }
  
  @keyframes waveFlow {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
  }