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

:root {
  --bg-color: #202124;
  --text-color: #e8eaed;
  --text-secondary: #9aa0a6;
  --search-bg: #303134;
  --search-border: #5f6368;
  --search-border-hover: #5f6368;
  --btn-bg: #303134;
  --btn-bg-hover: #3c4043;
  --btn-border: #303134;
  --btn-border-hover: #5f6368;
  --link-color: #8ab4f8;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  /* Push the content down exactly like Google's homepage */
  padding-top: 15vh;
  box-sizing: border-box;
}

.container {
  width: 100%;
  max-width: 584px; /* Google's search bar width */
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  /* Removed the AI card rectangle styling entirely */
}

h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 80px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -2.5px;
  color: var(--text-color);
}

h2 {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-secondary);
  margin: 4px 0 56px 0;
  text-align: center;
}

.search-wrapper {
  display: flex;
  align-items: center;
  background-color: var(--search-bg);
  border: 1px solid var(--search-border);
  border-radius: 24px;
  padding: 0 14px;
  width: 100%;
  height: 46px;
  margin-bottom: 24px;
  transition: background-color 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.search-wrapper:hover,
.search-wrapper:focus-within {
  background-color: #303134;
  box-shadow: 0 1px 6px rgba(23, 23, 23, 0.28);
  border-color: #5f6368;
}

.search-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 12px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-icon svg {
  width: 20px;
  height: 20px;
}

#urlInput {
  background: transparent;
  border: none;
  outline: none;
  width: 100%;
  font-size: 16px;
  color: var(--text-color);
  font-family: 'Inter', sans-serif;
}

/* Match the grey placeholder text for dark mode */
#urlInput::placeholder {
  color: var(--text-secondary);
}

.button-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 32px;
}

button.action-btn {
  background-color: var(--btn-bg);
  border: 1px solid var(--btn-border);
  color: var(--text-color);
  font-family: inherit;
  font-size: 14px;
  padding: 0 16px;
  height: 36px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

button.action-btn:hover {
  background-color: var(--btn-bg-hover);
  border-color: var(--btn-border-hover);
}

.hidden {
  display: none !important;
}

#historyContainer {
  width: 100%;
  background: var(--search-bg);
  border-radius: 8px;
  padding: 16px;
  box-sizing: border-box;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--search-border);
  padding-bottom: 12px;
  margin-bottom: 12px;
  font-weight: 500;
  font-size: 14px;
}

.history-header button {
  background: none;
  border: none;
  color: var(--link-color);
  cursor: pointer;
  font-size: 14px;
  padding: 0;
}

.history-header button:hover {
  text-decoration: underline;
}

#historyList {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

#historyList li {
  padding: 8px 0;
  color: var(--text-secondary);
  font-size: 14px;
  word-break: break-all;
}

#resultsContainer {
  margin-top: 24px;
  width: 100%;
  text-align: left;
}

#resultsContainer pre {
  background: var(--search-bg);
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--search-border);
  overflow-x: auto;
  font-size: 13px;
  color: var(--text-color);
}

.error-message {
  color: #f28b82; /* Google dark mode red */
  background-color: rgba(242, 139, 130, 0.1);
  border: 1px solid rgba(242, 139, 130, 0.2);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
}
