:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #2563eb;
  --accent-fg: #ffffff;
  --card: #ffffff;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --fg: #e5e7eb;
    --muted: #9ca3af;
    --border: #272a30;
    --accent: #3b82f6;
    --accent-fg: #ffffff;
    --card: #171a20;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
    "Microsoft YaHei", sans-serif;
}

body { transition: background 0.2s ease, color 0.2s ease; }

.home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px;
}

.logo {
  margin: 0;
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -1px;
}

.logo span { color: var(--accent); }

.tagline {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.search-box {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.search-icon { color: var(--muted); flex: none; }

.input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--fg);
  font-size: 18px;
  padding: 14px 0;
}

.engine-row {
  display: flex;
  gap: 16px;
  padding: 0 6px;
  font-size: 13px;
  color: var(--muted);
  user-select: none;
}

.engine-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.engine-row input { accent-color: var(--accent); }

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--fg);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.05s ease;
}

.btn:hover { border-color: var(--accent); }
.btn:active { transform: translateY(1px); }

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}
.btn.primary:hover { opacity: 0.92; }

.hint {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: center;
  font-size: 12px;
  color: var(--muted);
}

.hint code {
  background: color-mix(in srgb, var(--muted) 14%, transparent);
  padding: 2px 6px;
  border-radius: 6px;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
}
