:root {
  --bg: #0f172a;
  --surface: rgba(255, 255, 255, 0.06);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #f0821e;
  --accent-dark: #fdba74;
  --accent-2: #0050f0;
  --radius: 18px;
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 10px 40px rgba(240, 130, 30, 0.3);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font);
  background: radial-gradient(ellipse at top, #1e293b 0%, #0f172a 60%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body {
  position: relative;
  overflow-x: hidden;
}

/* fixed, blurred gradient blobs behind every screen — pure CSS, no images */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-glow::before,
.bg-glow::after {
  content: "";
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
}

.bg-glow::before {
  top: -20vmax;
  left: -15vmax;
  background: radial-gradient(circle, var(--accent), transparent 70%);
}

.bg-glow::after {
  bottom: -25vmax;
  right: -20vmax;
  background: radial-gradient(circle, var(--accent-2), transparent 70%);
}

.screen {
  display: none;
  min-height: 100vh;
  padding: 28px 20px 40px;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.screen.active {
  display: flex;
  animation: fadeInUp 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- search screen --- */

.lang-switcher-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

#lang-switcher {
  background: var(--surface);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 6px 10px;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
}

#lang-switcher option {
  background: #1e293b;
  color: var(--text);
}

.back-arrow {
  display: inline-block;
}

[dir="rtl"] .back-arrow {
  transform: scaleX(-1);
}

.brand {
  text-align: center;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-mark {
  width: min(360px, 85vw);
  margin-bottom: 14px;
  position: relative;
  /* the logo's "Show" text is near-black and invisible on our dark background —
     a light card behind it restores the contrast it was designed for. */
  background: #fff;
  border-radius: 20px;
  padding: 18px 22px;
  box-shadow: var(--shadow-glow), 0 12px 30px rgba(0, 0, 0, 0.35);
}

.logo-mark img {
  width: 100%;
  height: auto;
  display: block;
}

/* compact variant used on every screen besides the main search/home screen */
.logo-mark--small {
  width: min(170px, 50vw);
  margin: 0 auto 18px;
  padding: 10px 14px;
  border-radius: 14px;
}

.hero-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.25;
}

.tagline {
  color: var(--muted);
  margin: 8px 0 0;
  font-size: 1rem;
  font-weight: 500;
}

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

.install-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-soft);
  font-size: 0.85rem;
  color: var(--text);
}

.install-banner-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-dark);
}

.install-banner-icon svg {
  width: 100%;
  height: 100%;
}

.install-banner-text {
  flex: 1;
  font-weight: 600;
  line-height: 1.3;
}

.install-banner-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  border: none;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
}

.install-banner-dismiss {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
}

.search-box {
  position: relative;
}

#search-input {
  width: 100%;
  padding: 18px 20px;
  font-size: 1.1rem;
  font-family: var(--font);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  outline: none;
  background: var(--surface);
  color: var(--text);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

#search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(240, 130, 30, 0.15), var(--shadow-soft);
}

#search-input::placeholder,
.paste-box input::placeholder {
  color: rgba(248, 250, 252, 0.4);
}

.search-status {
  min-height: 20px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 8px;
  padding-left: 4px;
}

.search-status:not(:empty) {
  animation: pulseText 1.4s ease-in-out infinite;
}

@keyframes pulseText {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.results-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin: 24px 0;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.divider span {
  padding: 0 12px;
  font-weight: 500;
}

.paste-box input {
  width: 100%;
  padding: 18px 20px;
  font-size: 1rem;
  font-family: var(--font);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  outline: none;
  background: var(--surface);
  color: var(--text);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.paste-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(240, 130, 30, 0.15), var(--shadow-soft);
}

.secondary-btn {
  width: 100%;
  margin-top: 10px;
  background: var(--surface);
  color: var(--accent-dark);
  border: 1.5px solid var(--accent);
  padding: 15px;
  font-size: 1rem;
  font-family: var(--font);
  font-weight: 700;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.secondary-btn:hover {
  box-shadow: 0 6px 20px rgba(240, 130, 30, 0.18);
}

.secondary-btn:active {
  transform: scale(0.98);
  background: rgba(240, 130, 30, 0.15);
}

.result-item {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 16px 18px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.08);
  unicode-bidi: plaintext;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.result-item:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
}

.result-item:active {
  transform: translateY(0) scale(0.99);
}

.result-item .r-name {
  font-weight: 700;
  font-size: 1.02rem;
}

.result-item .r-address {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 3px;
}

/* --- shared buttons --- */

.primary-btn {
  margin-top: auto;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  border: none;
  padding: 19px;
  font-size: 1.15rem;
  font-family: var(--font);
  font-weight: 700;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.primary-btn:hover {
  box-shadow: 0 14px 44px rgba(240, 130, 30, 0.35);
}

.primary-btn:active {
  transform: scale(0.98);
}

.back-btn {
  align-self: flex-start;
  background: none;
  border: none;
  font-size: 1rem;
  font-family: var(--font);
  font-weight: 600;
  color: var(--muted);
  padding: 8px 0;
  cursor: pointer;
}

.back-btn.subtle {
  color: rgba(255, 255, 255, 0.5);
}

/* --- confirm screen --- */

.confirm-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 10px;
  unicode-bidi: plaintext;
}

.confirm-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  margin: 0;
}

[dir="rtl"] .confirm-label {
  text-transform: none;
  letter-spacing: 0;
  font-size: 1rem;
}

#confirm-name {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}

.confirm-address {
  color: var(--muted);
  font-size: 1rem;
  margin: 0;
  max-width: 320px;
}

/* --- driver screen --- */

.driver-mode {
  background: radial-gradient(ellipse at top, #1e293b 0%, #0f172a 60%);
  color: white;
  align-items: center;
  text-align: center;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
}

.qr-glow {
  position: absolute;
  top: 30%;
  left: 50%;
  width: 420px;
  height: 420px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(0, 80, 240, 0.35), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}

.driver-mode > *:not(.qr-glow) {
  position: relative;
  z-index: 1;
}

.driver-caption {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  margin: 10px 0;
}

/* letter-spacing breaks Arabic's connected letterforms, and uppercase doesn't
   apply — both just make RTL labels look small and cramped. */
[dir="rtl"] .driver-caption {
  text-transform: none;
  letter-spacing: 0;
  font-size: 1.05rem;
}

.driver-name {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 4px 0;
  line-height: 1.25;
  unicode-bidi: plaintext;
}

.driver-name-ar {
  font-size: 1.8rem;
  background: linear-gradient(135deg, #fdba74, #93c5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.qr-container {
  background: white;
  padding: 18px;
  border-radius: 22px;
  margin: 18px 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.qr-container canvas {
  display: block;
  border-radius: 8px;
}

.app-buttons {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 14px;
}

.app-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  color: white;
  text-decoration: none;
  padding: 12px 8px;
  border-radius: 14px;
  font-size: 0.85rem;
  font-family: var(--font);
  font-weight: 700;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.app-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.app-btn:active {
  transform: scale(0.97);
  background: rgba(255, 255, 255, 0.22);
}

.app-btn-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.app-btn-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.share-link-btn {
  margin-top: 14px;
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 13px;
  font-size: 0.9rem;
  font-family: var(--font);
  font-weight: 700;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.share-link-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.share-link-btn:active {
  transform: scale(0.98);
}

.powered-by {
  margin-top: 24px;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.05em;
}

.contact-link {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  color: rgba(255, 255, 255, 0.35);
  text-decoration: none;
}

.contact-link:hover {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: underline;
}

.copyright {
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 500;
  text-align: center;
  color: rgba(255, 255, 255, 0.25);
}

.legal-links {
  margin-top: 2px;
  text-align: center;
  font-size: 0.72rem;
}

.legal-links a {
  color: rgba(255, 255, 255, 0.3);
  text-decoration: none;
}

.legal-links a:hover {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: underline;
}

.legal-links span {
  color: rgba(255, 255, 255, 0.2);
  margin: 0 6px;
}

/* --- business / permanent-QR tool --- */

.pilot-banner {
  background: linear-gradient(135deg, rgba(240, 130, 30, 0.18), rgba(0, 80, 240, 0.18));
  border: 1px solid rgba(240, 130, 30, 0.35);
  border-radius: 14px;
  padding: 12px 16px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

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

.pilot-banner--muted {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-weight: 500;
}

.pilot-banner--muted a {
  color: var(--accent-dark);
  font-weight: 700;
}

.biz-label-box {
  width: 100%;
  margin-top: 18px;
  text-align: left;
}

[dir="rtl"] .biz-label-box {
  text-align: right;
}

.biz-label-caption {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
}

#biz-label-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 0.95rem;
  font-family: var(--font);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  outline: none;
  background: var(--surface);
  color: var(--text);
  backdrop-filter: blur(12px);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

#biz-label-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(240, 130, 30, 0.15);
}

.biz-footer-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.biz-footer-link:hover {
  color: var(--text);
}

.biz-nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}

.biz-nav-link:hover {
  color: var(--text);
  text-decoration: underline;
}

.paste-toggle-link {
  display: block;
  width: 100%;
  background: none;
  border: none;
  margin-top: 16px;
  padding: 4px;
  color: var(--accent-dark);
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.paste-toggle-link:hover {
  color: var(--accent);
}

.paste-toggle-link[hidden] {
  display: none;
}

.paste-box[hidden] {
  display: none;
}

.paste-box {
  margin-top: 14px;
}


