/* ========== 全局重置 & 字体 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px 60px;
  transition: background 0.8s ease;
}

.container {
  max-width: 820px;
  width: 100%;
}

/* ========== 标题 ========== */
.header {
  text-align: center;
  margin-bottom: 36px;
}
.header h1 {
  color: #ffffff;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.header p {
  color: rgba(255, 255, 255, 0.6);
  margin-top: 8px;
  font-size: 16px;
}

/* ========== 搜索框 ========== */
.search-wrapper {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  padding: 6px 6px 6px 24px;
  display: flex;
  align-items: center;
  margin-bottom: 48px;
  transition: box-shadow 0.3s, border-color 0.3s;
}
.search-wrapper:focus-within {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06);
}
.search-wrapper .icon {
  color: rgba(255, 255, 255, 0.4);
  font-size: 20px;
  margin-right: 12px;
  flex-shrink: 0;
}
.search-wrapper input {
  flex: 1;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 17px;
  outline: none;
  padding: 12px 0;
}
.search-wrapper input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}
.search-wrapper button {
  background: #fff;
  border: none;
  border-radius: 40px;
  padding: 11px 30px;
  font-size: 15px;
  font-weight: 600;
  color: #302b63;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  flex-shrink: 0;
}
.search-wrapper button:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
}
.search-wrapper button:active {
  transform: scale(0.97);
}

/* ========== 搜索引擎选择 ========== */
.engine-selector {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.engine-selector label {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  cursor: pointer;
  padding: 6px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s;
  user-select: none;
}
.engine-selector input[type="radio"] {
  display: none;
}
.engine-selector input[type="radio"]:checked + label {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  font-weight: 600;
}

/* ========== 快捷标签网格 ========== */
.section-title {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 18px;
  text-align: center;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}
.card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px 8px 16px;
  text-align: center;
  text-decoration: none;
  color: #fff;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.card:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}
.card .emoji {
  font-size: 32px;
  line-height: 1;
}
.card .name {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.85;
}

/* ========== 页脚 ========== */
.footer {
  text-align: center;
  color: rgba(255, 255, 255, 0.25);
  font-size: 13px;
  margin-top: 12px;
}
.admin-link {
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: color 0.2s;
}
.admin-link:hover {
  color: #fff;
  text-decoration: underline;
}

/* ========== 响应式 ========== */
@media (max-width: 520px) {
  .header h1 {
    font-size: 28px;
  }
  .search-wrapper {
    flex-wrap: wrap;
    padding: 10px 14px;
    border-radius: 30px;
  }
  .search-wrapper input {
    width: 100%;
    padding: 8px 0;
  }
  .search-wrapper button {
    width: 100%;
    margin-top: 8px;
    text-align: center;
  }
  .grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }
  .card {
    padding: 14px 4px 12px;
  }
  .card .emoji {
    font-size: 24px;
  }
}
@media (max-width: 380px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
