  :root {
    --card-width: 900px;
    --accent-gradient: linear-gradient(90deg, #ff7a7a, #6ad3c9);
    --header-grad: linear-gradient(90deg, #ff8a80, #79e6c7);
    --shadow: 0 10px 30px rgba(20, 20, 40, 0.12);
    font-family: "Microsoft Yahei", "PingFang SC", Arial, sans-serif;
  }



  body {
    background: #dfdff5;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
  }

  /* .header-main{
    width: var(--card-width);
    max-width: 95%;
    display: grid;
    margin-top: 40px;
  } */

  .header-main{
    width: var(--card-width);
    max-width: 95%;
    display: grid;
    margin-top: 40px;
    background: #f3f3f3;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    padding: 12px;
    gap: 10px;
    margin-bottom: 15px;
  }

  .container {

    background: #ffffff;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    padding: 18px;
    /* margin-top: 40px; */
  }


  .container-table {
    max-width: 95%;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    padding: 18px;
    /* margin-bottom: 15px; */
  }

  .header {
    background: var(--header-grad);
    padding: 28px;
    border-radius: 10px;
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: inset 0 -4px 10px rgba(0, 0, 0, 0.06);
  }

  .title {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: 1px;
    margin: 0 0 6px;
  }

  .subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
  }

  .meta {
    display: flex;
    gap: 18px;
    /* margin-top: 18px; */
  }

  .meta .card {
    flex: 1;
    background: #dfdff5;
    border-radius: 8px;
    padding: 18px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(16, 24, 40, 0.04);
  }

  .meta .label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
  }

  .meta .value {
    font-weight: 700;
    font-size: 20px;
    color: #2b8a4b;
  }

  /* main content */
  .main {
    margin-top: 20px;
    background: #fff;
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 6px 20px rgba(10, 10, 30, 0.03);
  }

  /* .main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 20px;
    flex-direction: column;
    gap: 10px;
  } */

  .intro {
    padding: 8px;
    border-radius: 8px;
    background: #fff;
  }

  .rules {
    margin: 6px 0 8px;
    padding: 14px;
    border-radius: 8px;
    background: #ffecec;
    color: #7b2b2b;
  }

  .btn {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    outline: none;
  }

  .btn-start {
    width: 49%;
    background: linear-gradient(90deg, #4aa0ff, #178bff);
    color: #fff;
    box-shadow: 0 6px 18px rgba(23, 139, 255, 0.2);
    font-size: 16px;
  }

  .btn-start:hover {
    filter: brightness(.95);
  }

  /* task area */
  .task-stage {
    display: none;
    gap: 18px;
  }

  .task-card {
    padding: 18px;
    border-radius: 8px;
    background: #fafafa;
    text-align: center;
    min-height: 220px;
    position: relative;
  }

  .task-img {
    max-width: 360px;
    height: 220px;
    display: block;
    margin: 0 auto 12px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  }

  .task-text {
    font-size: 20px;
    color: #222;
    line-height: 1.6;
    min-height: 48px;
  }

  .controls {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
  }

  .countdown {
    font-weight: 800;
    font-size: 22px;
    color: #e67a00;
  }

  .options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 10px;
  }

  .option-btn {
    background: #FFB6C1;
    border: 1px solid rgba(30, 30, 30, 0.06);
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
  }

  .continue-btn {
    background: #2fb3ff;
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    border: none;
  }

  /* progress rainbow */
  .progress-wrap {
    margin-top: 18px;
    padding: 12px;
    background: #fff;
    border-radius: 10px;
  }

  .progress {
    height: 14px;
    border-radius: 10px;
    background: linear-gradient(90deg, red, orange, yellow, green, cyan, blue, violet);
    position: relative;
    overflow: hidden;
  }

  .progress>.bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    transition: width 400ms linear;
  }

  .small {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
    text-align: right;
  }

  footer {
    margin-top: 14px;
    text-align: center;
    color: #666;
    font-size: 12px;
  }

  @media (max-width:720px) {
    .title {
      font-size: 24px;
    }

    .task-img {
      max-width: 100%;
    }

    .container {
      padding: 12px;
      /* width: auto; */
    }
  }

  .task-audio {
    margin-top: 10px;
    width: 100%;
    max-width: 360px;
  }

  .task-line {
    background: #c2ddf7;
    /* 淡灰背景，像气泡 */
    padding: 8px 12px;
    border-radius: 8px;
    margin: 6px 0;
    /* 每条消息之间的间隔 */
    font-size: 16px;
    line-height: 1.5;
    color: #222;
    /*text-align: left;*/
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  }

  /* ===================== 表格样式 ===================== */
  table {
    width: 100%;
    border-collapse: collapse;
    /* 去掉单元格之间的缝隙 */
    margin: 16px 0;
    font-size: 14px;
    background: #852d2d14;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  }

  thead {
    background: #c7c7c7;
    /* 用头部的渐变色 */
    color: #000000;
    text-align: left;
  }

  th,
  td {
    padding: 10px 14px;
    border-bottom: 1px solid #b7b7b7;
  }

  tr:last-child td {
    border-bottom: none;
    /* 去掉最后一行的底边 */
  }

  tbody tr:hover {
    background: #f7faff;
    /* 鼠标悬浮行高亮 */
  }

  caption {
    caption-side: top;
    font-weight: 700;
    text-align: left;
    padding: 8px;
    font-size: 15px;
    color: #444;
  }

  .box {
    background: #c9d5ff;
    border-radius: 10px;
    padding: 16px;
    /* margin-bottom: 16px; */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  }

  /* label {
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
  } */

  .container label {
    font-size: 14px;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    margin: 8px 0;
    width: 100%;
  }

  .select-box,
  .input-box {
    appearance: none;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    /* 包含 padding 和 border */
  }

  .select-box:hover,
  .input-box:hover {
    border-color: #2b8a4b;
    box-shadow: 0 3px 8px rgba(43, 138, 75, 0.2);
  }

  .select-box:focus,
  .input-box:focus {
    outline: none;
    border-color: #2b8a4b;
    box-shadow: 0 3px 8px rgba(43, 138, 75, 0.3);
  }

  .btn-max {
    display: inline-block;
    width: 100%;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    background: linear-gradient(90deg, #4aa0ff, #178bff);
    color: #fff;
    box-shadow: 0 6px 18px rgba(23, 139, 255, 0.2);
    transition: all 0.2s ease;
  }

  .btn-max:hover {
    filter: brightness(0.95);
  }

  .circle-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 10px;
  }

  .circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ccc;
    transition: background 0.2s;
  }

  .circle.active {
    background: #ff7a7a;
  }

  @keyframes flash {

    0%,
    100% {
      opacity: 1;
    }

    50% {
      opacity: 0.3;
    }
  }

  .circle.active.flash {
    animation: flash 0.2s ease-in-out;
  }

  .history-card {
    background: #fff;
    border-radius: 8px;
    padding: 10px 14px;
    margin: 8px 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    font-size: 15px;
    line-height: 1.4;
  }

  .history-card span.index {
    font-weight: 700;
    color: #2b8a4b;
    margin-right: 6px;
  }

  .history-card span.time {
    font-size: 12px;
    color: #777;
    float: right;
  }

  .btn:disabled,
  .btn-start:disabled {
    background-color: #ccc;
    /* 灰色背景 */
    cursor: not-allowed;
    /* 鼠标悬停时显示禁止符号 */
    box-shadow: none;
    /* 去掉阴影 */
    opacity: 0.7;
    /* 半透明效果 */
  }

  .btn-max:disabled {
    background-color: #ccc;
    /* 灰色背景 */
    cursor: not-allowed;
    /* 鼠标悬停时显示禁止符号 */
    box-shadow: none;
    /* 去掉阴影 */
    opacity: 0.7;
    /* 半透明效果 */
  }

  /* 上传按钮 */
  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;
  }


  /* ===== 表单区域 ===== */
  .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);
  }

  select,
  input {
    font-size: 14px;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
  }

  /* 单选按钮 */
  /* 隐藏原生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: 15px;
    height: 15px;
    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;
  }

  button.copy-btn {
    width: 100%;
    padding: 8px 10px;
    margin-top: 8px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: white;
    cursor: pointer;
    text-align: center;
    user-select: none;
    transition: background-color 0.3s ease;
  }

  button.copy-btn:disabled {
    cursor: default;
    background-color: #e0f7e9;
    color: #2e7d32;
  }

  button.max-bin {
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
    width: 100%;
  }

  button.max-bin:hover {
    background-color: #e7e7e7;
  }

  button.copy-bin1 {
    background: #fff;
    border: 1.5px solid #bbb;
    border-radius: 8px;
    padding: 10px 16px;
    margin: 5px 4px;
    font-size: 16px;
    cursor: pointer;
    transition: border-color 0.3s;
  }

  button.copy-bin1:hover {
    border-color: #888;
  }

  .segmented {
    display: flex;
    gap: 8px;
    background: #c8daff;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid var(--chip-border);
  }

  .segmented button {
    flex: 1;
    padding: 8px 10px
  }

  .segmented .active {
    background: #35abff;
    border-color: #1f4f82;
  }

  .pill {
    border-radius: 8px;
    padding: 8px 12px;
  }

  .row button {
    font-size: 14px;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
  }

  .btn-primary {
    background: #111827;
    color: white;
    border: 0;
  }

  .btn-ghost {
    background: transparent;
    border: 1px solid #d1d5db;
  }

  /* ===== 按钮样式 ===== */
  .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%;
  }

  /* 广告 */
  .image-card {
    flex: 1;
    /* border: 1px solid var(--border);  */
    width: var(--card-width);
    max-width: 95%;
    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;
  }



  button {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s;
  }

  /* button:hover {
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
  } */
  /* 状态 */
  .status-used {
    color: #aaa;
  }

  .status-unused {
    color: #4caf50;
  }