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

:root {
  --bg: #060b18;
  --bg-soft: #0a1428;
  --card: rgba(20, 31, 58, 0.55);
  --card-solid: #101c38;
  --text: #eaf1ff;
  --muted: #93a6cc;
  --accent: #3b82f6;
  --accent-dark: #1547b8;
  --accent-light: #67b4ff;
  --accent-glow: rgba(59, 130, 246, 0.45);
  --line: rgba(120, 165, 255, 0.18);
  --line-soft: rgba(120, 165, 255, 0.10);
  --cheap: rgba(59, 130, 246, 0.20);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 900px 600px at 12% -8%, rgba(59, 130, 246, 0.28), transparent 55%),
    radial-gradient(ellipse 800px 700px at 105% 10%, rgba(29, 78, 216, 0.30), transparent 55%),
    radial-gradient(ellipse 700px 600px at 50% 115%, rgba(103, 180, 255, 0.16), transparent 55%),
    linear-gradient(180deg, #060b18 0%, #0a1530 45%, #060b18 100%);
  pointer-events: none;
  z-index: -1;
}

.brandbar {
  max-width: 1100px;
  margin: 20px auto 0;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brandbar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.12);
  box-shadow: 0 0 0 1px var(--line), 0 8px 20px rgba(6, 20, 50, 0.4);
}

.brandbar-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brandbar-name {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 10%, var(--accent-light) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brandbar-name span {
  background: linear-gradient(135deg, var(--accent-light) 10%, var(--accent) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero {
  position: relative;
  max-width: 1100px;
  margin: 14px auto 18px;
  padding: 32px;
  background: linear-gradient(160deg, rgba(20, 32, 61, 0.85), rgba(10, 18, 38, 0.85));
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(2, 8, 24, 0.55), inset 0 1px 0 rgba(255,255,255,0.04);
  backdrop-filter: blur(16px);
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 24px;
  align-items: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.35), transparent 70%);
  pointer-events: none;
}

.hero > * {
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid var(--line);
  color: var(--accent-light);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(28px, 3.6vw, 42px);
  margin-bottom: 10px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 20%, #a9c8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  font-size: 16px;
  line-height: 1.6;
  max-width: 680px;
  color: var(--muted);
}

.hero-panel {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark) 120%);
  color: white;
  border-radius: 18px;
  padding: 20px;
  display: grid;
  gap: 10px;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.18), 0 18px 40px rgba(21, 71, 184, 0.45);
}

.hero-panel strong {
  font-size: 20px;
}

.toolbar {
  max-width: 1100px;
  margin: 0 auto 20px;
  padding: 16px;
  display: grid;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(2, 8, 24, 0.45);
  backdrop-filter: blur(14px);
}

.control {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.control input,
.control select {
  width: 100%;
  min-width: 0;
}

.control label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.autocomplete-list {
  position: fixed;
  z-index: 999999;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #0d1830;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 20px 45px rgba(2, 8, 24, 0.6);
  max-height: 340px;
  overflow-y: auto;
}

.autocomplete-item {
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--text);
  cursor: pointer;
}

.autocomplete-item.active,
.autocomplete-item:hover {
  background: var(--cheap);
  color: var(--accent-light);
}

.autocomplete-item-main {
  font-weight: 700;
}

.autocomplete-item-sub {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}

.control-fuel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.control-fuel-header label {
  margin: 0;
}

.fuel-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(6, 14, 32, 0.5);
}

.fuel-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(20, 32, 61, 0.7);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.fuel-option input {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  margin: 0;
}

.mode-tabs {
  display: flex;
  gap: 8px;
}

.mode-tab {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(20, 32, 61, 0.6);
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  min-height: 40px;
}

.mode-tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.35);
}

.mode-panel {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.7fr auto auto;
  gap: 12px;
  align-items: end;
}

.mode-panel[hidden] {
  display: none;
}

#routeControls {
  grid-template-columns: 1fr auto 1fr 0.7fr 0.7fr auto;
}

.swap-btn {
  align-self: end;
  padding: 0 14px;
  font-size: 18px;
  line-height: 1;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
  align-items: end;
}

input,
select,
button {
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 0 12px;
  font: inherit;
  background: rgba(10, 18, 38, 0.6);
  color: var(--text);
}

input::placeholder {
  color: #5c6f96;
}

select {
  appearance: none;
  -webkit-appearance: none;
  color-scheme: dark;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2367B4FF' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 34px;
  cursor: pointer;
}

select:focus {
  outline: none;
  border-color: var(--accent-light);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

select option {
  background: #101c38;
  color: var(--text);
}

#location {
  width: 100%;
  max-width: 360px;
  min-height: 48px;
  border-radius: 999px;
  padding: 0 18px;
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 4px rgba(2, 8, 24, 0.4);
  background: rgba(10, 18, 38, 0.7);
  transition: box-shadow 180ms ease, border-color 180ms ease;
}

#location:focus {
  outline: none;
  border-color: var(--accent-light);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

button {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.28);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

button:hover {
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  box-shadow: 0 14px 32px rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}

button:disabled {
  background: #223252;
  color: #7688ac;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.ghost {
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-light);
  border: 1px solid var(--line);
  box-shadow: none;
}

.ghost:hover {
  background: rgba(59, 130, 246, 0.22);
  box-shadow: none;
  transform: none;
}

.ghost.small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.ghost.small.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  border-color: var(--accent);
}

main {
  max-width: 1100px;
  margin: 0 auto 40px;
  padding: 0 16px;
}

.status {
  margin: 0 0 16px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(2, 8, 24, 0.4);
  color: var(--muted);
  backdrop-filter: blur(10px);
}

#routeMap {
  height: 420px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 16px;
  background: #0a1428;
}

.sort-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  display: grid;
  gap: 10px;
  box-shadow: 0 12px 30px rgba(2, 8, 24, 0.4);
  backdrop-filter: blur(12px);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(103, 180, 255, 0.4);
  box-shadow: 0 18px 40px rgba(59, 130, 246, 0.18);
}

.card.best {
  background: linear-gradient(160deg, rgba(59, 130, 246, 0.20), rgba(20, 32, 61, 0.75));
  border-color: rgba(103, 180, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(103, 180, 255, 0.2), 0 18px 40px rgba(59, 130, 246, 0.25);
}

.topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.brand {
  font-weight: 800;
  font-size: 18px;
  line-height: 1.2;
}

.price {
  font-size: 26px;
  font-weight: 900;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--accent-light), #b9d8ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.pill {
  padding: 4px 8px;
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
}

.fuel-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fuel-chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid var(--line-soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.fuel-chip.disabled {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
  color: #5c6f96;
}

.address {
  color: #b7c6e6;
  line-height: 1.35;
}

.maplink {
  color: var(--accent-light);
  font-weight: 700;
  text-decoration: none;
}

.leaflet-popup-content {
  font-family: inherit;
  line-height: 1.4;
}

.site-footer {
  max-width: 1100px;
  margin: 24px auto 40px;
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.instagram-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 14px 32px rgba(59, 130, 246, 0.35);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.instagram-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(59, 130, 246, 0.5);
}

.instagram-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .mode-panel,
  #routeControls {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .brandbar,
  .hero,
  .toolbar {
    margin-left: 16px;
    margin-right: 16px;
  }

  .brandbar {
    padding: 0;
  }

  .brandbar-name {
    font-size: 26px;
  }

  .mode-panel,
  #routeControls {
    grid-template-columns: 1fr;
  }

  .swap-btn {
    justify-self: center;
    width: 48px;
    padding: 0;
  }

  .toolbar-actions {
    flex-direction: column;
  }

  .toolbar-actions button {
    width: 100%;
  }

  #routeMap {
    height: 320px;
  }
}

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background: #0a1428;
  border-top: 1px solid var(--line);
  box-shadow: 0 -12px 30px rgba(2, 8, 24, 0.5);
  padding: 16px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner p {
  margin: 0;
  font-size: 14px;
  color: var(--text);
  max-width: 560px;
}

.cookie-banner-actions {
  display: flex;
  gap: 10px;
}

.cookie-banner button {
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.cookie-accept {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
}

.cookie-reject {
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border: 1px solid var(--line);
}

.city-links {
  max-width: 1100px;
  margin: 0 auto 40px;
  padding: 20px 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(2, 8, 24, 0.4);
  backdrop-filter: blur(12px);
}

.city-links h2 {
  margin: 0 0 12px;
  font-size: 20px;
  color: var(--text);
}

.city-links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.city-links-list a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid var(--line-soft);
  color: var(--accent-light);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease;
}

.city-links-list a:hover {
  background: var(--cheap);
  border-color: rgba(103, 180, 255, 0.4);
}

.city-info {
  max-width: 1100px;
  margin: 0 auto 40px;
  padding: 20px 28px;
}

.city-info h2 {
  font-size: 22px;
  margin: 28px 0 12px;
  color: var(--text);
}

.city-info p {
  color: var(--muted);
  line-height: 1.6;
}

.city-faq dt {
  font-weight: 800;
  color: var(--text);
  margin-top: 14px;
}

.city-faq dd {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}
