/* =========================
          Agent Design
   ========================= */

/* ---- Base / vh対策 ---- */
html, body {
  height: 100%;
}
* {
  box-sizing: border-box;
}

/* ---- Body ---- */
body {
  margin: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  height: 100vh;
  display: flex;
  justify-content: stretch;
  align-items: stretch;
  background: linear-gradient(
    to bottom,
    #0FE6E6,
    #2EC5ED,
    #338AE8
  ) !important;
  color: #ffffff;
}

/* ---- Container（全面） ---- */
.container {
  width: 100vw;
  height: 100%;
  max-width: none;
  margin: 0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  background: transparent;
}

/* ---- タイトル（最上部・中央） ---- */
h1 {
  position: fixed;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.9rem;
  font-weight: 500;
  margin: 0;
  opacity: 0.95;
  color: #ffffff;
  z-index: 1000;
}

/* ---- チャット領域 ---- */
.chat {
  flex: 1;
  margin-top: 36px;
  margin-bottom: 76px;
  overflow-y: auto;
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

/* ---- メッセージ ---- */
.msg {
  max-width: 75%;
  width: fit-content;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.95rem;
  line-height: 1.4;
  word-break: break-word;
  animation: fadeInUp 0.25s ease-out;
  white-space: pre-wrap; /* 改行をそのまま表示 */
}

/* ユーザー（右） */
.msg.user {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

/* AI（左） */
.msg.ai {
  margin-right: auto;
  background: rgba(25, 25, 112, 0.85);
  color: #ffffff;
  border-bottom-left-radius: 4px;
}

/* ---- 入力エリア ---- */
.input-area {
  position: fixed;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

/* ---- textarea ---- */
textarea {
  flex: 1;
  min-height: 56px;
  max-height: 160px;
  border-radius: 14px;
  border: none;
  padding: 12px;
  font-size: 1rem;
  resize: none;
  outline: none;
  background: rgba(255, 255, 255, 0.55);
  color: #000000;
  backdrop-filter: blur(6px);
}

/* ---- send ボタン（SVG アイコン） ---- */
#sendBtn {
  height: 56px;
  width: 56px;
  border-radius: 14px;
  border: none;
  background: rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.2s, transform 0.15s;
  color: #948bdb; 
}

#sendBtn:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

#sendBtn:active {
  transform: translateY(0);
}

/* SVG サイズ微調整 */
#sendBtn svg {
  width: 22px;
  height: 22px;
}

/* ---- フェードイン ---- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Small Link List (Portal用) */
.links a {
  display: block;
  margin: 12px 0;
}
