/* 设置页面整体背景为白色 */
body {
    background-color: #ffffff; /* 白色背景 */
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    color: #333; /* 深灰色文字 */
}

/* 容器样式 */
.container {
    background-color: #ffffff; /* 白色背景 */
    padding: 20px;
    max-width: 800px;
    margin: 20px auto;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 100%; /* 确保宽度占满父容器 */
    box-sizing: border-box; /* 确保 padding 不会增加宽度 */
}

/* 标题样式 */
h1 {
    text-align: center;
    color: #4CAF50; /* 绿色文字 */
}

/* 表单样式 */
#checkForm {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#checkForm label {
    font-weight: bold;
    color: #333; /* 深灰色文字 */
}

/* 输入框样式 */
#checkForm input[type="text"] {
    padding: 10px;
    font-size: 18px;
    border: 1px solid #ccc; /* 灰色边框 */
    border-radius: 4px;
    background-color: #fff; /* 白色背景 */
    color: #333; /* 输入文字颜色 */
    outline: none; /* 去掉聚焦时的蓝色边框 */
    width: 100%; /* 确保宽度占满父容器 */
    box-sizing: border-box; /* 确保 padding 不会增加宽度 */
}

/* 输入框聚焦时的样式 */
#checkForm input[type="text"]:focus {
    border-color: #4CAF50; /* 聚焦时边框颜色为绿色 */
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3); /* 添加绿色阴影 */
}

/* 提交按钮样式 */
#checkForm input[type="submit"] {
    padding: 10px;
    font-size: 20px;
    background-color: #4CAF50; /* 绿色按钮 */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%; /* 确保宽度占满父容器 */
    box-sizing: border-box; /* 确保 padding 不会增加宽度 */
}

#checkForm input[type="submit"]:hover {
    background-color: #45a049; /* 按钮悬停时更深的绿色 */
}

/* 结果区域样式 */
#result {
    margin-top: 20px;
    color: #333; /* 深灰色文字 */
    display: none; /* 初始隐藏 */
    width: 100%; /* 确保宽度占满父容器 */
    overflow-x: hidden; /* 隐藏水平滚动条 */
    box-sizing: border-box; /* 确保 padding 不会增加宽度 */
}

/* 检测结果方框样式 */
.result-box {
    border: 1px solid #ccc; /* 灰色边框 */
    border-radius: 5px; /* 圆角 */
    padding: 15px; /* 内边距 */
    margin-bottom: 15px; /* 下方间距 */
    background-color: #ffffff; /* 浅灰色背景 */
    max-height: 300px; /* 限制最大高度 */
    overflow-y: auto; /* 超出时显示垂直滚动条 */
    width: 100%; /* 确保宽度占满父容器 */
    box-sizing: border-box; /* 确保 padding 不会增加宽度 */
}

.result-box h3 {
    margin-top: 0; /* 去掉标题的上边距 */
    color: #4CAF50; /* 绿色文字 */
}

/* 结果内容样式 */
.result-content {
    background-color: #fff; /* 白色背景 */
    padding: 10px; /* 内边距 */
    margin-bottom: 10px; /* 下方间距 */
    width: 100%; /* 确保宽度占满父容器 */
    box-sizing: border-box; /* 确保 padding 不会增加宽度 */
    overflow-wrap: break-word; /* 强制换行 */
    word-wrap: break-word; /* 兼容性 */
}

.result-content p {
    margin: 5px 0; /* 段落间距 */
    overflow-wrap: break-word; /* 强制换行 */
    word-wrap: break-word; /* 兼容性 */
}

/* 违规内容样式 */
.violation-text {
    color: red; /* 红色字体 */
    font-weight: normal; /* 去除加粗 */
}

/* 图片检测结果样式 */
.image-result img {
    max-width: 100%; /* 图片宽度不超过容器 */
    height: auto; /* 保持图片比例 */
    border-radius: 5px; /* 圆角 */
}

/* 检测终止提示样式 */
.termination-message {
    color: red; /* 红色字体 */
    font-weight: bold; /* 加粗 */
    margin-top: 15px; /* 上方间距 */
    text-align: center; /* 文字居中 */
}

/* 模态框样式：取消遮盖层 */
.modal {
    display: none; /* 初始隐藏 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw; /* 覆盖整个视口宽度 */
    height: 100vh; /* 覆盖整个视口高度 */
    background-color: transparent; /* 透明背景，取消遮盖层 */
    z-index: 1000; /* 确保模态框在最上层 */
    display: flex; /* 使用 Flexbox 居中 */
    justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */
}

/* 模态框内容居中 */
.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    color: #333;
    width: 90%; /* 手机端宽度占满屏幕 */
    max-width: 600px; /* 设置最大宽度，避免在大屏幕上过宽 */
    position: relative; /* 相对定位，用于关闭按钮 */
    box-sizing: border-box; /* 确保 padding 不会增加宽度 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* 添加阴影 */
}

/* 关闭按钮样式 */
.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
    color: #333;
}

/* 进度条样式 */
.progress-bar {
    width: 100%; /* 进度条宽度占满模态框内容 */
    background-color: #f3f3f3;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 15px;
}

.progress-bar-inner {
    width: 0%;
    height: 30px;
    background-color: #4CAF50; /* 绿色进度条 */
    text-align: center;
    line-height: 30px;
    color: white;
}

/* 手机端样式：整体缩小为 90% */
@media (max-width: 768px) {
    body {
        transform: scale(0.9); /* 整体缩小为 90% */
        transform-origin: top center; /* 缩放原点为顶部居中 */
        width: 100%; /* 确保宽度占满屏幕 */
        overflow-x: hidden; /* 隐藏水平滚动条 */
    }

    /* 手机端模态框宽度调整为 90% */
    .modal-content {
        width: 90%; /* 手机端宽度占满屏幕 */
    }
}

/* 移除 <a> 标签的下划线和蓝色 */
a {
    text-decoration: none; /* 移除下划线 */
    color: inherit; /* 继承父元素的颜色 */
}

a:hover {
    text-decoration: none; /* 移除悬停时的下划线 */
}

/* 通用模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw; /* 覆盖整个视口宽度 */
    height: 100vh; /* 覆盖整个视口高度 */
    background-color: transparent; /* 透明背景，取消遮盖层 */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 300px;
    width: 90%; /* 手机端宽度占满屏幕 */
}

.close-button {
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.burl {
    font-size: 14px;
        text-align: center; /* 文字居中 */
}

/* 进度条样式 */
.progress-bar {
    width: 100%;
    background-color: #f3f3f3;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-bar-inner {
    width: 0%;
    height: 20px;
    background-color: #4CAF50;
    text-align: center;
    line-height: 20px;
    color: white;
    transition: width 0.3s ease;
}

/* 提示模态框样式 */
#alertModal h3 {
    margin-top: 0;
    color: #333;
}

#alertModal p {
    font-size: 16px;
    color: #555;
}

/* URL 不合法提示模态框样式 */
#urlAlertModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw; /* 覆盖整个视口宽度 */
    height: 100vh; /* 覆盖整个视口高度 */
    background-color: transparent; /* 透明背景，取消遮盖层 */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#urlAlertModal .modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 300px;
    width: 90%; /* 手机端宽度占满屏幕 */
}

#urlAlertModal .close-button {
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

#urlAlertModal h3 {
    margin-top: 0;
    color: #333;
}

#urlAlertModal p {
    font-size: 16px;
    color: #555;
}

        /* 新增红色字体样式 */
        .violation-count {
            color: red;
        }

        /* 新增分割线样式 */
        .image-result {
            margin-bottom: 20px;
            padding-bottom: 20px;
            border-bottom: 1px solid #ccc; /* 灰色分割线 */
        }

        /* 最后一个图片结果不需要分割线 */
        .image-result:last-child {
            border-bottom: none;
        }
        
        
 /* 密码输入模态框样式 */
.password-modal {
    display: none; /* 初始隐藏 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw; /* 覆盖整个视口宽度 */
    height: 100vh; /* 覆盖整个视口高度 */
    background-color: rgba(0, 0, 0, 0); /* 半透明黑色背景 */
    justify-content: center;
    align-items: center;
    z-index: 1000; /* 确保模态框在最上层 */
}

/* 密码输入模态框内容样式 */
.password-modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 300px;
    width: 70%; /* 手机端宽度占满屏幕 */
    position: relative; /* 相对定位，用于关闭按钮 */
}

/* 密码输入模态框标题样式 */
.password-modal-content h3 {
    margin-top: 0;
    color: #333;
    font-size: 18px;
    margin-bottom: 15px;
}

/* 密码输入框样式 */
.password-modal-content input[type="tel"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    outline: none;
    box-sizing: border-box;
}

.password-modal-content input[type="tel"]:focus {
    border-color: #4CAF50; /* 聚焦时边框颜色为绿色 */
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3); /* 添加绿色阴影 */
}

/* 密码输入模态框按钮样式 */
.password-modal-content button {
    padding: 10px 20px;
    margin: 5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

/* 独立确定按钮样式 */
.password-modal-content .submit-button {
    background-color: #4CAF50 !important; /* 绿色按钮 */
    color: #fff !important;
}

.password-modal-content .submit-button:hover {
    background-color: #45a049 !important; /* 按钮悬停时更深的绿色 */
}

/* 取消按钮样式 */
.password-modal-content .cancel-button {
    background-color: #EFEFEF; /* 灰色按钮 */
    color: #000000;
}

.password-modal-content .cancel-button:hover {
    background-color: #EFEFEF; /* 按钮悬停时更深的灰色 */
}

/* 关闭按钮样式 */
.password-modal-content .close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #333;
}

        /* 设置网址链接的颜色为红色 */
        #detectedUrl {
            color: red;
            text-decoration: none;
            font-size: 16px; /* 调整字体大小 */
        }
