.g-header-bar {
  position: relative;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Extra right padding leaves clean space for your fixed .theme-toggle button */
  padding: 12px 145px 12px 20px;
  background-color: var(--page-bg, #ffffff);
  color: var(--text-color, #1f2937);
  font-family: Arial, sans-serif;
  box-sizing: border-box;
  width: 100%;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.g-search-left {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 680px;
  gap: 20px;
}

.g-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.g-logo-link svg {
  display: block;
  pointer-events: none;
}

.g-search-form {
  display: flex;
  align-items: center;
  flex: 1;
  height: 44px;
  margin: 0;
  padding: 0 16px;
  border-radius: 24px;
  background: var(--btn-bg, #ffffff);
  border: 1px solid var(--btn-border, #d1d5db);
  box-shadow: 0 1px 6px rgba(32, 33, 36, 0.12);
  transition: box-shadow 0.2s, background-color 0.25s ease, border-color 0.25s ease;
  box-sizing: border-box;
}

.g-search-form:hover,
.g-search-form:focus-within {
  box-shadow: 0 1px 8px rgba(32, 33, 36, 0.22);
}

.g-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  color: var(--text-color, #1f2937);
  background: transparent;
  min-width: 0;
}

.g-clear-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: none;
  align-items: center;
  color: #70757a;
}

.g-clear-btn:hover {
  color: var(--text-color, #1f2937);
}

.g-divider {
  display: none;
  width: 1px;
  height: 24px;
  background-color: var(--btn-border, #d1d5db);
  margin: 0 8px;
}

.g-search-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  color: #4285f4;
}

.g-nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: 20px;
  flex-shrink: 0;
}

.g-nav-links a {
  color: var(--text-color, #1f2937);
  text-decoration: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  padding: 4px 6px;
}

.g-nav-links a:hover {
  text-decoration: underline;
}

.g-keep-icon {
  fill: #fbbc05;
  width: 24px;
  height: 24px;
  display: block;
  transition: transform 0.15s ease;
  pointer-events: none;
}

.g-nav-links a:hover .g-keep-icon {
  transform: scale(1.15);
}

/* --- Dark Mode Adjustments Matching [data-theme="dark"] --- */
[data-theme="dark"] .g-logo-link svg path {
  fill: #ffffff;
}

[data-theme="dark"] .g-search-form {
  box-shadow: none;
}

[data-theme="dark"] .g-search-form:hover,
[data-theme="dark"] .g-search-form:focus-within {
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .g-search-input::placeholder {
  color: #9ca3af;
}

[data-theme="dark"] .g-clear-btn {
  color: #9ca3af;
}

[data-theme="dark"] .g-search-btn {
  color: #8ab4f8;
}
