@charset "utf-8";
/* 全局优化 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  margin-top: 96px;
  font-family: 'Source Sans Pro', Arial, sans-serif;
  line-height: 1.6;
}

/* 顶部导航优化 */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 66px;
  background-color: #fff;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  will-change: transform;
}

/* 搜索区域优化 */
.search-box {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

.input-group {
  display: flex;
  gap: 12px;
  margin: 20px 0;
}

/* 输入框优化 */
input {
  flex: 1;
  height: 48px;
  padding: 12px 15px;
  border: 2px solid #1890ff;
  border-radius: 8px;
  font-size: 16px;
  background: #f8fbff;
  transition: all 0.3s ease;
}

input:focus {
  outline: none;
  box-shadow: 0 0 10px rgba(24, 144, 255, 0.3);
}

/* 按钮优化 */
button {
  height: 48px;
  padding: 0 25px;
  background: #ACD8FF;
  color: #555555;
  border: 2px solid #1890ff;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

button:hover {
  background: #096dd9;
  color: #ffffff;
  transform: translateY(-2px);
}

.container:hover .result {
  will-change: transform;
}

/* 结果区域优化 */
.result {
  margin-top: 30px;
  padding: 25px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  /* 仅在需要时启用下面动画 */
  /* will-change: transform; */
}

.result:active {
  transform: scale(0.98); /* 点击时轻微缩小 */
  transition: transform 0.2s; /* 平滑过渡 */
}

.error {
  color: #ff4d4f;
  padding: 10px;
  background: #fff2f0;
  border: 1px solid #ffccc7;
  border-radius: 4px;
  margin-bottom: 15px;
}

/* 辅助文本 */
.help-text {
  color: #666;
  font-size: 14px;
  margin-top: 20px;
  line-height: 1.6;
}

/* 响应式优化 
@media (max-width: 768px) {
  body {
    margin-top: 70px;
  }
  
  .input-group {
    flex-direction: column;
  }
  
  button {
    width: 100%;
  }
} */

.mobile-only { display: none; }
@media (max-width: 600px) {
  .mobile-only { display: inline; }
}

/* 移动端：保持横向排列且各占50% */
@media (max-width: 768px) {
  body {
    margin-top: 70px;
  }
  
  .input-group {
    flex-direction: row; /* 关键修改：保持横向排列 */
  }
  
  /* 输入框和按钮各占50%宽度 */
  input, button {
    flex: 0 0 calc(50% - 6px); /* 宽度计算：50% - 间距一半 */
    width: 50%; /* 覆盖移动端50%宽度设置 */
  }
}
