    :root {
      --bg: #f5f7fa;
      --card: #ffffff;
      --accent: #4f46e5;
      --muted: #6b7280;
      --border: #e5e7eb;
      --sidebar-width: 220px;
      --border-radius: 12px;
    }

    html, body {
      margin: 0;
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
      background: var(--bg);
      color: #111827;
      height: 100vh;
      overflow-x: hidden;
    }

    /* 顶部导航条 */
    .topbar {
      height: 60px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 16px;
      background: var(--card);
      border-bottom: 1px solid var(--border);
      box-shadow: 0 2px 6px rgba(0,0,0,0.05);
      position: sticky;
      top: 0;
      z-index: 100;
    }

    .topbar .left {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .topbar img {
      height: 36px;
      width: 36px;
      border-radius: 8px;
      background: #F38AB5;
      border-radius: 50%;
    }

    .topbar h1 {
      font-size: 18px;
      margin: 0;
      font-weight: 600;
    }

    .menu-btn {
      background: none;
      border: none;
      font-size: 1.8rem;
      cursor: pointer;
      color: var(--accent);
    }

    /* ✅ 侧边栏样式 */
    .sidebar {
      position: fixed;
      top: 0;
      left: -240px; /* 初始隐藏 */
      /* width: var(--sidebar-width); */
      width: 200px;
      height: 100%;
      background: var(--card);
      border-right: 1px solid var(--border);
      box-shadow: 2px 0 10px rgba(0,0,0,0.05);
      display: flex;
      flex-direction: column;
      padding: 20px;
      transition: left 0.3s ease;
      z-index: 200;
    }

    .sidebar.active {
      left: 0;
    }

    .sidebar h2 {
      font-size: 16px;
      font-weight: 600;
      margin-bottom: 20px;
      color: #111827;
    }

    .menu a {
      display: block;
      padding: 10px 12px;
      margin-bottom: 6px;
      border: 1px solid var(--border);
      text-decoration: none;
      color: #111827;
      border-radius: 8px;
      font-size: 14px;
      transition: background 0.2s ease, color 0.2s ease;
    }

    .menu a:hover {
      background: #eef2ff;
      color: var(--accent);
    }

    .menu a.active {
      background: var(--accent);
      color: white;
      font-weight: 600;
    }

    /* ✅ 遮罩层，用于点击关闭 */
    .overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0,0,0,0.3);
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.3s ease;
      z-index: 150;
    }

    .overlay.active {
      opacity: 1;
      visibility: visible;
    }

    .layout {
      /* width: 100%; */
      max-width: 980px;
      margin: 0 auto;
      display: flex;
      flex-direction: column;
      gap: 20px;
      padding: 20px;
    }

    .header {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }

    .logo {
      width: 56px;
      height: 56px;
      border-radius: 12px;
      background: var(--accent);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      color: white;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
      font-size: 20px;
    }
    .user-avatar { border-radius: 50%; height: 40px; width: 40px; object-fit: cover; flex-shrink: 0; }

    h1 {
      font-size: 22px;
      margin: 0;
      font-weight: 600;
    }

    p.lead {
      margin: 0;
      color: var(--muted);
      font-size: 14px;
    }

    /* 选项Box */
    .settings-box {
      background: var(--card);
      border-radius: 12px;
      padding: 16px;
      border: 1px solid var(--border);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      align-items: center;
    }
    
    .btn {
      background: var(--accent);
      border: none;
      color: white;
      padding: 10px 16px;
      border-radius: 8px;
      font-weight: 600;
      cursor: pointer;
      box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
      transition: background 0.3s ease;
      flex-shrink: 0;
    }

    .btn:hover {
      background: #4338ca;
    }

    /* 测试结果区域 */
    .grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
      gap: 16px;
    }

    .card {
      background: var(--card);
      padding: 16px;
      border-radius: 12px;
      border: 1px solid var(--border);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
      display: flex;
      flex-direction: column;
    }

    .target-title {
      font-size: 14px;
      margin: 0 0 6px 0;
      color: #111827;
      font-weight: 600;
    }

    .muted {
      color: var(--muted);
      font-size: 12px;
      word-break: break-all;
    }

    .progress-wrap {
      background: var(--glass);
      height: 10px;
      border-radius: 999px;
      overflow: hidden;
      margin-top: 10px;
    }

    .progress {
      height: 100%;
      width: 0%;
      background: var(--accent);
      transition: width 0.12s linear;
    }

    .metrics {
      display: flex;
      justify-content: space-between;
      gap: 8px;
      margin-top: 10px;
    }

    .metric {
      font-size: 13px;
    }

    .metric .value {
      font-weight: 700;
    }

    .note {
      margin-top: 10px;
      color: var(--muted);
      font-size: 12px;
    }

    footer.small {
      margin-top: 14px;
      color: var(--muted);
      font-size: 12px;
    }
    
    /* #grid {
        padding-bottom: 20px;
    } */
    /* 移动响应式调整 */
    @media (max-width: 640px) {
      .settings-box {
        flex-direction: column;
        align-items: stretch;
      }

      .settings-box label {
        width: 100%;
      }

      .btn {
        width: 100%;
      }

      .layout {
        min-width: 80vw;
      }

    }
    .settings-box label {
      font-size: 14px;
      color: var(--muted);
      display: flex;
      flex-direction: column;
      gap: 4px;
      width: 100%;
    }

    .settings-box input[type=range] {
      width: 100%;
    }

    .settings-box span {
      font-weight: bold;
      color: #111827;
    }
    /* 总统计卡片 */
    .summary-box {
      display: flex; 
      justify-content: space-around; 
      gap: 8px; /* 卡片之间间隔 */

    }
    .summary-card {
      flex: 1;
      text-align: center;
      padding: 10px;
      border: 1px solid var(--border); 
      border-radius: 12px; padding: 16px;
      background: var(--card);
      box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    }
    .summary-card label {
      font-size: 14px;
      color: var(--muted);
      display: flex;
      flex-direction: column;
      gap: 4px;
      width: 100%;
    }

    .summary-item { font-size: 14px; }
    .summary-item .value { font-size: 16px; font-weight: 700; color: #111827; }

    /* input[type=number] {
      width: 100%;
      padding:10px 12px;
      border-radius: 6px;
      border: 1px solid var(--border);
      background: #f9fafb;
      color: inherit;
    } */

/* ===== 表单区域 ===== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-label {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 500;
}

input.form-control,
select.form-control {
  width: 100%;
  text-align: center;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  background: #f9fafb;
  font-size: 14px;
  color: #111827;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input.form-control:focus,
select.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
  outline: none;
}

select.form-control option {
  background: #ffffff;   /* 背景色 */
  color: #111827;        /* 字体颜色 */
  padding: 8px 12px;     /* 仅部分浏览器支持 */
  font-size: 14px;
}

select.form-control option:hover {
  background: #eef2ff;   /* 在部分浏览器有效（Firefox 有效） */
  color: var(--accent, #4f46e5);
}


/* ===== 按钮样式 ===== */
.btn {
  background: var(--accent);
  color: white;
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn:hover {
  background: #4338ca;
}

.btn-block {
  width: 100%;
}

/* ===== 输出区样式 ===== */
#qe_ip h6 {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
}

.accordion-inner {
  /* padding: 10px; */
  width: 100%;
  text-align: center;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px dashed var(--border);
}

/* #uuidList { */
#codeList {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: monospace;
  font-size: 13px;
  color: #374151;
  /* line-height: 1.6; */
  word-break: break-all;
}

/* 广告 */
  .image-card {
    flex: 1;
    /* border: 1px solid var(--border);  */
    border-radius: 12px; 
    background: var(--card);
    padding: 6px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  }
  .image-card img {
    width: 100%;
    height: auto;
    max-height: 110px;
    border-radius: 8px;
  }
  
  .continue-btn{
    background:#2fb3ff;
    width: 100%;
    color:#fff;
    padding:10px 18px;
    border-radius:8px;
    cursor:pointer;
    font-weight:700;
    border:none;
  }
  /* 上传按钮 */
  input[type="file"] {
    border: 1.5px solid #bbb;
    border-radius: 8px;
    background: #fff;
    padding: 8px 12px;
    font-size: 16px;
    cursor: pointer;
    outline: none;
  }

  /* 主要样式 */
  input[type="file"]::file-selector-button {
    border: 1.5px solid #bbb;
    border-radius: 8px;
    padding: 8px 12px;
    background: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: border-color 0.3s;
  }

  /* 悬停时边框颜色变换 */
  input[type="file"]::file-selector-button:hover {
    border-color: #888;
    background: #fafafa;
  }

  /* 文本框 */
  textarea, input[type="text"], input[type="file"] {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    margin-bottom: 15px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    resize: vertical;
    background: #fff;
  }
  textarea {
    min-height: 120px;
  }

   /* 单选按钮 */
  /* 隐藏原生radio */
  input[type="radio"][name="dateFormat"] {
    display: none;
  }

  /* 自定义label的前置圆圈 */
  input[type="radio"][name="dateFormat"] + label {
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    line-height: 20px;
    user-select: none;
    font-family: "Microsoft YaHei", sans-serif;
    color: #333;
  }

  /* 未选中状态的圆圈 */
  input[type="radio"][name="dateFormat"] + label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border: 2px solid #399bfd;
    border-radius: 50%;
    background: white;
    transition: background-color 0.3s, border-color 0.3s;
  }

  /* 选中状态，内圈填充 */
  input[type="radio"][name="dateFormat"]:checked + label::before {
    background-color: #399bfd;
    border-color: #399bfd;
  }

  /* 鼠标悬浮时改变边框颜色 */
  input[type="radio"][name="dateFormat"] + label:hover::before {
    border-color: #1a78d7;
  }

  /* 获取焦点时添加阴影 */
  input[type="radio"][name="dateFormat"]:focus + label::before {
    box-shadow: 0 0 4px 2px rgba(57, 155, 253, 0.6);
    outline: none;
  }
