/* 新增标题样式确保不换行 */
.header-left h1 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 2.0rem; /* 基础字体大小 */
  margin-top: -40px;
  margin-bottom: 20px;
}

/* 响应式调整标题字体大小 */
@media (max-width: 1600px) {
  .header-left h1 {
    font-size: 1.6rem;
  }
}

@media (max-width: 1400px) {
  .header-left h1 {
    font-size: 1.4rem;
  }
}

@media (max-width: 1200px) {
  .header-left h1 {
    font-size: 1.2rem;
  }
}

@media (max-width: 1024px) {
  .header-left h1 {
    white-space: normal; /* 小屏幕允许换行 */
    text-overflow: clip;
    font-size: 1.05rem;
    margin-top: 0;
  }
}

/* 合并后的段落样式 */
.header-text {
  color: #e0e7ff;
  margin-top: 15px;
  line-height: 1.6;
  text-align: justify; /* 左右对齐 */
  font-size: 1rem; /* 增大字体（默认通常是1rem） */
  text-justify: inter-word; /* 优化英文单词间距 */
}



@media (max-width: 1024px) {
  /* 平板及中等屏幕尺寸 */
  .header-container {
    flex-direction: column;
    gap: 20px;
  }

  .header-left, .header-right {
    flex: 1;
    width: 100%;
  }

  .header-right {
    min-height: auto;
    margin-bottom: 20px;
  }

  .header-right img {
    width: 60%;
  }

  .exposure-features .features-row {
    flex-wrap: wrap;
  }

  .exposure-features .features-row select {
    flex: 1 1 40%;
    margin-bottom: 10px;
  }

  #predictBtn {
    flex: 1 1 100%;
    margin-top: 10px;
  }
}

@media (max-width: 768px) {
  /* 手机等小屏幕尺寸 */
  body {
    padding: 10px;
  }

  header {
    padding: 20px 15px;
    border-radius: 20px;
  }

  .header-left h1 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 15px;
  }

  .header-right img {
    width: 80%;
  }

  .input-section, .result-section {
    padding: 15px;
  }

  .exposure-features .features-row select {
    flex: 1 1 100%;
  }

  table th, table td {
    padding: 10px 5px;
    font-size: 12px;
  }

  /* 表格横向滚动处理 */
  .result-section {
    overflow-x: auto;
  }

  table {
    min-width: 600px;
  }
}




* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background-color: #f8fafc;
  line-height: 1.6;
  padding: 20px;
}

/* 头部区域修改 */
header {
  background-color: #5b6b8a;
  color: #fff;
  padding: 30px 20px;
  margin-bottom: 20px;
  border-radius: 45px;
}
/* 头部左右布局容器 */
.header-container {
  display: flex;
  gap: 30px;
  align-items: center;
}

.header-left {
  flex: 8;
}

.header-right {
  flex: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 220px;
}

/* 图片样式 */
.header-right img {
  width: 80%;
  height: auto;
  border-radius: 10px;
}

.header-left h1 {
  margin-top: -30px; /* 负值上移标题，数值可根据需要调整 */
  margin-bottom: 30px; /* 增加与下方第一行文字的间距 */
}

/* 头部文字间距调整 */
.header-text-first {
  margin-bottom: 5px;
  margin-top: 20px;
  color: #e0e7ff;
}
.header-text-second {
  margin-top: 20px; /* 第二行文字顶部间距（增大两行距离） */
  color: #e0e7ff;
}

.header-text-third {
  margin-top: 20px; /* 第二行文字顶部间距（增大两行距离） */
  color: #e0e7ff;
}

.input-header-container {
  display: flex;
  align-items: center; /* 垂直居中对齐 */
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 15px;
}

.input-header-container h2 {
  margin: 0; /* 移除默认的外边距 */
  font-size: 18px;
  line-height: 1.5;
}

.instruction-text {
  color: #5b6b8a;
  font-family: Arial;
  font-size: 14px;
  margin: 0; /* 移除默认的外边距 */
  line-height: 1.5;
  display: flex;
  align-items: center; /* 垂直居中对齐 */
  margin-bottom: 15px;
}


.download-template {
  color: #5b6b8a;
  text-decoration: underline;
  font-weight: bold;
  padding: 0px 6px;
  border-radius: 5px;
  font-size: 16px;
  margin-bottom: 15px;
}



/* 响应式调整 */
@media (max-width: 768px) {
  .input-section > div:first-child {
  display: flex;
  justify-content: space-between; /* 两端对齐 */
  align-items: center; /* 垂直居中 */
  flex-wrap: wrap; /* 小屏幕自动换行 */
  gap: 15px;
  margin-bottom: 15px;
  }
}


/* 3. 输入区与结果区配色区分（强化功能边界） */
.input-section {
  border: 1px solid #e0e7ff;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 14px;
  box-shadow: 0 3px 10px rgba(91, 107, 138, 0.08);
}

.result-section {
  background-color: #ffffff; /* 保持白色，突出结果区域 */
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 14px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.input-section h2,
.result-section h2 {
  font-size: 18px;
  margin-bottom: 15px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.form-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 3px;
}

.form-group input, .form-group select {
  border: 1px solid #c9d1e0; /* 浅灰蓝边框 */
  border-radius: 8px; /* 圆角与容器呼应 */
  transition: all 0.3s ease; /* 为后续顺滑效果铺垫 */
}

/* 下拉框展开/聚焦/悬停的过渡动画 */
.form-group select {
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  color: #94a3b8; /* 初始灰色 */
}

.exposure-select.selected {
  color: #000 !important; /* 选中后黑色 */
}

/* 聚焦/悬停时边框强化 */
.form-group input:focus, .form-group select:focus,
.form-group input:hover, .form-group select:hover {
  border-color: #5b6b8a; /* 聚焦时用主色边框，强化交互反馈 */
  outline: none; /* 去除默认高亮边框 */
  box-shadow: 0 0 0 1px rgba(91, 107, 138, 0.1); /* 轻量内阴影，突出聚焦状态 */
}


.form-group select option {
  padding: 8px 12px; /* 增加选项内边距，提升点击区域 */
  transition: background-color 0.2s ease; /* 选项hover时平滑变色 */
}

.form-group select option:hover {
  background-color: #e0e7ff; /* 选项hover时浅蓝背景，增强反馈 */
}

.form-group input::placeholder,
.form-group select:disabled { /* 下拉框默认文本样式 */
   color: #94a3b8;
   opacity: 1;
}




.exposure-features .features-row {
  display: flex;
  gap: 15px;
  align-items: center; /* 垂直居中对齐 */
}

.exposure-features .features-row select {
  flex: 1;
  min-width: 120px;
  height: 38px; /* 与按钮高度匹配 */
  color: #94a3b8;
  font-weight: bold;
}


.smiles-input-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.smiles-input-group input {
  flex: 1;
}

.button-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.uploadBtn {
  background-color: #5b6b8a;
  color: #fff;
  padding: 8px 22px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  white-space: nowrap;
  transition: all 0.3s ease;
  text-align: center;
  font-size: 15px;
}

.uploadBtn:hover {
  background-color: #44526b;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .smiles-input-group {
    flex-direction: column;
  }

  .smiles-input-group input,
  .button-group {
    width: 100%;
  }

  .button-group {
    flex-direction: row;
  }

  .uploadBtn {
    flex: 1;
    padding: 10px;
  }
}


/* 调整按钮样式使其与下拉框对齐 */
#predictBtn {
  background-color: #5b6b8a;
  color: #fff;
  padding: 12px 22px; /* 调整内边距 */
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  white-space: nowrap; /* 防止按钮文字换行 */
  transition: all 0.3s ease;
  font-size: 15px;
}

#predictBtn:hover {
  background-color: #44526b;
}

#adResultText {
    font-weight: bold;
    margin-left: 10px;
    padding: 7px 10px;
    border-radius: 5px;
}

.ad-in-domain {
    color: #2ecc71; /* 绿色表示在域内 */
    background-color: #e8f7f0;
    font-weight: bold;
}

.ad-out-domain {
    color: #e74c3c; /* 红色表示在域外 */
    background-color: #fdeded;
    font-weight: bold;
}

@media (max-width: 768px) {
    .result-section h2 {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    #adResultText {
        margin-left: 0;
        margin-top: 5px;
    }
}



table th,
table td {
  border: 1px solid #ccc;
  padding: 25px 10px;
  text-align: center;
  font-size: 14px;
  font-weight: bold;
}

.result-section table {
  width: 100%;
  border-collapse: collapse; /* 合并边框，使表格线条更简洁 */
  margin: 0 auto;
  table-layout: fixed;
}

.result-section table th,
.result-section table td {
    border: 1px solid #ccc;
    padding: 25px 10px;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    width: calc(100% / 7); /* 新增：7列等宽 */
    word-wrap: break-word; /* 新增：允许换行 */
}

.result-section table td.positive,
.result-section table td.negative {
  /* 移除整单元格背景色 */
  background-color: transparent;
  color: white;
  font-weight: bold;
  position: relative;
  z-index: 1;
}

.result-section table td.positive::before,
.result-section table td.negative::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 18px 50px; /* 控制背景范围 */
  border-radius: 5px; /* 圆角 */
  z-index: -1; /* 置于文字下方 */
}

.result-section table td.positive::before {
  background-color: #e74c3c; /* 红色背景 */
}

.result-section table td.negative::before {
  background-color: #2ecc71; /* 绿色背景 */
}

table thead {
  background-color: #5b6b8a;
  color: white;
}

table tbody tr:nth-child(odd) {
  background-color: #f0f9ff;
}

table tbody tr:nth-child(even) {
  background-color: #ffffff;
}



/* 新增页脚样式 */
.footer-section {
  background-color: #f0f4f8;
  padding: 15px;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  text-align: center;
  margin-top: 30px;
}
.disclaimer, .copyright {
  margin: 10px 0;
  font-size: 13px;
  color: #5a657a;
}
.copyright {
  margin-top: 15px;
  color: #8892a4;
}
