* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "SimSun", Arial, sans-serif;
    background-color: #f8fbff;
    color: #333;
    line-height: 1.8;
    overflow: hidden;
}

.container {
  display: flex;
  height: 100vh;
  max-width: 100%;
}
#btnExport {
 width:100%;
 margin-top:10px;
}
/* 左侧内容区域 (80%) */
.content-area {
    width: 70%;
    background: white;
    border: 1px solid #dc2118;
    overflow-y: auto;
    position: relative;
}

.document-container {
  padding: 30px;
  max-width: 1000px;
}

.document-section {
  margin-bottom: 5px;
  padding: 20px;
  border-radius: 12px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.document-section:hover {
  border-color: #87ceeb;
  background: #f8fbff;
  box-shadow: 0 4px 15px rgba(135, 206, 235, 0.2);
  transform: translateY(-2px);
}

.document-section.selected {
  border-color: #4682b4;
  background: #e6f3ff;
  box-shadow: 0 6px 20px rgba(135, 206, 235, 0.3);
}

.document-section::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #87ceeb;
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.document-section:hover::before,
.document-section.selected::before {
  opacity: 1;
}

.section-title {
    color: #2c5aa0;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #dce9f4;
}

.section-content {
  font-size: 16px;
  line-height: 2;
  text-align: justify;
  color: #444;
}

.section-content p {
  margin-bottom: 15px;
}

.section-content ul {
  margin: 15px 0;
  padding-left: 30px;
}

.section-content li {
  margin-bottom: 8px;
}

.keywords {
  margin-top: 20px;
  padding: 15px;
  background: #f0f8ff;
  border-left: 4px solid #87ceeb;
  border-radius: 0 8px 8px 0;
  font-size: 14px;
}

.keywords strong {
  color: #2c5aa0;
}

/* 右侧聊天面板 (20%) */
.chat-panel {
    width: 30%;
    background: #57c638;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.chat-header {
    padding: 15px;
    background: linear-gradient(135deg, #0f3199 0%, #baf4bd 100%);
    border-bottom: 2px solid #4682b4;
}

.chat-header h3 {
  color: #2c5aa0;
  font-size: 18px;
  text-align: center;
  margin-bottom: 10px;
}

.header-buttons {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.header-btn {
    flex: 1;
    padding: 8px 12px;
    background: #d97f7b;
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
    transition: all 0.3s ease;
}

    .header-btn:hover {
        background: linear-gradient(90deg,#cc605b);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(135, 206, 235, 0.4);
    }

.header-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(135, 206, 235, 0.6);
  background: #2c5aa0;
}

.function-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 15px;
  justify-content: center;
}

.function-btn {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.8);
  color: #2c5aa0;
  border: 2px solid transparent;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.function-btn:hover {
  background: white;
  border-color: #4682b4;
  transform: scale(1.05);
  box-shadow: 0 3px 10px rgba(135, 206, 235, 0.4);
}

.function-btn:active {
  transform: scale(0.95);
  box-shadow: 0 2px 6px rgba(135, 206, 235, 0.6);
}

.function-btn.active {
  background: #4682b4;
  color: white;
  border-color: #2c5aa0;
}

.function-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
}

.function-btn:active::before {
  width: 100px;
  height: 100px;
}

.input-section {
  padding: 15px;
  background: rgba(255, 255, 255, 0.8);
  margin: 10px;
  border-radius: 8px;
}

    .input-section label {
        display: block;
        margin-bottom: 8px;
        font-weight: bold;
        color: #2c5aa0;
        font-size: 14px;
        font-family: 幼圆;
    }

.main-input {
    width: 100%;
    height: 80px;
    padding: 10px;
    border: 2px solid #87ceeb;
    border-radius: 8px;
    resize: vertical;
    font-size: 12px;
    font-family: inherit;
    transition: all 0.3s ease;
    margin-bottom: 10px;
    line-height: 23px;
}

.main-input:focus {
  border-color: #4682b4;
  box-shadow: 0 0 8px rgba(135, 206, 235, 0.5);
  outline: none;
}

.submit-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(90deg,#fdfdfd,#bbabc8);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

    .submit-btn:hover {
        background: linear-gradient(90deg,#fdfdfd,#bbabc8);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(135, 206, 235, 0.4);
    }

.submit-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(135, 206, 235, 0.6);
  background: #2c5aa0;
}

/* 功能面板区域 */
.function-buttons1 {
    padding-left: 10px;
    padding-top: 10px;
    padding-bottom: 5px;
}
.function-panels {
    flex: 1;
    padding: 5px;
}

.function-panel-parent {
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
    border: 2px solid rgba(135, 206, 235, 0.3);
}
.function-panel {
    border-radius: 12px;
    padding: 10px;
    padding-bottom: 5px;
    margin-bottom: 0;
    transition: all 0.3s ease;
}
.function-panelExt { 
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 15px;
  transition: all 0.3s ease; 
  float:left; 
  padding-top:0;
      width:100%;
}

.function-panel.hidden {
  display: none;
}

.function-panel.show {
  display: block;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel-header {
  margin-bottom: 15px;
}

.panel-title {
  display: inline-block;
  width: 100%;
  padding: 10px;
  background: #87ceeb;
  color: white;
  text-align: center;
  border-radius: 20px;
  font-size: 14px;
  font-weight: bold;
}

.attachment-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.attachment-item {
  height: 60px;
  background: #f8fbff;
  border: 2px dashed #87ceeb;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 12px;
  color: #666;
}

.attachment-item:hover {
  background: #e6f3ff;
  border-color: #4682b4;
  transform: scale(1.02);
}

.attachment-item:active {
  transform: scale(0.98);
}

.hyperlink-input,
.table-input {
  width: 100%;
  padding: 12px;
  border: 2px solid #87ceeb;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.hyperlink-input:focus,
.table-input:focus {
  border-color: #4682b4;
  box-shadow: 0 0 8px rgba(135, 206, 235, 0.5);
  outline: none;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.image-item {
  height: 80px;
  background: #f8fbff;
  border: 2px dashed #87ceeb;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 12px;
  color: #666;
}

.image-item:hover {
  background: #e6f3ff;
  border-color: #4682b4;
  transform: scale(1.02);
}

.image-item:active {
  transform: scale(0.98);
}

/* 滚动条样式 */
.content-area::-webkit-scrollbar,
.chat-panel::-webkit-scrollbar {
  width: 6px;
}

.content-area::-webkit-scrollbar-track,
.chat-panel::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.content-area::-webkit-scrollbar-thumb,
.chat-panel::-webkit-scrollbar-thumb {
  background: #87ceeb;
  border-radius: 3px;
}

.content-area::-webkit-scrollbar-thumb:hover,
.chat-panel::-webkit-scrollbar-thumb:hover {
  background: #4682b4;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .container {
    flex-direction: column;
  }

  .content-area {
    width: 100%;
    height: 60vh;
  }

    .chat-panel {
        width: 100%;
        height: 40vh;
        border-top: #ccc 6px solid;
    }

  .function-buttons {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .attachment-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .image-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .document-container {
    padding: 20px;
  }

  .section-title {
    font-size: 20px;
  }

  .section-content {
    font-size: 14px;
  }

  .chat-header h3 {
    font-size: 16px;
  }

  .function-btn {
    font-size: 11px;
    padding: 6px 10px;
  }

  .attachment-grid {
    grid-template-columns: 1fr;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.container > * {
  animation: fadeIn 0.6s ease-out;
}

/* 选中文本高亮效果 */
.highlight {
  background: linear-gradient(120deg, #87ceeb 0%, #87ceeb 100%);
  background-repeat: no-repeat;
  background-size: 100% 0.2em;
  background-position: 0 88%;
  transition: background-size 0.25s ease-in;
}

.highlight.active {
  background-size: 100% 88%;
}
