/* singa-one-app/css/style.css (v4.6 - UI布局终极修正版) */

/* --- 基础与重置 --- */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #0d1117; /* 深色背景 */
    color: #c9d1d9; /* 浅色文本 */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    overflow: hidden; /* 防止出现多余的滚动条 */
}

/* --- 主容器布局 --- */
.main-container {
    display: flex;
    flex-direction: column; /* 垂直布局 */
    /* [修改] 确保内容从顶部开始堆叠，而不是分散 */
    justify-content: flex-start; 
    align-items: center; /* 水平居中 */
    height: 100%; /* 占据整个视口高度 */
    width: 100%;
    max-width: 900px; /* 限制最大宽度 */
    padding: 80px 20px 20px 20px;    box-sizing: border-box; /* 边框和内边距包含在宽度内 */
    gap: 15px; /* [恢复] 元素间距，由flexbox自动处理 */
    margin: 0 auto; /* 容器自身居中 */
    position: relative; /* 为z-index和内部定位提供上下文 */
}

.center-visuals {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative; /* 用于波纹容器绝对定位 */
  width: 100%;
  height: 180px; /* 控制占据空间高度，可根据视觉需求调整 */
  pointer-events: none; /* 不阻止点击输入框 */
  margin-top: 10px;
}

/* center-sphere 保持不变 */
.center-sphere {
  width: 80px;
  height: 80px;
  background-color: #00ffe0;
  border-radius: 50%;
  box-shadow: 0 0 20px #00ffe0;
  transition: transform 0.1s linear;
  z-index: 2;
}

/* wave-container 相对于 .center-visuals 定位 */
.wave-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

/* 每一圈波纹动画 */
.wave {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5); /* 初始从中心缩放 */
  border: 2px solid #00ffe0;
  border-radius: 50%;
  opacity: 0.3;
  animation: ripple 3s infinite ease-out;
  z-index: 0;
}
@keyframes ripple {
  0% {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0.4;
  }
  100% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
  }
}


.chat-container {
  display: flex;
  flex-direction: column-reverse;
  gap: 12px;
  max-height: 50vh;
  overflow-y: auto;
  width: 90%;
  margin: 0 auto;
  padding: 1rem;
  background-color: #1c1c1c;
  border-radius: 8px;
  color: #fff;
  margin-top: 20px;
}

/* 聊天气泡 */
.message {
  padding: 10px 14px;
  border-radius: 12px;
  max-width: 80%;
  word-wrap: break-word;
}
.user-message {
  background-color: #3a3a3a;
  align-self: flex-end;
}
.ai-message {
  background-color: #2a2a6a;
  align-self: flex-start;
}


.status-indicator {
  color: #00ffaa;
  margin: 8px auto;
  font-size: 14px;
  text-align: center;
}

.input-area {
  display: flex;
  gap: 8px;
  width: 90%;
  margin: 1rem auto;
}

#text-input {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  background: #222;
  color: #fff;
  border: none;
}
#text-input:focus {
    border-color: #00c6ff;
}

.send-btn, .mic-btn {
  background-color: #007bff;
  color: #fff;
  border: none;
  padding: 0 16px;
  border-radius: 8px;
  cursor: pointer;
}
.send-btn:hover, .mic-btn:hover {
  background-color: #0056b3;
}

#mic-btn.recording {
    background-color: #c62828;
    color: white;
    animation: pulse-mic 1s infinite alternate;
}
@keyframes pulse-mic {
    from { box-shadow: 0 0 0 0 rgba(198, 40, 40, 0.7); }
    to { box-shadow: 0 0 0 10px rgba(198, 40, 40, 0); }
}
