/* 全局样式 */
body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 容器样式 */
.container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

/* 标题样式 */
h1, h2, h3 {
    color: #2c3e50;
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* 段落样式 */
p {
    margin: 10px 0;
}

/* 链接样式 */
a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* 按钮样式 */
input[type="submit"], input[type="button"] {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin: 5px 0;
}

input[type="submit"]:hover, input[type="button"]:hover {
    background-color: #2980b9;
}

/* 输入框样式 */
input[type="text"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 200px;
}

/* 单选按钮样式 */
input[type="radio"] {
    margin-right: 5px;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 16px; /* 添加字体大小 */
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

tr:hover {
    background-color: #f5f5f5;
}

/* 分隔线样式 */
.divider {
    text-align: center;
    color: #7f8c8d;
    margin: 20px 0;
    font-size: 14px;
}

/* 时间显示样式 */
#time {
    font-size: 16px;
    color: #7f8c8d;
    text-align: center;
    margin: 10px 0;
}

/* 结果显示样式 */
#result {
    color: #e74c3c;
    font-size: 18px;
    font-weight: bold;
    margin: 10px 0;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border-left: 4px solid #e74c3c;
}

/* 自定义时间输入框 */
#custom_time {
    width: 80px;
    margin-left: 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 15px;
    }

    table {
        display: block;
        overflow-x: auto;
        font-size: 16px; /* 移动端表格字体大小 */
    }

    th, td {
        font-size: 14px; /* 可根据需求调整 */
    }
}

#visitor-count-container {
    padding: 15px;
    border-radius: 5px;
    margin: 20px auto;
    width: 100%;
    max-width: 600px;
    text-align: center;
}

/* 闪烁背景颜色 */
.bg-red {
    background-color: #ff4d4d !important;
}
.bg-white {
    background-color: #ffffff !important;
}

/* 弹窗样式 */
.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  background-color: rgba(43, 42, 42, 0.8); /* 调整透明度以更明显 */
  padding: 20px;
  border-radius: 0; /* 移除圆角以铺满屏幕 */
  box-shadow: none; /* 移除阴影 */
  text-align: center;
  overflow: hidden; /* 确保不显示滚动条 */
}

/* 弹窗内容容器 */
.popup-content {
  display: flex;
  flex-direction: column-reverse; /* 修改为逆序排列 */
  align-items: center; /* 水平居中 */
  justify-content: center;
  height: 100%; /* 让内容区域占满弹窗高度 */
}

/* 关闭按钮样式 */
#closeBtn {
  position: static; /* 移除绝对定位 */
  cursor: pointer;
  font-size: 40px;
  color: #7e7b7b; /* 改为白色以便在深色背景下更清晰 */
  margin-top: 20px; /* 控制与图片的距离 */
  text-align: center; /* 水平居中 */
  background-color: white; /* 增加白色背景 */
  border-radius: 50%; /* 设置为圆形 */
  width: 50px; /* 设置宽度 */
  height: 50px; /* 设置高度 */
  display: flex; /* 使用 Flexbox 布局 */
  align-items: center; /* 垂直居中 */
  justify-content: center; /* 水平居中 */
}

/* 图片样式 */
.popup .popup-img {
  width: 300px; /* 固定宽度 */
  height: fit-content;
  display: block;
  margin: 20px 0; /* 增加上下间距 */
  object-fit: contain;
  max-width: 110vw;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* 添加新样式：弹窗内文字颜色改为白色 */
.popup p {
  color: #fff; /* 文字颜色改为白色 */
  font-weight: bold; /* 字体加粗 */
  font-size: 18px; /* 字体变大一点 */
}
