/* ==========================================================================
   Giriş ekranı — cihangir.org görsel kimliği
   Koyu lacivert cam kart, altın vurgular, Playfair Display + Inter.
   ========================================================================== */

:root {
  --altin:      #d4af37;
  --altin-acik: #f3d77a;
  --koyu:       #0b1220;
  --lacivert:   #152238;
  --yesil:      #5be584;
  --kirmizi:    #ff8a8a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }

body {
  font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: #fff;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  background: var(--koyu);
}

/* Arka plan görseli + degrade kaplama */
.bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(150deg, rgba(11, 18, 32, .9) 0%, rgba(21, 34, 56, .84) 50%, rgba(11, 18, 32, .94) 100%),
    url('https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
}

/* Altın ışık bulutları */
.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .4;
  z-index: -1;
  animation: floaty 12s ease-in-out infinite;
}
.glow.g1 { width: 360px; height: 360px; background: var(--altin); top: -90px; right: -70px; }
.glow.g2 { width: 320px; height: 320px; background: #3b82f6; bottom: -100px; left: -60px; animation-delay: -6s; }

@keyframes floaty {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(30px) scale(1.08); }
}

/* --- Kart --------------------------------------------------------------- */

.card {
  width: 100%;
  max-width: 430px;
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(212, 175, 55, .28);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 26px;
  padding: 44px 40px 34px;
  text-align: center;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
  animation: rise .85s cubic-bezier(.2, .8, .2, 1) both;
}

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

/* Monogram rozeti */
.badge {
  width: 96px;
  height: 96px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--altin), var(--altin-acik));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 40px rgba(212, 175, 55, .45);
  animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}
.badge span {
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  font-size: 38px;
  letter-spacing: 1px;
  color: var(--koyu);
  line-height: 1;
}

h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.1;
  margin-bottom: 26px;
  letter-spacing: .5px;
}
h1 span {
  background: linear-gradient(90deg, var(--altin), var(--altin-acik));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Hata / uyarı satırı */
.uyari {
  background: rgba(255, 138, 138, .1);
  border: 1px solid rgba(255, 138, 138, .35);
  color: var(--kirmizi);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  padding: 11px 14px;
  border-radius: 12px;
  margin-bottom: 18px;
  text-align: left;
  word-break: break-word;
}

/* --- Form --------------------------------------------------------------- */

/* --- Kurulum teşhisi (yalnızca db_config.php yokken görünür) --- */

.kurulum {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 18px;
  text-align: left;
}
.kurulum summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--altin-acik);
  list-style: none;
}
.kurulum summary::-webkit-details-marker { display: none; }
.kurulum summary::before { content: '▸ '; }
.kurulum[open] summary::before { content: '▾ '; }

.kurulum-not {
  font-size: 11.5px;
  color: rgba(255, 255, 255, .7);
  line-height: 1.5;
  margin: 10px 0 8px;
}

.kurulum-liste {
  margin: 0 0 4px;
  padding-left: 18px;
  font-size: 11px;
  color: rgba(255, 255, 255, .8);
}
.kurulum-liste li { margin-bottom: 6px; line-height: 1.45; }

.kurulum-durum {
  display: inline-block;
  font-weight: 700;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 5px;
  margin-right: 6px;
}
.kurulum-durum.yok   { background: rgba(255, 255, 255, .1);  color: rgba(255, 255, 255, .6); }
.kurulum-durum.sorun { background: rgba(255, 138, 138, .18); color: var(--kirmizi); }

.kurulum code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 10.5px;
  color: var(--altin-acik);
  word-break: break-all;
}

.giris-form { text-align: left; }

/* Bot tuzağı — ekranda görünmez, ekran okuyucudan da uzak tutulur */
#website {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.alan { margin-bottom: 15px; }
.alan label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, .85);
}

.alan-kutu { position: relative; display: flex; align-items: center; }

.alan-ikon {
  position: absolute;
  left: 13px;
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, .45);
  pointer-events: none;
  transition: color .2s;
}

.alan input {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  color: #fff;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  padding: 12px 13px 12px 41px;
  transition: border-color .2s, background .2s;
}
.alan input::placeholder { color: rgba(255, 255, 255, .4); }
.alan input:focus {
  outline: none;
  border-color: var(--altin);
  background: rgba(212, 175, 55, .08);
}
.alan-kutu:focus-within .alan-ikon { color: var(--altin); }

/* Chrome otomatik doldurma mavisini kart temasına çevir */
.alan input:-webkit-autofill,
.alan input:-webkit-autofill:hover,
.alan input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px #16233a inset;
  caret-color: #fff;
  transition: background-color 9999s ease-in-out 0s;
}

/* Şifreyi göster/gizle */
.goz {
  position: absolute;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, .45);
  cursor: pointer;
  border-radius: 8px;
  transition: color .2s, background .2s;
}
.goz:hover { color: var(--altin-acik); background: rgba(255, 255, 255, .06); }
.goz.acik  { color: var(--altin); }
.goz svg   { width: 18px; height: 18px; }

/* Beni Unutma */
.beni-unutma {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  margin: 4px 0 20px;
}
.beni-unutma input { position: absolute; opacity: 0; width: 0; height: 0; }

.beni-unutma .kutu {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .06);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, border-color .2s;
}
.beni-unutma .kutu svg {
  width: 13px;
  height: 13px;
  color: var(--koyu);
  opacity: 0;
  transform: scale(.5);
  transition: opacity .18s, transform .18s;
}
.beni-unutma input:checked + .kutu {
  background: linear-gradient(135deg, var(--altin), var(--altin-acik));
  border-color: var(--altin);
}
.beni-unutma input:checked + .kutu svg { opacity: 1; transform: scale(1); }
.beni-unutma input:focus-visible + .kutu { box-shadow: 0 0 0 3px rgba(212, 175, 55, .35); }

.beni-unutma .metin { font-size: 13.5px; font-weight: 500; color: rgba(255, 255, 255, .82); }
.beni-unutma:hover .metin { color: var(--altin-acik); }

/* Giriş butonu */
.giris-btn {
  width: 100%;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--koyu);
  background: linear-gradient(135deg, var(--altin), var(--altin-acik));
  border: none;
  border-radius: 12px;
  padding: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: transform .2s, box-shadow .2s;
}
.giris-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(212, 175, 55, .4); }
.giris-btn:active { transform: translateY(0); }
.giris-btn svg { width: 18px; height: 18px; }

/* --- Alt satır: sayaçlar ------------------------------------------------- */

.alt-satir {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .14);
}

.sayac-satir {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}

.sayac {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, .6);
  white-space: nowrap;
}
.sayac svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--altin); }
.sayac-sol { justify-content: flex-start; }
.sayac-sag { justify-content: flex-end; }

.guvenli {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(212, 175, 55, .12);
  border: 1px solid rgba(212, 175, 55, .32);
  color: var(--altin-acik);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.guvenli svg { width: 15px; height: 15px; }

/* --- Mobil -------------------------------------------------------------- */

@media (max-width: 560px) {
  /* iPhone çentiği / ana ekran çubuğu için güvenli alan */
  body {
    padding: max(24px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
             max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    align-items: flex-start;
  }
  .card { padding: 34px 22px 28px; border-radius: 22px; margin: auto 0; }
  .badge { width: 80px; height: 80px; margin-bottom: 16px; }
  .badge span { font-size: 31px; }

  /* iOS'un alana odaklanınca yaptığı otomatik yakınlaştırmayı engelle */
  .alan input { font-size: 16px; }
  .sayac-satir { gap: 6px; }
  .sayac { font-size: 11px; gap: 4px; }
  .sayac svg { width: 13px; height: 13px; }
  .guvenli { padding: 6px 11px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .card, .badge, .glow { animation: none; }
}
