:root {
  --brand-blue: #1f77be;
  --brand-blue-text: #12629f;
  --brand-blue-dark: #15588f;
  --brand-gradient: radial-gradient(135% 80% at 50% -8%, #2f95d6 0%, #2280c9 32%, #1c72b8 58%, #15588f 100%);
  --radius: 16px;
  --splash-blue: #1f74c4;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  background: #0a0d12; color: #fff;
}

/* ============ TELEFON ÇERÇEVESİ ============ */
.device {
  position: relative;
  width: 100%; max-width: 430px;
  height: 100vh; height: 100dvh;
  overflow: hidden;
  background: var(--brand-blue-dark);
}
@media (min-width: 480px) {
  body { padding: 24px; }
  .device {
    height: min(920px, calc(100dvh - 48px));
    border-radius: 38px;
    box-shadow: 0 40px 90px -25px rgba(0,0,0,.75), 0 0 0 11px #0d1015, 0 0 0 12px rgba(255,255,255,.05);
  }
}
.app { position: absolute; inset: 0; }

/* ============ EKRANLAR ============ */
.screen {
  position: absolute; inset: 0;
  display: none; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 28px;
}
.screen.active { display: flex; animation: fade .35s ease; }
@keyframes fade { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }
@keyframes pop { 0%{opacity:0;transform:scale(.86)} 100%{opacity:1;transform:scale(1)} }

/* ============ SPLASH ============ */
#splash {
  padding: 0;
  background: var(--splash-blue) url('/assets/splash-bg.jpg') center / cover no-repeat;
  text-align: center;
}
.splash-inner { animation: pop .7s cubic-bezier(.16,1,.3,1); }
#splash .logo {
  width: 88px; height: 88px; margin: 0 auto; border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  font-size: 42px; font-weight: 800; color: #fff;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: 0 12px 40px rgba(0,20,45,.25);
}
.splash-logo-img { display: none; max-width: 220px; max-height: 120px; object-fit: contain; margin: 0 auto; }
#splash .brand { font-size: 30px; letter-spacing: 5px; font-weight: 700; margin-top: 20px; color: #fff; text-shadow: 0 2px 18px rgba(0,20,45,.35); }
#splash .splash-subtitle { color: rgba(255,255,255,.9); margin-top: 8px; font-size: 14px; }
.splash-spinner {
  position: absolute; bottom: 56px; left: 50%; transform: translateX(-50%);
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.3); border-top-color: #fff;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: translateX(-50%) rotate(360deg); } }

/* ============ MARKA / LOGO ============ */
.brand-logo { display: flex; align-items: center; justify-content: center; }
.brand-logo-img { display: none; max-width: 220px; max-height: 96px; object-fit: contain; }
.brand-logo-text { color: #fff; font-size: 30px; font-weight: 800; letter-spacing: 1px; text-shadow: 0 2px 16px rgba(0,20,45,.3); }
.brand-logo.mini .brand-logo-text { font-size: 22px; }
.brand-logo.mini .brand-logo-img { max-height: 60px; max-width: 160px; }
.header-logo .brand-logo-text { font-size: 20px; }
.header-logo .brand-logo-img { max-height: 42px; max-width: 180px; }

/* Form üst başlık (logo header) */
#form .top-header { flex-shrink: 0; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 48px 8px; }

/* ============ GİRİŞ ============ */
#entry {
  justify-content: flex-start; align-items: stretch; overflow-y: auto;
  padding: calc(env(safe-area-inset-top,0px) + 18px) 22px calc(env(safe-area-inset-bottom,0px) + 16px);
  background: var(--brand-gradient);
}
.entry-topbar { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.lang { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28); color: #fff; font-size: 13px; font-weight: 700; font-family: inherit; border-radius: 10px; padding: 7px 12px; cursor: pointer; }
.entry-center { flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; gap: 18px; padding: 18px 0; }
.welcome { color: #fff; font-size: 25px; font-weight: 700; text-align: center; }
.entry-actions { width: 100%; display: flex; flex-direction: column; gap: 13px; }

/* Duyuru */
.announcement { width: 100%; display: flex; align-items: center; gap: 13px; background: rgba(9,33,56,.38); border: 1px solid rgba(255,255,255,.14); border-radius: 16px; padding: 14px 16px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ann-icon { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(255,255,255,.14); }
.announcement p { color: rgba(255,255,255,.92); font-size: 13px; line-height: 1.5; }

/* ============ ALT BİLGİ (footer) ============ */
.entry-footer { flex-shrink: 0; padding-top: 16px; }
.form-foot { flex-shrink: 0; margin-top: 20px; padding-top: 6px; }
.site-footer, .entry-footer, .form-foot { text-align: center; }
.f-note { color: rgba(255,255,255,.72); font-size: 11.5px; line-height: 1.6; }
.f-links { margin-top: 7px; font-size: 12px; color: rgba(255,255,255,.82); }
.f-links a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.f-copy { margin-top: 6px; font-size: 11px; color: rgba(255,255,255,.55); }

/* ============ BUTONLAR ============ */
.btn {
  width: 100%; padding: 16px 20px; font-size: 16px; font-weight: 600;
  border: none; border-radius: 12px; cursor: pointer; font-family: inherit;
  transition: transform .08s, background .15s, opacity .15s;
}
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-white { background: #fff; color: var(--brand-blue-text); box-shadow: 0 12px 26px -14px rgba(0,0,0,.5); }
.btn-white:hover { background: #f2f6fb; }
.btn-outline-white { background: rgba(255,255,255,.08); color: #fff; border: 1.5px solid rgba(255,255,255,.6); }
.btn-outline-white:hover { background: rgba(255,255,255,.16); }
.btn-passive { background: transparent; color: rgba(255,255,255,.72); border: 1px solid rgba(255,255,255,.25); }
.btn-solid-blue { background: var(--brand-blue); color: #fff; box-shadow: 0 12px 26px -14px rgba(31,119,190,.8); }
.btn-solid-blue:hover:not(:disabled) { background: #1c6db0; }
.btn-ghost-blue { background: #eef3f8; color: var(--brand-blue-text); }
.btn-ghost-blue:hover { background: #e2eaf2; }

/* ============ FORM ============ */
#form {
  background: var(--brand-gradient);
  justify-content: flex-start; align-items: stretch; overflow-y: auto;
  padding: calc(env(safe-area-inset-top,0px) + 20px) 22px calc(env(safe-area-inset-bottom,0px) + 16px);
}
.back-btn {
  position: absolute; top: 20px; left: 18px; width: 42px; height: 42px; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.1); color: #fff; cursor: pointer;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.back-btn:active { transform: scale(.94); }
.form-wrap { width: 100%; flex: 1 0 auto; display: flex; flex-direction: column; justify-content: center; }
.form-head { text-align: center; margin-bottom: 18px; }
.form-head .brand-logo { margin-bottom: 12px; }
.form-title { color: #fff; font-size: 20px; font-weight: 700; }
.form-desc { color: rgba(255,255,255,.85); font-size: 13px; margin-top: 6px; line-height: 1.5; }
.step-indicator { color: rgba(255,255,255,.85); font-size: 12px; font-weight: 600; margin-top: 10px; }

.white-card { width: 100%; background: #fff; color: #12233a; border-radius: 20px; padding: 24px 20px; box-shadow: 0 24px 55px -22px rgba(0,0,0,.5); }
.white-card h2 { color: #12233a; }

.step { display: none; }
.step.active { display: block; }
.field { margin-top: 16px; text-align: left; }
.field:first-child { margin-top: 0; }
.field label { display: block; font-size: 13px; font-weight: 600; color: #5a6b7d; margin-bottom: 7px; }
.field .req { color: #dc2626; }
.white-card .field input, .white-card .field textarea, .white-card .field select {
  width: 100%; padding: 14px 15px; font-size: 16px; color: #12233a;
  background: #f2f6fa; border: 1px solid #e2e8f0; border-radius: 12px; outline: none;
  font-family: inherit; transition: border-color .15s, box-shadow .15s, background .15s;
}
.white-card .field textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
.white-card .field input::placeholder, .white-card .field textarea::placeholder { color: #9aa7b4; }
.white-card .field input:focus, .white-card .field textarea:focus, .white-card .field select:focus {
  border-color: var(--brand-blue); background: #fff; box-shadow: 0 0 0 3px rgba(31,119,190,.18);
}
.error { color: #dc2626; font-size: 14px; margin-top: 12px; min-height: 18px; }

.form-nav { display: flex; gap: 10px; margin-top: 20px; }
.form-nav .btn { margin-top: 0; }
.form-nav #prevBtn { flex: 0 0 auto; width: auto; padding-left: 22px; padding-right: 22px; }
.form-nav #nextBtn, .form-nav #submitButton { flex: 1; }

/* ============ BAŞARI ============ */
#success { background: var(--brand-gradient); }
.success-card { text-align: center; }
.success-card .check { margin: 0 auto 18px; }
.success-card h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.success-card .muted { color: #5a6b7d; font-size: 15px; line-height: 1.55; }
.success-card .btn-solid-blue { margin-top: 24px; }
.check {
  width: 74px; height: 74px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: #fff;
  background: linear-gradient(135deg, #22c55e, #15803d);
  box-shadow: 0 12px 30px -8px rgba(34,197,94,.5); animation: pop .5s ease;
}
