@import url("https://fonts.googleapis.com/css2?family=Parkinsans:wght@700&family=Inter:wght@400;500&display=swap");

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0a;
  --accent: #31ff92;
  --accent-glow: rgba(49,255,146,0.35);
  --text: #f0f0f0;
  --muted: rgba(240,240,240,0.35);
  --proxy-h: 52px;
}

html, body { height: 100%; overflow: hidden; background: var(--bg); }
body { font-family: "Inter", sans-serif; color: var(--text); }

#vanta-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
}

#center {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  z-index: 2;
  pointer-events: none;
}

#center > * { pointer-events: all; }

#logo {
  font-family: "Parkinsans", sans-serif;
  font-size: 88px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  text-shadow: 0 0 40px rgba(49,255,146,0.25);
  user-select: none;
}

#search-form { width: 100%; max-width: 540px; padding: 0 20px; position: relative; }

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 4px 18px;
  gap: 10px;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
  backdrop-filter: blur(12px);
}

.search-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow), 0 8px 32px rgba(0,0,0,0.4);
  background: rgba(255,255,255,0.07);
}

.search-icon {
  width: 17px;
  height: 17px;
  color: var(--muted);
  flex-shrink: 0;
  transition: color 0.2s;
}

.search-wrap:focus-within .search-icon { color: var(--accent); }

#search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-size: 15px;
  padding: 10px 0;
  letter-spacing: 0.01em;
}

#search-input::placeholder { color: var(--muted); }

#search-error {
  color: #f87171;
  font-size: 13px;
  text-align: center;
}

.ac-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 20px; right: 20px;
  background: rgba(18,18,22,0.96);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 14px;
  overflow: hidden;
  z-index: 50;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
}

.ac-dropdown.hidden { display: none; }

.ac-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.12s;
  font-size: 14px;
  color: var(--text);
}

.ac-item:hover, .ac-item.active { background: rgba(255,255,255,0.07); }
.ac-item:not(:last-child) { border-bottom: 1px solid rgba(255,255,255,0.04); }

.ac-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
  color: var(--muted);
}

.ac-icon img { width: 16px; height: 16px; border-radius: 3px; }
.ac-icon.search-icon-ac { color: var(--accent); }
.ac-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-type { font-size: 11px; color: var(--muted); flex-shrink: 0; }

#proxy-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--proxy-h);
  background: #1a1a1a;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  z-index: 100;
}

#proxy-bar.hidden { display: none; }

.pb-left, .pb-right {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

#proxy-bar button {
  background: none;
  border: none;
  color: rgba(255,255,255,0.35);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: color 0.12s, background 0.12s;
  flex-shrink: 0;
}

#proxy-bar button:hover { color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.07); }
#proxy-bar button i { font-size: 14px; }

.pb-addr {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #2a2a2a;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 0 12px;
  height: 34px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pb-addr:focus-within {
  border-color: rgba(255,255,255,0.25);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.05);
}

.pb-lock { font-size: 11px; color: rgba(255,255,255,0.3); flex-shrink: 0; }

#proxy-url-bar {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  padding: 0;
}

#bottom-bar {
  position: fixed;
  bottom: 18px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(20,20,20,0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 6px 12px;
  z-index: 200;
}

#bottom-bar button {
  background: none;
  border: none;
  color: rgba(255,255,255,0.55);
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 6px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

#bottom-bar button:hover { color: #fff; background: rgba(255,255,255,0.07); }
#bottom-bar button i { font-size: 13px; }

.bb-dot { color: rgba(255,255,255,0.2); font-size: 16px; line-height: 1; padding: 0 2px; }

#proxy-frame {
  display: none;
  position: fixed;
  top: var(--proxy-h); left: 0; right: 0; bottom: 0;
  width: 100%;
  height: calc(100% - var(--proxy-h));
  border: none;
  z-index: 100;
  background: #fff;
}

#proxy-frame.active { display: block; }
