/* 修改导航菜单样式 */
.nav-container {
  background-color: #242A2F;
  box-shadow: none;
  padding: 1rem 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}
.nav-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: self-end;
  padding: 0 2rem;
}


.nav-links {
  display: flex;
  gap: 1rem;  /* 默认最小间距 */
}
.nav-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  display: inline-block;
  padding: 0.5rem 1rem;
}
.nav-link:hover {
  color: #3498db;
}
.nav-link.active {
  color: #3498db;
  border-bottom: 2px solid #3498db;
}

/* 移动端响应式布局 */
@media (max-width: 768px) {
  .nav-content {
    padding: 0 1rem;
    flex-direction: column;  /* 垂直排列 */
    gap: 1rem;
  }
  .nav-logo {
    font-size: 1.25rem;
  }
  .nav-links {
    flex-wrap: wrap;  /* 允许换行 */
    justify-content: center;  /* 居中对齐 */
    gap: 0.5rem;  /* 减小间距 */
  }
  .nav-link {
    padding: 0.5rem;  /* 减小内边距 */
    font-size: 0.9rem;  /* 减小字体大小 */
  }
}

/* 响应式布局 - 从小到大 */
@media (min-width: 576px) {
  .nav-links {
    gap: 1.5rem;
  }
}

@media (min-width: 768px) {
  .nav-links {
    gap: 2rem;
  }
}

@media (min-width: 992px) {
  .nav-links {
    gap: 2.5rem;
  }
}

@media (min-width: 1200px) {
  .nav-links {
    gap: 3rem;
  }
}

/* 为固定导航栏添加内容偏移 */
body {
  padding-top: 0;
  margin: 0;
}

/* 确保主内容区域正确显示 */
#app {
  margin-top: 0;
}

/* 添加标题和说明部分的样式 */
.header-section {
  height: 200px;
  margin-bottom: 3rem;
  padding: 2rem 0;
  background-color: #242a2f;
  border-radius: 0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
  position: relative;
  top: -28px;
}

.header-section h1 {
  font-size: 2rem;
  font-weight: bold;
  color: #ffffff;  /* 修改文字颜色为白色 */
  margin-bottom: 1rem;
}

.header-section p {
  font-size: 1.125rem;
  color: #ffffff;  /* 修改文字颜色为白色 */
  max-width: 36rem;
  margin: 0 auto;
  line-height: 1.6;
}

/* 修改模块样式 */
.module {
  background-color: white;
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  margin-top: 2.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  width: 848px;  /* 固定宽度为848px */
  margin-left: auto;
  margin-right: auto;
}

/* 绘图容器也统一宽度 */
.drawingContainer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 7rem;
  width: 848px;  /* 固定宽度为848px */
  margin-left: auto;
  margin-right: auto;
}
.ketcher-container {
  width: 420px;
  flex-shrink: 0;
  height: 400px;
  position: relative;
}
.ketcher-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  position: absolute;
  top: 0;
  left: 0;
}
.arrow-box {
  display: flex;
  justify-content: center;
  align-items: center;
  
  min-width: 40px;
}
.arrow-box img {
  width: 40px;
  height: 40px;
  cursor: pointer;
  transform: rotate(0deg);
  display: block;
  opacity: 1;
  background-color: transparent;
}
.smiles-input-container {
  width: 360px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  height: 400px;
}
/* 修改el-input样式使其完全填充可用空间 */
.text-val {
  width: 100%;  /* 改为100%宽度 */
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
}
/* 确保el-textarea内部的textarea元素填充整个区域 */
.text-val >>> .el-textarea__inner {
  height: 320px !important;  /* 设置固定高度 */
  min-height: 320px !important;
  resize: none !important;
  font-size: 14px;
  line-height: 1.5;
}
.smiles-box {
  margin-bottom: 5px;
}
.run-btn-box {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.btn {
  padding: 8px 16px;
  background-color: #5558DB;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.btn-disabled {
  padding: 8px 16px;
  background-color: #8485e6;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: not-allowed;
}
.tooltip {
  position: relative;
  display: inline-block;
}
.tooltip .tooltiptext {
  visibility: hidden; 
  width: 120px;
  background-color: #555;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px 0;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -60px;
  opacity: 0;
  transition: opacity 0.3s;
}
.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1; 
}
.module-title {
  font-size: 1.25rem;
  font-weight: bold;
  color: #374151;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e5e7eb;
}
.advanced-options {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease-out;
    opacity: 0;
    transform: translateY(-10px);
  }

  .advanced-options.expanded {
    max-height: 500px;
    opacity: 1;
    transform: translateY(0);
    display: block; /* 确保显示 */
  }
  
.chevron {
  transition: transform 0.3s ease;
  width: 20px;
  height: 20px;
  display: inline-block;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236B7280'%3E%3Cpath d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}
.chevron.rotated {
  transform: rotate(180deg);
}

/* 新增样式用于参数选择 */
.parameter-selection {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 15px 0;
}
.parameter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
  background-color: #f9fafb;
  border-radius: 6px;
}
.parameter-label {
  font-weight: 500;
  color: #374151;
}
.mode-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.switch-label {
  margin-right: 10px;
  font-weight: 500;
  color: #374151;
}
/* 新增提示框样式 */
.tips-box {
  padding: 10px 15px;
  background-color: #fff8e6;
  border-left: 4px solid #f59e0b;
  border-radius: 4px;
  margin: 15px 0;
  font-size: 14px;
  color: #92400e;
}
.tips-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #f59e0b;
  color: white;
  margin-right: 8px;
  font-weight: bold;
}
.advanced-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 15px 0;
  padding: 10px;
  border-radius: 6px;
  background-color: #f9fafb;
}

.advanced-toggle .el-switch {
  margin-left: 10px;
}

/* 自定义开关样式 */
.advanced-toggle .el-switch__core {
  width: 40px !important;
  height: 20px !important;
  border-radius: 10px !important;
  background-color: #dcdfe6 !important;
  transition: all 0.3s ease;
}

.advanced-toggle .el-switch__core:after {
  width: 16px !important;
  height: 16px !important;
  border-radius: 50% !important;
  top: 2px !important;
  left: 2px !important;
  transition: all 0.3s ease;
}

.advanced-toggle .el-switch.is-checked .el-switch__core {
  background-color: #409EFF !important;
}

.advanced-toggle .el-switch.is-checked .el-switch__core:after {
  transform: translateX(20px) !important;
}

/* 修改高级选项样式 */
.advanced-options {
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease-out;
  opacity: 0;
  transform: translateY(-10px);
}

.advanced-options.expanded {
  max-height: 500px;
  opacity: 1;
  transform: translateY(0);
}

/* 删除所有弹窗相关样式 */
.result-modal,
.result-content,
.result-header,
.result-title,
.result-close,
.result-item,
.result-label,
.result-value,
.modal-fade-enter-active,
.modal-fade-leave-active,
.modal-fade-enter,
.modal-fade-leave-to {
  display: none;
}

/* 保留并优化加载动画样式 */
.loading-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.loading-content {
  background-color: white;
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.loading-spinner {
  display: inline-block;
  width: 60px;
  height: 60px;
  border: 6px solid #f3f3f3;
  border-top: 6px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-text {
  margin-top: 1rem;
  color: #2c3e50;
  font-size: 18px;
}

.countdown {
  margin-top: 0.5rem;
  font-size: 24px;
  font-weight: bold;
  color: #3498db;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 修改页脚样式 */
.footer-bar {
  background-color: #242A2F;
  padding: 40px 0;
  margin-top: 60px;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
  width: 100%; /* 确保全宽 */
  left: 0;
  right: 0;
}

.footer-box {
  max-width: 1200px; /* 与导航栏宽度一致 */
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  padding: 0 2rem; /* 与导航栏内边距一致 */
  align-items: flex-start;
}
.footer-item {
  flex: 1;
  text-align: left;
  padding: 0 20px;
}
.footer-item:first-child {
  padding-left: 0;
  text-align: right;  /* 左侧内容右对齐 */
}
.footer-item:first-child .footer-item-label {
  text-align: right;  /* 左侧内容下的文字右对齐 */
}
.footer-item:last-child {
  padding-right: 0;
}
.footer-item-title {
  font-size: 24px;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 30px;  /* 统一标题下边距 */
}
.footer-item-label {
  color: #B2B7BD;
  margin-bottom: 20px;
  font-size: 16px;
  text-align: center;
}
.footer-item-way {
  display: flex;
  align-items: flex-start;
  margin-bottom: 15px;
  color: #B2B7BD;
  font-size: 16px;
}
.footer-item-way img {
  width: 20px;
  height: 20px;
  margin-right: 10px;
  margin-top: 3px;
}
/* 删除多余的margin类 */
.mb90, .mb59 {
  display: none;
}
.main-center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.map {
  width: 280px;
  height: auto;
  margin-top: 10px;  /* 减小地图上边距 */
}

/* 修改高级选项网格布局 */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  width: 100%;
  max-width: 800px;  /* 减小最大宽度 */
  margin: 0 auto;  /* 居中显示 */
}

/* 修改提交按钮样式 */
.submit-button {
  background-color: #409eff;
  color: white;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  width: auto;  /* 改为自动宽度 */
  max-width: 200px;  /* 设置最大宽度 */
  margin: 1.5rem auto;  /* 居中显示 */
  display: block;  /* 改为块级元素 */
  transition: background-color 0.3s;
}

.submit-button:hover {
  background-color: #66b1ff;
}

/* 开关样式 */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
  vertical-align: middle;
  transform: translateZ(0); /* 启用硬件加速 */
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
  margin: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 34px;
  transform: translateZ(0); /* 启用硬件加速 */
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transform: translateZ(0); /* 启用硬件加速 */
}

input:checked + .slider {
  background-color: #2196F3;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* 高级选项内容 */
.advanced-content {
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateY(-10px);
  will-change: max-height, opacity, transform;
}

.advanced-content.show {
  max-height: 500px;
  opacity: 1;
  transform: translateY(0);
}

/* 添加高级选项模块的样式 */
.advanced-options-module {
  padding: 1rem;
}

/* 添加footer样式，使支持库列表居中 */
.footer-items-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  row-gap: 10px;
}

.footer-item-title {
  text-align: center;
  margin-bottom: 15px;
  font-weight: bold;
}

.footer-item-label {
  margin-bottom: 8px;
  text-align: center;
 
} 



.results-container {
  margin-top: 1rem;
  /* padding: 1.5rem; */
  /* background-color: #f9f9f9; */
  border-radius: 0.5rem;
  /* box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); */
}

.results-header {
  text-align: left;
  margin-bottom: 1.5rem;
}

.results-title {
  display: inline-block;
  font-size: 1.3rem;
  font-weight: 600;
  background-color: #0069d9;
  color: #ffffff;
  margin-bottom: 0.5rem;
  margin-top: 3rem;
  /* background-color: #f9f9f9; */
  padding: 0 10px; /* 在文字两侧添加一些内边距 */
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  border-radius: 0.5rem;
}



.results-summary {
  font-size: 1rem;
  color: #666;
  margin-bottom: 1rem;
}

.molecule-cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.molecule-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.molecule-content {
  display: grid;
  grid-template-columns: 42% 30% 28%;
}

.section {
  padding: 15px 20px;
}

.section-title {
  font-size: 16px;
  font-weight: 500;
  padding: 10px 15px;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
  color: #333;
  letter-spacing: 0.3px;
}

.smiles-section {
  border-right: 1px solid #e0e0e0;
}

.properties-section {
  border-right: 1px solid #e0e0e0;
}

.molecule-images {
  display: flex;
  gap: 15px;
  justify-content: space-around;
  margin-top: 8px;
}

.molecule-image {
  width: 180px;
  height: 180px;
  border: 1px solid #e0e0e0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: white;
  border-radius: 4px;
}

.property-item {
  margin: 8px 0;
  color: #333;
  font-size: 14px;
  display: grid;
  grid-template-columns: auto 90px;
  align-items: center;
  gap: 15px;
}

.property-name {
  color: #555;
  white-space: nowrap;
  font-weight: 400;
  letter-spacing: 0.2px;
  font-size: 15px;
}

.property-value {
  font-family: 'Source Code Pro', monospace;
  font-weight: 500;
  text-align: center;
  background: #f8f9fa;
  padding: 4px 8px;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  color: #2c3e50;
  width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}

.smiles-text {
  font-family: 'Source Code Pro', monospace;
  background: #f8f9fa;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 14px;
  color: #333;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  overflow: auto;
  max-width: 100%;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
  gap: 1rem;
}

.page-button {
  padding: 0.5rem 1rem;
  background-color: #4299e1;
  color: white;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s;
}

.page-button:hover:not(:disabled) {
  background-color: #3182ce;
}

.page-button:disabled {
  background-color: #cbd5e0;
  cursor: not-allowed;
}

.page-info {
  font-size: 0.875rem;
  color: #4a5568;
}

.loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 0;
}

.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: #4299e1;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

.loading-text {
  color: #4a5568;
  font-size: 1rem;
}

.error-message {
  background-color: #fed7d7;
  color: #c53030;
  padding: 1rem;
  border-radius: 0.25rem;
  border-left: 4px solid #c53030;
  margin: 2rem 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 响应式布局 */
@media screen and (max-width: 1024px) {
  .molecule-content {
    grid-template-columns: 1fr 1fr;
  }
  
  .smiles-section {
    grid-column: 1 / -1;
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
  }
  
  .properties-section {
    border-right: 1px solid #e0e0e0;
  }
}

@media screen and (max-width: 768px) {
  .molecule-content {
    grid-template-columns: 1fr;
  }
  
  .properties-section {
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
  }
  
  .molecule-images {
    flex-direction: column;
    align-items: center;
  }
  
  .molecule-image {
    width: 100%;
    max-width: 250px;
  }
}

@media screen and (max-width: 480px) {
  .section {
    padding: 10px;
  }
  
  .section-title {
    font-size: 14px;
  }
  
  .property-name {
    font-size: 13px;
  }
  
  .property-value {
    width: 65px;
    font-size: 13px;
  }
}