.container {
  padding: 16px;
  background: #f5f5f5;
  min-height: 100vh;

  .customHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;

    .headerLeft {
      display: flex;
      align-items: center;
      gap: 12px;

      .backButton {
        padding: 4px;
        border: none;
        background: transparent;
        color: #666;
        font-size: 18px;

        &:hover {
          color: #1890ff;
        }
      }

      .headerTitle {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 16px;
        font-weight: bold;
        color: #333;

        .headerIcon {
          font-size: 20px;
          color: #1890ff;
        }
      }
    }
  }

  .controlPanel {
    margin-bottom: 16px;

    h3 {
      font-size: 16px;
      font-weight: bold;
      color: #333;
      margin-bottom: 16px;
    }

    .controlItem {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 8px 0;
      border-bottom: 1px solid #f0f0f0;

      &:last-child {
        border-bottom: none;
      }

      span {
        font-size: 14px;
        color: #333;
      }
    }
  }

  .testSection {
    margin-bottom: 16px;

    h3 {
      font-size: 16px;
      font-weight: bold;
      color: #333;
      margin-bottom: 8px;
    }

    p {
      font-size: 12px;
      color: #666;
      margin-bottom: 16px;
    }

    .result {
      margin-top: 16px;
      padding: 12px;
      background: #f8f9fa;
      border-radius: 8px;

      h4 {
        font-size: 14px;
        font-weight: bold;
        color: #333;
        margin-bottom: 8px;
      }

      .urlList {
        .urlItem {
          display: flex;
          align-items: flex-start;
          margin-bottom: 4px;
          font-size: 12px;

          span:first-child {
            color: #666;
            margin-right: 8px;
            min-width: 20px;
            flex-shrink: 0;
          }

          .url {
            color: #1890ff;
            word-break: break-all;
            line-height: 1.4;
            white-space: pre-wrap;
            word-wrap: break-word;
            overflow-wrap: break-word;
            flex: 1;
            min-width: 0; // 确保flex项目可以收缩
          }
        }
      }

      .emptyText {
        color: #999;
        font-style: italic;
      }
    }
  }

  .form {
    .formItem {
      margin-bottom: 16px;

      label {
        display: block;
        font-size: 14px;
        font-weight: bold;
        color: #333;
        margin-bottom: 8px;
      }

      input,
      textarea {
        width: 100%;
        padding: 8px 12px;
        border: 1px solid #d9d9d9;
        border-radius: 6px;
        font-size: 14px;
        transition: border-color 0.3s;

        &:focus {
          outline: none;
          border-color: #1890ff;
          box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
        }

        &::placeholder {
          color: #bfbfbf;
        }
      }

      textarea {
        resize: vertical;
        min-height: 80px;
      }
    }
  }

  .actionPanel {
    margin-bottom: 16px;
  }

  .dataPanel {
    h3 {
      font-size: 16px;
      font-weight: bold;
      color: #333;
      margin-bottom: 16px;
    }

    .dataContent {
      background: #f8f9fa;
      border-radius: 8px;
      padding: 12px;
      max-height: 300px;
      overflow-y: auto;

      pre {
        margin: 0;
        font-size: 12px;
        line-height: 1.4;
        color: #333;
        white-space: pre-wrap;
        word-break: break-all;
      }
    }
  }
}

// 响应式设计
@media (max-width: 768px) {
  .container {
    padding: 12px;

    .customHeader {
      padding: 8px 12px;

      .headerLeft {
        .headerTitle {
          font-size: 14px;

          .headerIcon {
            font-size: 18px;
          }
        }
      }
    }

    .testSection {
      .result {
        .urlList {
          .urlItem {
            font-size: 11px;
          }
        }
      }
    }

    .dataPanel {
      .dataContent {
        pre {
          font-size: 11px;
        }
      }
    }
  }
}

// 暗色主题支持
@media (prefers-color-scheme: dark) {
  .container {
    background: #1f1f1f;

    .customHeader {
      background: #2a2a2a;
      border-bottom-color: #434343;

      .headerLeft {
        .backButton {
          color: #ccc;

          &:hover {
            color: #40a9ff;
          }
        }

        .headerTitle {
          color: #fff;

          .headerIcon {
            color: #40a9ff;
          }
        }
      }
    }

    .testSection {
      h3 {
        color: #fff;
      }

      p {
        color: #ccc;
      }

      .result {
        background: #2a2a2a;

        h4 {
          color: #fff;
        }

        .urlList {
          .urlItem {
            span:first-child {
              color: #ccc;
            }

            .url {
              color: #40a9ff;
            }
          }
        }

        // 单个URL项（头像、视频）的样式
        .urlItem {
          .url {
            color: #40a9ff;
          }
        }

        .emptyText {
          color: #888;
        }
      }
    }

    .form {
      .formItem {
        label {
          color: #fff;
        }

        input,
        textarea {
          background: #2a2a2a;
          border-color: #434343;
          color: #fff;

          &:focus {
            border-color: #40a9ff;
            box-shadow: 0 0 0 2px rgba(64, 169, 255, 0.2);
          }

          &::placeholder {
            color: #666;
          }
        }
      }
    }

    .dataPanel {
      h3 {
        color: #fff;
      }

      .dataContent {
        background: #2a2a2a;

        pre {
          color: #fff;
        }
      }
    }
  }
}
