:root {
  --og-bg: radial-gradient(circle at 20% 20%, #1b3157 0%, transparent 45%),
      radial-gradient(circle at 78% 18%, #1a3b63 0%, transparent 40%),
      radial-gradient(circle at 55% 86%, #0f2745 0%, transparent 55%),
      #071222;
  --og-panel: rgba(10, 20, 40, 0.92);
  --og-border: rgba(160, 204, 255, 0.28);
  --og-text: #f4f8ff;
  --og-accent: #7ecbff;
  --og-muted: rgba(244, 248, 255, 0.72);
  --og-card: rgba(16, 37, 70, 0.55);
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Noto Sans SC", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--bg-color, #151a1f);
  color: var(--og-text);
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: 50px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--og-bg);
  z-index: -1;
  pointer-events: none;
}

.虚拟老师布局 {
  min-height: calc(100vh - 80px);
  display: flex;
  justify-content: center;
  padding: clamp(2.4rem, 4vw, 5rem) clamp(1.25rem, 3vw, 4rem) clamp(1.5rem, 4vw, 4.5rem);
}

.对话面板 {
  margin-top: 25px; 
  width: min(1100px, 100%);
  border-radius: 32px;
  border: 1px solid var(--og-border);
  background: var(--og-panel);
  padding: clamp(1.5rem, 3vw, 3rem);
  box-shadow: 0 25px 60px rgba(3, 5, 12, 0.65);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.提示字 {
  text-transform: uppercase;
  letter-spacing: 0.5em;
  font-size: 0.8rem;
  color: var(--og-muted);
  margin-bottom: 1rem;
}

.对话面板 h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3rem);
}

.简介段落 {
  margin: 0;
  line-height: 1.8;
  color: var(--og-muted);
}

.对话顶栏 {
  display: grid;
  grid-template-columns: minmax(280px, 2fr) minmax(260px, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(160, 204, 255, 0.25);
}

.模型标识 {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 1rem 1.8rem;
  border-radius: 28px;
  border: 1px solid rgba(126, 203, 255, 0.35);
  background: rgba(36, 64, 104, 0.35);
  box-shadow: inset 0 0 0 1px rgba(126, 203, 255, 0.15);
  min-height: 130px;
}

.模型标识 span {
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--og-muted);
}

.模型标识 strong {
  font-size: 1.1rem;
  line-height: 1.4;
  color: var(--og-text);
  text-align: left;
  width: 100%;
}

.模型信息 {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.模型名称 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--og-text);
  transition: letter-spacing 0.2s ease;
}

.模型副标题 {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: rgba(230, 242, 255, 0.9);
}

.模型副标题::before {
  content: "";
  display: inline-block;
  width: 32px;
  height: 1px;
  background: rgba(126, 203, 255, 0.4);
}

.模型提示 {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.2rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  background: rgba(126, 203, 255, 0.16);
  border: 1px solid rgba(126, 203, 255, 0.35);
  color: #e2f2ff;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .模型名称 {
    background: linear-gradient(120deg, #8fd6ff, #7aa8ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.工具动作 {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
  row-gap: 0.5rem;
}

.状态徽章 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  text-align: center;
  padding: 0.4rem 1.1rem;
  border-radius: 20px;
  background: rgba(126, 203, 255, 0.2);
  color: #e0f2ff;
  font-size: 0.95rem;
  line-height: 1.25;
  font-weight: 600;
}

.状态徽章[data-tone="busy"] {
  background: rgba(255, 210, 150, 0.18);
  color: #ffe7c7;
}

.状态徽章[data-tone="error"] {
  background: rgba(255, 150, 150, 0.22);
  color: #ffe0e0;
}

.次按钮 {
  background: rgba(22, 45, 82, 0.6);
  border: 1px solid rgba(160, 204, 255, 0.3);
  border-radius: 999px;
  padding: 0.5rem 1.6rem;
  color: var(--og-text);
  cursor: pointer;
  transition: 0.2s;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.次按钮:hover {
  border-color: var(--og-accent);
  color: var(--og-accent);
}

.对话记录 {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-right: 0.5rem;
  margin-bottom: 1rem;
}

.消息卡片 {
  padding: 1rem 1.25rem;
  border-radius: 20px;
  background: var(--og-card);
  border: 1px solid rgba(160, 204, 255, 0.22);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.消息卡片[data-role="user"] {
  align-self: flex-end;
  background: rgba(126, 203, 255, 0.18);
}

.消息卡片[data-state="thinking"] .正文 {
  color: var(--og-muted);
  font-style: italic;
}

.消息卡片[data-state="error"] {
  border-color: rgba(255, 129, 129, 0.45);
}

.消息卡片 header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.消息卡片 .名称 {
  font-weight: 600;
}

.消息卡片 .时间戳 {
  font-size: 0.8rem;
  color: var(--og-muted);
  margin-top: 0.1rem;
}

.消息卡片 .正文 {
  line-height: 1.7;
}

.markdown-body {
  font-size: 0.98rem;
  line-height: 1.75;
}

.markdown-body p {
  margin: 0 0 0.8rem;
}

.markdown-body ul,
.markdown-body ol {
  margin: 0.2rem 0 0.8rem 1.3rem;
  padding-left: 1rem;
}

.markdown-body li {
  margin-bottom: 0.3rem;
}

.markdown-body code {
  font-family: "JetBrains Mono", "Noto Sans Mono", monospace;
  background: rgba(126, 203, 255, 0.12);
  padding: 0.15rem 0.45rem;
  border-radius: 8px;
  font-size: 0.95em;
}

.markdown-body pre {
  font-family: "JetBrains Mono", "Noto Sans Mono", monospace;
  background: rgba(7, 24, 50, 0.9);
  border-radius: 12px;
  padding: 1rem;
  overflow-x: auto;
  border: 1px solid rgba(88, 200, 255, 0.2);
  margin-bottom: 1rem;
}

.markdown-body pre code {
  background: transparent;
  padding: 0;
}

.markdown-body hr {
  border: none;
  border-top: 1px dashed rgba(160, 204, 255, 0.32);
  margin: 1.2rem 0;
}

.推理切换按钮 {
  border: none;
  background: rgba(126, 203, 255, 0.18);
  color: #e5f4ff;
  border-radius: 999px;
  padding: 0.25rem 0.9rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.推理块 {
  background: rgba(15, 38, 70, 0.38);
  border-radius: 16px;
  padding: 0.75rem 1rem;
  border: 1px dashed rgba(160, 204, 255, 0.38);
}

.推理块 summary {
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--og-muted);
}

.推理内容 {
  margin-top: 0.5rem;
  font-family: "JetBrains Mono", "Noto Sans Mono", monospace;
  white-space: pre-wrap;
  line-height: 1.5;
  color: rgba(226, 240, 255, 0.92);
}

.输入区域 {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.输入区域 label {
  font-size: 0.85rem;
  color: var(--og-muted);
}

.输入区域 textarea {
  resize: vertical;
  min-height: 90px;
  background: rgba(10, 28, 55, 0.85);
  border: 1px solid rgba(160, 204, 255, 0.22);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  color: var(--og-text);
  font-size: 1rem;
}

.输入区域 textarea:focus {
  outline: 2px solid var(--og-accent);
}

.输入动作 {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.切换控件 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--og-muted);
}

.主按钮 {
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.8rem;
  background: linear-gradient(110deg, #9ad7ff, #76aef5);
  color: #081b2f;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
}

.主按钮:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.主按钮:not(:disabled):hover {
  transform: translateY(-1px);
}

@media (max-width: 960px) {
  .对话顶栏 {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 640px) {
  .工具动作 {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .输入动作 {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }

  .主按钮 {
    width: 100%;
    text-align: center;
  }
}
