html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: Arial, sans-serif;
  background-color: #f8f9fa;
}
body {
    font-family: Arial, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    display: block;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}
:root {
  --primary-blue: #2F80ED;
  --primary-hover: #1B64DA;
  --success-green: #27AE60;
  --bg-light: #F8F9FA;
  --text-dark: #333;
  --site-dark: #263238;;
}
.container {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1.2fr 0.8fr; /* 修改为适当的列宽，确保每个部分有更多空间 */
    grid-template-rows: auto auto auto auto;
    grid-auto-flow: row;
    min-width: 1200px;
    
    row-gap: 10px;  /* 单独控制行间距 */
    column-gap: 10px; /* 保持列间距不变 */
    width: 99%;
    margin: 20px auto;
    padding: 15px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

h1 {
    color: #333;
    grid-column: span 3; /* 跨越三列 */
}
h2 {
  color: #333;
  grid-column: span 3; /* 跨越三列 */
}
/* 控制左侧和右侧区域 */
.controls-preview {
    grid-column: 1; /* 文件选择和图片预览在左侧 */
    background: #EEF3F9;
    border: 2px solid #B6C5DD;/* 边框颜色 */
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: 460px; /* 固定高度 */
    overflow: hidden; /* 防止图片超出 */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* 确保内容靠上 */
    align-items: center;
    padding-top: 20px;
}


.spec-select {
    grid-column: 2; /* 规格选择在右侧 */
    text-align: left;  
    padding: 0 20px; /* 增加内边距 */
    padding-top: 20px; /* 为标签提供顶部间距 */
}

.section-header {
  grid-column: 1 / -1;
  text-align: center;
  margin-bottom: 10px;
  margin-top: 30px;
}
.main-title {
  font-size: 26px;
  color: #2F3A60;
  margin-bottom: 6px;
}
.subtitle {
  font-size: 14px;
  color: #666;
}
.requirements-wrapper {
  grid-column: 1 / -1; /* 让其占据全行 */
  grid-row: 5;
  background: #f8f9fb;
  color: #2F3A60;
  padding: 24px;
  border-radius: 12px;
  margin-top: 10px;
  margin-bottom: 10px;  /* 可以调整与其它模块的间距 */
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.requirements-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 16px;
  color: #2F3A60;
  position: relative;
}
.requirements-title::before,
.requirements-title::after {
  content: '';
  display: inline-block;
  width: 50px;
  height: 2px;
  background: #ccc;
  vertical-align: middle;
  margin: 0 12px;
}
.requirements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 14px 24px;
  font-weight: 500;
  font-size: 15px;
  justify-items: center;
  align-items: center;
}
.preview-container {
    grid-column: 3; /* 处理结果预览在中间 */
    text-align: center;
    background: #F4F9FF;
    border: 2px solid #A6C8F0;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    height: 450px; /* 固定高度 */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* 确保内容靠上 */
    align-items: center;
    padding-top: 20px; /* 为标签提供顶部间距 */
}
.preview-container {
  text-align: center;
  margin-top: 0 !important;
}
.layout-container {
    grid-column: 4; /* 处理结果预览在中间 */
    text-align: center;
    background: #F4F9FF;
    border: 2px solid #A6C8F0;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    height: 450px; /* 固定高度 */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* 确保内容靠上 */
    align-items: center;
    padding-top: 20px; /* 为标签提供顶部间距 */
}
.photo-frame {
  position: relative;
  display: inline-block;
  border: 2px dashed #888;
  padding: 8px;
  margin-top: 10px;
}
.photo-frame img {
  max-height: 370px;
  max-width: 100%;
  height: auto;
  width: auto;
  object-fit: contain;
  display: block;
}
.layout-frame {
  position: relative;
  display: flex;
  justify-content: center; /* <-- 水平居中 */
    align-items: center; /* <-- 垂直居中 */
  border: 2px dashed #888;
  padding: 18px;
  margin-top: 10px;
  width: 100%; /* 允许它填充其父容器的宽度 */
    height: calc(100% - 60px); /* 假设顶部标签和底部可能有的元素占据60px */
    max-height: 390px; /* 配合 .layout-container 的 height: 450px - padding-top - some margin */
    box-sizing: border-box; /* 确保 padding 包含在 width/height 内 */

    /* 默认隐藏，通过 JS 控制显示 */
    display: none; /* <-- 初始隐藏 */
}
.layout-frame img {
  max-height: 100%;
  max-width: 100%;
  height: auto;
  width: auto;
  object-fit: contain;
  display: block;
}
.layout-label
{
  display: none;
}
.dimension {
  position: absolute;
  font-size: 12px;
  color: #555;
  background: rgba(255,255,255,0.8);
  padding: 2px 4px;
  border-radius: 4px;
  pointer-events: none;
}
.dimension.top { top: -20px; left: 50%; transform: translateX(-50%); }
.dimension.bottom { bottom: -20px; left: 50%; transform: translateX(-50%); }
.dimension.left { top: 50%; left: -45px; transform: translateY(-50%); }
.dimension.right { top: 50%; right: -45px; transform: translateY(-50%); }
/* 固定上传按钮和标签 */
.controls-preview::before {
    font-weight: bold;
    color: #1565c0;
    margin-bottom: 15px;
}

.preview-container::before { content: none; }
.preview-label {
  font-weight: bold;
  color: #421ea6;
  margin-bottom: 10px;
}

input[type="file"] {
    display: none;
}
.loadingMessage {
  margin-top: 150px;
  margin-left: 160px;
   top: 20%;           /* 垂直居中 */
   left: 60%;          /* 水平居中 */
   transform: translate(-50%, -50%); /* 使用 transform 来调整精确居中 */
   background-color: rgba(0, 0, 0, 0.5); /* 半透明背景 */
   color: white;       /* 白色字体 */
   padding: 20px;      /* 添加内边距 */
   border-radius: 5px; /* 圆角 */
   font-size: 15px;    /* 设置字体大小 */
   font-weight: bold;  /* 设置加粗字体 */
   z-index: 999;       /* 确保加载提示在其他元素之上 */
 }
.file-label {
    background-color:var(--primary-blue);
    color: white;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
    text-align: center;
    display: inline-block;
    margin-bottom: 10px;
}

.file-label:hover {
    background-color: var(--primary-hover);
}

.preview-img {
  max-width: 100%;
  max-height: 380px; /* 或者和 container 对齐 */
  width: auto;
  height: auto;
    object-fit: contain;
    border: 1px solid #ddd;
    padding: 1px;
    border-radius: 5px;
    background: #fff;
    margin: 0 auto; /* 居中图片 */
    display: none; /* 默认隐藏图片 */
}


#photoSpecList {
    padding: 0;
    margin: 0;
}

#photoSpecList ul {
    list-style: none;
    padding: 0;
}

#photoSpecList li {
    padding: 10px;
    cursor: pointer;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
}

#photoSpecList li.selected {
    background-color: #007bff;
    color: white;
}

/* 改进的颜色选择块布局 */
.background-color-options {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
}

/* 隐藏原始的radio按钮，只显示颜色块 */
.background-color-options input[type="radio"] {
    display: none;
}
/* 去背景关闭时禁用颜色选择 */
.background-color-options.disabled {
    opacity: 0.6;
    pointer-events: none;
}

.background-color-options.disabled label {
    cursor: not-allowed;
}

.background-color-options label {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #ddd;
  cursor: pointer;
  display: inline-block;
  transition: border 0.2s ease, transform 0.2s ease;
}

/* 隐藏自定义颜色输入框 */
#customBgColor {
    margin-left: 10px;
    display: none;
}

  
  /* 标题蓝色加专业感 */
  h2 {
    color: var(--primary-blue);
  }
  
  /* 上传按钮样式提升 */
  .file-label {
    background-color: var(--primary-blue);
    border-radius: 6px;
    font-weight: bold;
    transition: background-color 0.2s ease;
  }
  
  .file-label:hover {
    background-color: var(--primary-hover);
  }
  
  /* 被选中的规格高亮 */
  #photoSpecList li.selected {
    background-color: var(--primary-blue);
    color: white;
    font-weight: bold;
  }
  
  /* 开始处理按钮强化绿色风格 */
  .spec-select button {
    background-color: var(--success-green);
    color: white;
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 10px;
  }
  
  .spec-select button:hover {
    background-color: #219653;
  }
  
  /* 背景色选择按钮美化 */
  .background-color-options label {
    border: 2px solid transparent;
    transition: transform 0.2s, border-color 0.2s;
  }
  
  .background-color-options input[type="radio"]:checked + label {
    border-color: var(--primary-blue);
    transform: scale(1.2);
  }
  
#removeBackground + label {
    font-size: 14px;
    color: #555;
    margin-left: 8px;
  }

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
  }
  
  .tab {
    padding: 6px 12px;
    border: none;
    background: #e0e0e0;
    color: #333;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s ease;
  }
  
  .tab.active {
    background: var(--primary-blue);
    color: white;
  }
  
  .tab:hover {
    background: #ccc;
  }
  
  .tab-content {
    display: none;
    min-height: 375px; /* 让空的也不会太短 */
  }
  
  .tab-content.active {
    display: block;
  }
  .custom-spec-input {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
    min-height: 37px;
  }
  
  
  .custom-spec-input label {
    font-size: 14px;
    color: #333;
  }
  
  .custom-spec-input input,
  .custom-spec-input select {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-top: 4px;
    width: 150px;
  }
  
  .scrollable-list {
    max-height: 380px;  /* 或你想要的值 */
    overflow-y: auto;
    padding-right: 5px;  /* 避免滚动条遮挡文字 */
    border: 1px solid #ddd;
    border-radius: 6px;
  }
  .scrollable-list::-webkit-scrollbar {
    width: 6px;
  }
  
  .scrollable-list::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
  }
  
  .scrollable-list::-webkit-scrollbar-track {
    background-color: transparent;
  }
  #processBtn {
    display: block;
    margin: 20px auto 0 auto;
    width: 180px;
    font-size: 16px;
  }
  #processBtn:hover {
    background-color: #219653;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  }
  #downloadBtn {
    background-color: var(--success-green);
    color: white;
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
  }
  
  #downloadBtn:hover {
    background-color: #219653;
  }
  .download-section {
    display: flex;
    align-items: center;
    margin-top: 18px;
  }
  .custom-spec-input-row {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
  }
  
  .custom-spec-input-row label {
    font-size: 14px;
    color: #333;
    display: flex;
    flex-direction: column;
  }
  
  .custom-spec-input-row input {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-top: 4px;
    width: 150px;
  }
  .background-color-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
  }
  
  .color-label {
    font-weight: bold;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    display: inline-block;
    margin: 0;
  }
  .bottom-controls {
    grid-column: 1 / -1;
    grid-row: 4; /* 明确放在第四行 */
    display: flex;
    gap: 30px;
    align-items: center;
    padding: 15px 20px;
    margin-top: 0px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

/* 步骤3：修复子元素换行问题 */
.remove-bg-control,
.background-color-row {
    flex-shrink: 0; /* 禁止收缩 */
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 步骤4：调整颜色选择项的内联间距 */
.background-color-row {
    margin: 0;
    padding: 0;
}

.background-color-row > * {
    margin-right: 8px !important; /* 强制横向间距 */
}
  
  .color-label {
    font-weight: bold;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
  }
  .color-box {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #ccc;
    cursor: pointer;
    display: inline-block;
  }
  .remove-bg-control {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
  }
  
  .remove-bg-label {
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  
  .remove-bg-desc {
    font-weight: normal;
    font-size: 13px;
    color: #666;
  }
  .modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
  }

  .modal-content {
    background: #fff;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 0 10px #00000030;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 300px;
  }

  .auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
  }

  .auth-tabs button {
    flex: 1;
    padding: 8px;
    border: none;
    background: #eee;
    cursor: pointer;
    border-radius: 4px;
  }

  .auth-tabs .active {
    background: #2F80ED;
    color: #fff;
  }

  input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
  }

  .error-msg {
    color: red;
    font-size: 13px;
    display: none;
  }
  .site-header {
    background-color: var(--site-dark);
    color: #fff;
    padding: 15px 30px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 999;
    width: 96%;
  }
  
  
  .header-container {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
  }
  
  .left-section {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 500px;
  }
  
  .right-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: flex-end;    
    flex: 1;
  }
  
  .site-title {
    font-size: 1.6rem;
    font-weight: bold;
    color: #fff;
    white-space: nowrap;    
    flex-shrink: 0;
  }
  
  .site-slogan {
    font-size: 1rem;
    color: #ccc;
    white-space: nowrap;
  }
  h2.site-slogan {
    margin-top: 1px; /* 缩小 h2 上方的间距 */
    margin-bottom: 2px; /* 缩小 h2 下方的间距 */
    padding: 0; /* 移除内边距 */
  }
  
  .nav-links {
    display: flex;
    gap: 24px;
    flex-wrap: nowrap; /* 自动换行避免挤压 */
    justify-content: center;
    flex: 1; /* 占据中间可伸缩空间 */
    white-space: nowrap;
  }
  .nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 18px;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
  }
  
  .nav-links a:hover {
    background-color: #455A64;
  }
  
  .auth-controls {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
    white-space: nowrap;
  }
  
  .auth-controls button {
    padding: 6px 12px;
    background-color: #00BCD4;
    border: none;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
  }
  
  .auth-controls button:hover {
    background-color: #0097A7;
  }

  #changePasswordPanel input {
    display: block;
    margin: 10px 0;
    padding: 8px;
    width: 100%;
  }
  #registerPanel input {
    display: block;
    margin: 10px 0;
    padding: 8px;
    width: 100%;
  }
  
  
  
  #changePasswordPanel .error-msg {
    color: red;
    font-size: 12px;
  }
  
  /* 注册面板按钮竖排 */
  /*#registerPanel button {
    display: block;
    margin: 10px 0;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border-radius: 5px;
    font-size: 14px;
  }*/
  
  /* 美化修改密码链接 */
  #forgotPasswordLink {
    color: #007bff;
    cursor: pointer;
    font-size: 14px;
  }
  
  #forgotPasswordLink:hover {
    text-decoration: underline;
  }

  .site-footer {
    background-color: #263238;
    color: #fff;
    padding: 40px 30px;
    font-size: 0.9rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  }
  
  .footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    color: #fff;
  }
  
  .footer-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }
  
  .footer-section h3 {
    margin: 0 0 10px;
    font-size: 18px;
    border-bottom: 2px solid rgba(255,255,255,0.2);
    padding-bottom: 8px;
  }
  
  .footer-section a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 14px;
  }
  
  .footer-section a:hover {
    text-decoration: underline;
  }
  
  .footer-copyright {
    grid-column: 1 / -1;
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.2);
    margin-top: 30px;
    font-size: 13px;
    opacity: 0.8;
  }
  
  .examples-wrapper {
    grid-column: 1 / -1;
    text-align: center;
    margin: 40px 0;
  }
  
  .examples img {
    max-height: 180px;
    margin: 0 10px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
  }
  
  .examples img:hover {
    transform: scale(1.05);
  }
  
  #faq, #contact {
    max-width: 800px;
    margin: 30px auto;
    padding: 0 20px;
  }
  
  #faq ul {
    list-style: disc;
    padding-left: 20px;
  }
  
  #faq li, #contact p {
    margin-bottom: 10px;
    color: #333;
    font-size: 1rem;
  }
  
  
.main-nav {
  display: flex;
  gap: 35px;
}

.main-nav a {
  color: #555;
  font-weight: 500;
  transition: color 0.2s;
  text-decoration: none;
}


/* 调整原有容器位置 */
.container {
  margin-top: 60px; /* 给头部留出空间 */
  margin-bottom: 60px; /* 给底部留出空间 */
}
.process-introduction {
  text-align: center;
  padding: 20px 2px;
  background-color: #f0f4f8;
  border-radius: 8px;
  margin: 20px auto;
  width: 96%;
}

/* 标题 */
.process-introduction h2 {
  font-size: 24px;
  color: #2F3A60;
  margin-bottom: 20px;
}

/* 流程步骤容器 */
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 30px;
}

/* 单个步骤 */
.step {
  text-align: center;
}

.step img {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 8px;
  margin-bottom: 15px;
}

.step p {
  font-size: 14px;
  color: #555;
}
h1, h2 {
  color: var(--text-dark); /* 深色文本 */
}

.beauty-introduction {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  padding: 20px 2px;
  background-color: #f0f4f8;
  border-radius: 8px;
  margin: 20px auto;
  padding: auto;
  text-align: center;
  width: 96%;
}
.beauty-introduction img {
  width: 100%;
  max-width: 750px; 
  border-radius: 8px;
  height: auto;
}

/* 错误消息 */
.error-msg {
  color: red; /* 错误文本使用红色 */
  font-size: 13px;
}

/* 默认文本 */
body, .subtitle, .requirements-grid {
  color: #555; /* 中灰色文字 */
}

/* 输入框和选择框 */
input, select, textarea {
  color: #333;
  background-color: #fff;
  border: 1px solid #ddd;
}
.custom-spec-input-infoimg {
  display: block;                     /* 确保元素块级显示 */
  width: 35%;                        /* 图片宽度占满容器 */
  max-width: 100%;                    /* 图片最大宽度为容器宽度 */
  max-height: 300px;                  /* 设置图片最大高度为 300px */
  height: auto;                       /* 高度自动调整，保持比例 */
  object-fit: contain;                /* 保证图片按比例缩放，不裁剪 */
  margin: 0 auto;                     /* 确保图片在容器中水平居中 */
  padding: 0;                         /* 去掉可能影响显示的内边距 */
  position: relative;                 /* 为了避免被其他元素干扰 */
  overflow: hidden;                   /* 确保不会超出容器 */
}

.custom-spec-input-infoimg img {
  display: block;                     /* 图片作为块级元素显示 */
  width: 100%;                        /* 保证图片宽度填满容器 */
  height: auto;                       /* 保持图片的自适应高度 */
  object-fit: contain;                /* 按比例缩放图片，避免裁剪 */
}
.hero-banner {
  position: relative;
  width: 96%;
  max-height: 520px;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background-color: var(--site-dark);
  margin-top: 0px;
  padding: 15px 30px;
  gap: 5px;
  flex-wrap: wrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  
}

.hero-banner img {
  max-height: 350px;
  width: auto;
  margin-top: 0px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  margin-bottom: 10px;
}

.hero-text {
  flex: 1;
  max-width: 800px;
  text-align: left;
  color: #ccc;
}

.hero-text h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: #ccc;
}

.hero-text p {
  font-size: 1.0rem;
  line-height: 1.6;
}


.hero-left {
  flex: 1;
  display: flex;
  margin-left: 150px;
  gap: 30px;
  align-items: flex-start;
  max-width: 75%; 
}

.hero-left img {
  max-width: 380px;
  max-height: 350px;
  flex-shrink: 0;
}

.hero-text {
   
  max-width: 800px;
}

.hero-right {
  flex: 0 0 220px;
  
  text-align: center;
  margin-top: auto;
  padding-bottom: 30px;
}

.hero-right .qrcode-img {
  max-height: 150px;
  width: auto;
  border: 1px solid #eee;
  padding: 8px;
  background: white;
}

.qrcode-label {
  margin-top: 10px;
  color: #ccc;
  font-size: 14px;
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
  .hero-banner {
    flex-direction: column;
  }
  
  .hero-left {
    flex-direction: column;
  }
  
  .hero-right {
    align-self: center;
    margin-top: 20px;
    padding-bottom: 0;
  }
}

/* 为 summary 元素添加样式 */
details summary {
  font-weight: bold;
  cursor: pointer;
  padding: 10px;
  background-color: #f1f1f1;
  border-radius: 5px;
  margin: 5px 0;
}

/* 设置展开时的样式 */
details[open] summary {
  background-color: #00BCD4; /* 设置选中的颜色 */
  color: white;
}

/* 控制内容显示 */
details p {
  margin: 10px;
  padding: 10px;
  background-color: #f9f9f9;
  border-radius: 5px;
  font-size: 16px;
}

/* 让 FAQ 列表看起来更整洁 */
#faq ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}
.container,
.api-documentation.container,
.api-demo.container {
  min-width: 1200px;
  width: 95%;
  margin: 20px auto;
  box-sizing: border-box; /* 新增盒模型计算方式 */
}

.api-demo.container {
  display: flex;          /* 新增flex布局 */
  justify-content: center;/* 水平居中 */
  align-items: center;    /* 垂直居中 */
  flex-direction: column; /* 纵向排列 */
  text-align: center; /* 水平居中 */
  background: white;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* 统一投影效果 */
  padding: 2px 0;        /* 统一上下内边距 */
}

.api-demo.container video {
  display: block;         /* 修复inline元素居中问题 */
  width: 96%;            /* 略微缩小显示区域 */
  max-width: 1640px;      /* 适当增加最大宽度 */
  margin: 12px auto;     /* 统一外边距 */
  border-radius: 8px;
  border: 1px solid #eee; /* 增加边框与其它预览区一致 */
  
}
/* 确保容器宽度居中并不超出 */
.api-documentation.container {
  
  min-width: 1200px;
  width: 95%;
  margin: 0 auto;  /* 居中显示 */
  
  display: grid;
    grid-template-columns: 240px 1fr;  /* 左侧菜单宽度固定，右侧内容自适应 */
    padding: 20px;
    background-color: #f9f9f9;
    margin-bottom: 40px;
    border: 1px solid #ddd;
    height: 660px;  /* 固定高度 */
    grid-template-rows: auto 1fr;  /* h2 跨越上方，内容区填充剩余空间 */
}

/* 左侧菜单样式 */
.api-sidebar {
  width: 240px;
  background-color: #f4f4f4;
  padding: 15px;
  border-right: 1px solid #ddd;
  display: flex;
  flex-direction: column;
}

/* 左侧菜单中的按钮 */
.api-nav {
  display: flex;
  flex-direction: column;
}

.api-nav-item {
  padding: 10px;
  margin: 5px 0;
  background-color: #fff;
  border: 1px solid #ddd;
  cursor: pointer;
  text-align: left;
  font-size: 16px;
}

.api-nav-item.active {
  background-color: #007BFF;
  color: white;
}

/* 右侧内容区域 */
.api-content {
  flex: 1;
  padding: 20px;
  background-color: #fff;
  height: 93%;  /* 与父容器相同的高度 */
  overflow-y: auto;
  border-left: 1px solid #ddd;  /* 为右侧区域添加边框 */
  border: 1px solid #ddd;  /* 为右侧区域添加边框 */
}

/* 使h2跨越左右两侧 */
.api-documentation h2 {
  font-size: 26px;
  color: #2F3A60;
  margin-bottom: 6px;
  text-align: center; /* 居中 */
  width: 100%;
  margin: 0;
  padding: 10px 0;
  /*border-bottom: 1px solid #ddd;*/
}

/* 内容区切换 */
.api-content-section {
  display: none;
}

.api-content-section.active {
  display: block;
  text-align: left; 
}

/* 代码块样式 */
.api-content-section pre {
  background-color: #f4f4f4;
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
  white-space: pre-wrap;
  text-align: left; 
}

.api-content-section h3 {
  font-size: 22px;
  color: #333;
  text-align: center; 
}

.api-content-section p {
  font-size: 16px;
  line-height: 1.5;
  color: #555;
}

.global-toast {
  position: fixed;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: rgb(68, 243, 62);
  padding: 12px 24px;
  border-radius: 4px;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.global-toast.show {
  opacity: 1;
}

.payment-content {
  width: 400px;
  text-align: center;
}

.package-select {
  margin: 10px 0;
}

.package-option {
  padding: 10px;
  margin: 10px 0;
  border: 2px solid #eee;
  border-radius: 8px;
  cursor: pointer;
}

.package-option input:checked + label {
  color: var(--primary-blue);
  font-weight: bold;
}

#qrcode-container {
  margin: 10px auto;
  padding: 15px;
  background: white;
  border-radius: 8px;
  width: 200px; 
  height: 200px;
  
}

.payment-tip {
  color: #666;
  font-size: 14px;
}
#confirmPayment {
  background: var(--success-green);
  color: white;
  padding: 12px 24px;
  border-radius: 6px;
  margin: 15px 0;
  transition: opacity 0.3s;
}

#confirmPayment:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.loading .package-select,
.loading #confirmPayment {
  opacity: 0.6;
  pointer-events: none;
}
ol.payment-tips-list {  
 list-style-type: none;
  padding-left: 5px; 
  margin: 5px 0; 
  text-align: left;   
}

ol.payment-tips-list li {
 list-style-type: none;
  margin-bottom: 5px; 
  color: #666; 
  font-size: 14px; 
  line-height: 1.6;   
}
.package-option input:checked + .package-label {
  border-color: var(--primary-blue);
}
.package-option input:focus-visible + .package-label {
  outline: 2px solid var(--primary-blue);
}
.package-option input:disabled + label {
  opacity: 0.6;
  cursor: not-allowed;
}
.package-option {
  transition: opacity 0.2s;
}
.package-option[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.qrcode-container {
  display: flex;
  gap: 50px;
  margin-bottom: 5px;
}

.qrcode-item {
  text-align: center;
}

.qrcode-item img {
  width: 100px;
  height: 100px;
  display: block;
  margin: 0 auto 15px;
  border: 1px solid #eee;
  padding: 5px;
  background: white;
}

.qrcode-item p {
  font-size: 13px;
  color: #ccc;
  margin: 0;
}
@media screen and (max-width: 768px) {
  .qrcode-container {
    flex-direction: column;
    gap: 15px;
  }
}
@media screen and (max-width: 768px) {
  /* 基础布局调整 */
  .container {
    width: 100% !important;
    min-width: unset !important;
    grid-template-columns: 1fr !important;
    margin: 10px auto !important;
    padding: 10px !important;
  }

  /* 头部适配 */
  .header-container {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  
  .left-section {
    min-width: unset !important;
    order: 1;
  }

  .right-section {
    flex-direction: column !important;
    align-items: flex-start !important;
    width: 100% !important;
  }

  /* 导航折叠 */
  .nav-links {
    flex-wrap: wrap !important;
    gap: 10px !important;
    justify-content: flex-start !important;
  }

  /* 主内容区域适配 */
  .controls-preview,
  .spec-select,
  .preview-container {
    grid-column: 1 !important;
    width: 100% !important;
    height: auto !important;
    margin: 5px 0 !important;
  }

  /* 步骤展示改为垂直布局 */
  .process-steps {
    grid-template-columns: 1fr !important;
  }

  /* 表单元素适配 */
  input, select {
    width: 100% !important;
    min-width: unset !important;
  }

  /* 按钮适配 */
  #processBtn {
    width: 100% !important;
  }

  /* 隐藏非必要元素 */
  .custom-spec-input-infoimg,
  .hero-banner img {
    display: none !important;
  }

  /* API文档区域适配 */
  .api-documentation.container {
    grid-template-columns: 1fr !important;
    height: auto !important;
    min-width: unset !important;
    padding: 10px !important;
  }

  .api-sidebar {
    width: 100% !important;
    border-right: none !important;
  }

  .api-content {
    height: auto !important;
    border-left: none !important;
  }

  /* 文字大小调整 */
  .site-title { font-size: 1.2rem !important; }
  .site-slogan { font-size: 0.8rem !important; }
  .hero-text p { font-size: 0.9rem !important; }

  .beauty-introduction {
    grid-template-columns: 1fr; /* Stack items vertically on small screens */
    padding: 15px 10px; /* Adjust padding for smaller screens */
  }

  .beauty-introduction img {
    width: 90%; /* Adjust image width for better spacing on mobile */
    margin: 0 auto; /* Center the image if it doesn't take full width */
  }
}

/* 小屏幕精细调整（最大宽度480px） */
@media screen and (max-width: 480px) {
  /* 底部菜单垂直排列 */
  .footer-content {
    grid-template-columns: 1fr !important;
  }

  /* 弹窗适配 */
  .modal-content {
    width: 90% !important;
    min-width: unset !important;
  }

  /* 颜色选择块间距调整 */
  .background-color-options {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  /* 步骤说明文字缩小 */
  .step p {
    font-size: 12px !important;
  }
  .beauty-introduction {
    padding: 10px 5px;
  }
}
