:root {
  --bg: #000000;
  --fg: #f5f5f5;
  --hint: #8a8a8a;
  --active: #00ff9d;
  --panel: rgba(255, 255, 255, 0.07);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.container {
  width: 100%;
  height: 100%;
  padding: 4vw;
  position: relative;
  overflow: hidden;
}

.stack {
  position: absolute;
  left: 0;
  right: 0;
  top: 30px;
  bottom: 110px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 20px 30px;
}

.stack::-webkit-scrollbar {
  width: 8px;
}

.stack::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 6px;
}

.stack-item {
  position: relative;
  left: 50%;
  max-width: min(90vw, 1200px);
  width: fit-content;
  text-align: center;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
  word-break: break-word;
  white-space: normal;
  transform: translateX(-50%);
  transition: transform 360ms ease, opacity 320ms ease, font-size 320ms ease, color 320ms ease;
  opacity: 1;
  will-change: transform, opacity;
  margin-bottom: 12px;
}

.stack-item.is-newest {
  text-shadow: 0 0 12px rgba(0, 255, 157, 0.25);
  color: #f4fff8;
}

.composer {
  position: fixed;
  left: 50%;
  bottom: 44px;
  transform: translateX(-50%);
  width: min(90vw, 620px);
  display: flex;
  gap: 10px;
  z-index: 2;
}

.composer-input {
  flex: 1;
  height: 44px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: var(--panel);
  color: var(--fg);
  padding: 0 16px;
  outline: none;
  font-size: 15px;
}

.composer-input:focus {
  border-color: rgba(0, 255, 157, 0.8);
  box-shadow: 0 0 0 3px rgba(0, 255, 157, 0.18);
}

.send-btn {
  height: 44px;
  min-width: 88px;
  border-radius: 22px;
  border: 1px solid rgba(0, 255, 157, 0.8);
  background: rgba(0, 255, 157, 0.12);
  color: var(--fg);
  cursor: pointer;
}

.send-btn:hover {
  background: rgba(0, 255, 157, 0.2);
}

.status {
  position: fixed;
  right: 14px;
  bottom: 12px;
  color: var(--hint);
  font-size: 12px;
  user-select: none;
  max-width: calc(100vw - 20px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#typingHint.typing {
  color: #ffd166;
}

@keyframes pulse {
  0% {
    opacity: 0.65;
  }
  100% {
    opacity: 1;
  }
}
