/* Pale Blue × Material Design Theme */
:root {
  --primary-bg: #e0f2fe;
  /* Sky 100 - Pale Blue */
  --surface-bg: #ffffff;
  --accent-color: #0ea5e9;
  /* Sky 500 */
  --accent-hover: #0284c7;
  /* Sky 600 */
  --accent-light: #bae6fd;
  /* Sky 200 */
  --text-primary: #0c4a6e;
  /* Sky 900 */
  --text-secondary: #64748b;
  --border-radius: 24px;
  /* Material 3 uses larger radius */
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--primary-bg);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.container {
  width: 100%;
  max-width: 800px;
  padding: 60px 20px;
  box-sizing: border-box;
}

h1 {
  font-size: 2.5rem;
  font-weight: 500;
  /* Material uses medium weight */
  color: var(--text-primary);
  margin-bottom: 2rem;
  text-align: center;
}

/* Search Form - Material Card Style */
form {
  display: flex;
  gap: 12px;
  background: var(--surface-bg);
  padding: 8px 8px 8px 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  margin-bottom: 3rem;
  transition: box-shadow 0.2s;
}

form:focus-within {
  box-shadow: var(--shadow-lg);
}

input[type="text"] {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 0;
  font-size: 1.1rem;
  outline: none;
  color: var(--text-primary);
}

input[type="text"]::placeholder {
  color: var(--text-secondary);
}

button {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 20px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

button:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-sm);
}

/* Results */
.meta-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.mode-switch a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 16px;
  transition: background 0.2s;
}

.mode-switch a:hover {
  background: var(--accent-light);
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Result Card - Material Elevated Card */
.hit {
  background: var(--surface-bg);
  padding: 20px 24px;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.hit:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.hit-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.hit-favicon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

.hit-title {
  font-size: 1.1rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--accent-color);
}

.hit-title:hover {
  text-decoration: underline;
}

.url {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.snippet {
  line-height: 1.6;
  color: var(--text-primary);
}

mark {
  background: var(--accent-light);
  color: var(--accent-hover);
  padding: 1px 4px;
  border-radius: 4px;
}

/* Pagination - Material Chips */
.pagination {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.pagination a {
  text-decoration: none;
  color: var(--accent-color);
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 20px;
  background: var(--surface-bg);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.pagination a:hover {
  background: var(--accent-light);
  box-shadow: var(--shadow-md);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hit {
  animation: fadeIn 0.3s ease-out;
}
