:root {
  --bg: #fbf8f4;
  --surface: #ffffff;
  --soft: #f4efe8;
  --text: #1e2a3b;
  --muted: #6b7280;
  --border: #ece5dc;
  --brand: #2f6fed;
  --brand-soft: #e8f0ff;
  --accent: #ff7a59;
  --accent-dark: #f0623f;
  --success: #15a05a;
  --sky-1: #dcebff;
  --sky-2: #fff1e6;
  --shadow: 0 10px 30px rgba(30, 42, 59, 0.08);
  --radius: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11151c;
    --surface: #1a2029;
    --soft: #232a35;
    --text: #eef1f6;
    --muted: #9aa4b2;
    --border: #2c3440;
    --brand: #6b9bff;
    --brand-soft: #1f2d4a;
    --accent: #ff8a6b;
    --accent-dark: #ff7552;
    --success: #43cf86;
    --sky-1: #16233a;
    --sky-2: #2a1f22;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

img.emoji {
  display: inline-block;
  width: 1.2em;
  height: 1.2em;
  margin: 0 0.06em;
  vertical-align: -0.22em;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Üst panel ---------- */
.topbar {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 21px;
  font-weight: 800;
}
.logo b { color: var(--brand); font-weight: 800; }
.nav { display: flex; align-items: center; gap: 14px; }
.nav-link {
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  color: var(--muted);
}
.nav-link:hover { color: var(--text); }
.langs {
  display: flex;
  gap: 2px;
  background: var(--soft);
  padding: 3px;
  border-radius: 999px;
}
.langs a {
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--muted);
}
.langs a.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(ellipse at 15% 20%, rgba(255, 255, 255, 0.7), transparent 45%),
    radial-gradient(ellipse at 85% 10%, rgba(255, 255, 255, 0.5), transparent 40%),
    linear-gradient(170deg, var(--sky-1), var(--sky-2));
  padding: 48px 0 56px;
}
.hero-small { padding: 24px 0 28px; }
.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 720px;
}
.hero-sub {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 18px;
  max-width: 600px;
}

/* ---------- Axtarış kartı ---------- */
.search-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
}
.trip-toggle { display: flex; gap: 6px; margin: 0 0 12px 4px; }
.trip-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.trip-toggle span {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.trip-toggle input:checked + span { background: var(--brand-soft); color: var(--brand); }
.trip-toggle input:focus-visible + span { outline: 2px solid var(--brand); }

.search-fields {
  display: grid;
  grid-template-columns: 1.3fr 1.3fr 1fr 1fr auto;
  gap: 8px;
}
.search-fields.one-way { grid-template-columns: 1.3fr 1.3fr 1fr auto; }
.field {
  display: flex;
  flex-direction: column;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--soft);
  min-width: 0;
  border: 2px solid transparent;
  transition: border-color 0.15s;
}
.field:focus-within { border-color: var(--brand); background: var(--surface); }
.field-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.field input,
.field select {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  padding: 2px 0;
  outline: none;
  text-overflow: ellipsis;
}
.field select { cursor: pointer; }
.field select option { color: #1e2a3b; }
[data-return-field][hidden] { display: none; }
.btn-search {
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  padding: 0 30px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.btn-search:hover { background: var(--accent-dark); }
.btn-search:active { transform: scale(0.98); }

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
}

/* Autocomplete */
.ac { position: relative; display: block; }
.suggestions {
  position: absolute;
  top: calc(100% + 14px);
  left: -16px;
  right: -16px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  z-index: 20;
}
.suggestions li {
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
}
.suggestions li:hover,
.suggestions li.active { background: var(--soft); }

/* ---------- Bölmələr və uçuş kartları ---------- */
.section { padding: 40px 16px 64px; }
.section h2 { margin: 0 0 20px; font-size: 24px; font-weight: 800; }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.section-head h2 { margin: 0; }
.tag {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 13px;
  vertical-align: middle;
}
.btn-locate {
  border: 0;
  background: var(--brand-soft);
  color: var(--brand);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
}
.btn-locate:hover { filter: brightness(0.97); }
.btn-locate:disabled { opacity: 0.6; cursor: wait; }

.flights { display: grid; gap: 12px; }
.flight {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.flight:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.airline-logo {
  flex-shrink: 0;
  border-radius: 12px;
  background: #fff;
  object-fit: contain;
  border: 1px solid var(--border);
}
.flight-info { flex: 1; min-width: 0; }
.flight-route { font-size: 18px; font-weight: 800; }
.arrow { color: var(--brand); }
.flight-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 4px;
  font-size: 14px;
  color: var(--muted);
}
.flight-meta .direct { color: var(--success); font-weight: 700; }
.flight-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}
.flight-price strong { font-size: 24px; font-weight: 800; line-height: 1.1; }
.flight-price small { font-size: 12px; color: var(--muted); }
.buy {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  background: var(--accent);
  padding: 5px 14px;
  border-radius: 999px;
}
.flight:hover .buy { background: var(--accent-dark); }

.notice {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
}
.disclaimer { margin-top: 16px; font-size: 13px; color: var(--muted); }

/* ---------- Haqqımızda ---------- */
.about-hero h1 { margin-top: 12px; }
.about-hero .hero-sub { margin-bottom: 8px; }
.about { display: grid; gap: 16px; max-width: 820px; }
.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
}
.about-card h2 { font-size: 21px; margin: 0 0 10px; }
.about-card p { margin: 0; }
.about-card ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.about-card ol.steps { list-style: none; padding: 0; counter-reset: step; }
.about-card ol.steps li {
  counter-increment: step;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.about-card ol.steps li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 800;
  display: grid;
  place-items: center;
}
.about-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.btn-primary,
.btn-secondary {
  text-decoration: none;
  font-weight: 800;
  padding: 10px 18px;
  border-radius: 999px;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-secondary { background: var(--brand-soft); color: var(--brand); }

/* ---------- Giriş, hesab, bağlı qiymətlər ---------- */
.nav-btn {
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
}
.auth-hero { padding: 48px 0 64px; }
.auth-card {
  max-width: 440px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 28px;
}
.auth-card h1 { font-size: 26px; margin: 0 0 8px; }
.auth-card form { display: grid; gap: 12px; margin-top: 20px; }
.auth-sub { color: var(--muted); margin: 0; }
.auth-sub.small { font-size: 13px; margin-top: 10px; }
.btn-block { width: 100%; padding: 14px; }
.code-input { font-size: 26px !important; letter-spacing: 0.3em; }
.form-error { margin: 0; color: #d93025; font-weight: 700; font-size: 14px; }
.auth-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}
.auth-foot { margin: 20px 0 0; font-size: 13px; }
.auth-foot a { color: var(--muted); }
.account-email { font-size: 18px; font-weight: 700; margin: 4px 0 20px; }
.tg-box {
  background: var(--soft);
  border-radius: 14px;
  padding: 18px;
}
.tg-box p { margin: 0 0 12px; }
.tg-box .btn-primary,
.tg-box .btn-secondary { display: inline-block; }

.locked { position: relative; }
.locked-preview { display: grid; gap: 12px; filter: blur(3px); opacity: 0.6; }
.flight.ghost { height: 84px; }
.flight.ghost span {
  display: block;
  height: 14px;
  border-radius: 8px;
  background: var(--soft);
  flex: 1;
}
.locked-card {
  position: absolute;
  inset: 0;
  margin: auto;
  height: fit-content;
  max-width: 420px;
  text-align: center;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.locked-card h3 { margin: 0 0 6px; font-size: 20px; }
.locked-card p { margin: 0 0 16px; color: var(--muted); }
.locked-card .btn-primary { display: inline-block; }

.compare {
  margin-top: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.compare h3 { margin: 0 0 12px; font-size: 18px; }
.compare-links { display: flex; flex-wrap: wrap; gap: 8px; }
.compare-links a {
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 40px;
  font-size: 14px;
  color: var(--muted);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 12px; }
.footer-links a { font-weight: 700; color: var(--brand); text-decoration: none; }
.legal { max-width: 760px; margin: 0 0 8px; }
.copy { margin: 0; }

/* ---------- Planşet və telefon ---------- */
@media (max-width: 900px) {
  .search-fields,
  .search-fields.one-way { grid-template-columns: 1fr 1fr; }
  .btn-search { grid-column: 1 / -1; padding: 14px; }
}

@media (max-width: 560px) {
  .hide-mobile { display: none; }
  .hero { padding: 28px 0 36px; }
  .auth-card { padding: 24px 18px; }
  .hero-sub { font-size: 16px; }
  .nav { gap: 8px; }
  .search-card { padding: 10px; }
  .search-fields,
  .search-fields.one-way { grid-template-columns: 1fr; }
  .flight { flex-wrap: wrap; padding: 14px 16px; gap: 12px; }
  .flight-info { flex-basis: calc(100% - 60px); }
  .flight-price {
    width: 100%;
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }
  .flight-price .buy { margin: 0 0 0 auto; }
  .about-card { padding: 20px; }
}
