* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Microsoft YaHei", system-ui, sans-serif;
}

html, body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* 本地背景图路径 */
body {
  background-image: url("./assets/bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* 页面遮罩，提升文字清晰度 */
.mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 1;
}

.container {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
}

/* 搜索框基础样式 桌面端 */
.search-box {
  display: flex;
  height: 52px;
  width: min(620px, 92vw);
  background-color: #0a0a0a;
  border: 1px solid transparent;
  border-radius: 999px;
  overflow: visible;
  transition: all 0.28s ease;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
/* 无内容hover 红色边框类 */
.search-box.hover-empty {
  border-color: #ff4747;
  box-shadow: 0 10px 36px rgba(255, 71, 71, 0.22);
  transform: translateY(-2px);
}
/* 有内容hover 蓝色边框类 */
.search-box.hover-fill {
  border-color: #2383ff;
  box-shadow: 0 10px 36px rgba(35, 131, 255, 0.22);
  transform: translateY(-2px);
}

/* 搜索引擎下拉 */
.engine-select {
  height: 100%;
  min-width: 92px;
  background: linear-gradient(135deg, #1a1a1a, #111111);
  color: #f0f0f0;
  border: none;
  padding: 0 16px;
  outline: none;
  cursor: pointer;
  font-size: 14px;
  border-radius: 999px 0 0 999px;
  transition: background 0.2s;
}

.engine-select:hover {
  background: linear-gradient(135deg, #222222, #181818);
}

.engine-select option {
  background: #0a0a0a;
  color: #fff;
}

/* 输入框自适应填充剩余宽度 */
.search-input {
  flex: 1;
  height: 100%;
  background: transparent;
  border: none;
  color: #ffffff;
  padding: 0 18px;
  font-size: 15px;
  outline: none;
  caret-color: #4096ff;
  min-width: 100px;
}

.search-input::placeholder {
  color: #919191;
  letter-spacing: 0.5px;
}

/* 蓝色搜索按钮 */
.search-btn {
  position: relative;
  height: 100%;
  padding: 0 26px;
  background: linear-gradient(135deg, #2383ff, #0f66e8);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  border-radius: 0 999px 999px 0;
  transition: all 0.24s ease;
}

.search-btn:hover {
  background: linear-gradient(135deg, #3990ff, #1a72f2);
  transform: scale(1.03);
}

/* 悬浮弹出正方形图片【已彻底移除阴影，干净无黑影】 */
.pop-image {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  width: 52px;
  height: 52px;
  background-image: url("./assets/pop.png");
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  box-shadow: none; /* 完全删除阴影，无任何黑色外发光 */
  opacity: 0;
  visibility: hidden;
  transition: all 0.24s ease;
  z-index: 999;
}

.search-btn:hover .pop-image {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ========== 平板适配 768px以下 ========== */
@media screen and (max-width: 768px) {
  .search-box {
    height: 46px;
  }

  .engine-select {
    min-width: 76px;
    padding: 0 10px;
    font-size: 13px;
  }

  .search-input {
    padding: 0 12px;
    font-size: 14px;
  }

  .search-btn {
    padding: 0 18px;
    font-size: 13px;
  }

  .pop-image {
    width: 46px;
    height: 46px;
  }
  .search-box.hover-empty, .search-box.hover-fill {
    transform: translateY(-1px);
  }
}

/* ========== 竖屏手机 480px以下 ========== */
@media screen and (max-width: 480px) {
  .search-box {
    height: 42px;
  }

  .engine-select {
    min-width: 64px;
    padding: 0 6px;
    font-size: 12px;
  }

  .search-input {
    padding: 0 8px;
    font-size: 13px;
  }

  .search-btn {
    padding: 0 12px;
    font-size: 12px;
  }

  .pop-image {
    width: 42px;
    height: 42px;
    bottom: calc(100% + 8px);
  }
  .search-box.hover-empty, .search-box.hover-fill {
    transform: translateY(-1px);
  }
}

/* ========== 横屏手机专项兼容 ========== */
@media screen and (max-height: 420px) and (orientation: landscape) {
  .container {
    padding: 0 24px;
  }

  .search-box {
    height: 40px;
    width: min(700px, 96vw);
  }

  .engine-select {
    min-width: 60px;
    padding: 0 8px;
    font-size: 12px;
  }

  .search-input {
    padding: 0 10px;
    font-size: 13px;
  }

  .search-btn {
    padding: 0 14px;
    font-size: 12px;
  }

  .pop-image {
    width: 40px;
    height: 40px;
    bottom: calc(100% + 6px);
  }
  .search-box.hover-empty, .search-box.hover-fill {
    transform: translateY(-1px);
  }
}