:root {
  --ok-green: #0b6e4f;
  --ok-green-dark: #084d38;
  --ok-gold: #d4a537;
  --ok-red: #c0392b;
  --ok-bg: #0f2419;
  --ok-card: #ffffff;
  --ok-ink: #1c2b24;
  --ok-muted: #6b7d74;
  --ok-border: #e3e8e4;
  --ok-radius: 14px;
  font-size: 16px;
}

* { box-sizing: border-box; }

html {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

body {
  margin: 0;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  /* GERİ ALINDI (kullanıcı bildirimi: "mobilde sayfayı aşağı kaydıramıyorum" — admin panelinde ve
     lobide, muhtemelen tüm sayfalarda): burada daha önce mobil "kazara pull-to-refresh" jestini
     engellemek için overscroll-behavior-y:contain denenmişti, önce html+body'de birlikte, sonra
     sadece body'de — ama ikisi de bazı mobil tarayıcılarda normal aşağı kaydırmayı TAMAMEN
     kilitleyebiliyor (bu özelliğin bilinen bir motor davranışı/hatası). Asıl "animasyon her 2-3
     saniyede tetikleniyor" şikayetinin GERÇEK kaynağı zaten ayrıca (lobby.js'teki masa listesi
     otomatik yenilemesinin artık sadece manuel "Yenile" tıklamasında animasyon oynatması ile)
     düzeltildiği için, bu overscroll-behavior denemesine artık ihtiyaç yok — kaydırmayı bozma
     riski taşıyan bu kural tamamen kaldırıldı. */
  box-sizing: border-box;
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  background: #0f2419; /* Gradyanı desteklemeyen tarayıcılar için düz koyu yeşil yedek renk */
  background: radial-gradient(circle at top, #123c2b 0%, #081a12 65%, #04100a 100%);
  color: var(--ok-ink);
  padding: 40px 20px 80px;
}

/* Mobilde uzun basınca başlık/buton metinlerinin yanlışlıkla seçilip mor vurgulanmasını önler
   (ekranın gereksiz yere "seçili" görünmesine sebep olan yaygın bir mobil UX sorunu) */
h1, h2, h3, label, button, .btn, .form-section-title, .brand, .tr-badge, .tib-badge,
.wallet-badge, .pill-option, .seat-status, .tr-name {
  -webkit-user-select: none;
  user-select: none;
}

*, *::before, *::after { box-sizing: border-box; }

.ok-bg-pattern {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.06;
  background-image:
    repeating-linear-gradient(45deg, #ffffff 0 2px, transparent 2px 40px);
  pointer-events: none;
}

.wizard-shell {
  position: relative;
  z-index: 1;
  max-width: 840px;
  margin: 0 auto;
}

.wizard-header {
  text-align: center;
  margin-bottom: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: #f4f1e8;
}

.brand-tile {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  background: linear-gradient(160deg, #fdf6e3, #f0e2b8);
  border: 2px solid var(--ok-gold);
  color: var(--ok-red);
  font-weight: 800;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.35), inset 0 0 0 3px rgba(255,255,255,0.4);
}

.brand h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0.2px;
}

.brand p {
  margin: 4px 0 0;
  color: #b9ceb9;
  font-size: 14px;
}

/* Progress Track */
.progress-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0.5;
  transition: opacity 0.25s ease;
}

.progress-step.active,
.progress-step.completed {
  opacity: 1;
}

.ps-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 2px solid rgba(255,255,255,0.25);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.25s ease;
}

.progress-step.active .ps-num {
  background: var(--ok-gold);
  border-color: var(--ok-gold);
  color: #3a2a05;
}

.progress-step.completed .ps-num {
  background: var(--ok-green);
  border-color: var(--ok-green);
  color: #fff;
}

.ps-label {
  font-size: 11px;
  color: #d8e6d8;
  white-space: nowrap;
}

.progress-line {
  width: 32px;
  height: 2px;
  background: rgba(255,255,255,0.2);
  margin-top: -18px;
}

/* Card */
.wizard-card {
  background: linear-gradient(165deg, rgba(255,255,255,0.97), rgba(255,255,255,0.9));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: var(--ok-radius);
  box-shadow: 0 20px 50px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.6);
  padding: 36px 40px;
  min-height: 320px;
}

.step-panel { display: none; animation: fadeIn 0.3s ease; }
.step-panel.active { display: block; }

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

.step-panel h2 {
  margin: 0 0 6px;
  font-size: 22px;
  color: var(--ok-green-dark);
}

.step-desc {
  color: var(--ok-muted);
  font-size: 14.5px;
  margin: 0 0 24px;
  line-height: 1.55;
}

.form-section-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--ok-gold);
  margin: 28px 0 12px;
  border-bottom: 1px solid var(--ok-border);
  padding-bottom: 8px;
}
.form-section-title:first-of-type { margin-top: 0; }

/* Engellenmiş üye bildirimi (bkz. pages/lobby.php) */
.banned-notice { text-align: center; padding: 8px 4px 4px; }
.banned-notice-icon { font-size: 44px; line-height: 1; }
.banned-notice p { color: var(--ok-ink); font-size: 14.5px; line-height: 1.6; margin: 10px 0; }
.banned-notice-reason {
  background: rgba(192, 57, 43, 0.08);
  border: 1px solid rgba(192, 57, 43, 0.35);
  color: var(--ok-red);
  border-radius: 10px;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1.55;
  text-align: left;
  margin: 10px 0;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 13px; font-weight: 600; color: var(--ok-ink); }
.form-field input,
.form-field select {
  padding: 11px 13px;
  border: 1.5px solid var(--ok-border);
  border-radius: 9px;
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fbfcfb;
  font-family: inherit;
  color: inherit;
}
.form-field input:focus,
.form-field select:focus {
  border-color: var(--ok-green);
  box-shadow: 0 0 0 3px rgba(11,110,79,0.12);
  background: #fff;
}

.hint {
  font-size: 12.5px;
  color: var(--ok-muted);
  margin: 10px 0 0;
}

/* Requirement list */
.req-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.req-loading { color: var(--ok-muted); font-size: 14px; padding: 20px 0; }

.req-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f5f8f5;
  border: 1px solid var(--ok-border);
}
.req-item.fail { background: #fdf1ef; border-color: #f3c7bf; }

.req-icon {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; flex-shrink: 0;
  background: var(--ok-green); color: #fff;
}
.req-item.fail .req-icon { background: var(--ok-red); }

.req-text { display: flex; flex-direction: column; }
.req-text .rl { font-weight: 600; font-size: 14px; }
.req-text .rd { font-size: 12.5px; color: var(--ok-muted); }

/* Buttons */
.step-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--ok-border);
}
.step-actions-right { display: flex; gap: 10px; }

.btn {
  padding: 11px 22px;
  border-radius: 9px;
  border: none;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  background: #0b6e4f; /* CSS değişkenlerini/gradyanı desteklemeyen eski tarayıcılar için düz yedek renk */
  background: linear-gradient(160deg, var(--ok-green), var(--ok-green-dark));
  color: #fff;
  box-shadow: 0 6px 14px rgba(11,110,79,0.35);
}
.btn-outline {
  background: #fff;
  color: var(--ok-green-dark);
  border: 1.5px solid var(--ok-green);
}
.btn-ghost {
  background: transparent;
  color: var(--ok-muted);
}
.btn-ghost:hover { color: var(--ok-ink); }

/* Test result / summary */
.test-result { margin-top: 16px; font-size: 14px; }
.test-result.ok { color: var(--ok-green-dark); }
.test-result.err { color: var(--ok-red); }
.test-result .tr-box {
  padding: 12px 14px;
  border-radius: 9px;
  background: #f2f8f4;
  border: 1px solid #c8e3d1;
}
.test-result.err .tr-box {
  background: #fdf1ef;
  border-color: #f3c7bf;
}

.summary-box {
  background: #f5f8f5;
  border: 1px solid var(--ok-border);
  border-radius: 10px;
  padding: 18px 20px;
  font-size: 14px;
  line-height: 1.9;
}
.summary-box b { color: var(--ok-green-dark); }

.install-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 0;
  color: var(--ok-muted);
  font-size: 14px;
}
.spinner {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 3px solid #d8e6da;
  border-top-color: var(--ok-green);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Done screen */
.done-screen { text-align: center; padding: 20px 0; }
.done-icon {
  width: 72px; height: 72px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--ok-green), var(--ok-green-dark));
  color: #fff;
  font-size: 34px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(11,110,79,0.35);
}
.done-screen h2 { color: var(--ok-green-dark); }
.done-actions { margin-top: 22px; }

.already-installed { text-align: center; padding: 20px 0; }
.ai-icon { font-size: 40px; margin-bottom: 12px; }
.already-installed code {
  background: #f5f8f5;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 13px;
}

@media (max-width: 640px) {
  .wizard-card { padding: 24px 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .progress-line { width: 14px; }
  .ps-label { display: none; }
}
/* ADIM 98/N — admin panelinden yüklenen site logosu ("101" karosunun yerine) */
.brand-logo { width: 58px; height: 58px; object-fit: contain; border-radius: 10px; flex-shrink: 0; display: block; }
.brand[style*="column"] .brand-logo { margin: 0 auto 10px; }

/* ADIM 108/N — varsayılan logo: "yelpaze taşlar" (assets/img/logo-101.svg) ve başlıkta altın "101" */
.brand-logo.brand-logo-101 {
  width: auto;
  height: 66px;
  border-radius: 0;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.35));
  transition: transform 0.18s ease, filter 0.18s ease;
}
.brand[style*="column"] .brand-logo.brand-logo-101 { height: 78px; margin: 0 auto 8px; }
.brand-accent { color: var(--ok-gold, #e8c46a); }
@media (hover: hover) and (pointer: fine) {
  .lobby-topbar .brand-logo.brand-logo-101:hover {
    transform: translateY(-2px) scale(1.04);
    filter: drop-shadow(0 8px 14px rgba(0,0,0,0.4)) drop-shadow(0 0 10px rgba(212,165,55,0.45));
  }
}
@media (max-width: 720px) {
  .lobby-topbar .brand-logo.brand-logo-101 { width: auto; height: 42px; flex-shrink: 0; }
  /* Telefonda başlık yazısı cüzdanın altına girmesin: marka alanı daralabilir, yazı "…" ile kısalır */
  body .lobby-topbar .brand { flex: 1 1 auto; min-width: 0; overflow: hidden; }
  body .lobby-topbar .brand > div { min-width: 0; }
  body .lobby-topbar .brand h1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
/* Dar telefonlar: logonun içinde zaten "101" yazıyor; yer açmak için başlık yazısı gizlenir */
@media (max-width: 480px) {
  body .lobby-topbar .brand-logo.brand-logo-101 ~ div h1,
  body .lobby-topbar .brand-logo.brand-logo-101 + h1 { display: none; }
}
