/* Базовые переменные под стиль Genflow (светлая тема) */
:root {
  --color-bg: hsl(210, 20%, 97%);
  --color-panel: hsl(0, 0%, 100%);
  --color-text: hsl(220, 6%, 25%);
  --color-text-muted: hsl(220, 9%, 46%);
  --color-border: hsl(216, 12%, 84%);
  --color-accent: hsl(221, 39%, 11%);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 1px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* Сбросы и типографика */
* { box-sizing: border-box; }
html, body { height: 100%; overflow-x: hidden; }
html {
  background: var(--color-bg);
}
body {
  margin: 0;
  font-family: "Inter Tight", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--color-text);
  background: var(--color-bg);
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Фиксированный фон, растянутый на весь экран */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  /* Линейный градиент 45°: 0% #060D14 → 40% #14202C → 100% #060D14 */
  background: linear-gradient(45deg, #060D14 0%, #14202C 40%, #060D14 100%);
  z-index: 0;
  pointer-events: none;
  transform: translateZ(0);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  white-space: nowrap;
  clip-path: inset(50%);
  clip: rect(0 0 0 0);
  overflow: hidden;
}

/* Центровка блока */
.page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.hero {
  width: 100%;
  max-width: 760px;
}

.options { margin-top: 12px; display: flex; align-items: center; gap: 12px; width: 100%; }
.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  background: rgba(255,255,255,0.5);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 8px 12px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: saturate(180%) blur(6px);
}
.checkbox:hover { box-shadow: var(--shadow-md); }
.checkbox input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid var(--color-border);
  border-radius: 5px;
  background: var(--color-panel);
  display: inline-grid;
  place-content: center;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.checkbox input::after {
  content: "";
  width: 10px;
  height: 10px;
  transform: scale(0);
  transition: transform .12s ease;
  background: #fff;
  clip-path: polygon(14% 52%, 0 66%, 44% 100%, 100% 28%, 85% 14%, 44% 62%);
}
.checkbox input:checked {
  background: var(--color-text);
  border-color: var(--color-text);
}
.checkbox input:checked::after { transform: scale(1); }
.checkbox input:focus-visible { outline: 2px solid rgba(0,0,0,.6); outline-offset: 2px; }
.checkbox span { font-size: 14px; user-select: none; }

/* Поисковая строка */
.search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: saturate(180%) blur(8px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow-sm);
}

.search__input {
  width: 100%;
  appearance: none;
  outline: none;
  border: 0;
  background: transparent;
  font-size: 18px;
  line-height: 24px;
  padding: 12px 14px;
  color: var(--color-text);
}
.search__input::placeholder { color: var(--color-text-muted); }

.search__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-panel);
  color: var(--color-text);
  font-weight: 600;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
  box-shadow: var(--shadow-sm);
}
.search__button:hover { box-shadow: var(--shadow-md); }
.search__button:active { transform: translateY(1px); }
.search__button:focus-visible { outline: 2px solid rgba(0,0,0,.6); outline-offset: 2px; }
.search__icon { display: block; }

/* Кнопки общего вида */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-panel);
  color: var(--color-text);
  font-weight: 600;
  cursor: pointer;
}
.button.small { padding: 6px 10px; font-weight: 500; }

.link-button {
  background: transparent;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  text-decoration: underline;
  padding: 4px 6px;
}
.options .link-button { margin-left: auto; }
.link-button:focus-visible { outline: 2px solid rgba(0,0,0,.6); outline-offset: 2px; }

/* Поле ввода в модалке исключений */
.modal__body #exclude-input {
  width: 100%;
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  color: var(--color-text);
}
.button:hover { box-shadow: var(--shadow-sm); }
.button:focus-visible { outline: 2px solid rgba(0,0,0,.6); outline-offset: 2px; }

/* Модалка */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1000;
}
.modal[aria-hidden="false"] { display: block; }

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  opacity: 0;
  transition: opacity .2s ease;
}
.modal[aria-hidden="false"] .modal__overlay { opacity: 1; }

.modal__dialog {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -45%);
  width: min(560px, calc(100% - 40px));
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
}
.modal[aria-hidden="false"] .modal__dialog { opacity: 1; transform: translate(-50%, -50%); }

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 0 16px;
}
.modal__title { margin: 0; font-size: 20px; }

.modal__close {
  appearance: none;
  border: none;
  background: transparent;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--color-text);
}
.modal__close:hover { background: rgba(0,0,0,0.04); }

.modal__body { padding: 4px 16px 16px 16px; color: var(--color-text-muted); }
.modal__footer { padding: 0 16px 16px 16px; display: flex; justify-content: flex-end; gap: 10px; }

.answer {
  margin: 0;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  color: var(--color-text);
}

.loader {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0,0,0,0.15);
  border-top-color: rgba(0,0,0,0.6);
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: -2px;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Рендер списка офферов */
.offers-list {
  list-style: none;
  margin: 0;
  padding: 8px 0 0 0;
  display: grid;
  gap: 10px;
}
.offer-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-panel);
  box-shadow: var(--shadow-sm);
}
.offer-shop { font-weight: 600; color: var(--color-text); }
.offer-price { color: var(--color-text); }
.offer-link { color: var(--color-text); text-decoration: underline; white-space: nowrap; }
.note { margin-bottom: 8px; color: var(--color-text-muted); }
.meta { margin-top: 10px; color: var(--color-text-muted); font-size: 12px; }

.actions-row {
  margin-top: 12px;
  display: flex;
}

/* Floating action button (logs) */
.fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: rgba(255,255,255,0.6);
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  opacity: .5;
  transition: opacity .2s ease, box-shadow .2s ease, transform .08s ease;
  z-index: 1101; /* выше модалки */
}
.fab:hover { opacity: 1; box-shadow: var(--shadow-md); }
.fab:active { transform: translateY(1px); }

@media (max-width: 600px) {
  .search { grid-template-columns: 1fr auto; }
  .search__input { font-size: 16px; }
}


