/* vCard NFC - Genel UI stilleri */

:root {
  --vc-bg: #f6f8fb;
  --vc-card: #ffffff;
  --vc-border: #e5e9ef;
}

body {
  background: var(--vc-bg);
  -webkit-tap-highlight-color: transparent;
}

/* Mobile-first kart yapilari */
.card {
  border: 1px solid var(--vc-border);
  border-radius: .75rem;
}

.section-title {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #6c757d;
  margin-bottom: .65rem;
  font-weight: 600;
}

/* Form alanı spacingleri */
.form-label { font-weight: 500; font-size: 1rem; }
.form-text  { font-size: 1rem; }

/* Mobil dokunmatik hedef boyutu */
.btn { min-height: 44px; font-size: 1rem; }
.form-control, .form-select { min-height: 44px; font-size: 1rem; }

/* Bootstrap "small" sınıfını biraz iyileştir */
small, .small { font-size: 1em; }

/* =====================================================================
   Bootstrap default <1rem sınıflarının override'ı
   Kural: Hiçbir metin 1rem altına düşmesin.
   ===================================================================== */
.btn-sm,
.form-control-sm,
.form-select-sm,
.input-group-sm > .form-control,
.input-group-sm > .form-select,
.input-group-sm > .input-group-text,
.input-group-sm > .btn,
.pagination-sm .page-link,
.pagination .page-link,
.dropdown-menu,
.dropdown-item,
.dropdown-header,
.nav-link,
.alert,
.badge,
.form-text,
h6, .h6,
.modal-title,
.list-group-item,
.table,
.table > :not(caption) > * > * {
  font-size: 1rem;
}

/* Bootstrap .table-sm öğeleri */
.table-sm > :not(caption) > * > * { font-size: 1rem; padding: .6rem .75rem; }

/* Input group içindeki butonlar minimum 1rem */
.input-group .btn { font-size: 1rem; }

/* Pagination minimum */
.pagination .page-link { font-size: 1rem; }

/* Sticky yan panel — geniş ekranlarda yapışkan, mobilde normal akış.
   ÖNEMLİ: parent col'a align-self: flex-start VERME — col yüksekliğinin
   row'la (sol uzun form) eşit olması gerekiyor ki sticky scroll alanı oluşsun. */
@media (min-width: 992px) {
  .panel-sticky {
    position: sticky;
    top: 88px;       /* sticky navbar (~64px) + biraz boşluk */
  }
}

/* Avatar onizleme (eski kullanıcılar için saklı) */
.avatar-preview {
  width: 96px; height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
  background: #e9ecef;
}

/* ===== Avatar drag & drop bölgesi ===== */
.avatar-dropzone {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border: 2px dashed #cbd2e0;
  background: #f7f9fc;
  border-radius: .75rem;
  cursor: pointer;
  transition: all .15s;
}
.avatar-dropzone:hover {
  border-color: #4f6cf7;
  background: #f0f3ff;
}
.avatar-dropzone.is-dragging {
  border-color: #16a34a;
  border-style: solid;
  background: #ecfdf5;
  transform: scale(1.01);
}
.avatar-dropzone.is-dragging .dz-idle  { display: none; }
.avatar-dropzone:not(.is-dragging) .dz-active { display: none; }

.avatar-dz-preview {
  width: 110px; height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,.10);
  background: #e9ecef;
  flex-shrink: 0;
  pointer-events: none;
}
.avatar-dz-text {
  flex: 1 1 auto;
  min-width: 0;
}
.dz-icon {
  font-size: 1.8rem;
  color: #6c7693;
  display: block;
  margin-bottom: 6px;
}
.avatar-dropzone.is-dragging .dz-icon { color: #16a34a; }
.dz-msg {
  font-weight: 600;
  line-height: 1.35;
}
.dz-hint {
  font-size: 1rem;
  margin-top: 4px;
}

@media (max-width: 575.98px) {
  .avatar-dropzone { flex-direction: column; text-align: center; padding: 16px; }
  .avatar-dz-text  { width: 100%; }
}

/* ===== Cover (kapak) drag & drop bölgesi — 3:1 banner ===== */
.cover-dropzone {
  position: relative;
  /* aspect-ratio: 3/1 ideal ama eski tarayıcılarda fallback gerekir.
     Modern tarayıcılarda aspect-ratio devreye girer; eski olanlar min-height kullanır. */
  aspect-ratio: 3 / 1;
  min-height: 140px;
  width: 100%;
  border: 2px dashed #cbd2e0;
  background-color: #f7f9fc;
  background-size: cover;
  background-position: center;
  border-radius: .75rem;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 18px;
}
/* İçerik (text overlay) tıklama event'lerini emmesin — dropzone yakalasın */
.cover-dropzone .cover-dz-text { pointer-events: none; }
.cover-dropzone:hover {
  border-color: #4f6cf7;
  background-color: #f0f3ff;
}
.cover-dropzone.is-dragging {
  border-color: #16a34a;
  border-style: solid;
  background-color: #ecfdf5;
}
.cover-dropzone.is-dragging .dz-idle { display: none; }
.cover-dropzone:not(.is-dragging) .dz-active { display: none; }

.cover-dz-text {
  text-align: center;
  padding: 16px;
}
.cover-dropzone.has-cover .cover-dz-text {
  /* Cover varsa metni okunaklı yapmak için yarı saydam siyah pad */
  background: rgba(0,0,0,.55);
  color: #fff;
  border-radius: .5rem;
  backdrop-filter: blur(4px);
}
.cover-dropzone.has-cover .dz-icon,
.cover-dropzone.has-cover .dz-hint { color: #fff !important; }

.cover-dropzone .dz-hint { color: #6c7693; }

/* Link satirlari (sortable) */
.link-row {
  background: #fff;
  border: 1px solid var(--vc-border);
  border-radius: .5rem;
  padding: .75rem;
  margin-bottom: .5rem;
}
.link-row .drag-handle {
  cursor: grab;
  color: #adb5bd;
  user-select: none;
}
.link-row.sortable-ghost { opacity: .4; }

/* Şekil seçimi (avatar — yuvarlak/kare) */
.shape-card {
  cursor: pointer;
  border: 2px solid #e5e9ef;
  border-radius: .5rem;
  padding: .75rem .5rem;
  text-align: center;
  background: #fff;
  transition: all .15s;
}
.shape-card.selected {
  border-color: #0d6efd;
  background: #f0f6ff;
}
.shape-card:hover { border-color: #0d6efd; }
.shape-preview {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  margin: 0 auto .5rem;
}
.shape-preview-circle { border-radius: 50%; }
.shape-preview-square { border-radius: 0; }

/* Konum seçici (avatar position — sol/orta/sağ) mini önizleme */
.pos-preview {
  width: 64px; height: 44px;
  margin: 0 auto .5rem;
  background: #e9ecef;
  border-radius: 6px;
  position: relative;
}
/* Avatar noktası */
.pos-preview::before {
  content: '';
  position: absolute;
  top: 50%;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #4f6cf7;
  transform: translateY(-50%);
}
/* Metin çizgileri */
.pos-preview::after {
  content: '';
  position: absolute;
  top: 50%;
  height: 3px;
  background: linear-gradient(#9aa4b8, #9aa4b8) top/100% 3px no-repeat,
              linear-gradient(#cbd2e0, #cbd2e0) bottom/70% 3px no-repeat;
  transform: translateY(-50%);
}
/* Sol: avatar sol, metin sağda kalan alana */
.pos-preview.pos-left::before  { left: 4px; }
.pos-preview.pos-left::after   { left: 24px; right: 4px; }
/* Orta: avatar üstte, metin altta */
.pos-preview.pos-center::before { left: 50%; margin-left: -7px; top: 30%; }
.pos-preview.pos-center::after  { left: 18%; right: 18%; top: 70%; }
/* Sağ: avatar sağ, metin sol */
.pos-preview.pos-right::before { right: 4px; }
.pos-preview.pos-right::after  { left: 4px; right: 24px; }

/* Tema kart secimi */
.theme-card {
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: .75rem;
  transition: all .15s;
}
.theme-card.selected {
  border-color: #0d6efd;
  box-shadow: 0 0 0 4px rgba(13,110,253,.12);
}
.theme-card:hover { transform: translateY(-2px); }
.theme-preview {
  height: 120px;
  border-radius: .5rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
}
.theme-classic .theme-preview { background: linear-gradient(180deg, #ffffff 0%, #e9ecef 100%); border:1px solid #dee2e6; }
.theme-modern  .theme-preview { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.theme-dark    .theme-preview { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%); }
.theme-vivid   .theme-preview { background: linear-gradient(135deg, #ff6a00 0%, #ee0979 100%); }

/* Mobil bottom safe area */
@supports (padding: max(0px)) {
  main { padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
}

/* Abonelik bilgi serit */
.subscription-banner {
  border-radius: .5rem;
  padding: .65rem 1rem;
  margin-bottom: 1rem;
}
.subscription-banner.trial    { background:#cff4fc; color:#055160; }
.subscription-banner.paid     { background:#d1e7dd; color:#0a3622; }
.subscription-banner.expired  { background:#f8d7da; color:#58151c; }

/* Login/register sayfasi */
.auth-wrap { max-width: 420px; margin: 4vh auto; }
.auth-brand { text-align:center; margin-bottom:1.5rem; }
.auth-brand i { color:#0d6efd; font-size:2.5rem; }
.auth-brand .h4 { margin-top:.5rem; }

/* =====================================================================
   Matrix temasi (giris ekrani) — body.auth-matrix altinda kapsanir
   ===================================================================== */
body.auth-matrix {
  background: #000;
  min-height: 100vh;
  overflow-x: hidden;
}
/* Arka plandaki yagmur efekti tuvali */
#matrix-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}
/* Icerik tuvalin uzerinde */
body.auth-matrix .auth-wrap {
  position: relative;
  z-index: 1;
}
/* Marka — yesil neon */
body.auth-matrix .auth-brand i,
body.auth-matrix .auth-brand .h4 {
  color: #00ff66;
  text-shadow: 0 0 8px rgba(0,255,102,.7);
}
body.auth-matrix .auth-brand .text-muted {
  color: #2ecc71 !important;
  opacity: .75;
}
/* Cam efektli koyu kart */
body.auth-matrix .card {
  background: rgba(0, 20, 8, .82);
  border: 1px solid rgba(0,255,102,.45);
  border-radius: .75rem;
  /* Cok katmanli golge: derinlik + yesil neon hale + ic parlama */
  box-shadow:
    0 18px 50px rgba(0,0,0,.85),
    0 0 40px rgba(0,255,102,.45),
    0 0 90px rgba(0,255,102,.18),
    inset 0 0 35px rgba(0,255,102,.06) !important; 
  backdrop-filter: blur(4px);
}
body.auth-matrix .form-label { color: #7CFF9E; }
/* Giris alanlari — koyu, yesil odak */
body.auth-matrix .form-control,
body.auth-matrix .input-group-text {
  background: rgba(0,0,0,.55);
  border-color: rgba(0,255,102,.3);
  color: #aaffc3;
}
body.auth-matrix .input-group-text { color: #00ff66; }
body.auth-matrix .form-control::placeholder { color: rgba(170,255,195,.4); }
body.auth-matrix .form-control:focus {
  background: rgba(0,0,0,.7);
  border-color: #00ff66;
  color: #d6ffe3;
  box-shadow: 0 0 0 .2rem rgba(0,255,102,.25);
}
/* Butonlar */
body.auth-matrix .btn-primary {
  background: #00cc55;
  border-color: #00ff66;
  color: #00200d;
  font-weight: 600;
  text-shadow: none;
  box-shadow: 0 0 12px rgba(0,255,102,.4);
}
body.auth-matrix .btn-primary:hover {
  background: #00ff66;
  border-color: #00ff66;
}
body.auth-matrix .btn-outline-secondary {
  border-color: rgba(0,255,102,.4);
  color: #00ff66;
}
body.auth-matrix .btn-outline-secondary:hover {
  background: rgba(0,255,102,.15);
  color: #00ff66;
}
/* Linkler */
body.auth-matrix a { color: #5dffa0; }
body.auth-matrix a:hover { color: #00ff66; }
body.auth-matrix .text-muted { color: #4a9e6a !important; }
/* Uyari/hata kutulari — koyu zemine uyum */
body.auth-matrix .alert {
  background: rgba(0,0,0,.5);
  border-width: 1px;
  color: #d6ffe3;
}

/* --- Giris efektleri --- */
/* Buton spinner */
body.auth-matrix .spin { display:inline-block; animation: vc-spin .7s linear infinite; }
@keyframes vc-spin { to { transform: rotate(360deg); } }

/* Hatali giriste form sallanir */
body.auth-matrix #loginForm.shake { animation: vc-shake .4s ease; }
@keyframes vc-shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-8px); }
  40%, 60% { transform: translateX(8px); }
}

/* Basarili giriste "Matrix'e dalis": kart ekrana dogru buyuyup erir */
body.auth-matrix .auth-wrap {
  transition: transform .9s cubic-bezier(.55,0,.85,1), opacity .9s ease, filter .9s ease;
  transform-origin: center center;
}
body.auth-matrix .auth-wrap.diving {
  transform: scale(2.6);
  opacity: 0;
  filter: blur(8px);
}

/* Tam ekran yesil flash (dalis aninda) */
#matrix-flash {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(0,255,102,.55), rgba(0,0,0,0) 60%);
  opacity: 0;
  animation: vc-flash 1.3s ease-out forwards;
}
@keyframes vc-flash {
  0%   { opacity: 0; }
  35%  { opacity: 1; }
  100% { opacity: 0; }
}

/* Hareket azaltma tercihi olanlar icin animasyonlari kapat */
@media (prefers-reduced-motion: reduce) {
  body.auth-matrix .auth-wrap,
  body.auth-matrix .auth-wrap.diving { transition: none; transform: none; opacity: 1; filter: none; }
  #matrix-flash { display: none; }
}
