/* PRD Prototype Patches v4 - 侧栏底部去除 + 对话框重构 */

/* ========== 全局背景 ========== */
body[data-proto-patched] .bg-\[\#f8fafc\] {
  background: linear-gradient(180deg, #eef4ff 0%, #f5f8ff 35%, #faf5ff 100%) !important;
  position: relative;
}
body[data-proto-patched] .bg-\[\#f8fafc\]::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 10%, rgba(59,130,246,0.08), transparent 70%),
    radial-gradient(ellipse 50% 35% at 80% 20%, rgba(139,92,246,0.08), transparent 70%),
    radial-gradient(ellipse 70% 50% at 50% 95%, rgba(96,165,250,0.10), transparent 70%);
  pointer-events: none;
}

/* ========== 左侧菜单 ========== */
.proto-side-menu {
  display: flex;
  flex-direction: column;
  padding: 12px 8px;
  gap: 2px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}
.proto-side-menu .proto-side-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  transition: all .15s;
  position: relative;
}
.proto-side-menu .proto-side-item:hover {
  background: #eff6ff;
  color: #2563eb;
}
.proto-side-menu .proto-side-item.active {
  background: #2563eb;
  color: #fff;
}
.proto-side-menu .proto-side-item .ico {
  font-size: 16px;
  width: 20px;
  text-align: center;
}
.proto-side-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 6px 8px;
}

/* ========== 首页主标题 ========== */
.proto-hero-title {
  font-size: 56px !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 35%, #8b5cf6 70%, #a855f7 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  margin-bottom: 12px !important;
  letter-spacing: -0.02em !important;
}
.proto-hero-sub {
  font-size: 16px;
  color: #6b7280;
  margin-bottom: 32px;
  font-weight: 400;
}

/* ========== 卡片隐藏 ========== */
.proto-cards-hidden { display: none !important; }

/* ========== 对话框重构 ========== */
.proto-dialog-card {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  background: #fff;
  border-radius: 20px;
  border: 1px solid #dbeafe;
  box-shadow: 0 8px 30px rgba(59,130,246,0.08), 0 2px 8px rgba(0,0,0,0.04);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 输入区容器（skill chip + textarea） */
.proto-input-area {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Skill chip（在输入区内） */
.proto-skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  align-self: flex-start;
}
.proto-skill-chip-icon {
  font-size: 14px;
}
.proto-skill-chip-close {
  margin-left: 4px;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.8;
  transition: opacity .15s;
}
.proto-skill-chip-close:hover {
  opacity: 1;
}

/* 大文本输入区 */
.proto-textarea {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  font-size: 14px;
  color: #1f2937;
  background: transparent;
  padding: 8px 12px;
  line-height: 1.6;
  font-family: inherit;
}
.proto-textarea::placeholder {
  color: #9ca3af;
}

/* 底部工具栏 */
.proto-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0 0;
  border-top: 1px solid #f3f4f6;
  position: relative;
}

/* 附件按钮（+） */
.proto-attach-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  font-size: 20px;
  color: #6b7280;
  padding: 0;
  flex-shrink: 0;
  transition: all .15s;
}
.proto-attach-btn:hover {
  background: #e5e7eb;
  color: #374151;
}

/* 模式按钮 */
.proto-mode-btn {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  background: transparent;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.proto-mode-btn:hover {
  background: #f3f4f6;
  color: #374151;
}
.proto-mode-btn-active {
  background: #1f2937;
  color: #fff;
  border-color: #1f2937;
}
.proto-mode-btn-active:hover {
  background: #374151;
  color: #fff;
}

/* 使用技能按钮 */
.proto-skill-btn {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: #1e293b;
  border: none;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  position: relative;
  margin-left: auto;
}
.proto-skill-btn:hover {
  background: #334155;
}
.proto-skill-arrow {
  font-size: 11px;
  margin-left: 2px;
}

/* 技能下拉 */
.proto-skill-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  padding: 6px;
  z-index: 100;
}
.proto-skill-item {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  color: #374151;
  text-align: left;
  cursor: pointer;
}
.proto-skill-item:hover {
  background: #eff6ff;
  color: #2563eb;
}
.proto-skill-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 4px 0;
}

/* 发送按钮 */
.proto-send-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e5e7eb;
  color: #6b7280;
  border: none;
  cursor: pointer;
  transition: all .15s;
  font-size: 18px;
  font-weight: 700;
  padding: 0;
  flex-shrink: 0;
}
.proto-send-btn:hover {
  background: #d1d5db;
  color: #374151;
}

/* 隐藏侧栏底部（新建对局/搜索/历史列表） */
.proto-side-bottom-hide { display: none !important; }

/* 隐藏被替换的旧元素 */
.proto-hide { display: none !important; }
.proto-hide-topbar { display: none !important; }

/* 旧 56px 侧栏不再需要 */
#proto-sidebar { display: none !important; }
body[data-proto-patched] .h-screen,
body[data-proto-patched] #root > div {
  padding-left: 0 !important;
}
body[data-proto-patched] .h-14 {
  margin-left: 0 !important;
  padding-left: 16px !important;
}
