* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #202124;
  color: #e8eaed;
}
a { color: #8ab4f8; }

#browser-chrome {
  background: #17181a;
  border-bottom: 1px solid #3c4043;
}
#tab-bar { display: flex; padding: 6px 8px 0 8px; }
.tab {
  background: #202124;
  border: 1px solid #3c4043;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 6px 18px;
  font-size: 13px;
  color: #bdc1c6;
}
#address-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #202124;
}
#back-btn {
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  color: #bdc1c6;
}
#address-bar {
  flex: 1;
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid #5f6368;
  font-size: 14px;
  background: #303134;
  color: #e8eaed;
}
#go-btn {
  padding: 7px 16px;
  border-radius: 16px;
  border: 1px solid #5f6368;
  background: #303134;
  color: #e8eaed;
  cursor: pointer;
  font-size: 13px;
}

.target-info {
  text-align: center;
  font-size: 12px;
  color: #9aa0a6;
  padding: 6px 0;
  background: #17181a;
  border-bottom: 1px solid #3c4043;
}

#content { min-height: 80vh; padding-bottom: 40px; }

/* --- Search home (centered, first landing) --- */
.search-home { text-align: center; padding-top: 8vh; }
.search-home .logo { font-size: 52px; font-weight: 600; margin-bottom: 24px; }
.search-home .logo span:nth-child(1) { color:#8ab4f8; }
.search-home .logo span:nth-child(2) { color:#f28b82; }
.search-home .logo span:nth-child(3) { color:#fdd663; }
.search-home .logo span:nth-child(4) { color:#8ab4f8; }
.search-home .logo span:nth-child(5) { color:#81c995; }
.search-home .logo span:nth-child(6) { color:#f28b82; }
.search-home .logo span:nth-child(7) { color:#f28b82; }
.search-home form { display: flex; justify-content: center; }
.search-home input[type=text] {
  width: 100%;
  max-width: 560px;
  padding: 12px 20px;
  border-radius: 24px;
  border: 1px solid #5f6368;
  background: #303134;
  color: #e8eaed;
  font-size: 16px;
}
.search-home button {
  margin-top: 20px;
  padding: 10px 16px;
  background: #303134;
  color: #e8eaed;
  border: 1px solid #303134;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
}

/* --- Persistent top search bar + tabs (results page) --- */
.search-top {
  padding: 16px 40px 8px 40px;
  max-width: 700px;
  margin: 0 auto;
}
.search-top-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #303134;
  border: 1px solid #5f6368;
  border-radius: 24px;
  padding: 8px 18px;
}
.search-top-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #e8eaed;
  font-size: 16px;
}
.search-icon-left, .search-icon { opacity: 0.8; font-size: 15px; }

.tabs-row {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  gap: 26px;
  padding: 10px 40px 10px 40px;
  border-bottom: 1px solid #3c4043;
  font-size: 14px;
  color: #9aa0a6;
}
.tab-item { cursor: default; padding-bottom: 10px; }
.tab-item.active { color: #8ab4f8; border-bottom: 3px solid #8ab4f8; font-weight: 500; }

/* --- Results --- */
.results-list { max-width: 700px; margin: 0 auto; padding: 20px 40px 0 40px; }
.results-header { margin-bottom: 20px; color: #9aa0a6; font-size: 13px; }
.result { margin-bottom: 30px; }
.r-top { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.favicon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}
.r-sitename { font-size: 14px; color: #e8eaed; }
.r-url { font-size: 12px; color: #9aa0a6; }
.result .r-title {
  color: #8ab4f8;
  font-size: 20px;
  text-decoration: none;
  display: block;
  margin: 4px 0 4px 0;
  cursor: pointer;
}
.result .r-title:hover { text-decoration: underline; }
.result .r-snippet { color: #bdc1c6; font-size: 14px; line-height: 1.5; }
.result .r-snippet b { color: #e8eaed; font-weight: 600; }
.result .r-filetype-tag {
  display:inline-block; font-size:11px; background:#3c4043; color:#bdc1c6;
  padding:1px 6px; border-radius:3px; margin-left:6px; vertical-align: middle;
}

/* --- Site pages (about/blog/support/etc. content injected server-side) --- */
#content:not(.search-mode) { max-width: 700px; margin: 0 auto; padding: 40px 20px; }
.page-view h1 { font-size: 26px; color: #e8eaed; }
.page-view { line-height: 1.6; color: #bdc1c6; }
.page-view ul { color: #bdc1c6; }

/* --- Portal --- */
.portal-box {
  max-width: 360px;
  margin: 10vh auto 0 auto;
  border: 1px solid #3c4043;
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  background: #17181a;
}
.portal-box h2 { margin-top: 0; font-size: 20px; color: #e8eaed; }
.portal-box p { color: #9aa0a6; }
.portal-box input {
  width: 100%;
  padding: 10px 12px;
  margin: 8px 0;
  border-radius: 4px;
  border: 1px solid #5f6368;
  background: #303134;
  color: #e8eaed;
  font-size: 14px;
}
.portal-box button {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  background: #8ab4f8;
  color: #202124;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}
.portal-msg { margin-top: 14px; font-size: 13px; }
.portal-msg.error { color: #f28b82; }
.portal-msg.success { color: #81c995; }
.flag-box {
  margin-top: 16px;
  padding: 12px;
  background: #1a2e21;
  border: 1px solid #81c995;
  border-radius: 6px;
  font-family: monospace;
  font-size: 14px;
  color: #81c995;
  word-break: break-all;
}
.not-found { text-align: center; color: #9aa0a6; margin-top: 15vh; }
