/* =========================
   AŞK TEMASI — TEMİZ / DÜZENLİ
   ========================= */

/* ---------- Değişkenler ---------- */
:root {
  /* Renkler */
  --bg: #0e0a13;
  --card: #1a1020;
  --text: #ffeef7;
  --muted: #d6b7c8;
  --primary: #ff7aa8;
  --primary2: #ff4f88;
  --accent: #ffc2d1;
  --danger: #ff9aa2;

  /* Güvenli Alan */
  --safe-top: env(safe-area-inset-top);

  /* Z-Index */
  --z-nav: 100;
  --z-lightbox: 3000;
  --z-modal: 2147483000;

  /* Global kalp çerçevesi */
  --z-frame: 30;
  --frame-gap: 14px;
}

/* ---------- Sayfa Arka Planı ---------- */
html, body {
  background:
    radial-gradient(900px 400px at 50% -10%, rgba(199,155,255,.14), transparent),
    linear-gradient(180deg, rgba(24,10,24,.60), rgba(12,10,16,.80)),
    url("backend2.jpg") center/cover no-repeat fixed;
  color: var(--text);
}

/* ---------- Genel ---------- */
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0 0 .6rem; }
.center { text-align: center; }
.muted { color: var(--muted); }
.section { padding: 56px 16px; max-width: 960px; margin: 0 auto; }

.card {
  background: var(--card);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
  border-color: rgba(255,194,209,.14); /* pembe parıltı */
}

.row { display: grid; grid-template-columns: 1fr; gap: 10px; margin: .4rem 0; }
.row.two { grid-template-columns: 1fr 1fr; }

input, textarea, button { font: inherit; }
input, textarea {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  background: #0c0f1c;
  border: 1px solid rgba(255,255,255,.12);
  color: #fff;
  font-size: 16px;
}

/* ---------- Butonlar ---------- */
.btn {
  display: block;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color: #111;
  font-weight: 800;
  cursor: pointer;
}
.btn.btn-secondary {
  background: linear-gradient(135deg, var(--accent), #ffd6e0);
  color: #3a0f22;
}

/* ---------- Uyarılar ---------- */
.alert { padding: 10px 12px; border-radius: 10px; margin: 8px 0; font-weight: 600; }
.alert.error { background: #3a1b1b; border: 1px solid #ea8686; color: #ffdede; }

/* ---------- Navbar ---------- */
.nav {
  position: sticky; top: 0; z-index: var(--z-nav);
  padding: max(8px, var(--safe-top)) 16px 10px;
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  background: rgba(15,18,32,.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.06);
  overflow: visible;
  /* ton ayarı */
  background-color: rgba(22,13,25,.85);
  border-bottom-color: rgba(255,194,209,.18);
}
.brand { font-weight: 800; }
.nav-center {
  display: flex; gap: 12px; flex: 1 1 100%; order: 2;
  justify-content: center; overflow-x: auto; white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}
.nav-center a { padding: 8px 10px; border-radius: 10px; opacity: .9; }
.nav-center a:hover { background: rgba(255,255,255,.08); opacity: 1; }
.nav-right { display: flex; gap: 8px; align-items: center; order: 3; width: 100%; justify-content: flex-end; }
@media (min-width:768px){
  .nav-center { flex: 1 1 auto; order: 1; overflow: visible; white-space: normal; }
  .nav-right  { order: 2; width: auto; }
}
.pimg { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background:#232742; display:grid; place-items:center; }
.pname { font-weight: 700; }
.link { background:transparent; border:0; color:#cfe2ff; cursor:pointer; }

/* Sayaç chip */
.time-chip {
  border: 1px solid rgba(255,255,255,.15);
  padding: .45rem .7rem;
  border-radius: 10px;
  color: #e7e9f3;
  white-space: nowrap;
}

/* ---------- Login ---------- */
.u-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.u-card {
  display: flex; align-items: center; gap: 10px;
  background: #0c0f1c; border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px; padding: 10px; cursor: pointer;
}
.u-card.active { outline: 2px solid var(--primary); }
.avatar { width: 44px; height: 44px; border-radius: 50%; display:grid; place-items:center; background:#232742; overflow:hidden; }
.uname { font-weight: 700; }
.avatar .uimg { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Login sayfası */
#loginSection { position: relative; isolation: isolate; min-height: 100vh; display:grid; place-items:center; padding-top: max(24px, var(--safe-top)); }
#loginSection::before {
  content:""; position: fixed; inset: 0;
  background: url("img/login-bg.jpg") center/cover no-repeat;
  z-index: -1; filter: none; opacity: 1;
}
#loginSection::after { content: none !important; background: none !important; }
#loginSection .u-grid { gap: 16px; }
#loginSection .u-card {
  position: relative; height: 84px; padding: 0 22px 12px;
  display:flex; align-items:center; justify-content:center; gap:10px; border:0; color:#fff;
  background: linear-gradient(145deg, #ff7aa8, #ff4f88);
  box-shadow: 0 10px 24px rgba(255,79,136,.25), 0 0 0 2px rgba(255,255,255,.12) inset;
  clip-path: polygon(50% 100%, 35% 86%, 18% 74%, 6% 60%, 2% 45%, 6% 31%, 16% 21%, 30% 16%, 40% 18%, 50% 26%, 60% 18%, 70% 16%, 84% 21%, 94% 31%, 98% 45%, 94% 60%, 82% 74%, 65% 86%);
  transition: transform .15s ease, filter .2s ease, box-shadow .2s ease;
}
#loginSection .u-card:hover { filter: brightness(1.05); transform: translateY(-1px); }
#loginSection .u-card.active { box-shadow: 0 12px 28px rgba(255,79,136,.35), 0 0 0 2px rgba(255,255,255,.22) inset; }
#loginSection .u-card .avatar { width: 40px; height: 40px; background: rgba(0,0,0,.25); }
#loginSection .u-card .uname { font-weight: 800; text-shadow: 0 1px 8px rgba(0,0,0,.25); }
#loginSection input[type="password"]{
  border-radius: 999px;
  border-color: rgba(255,255,255,.18);
  background: radial-gradient(10px 10px at 12px 50%, rgba(255,79,136,.25) 0 50%, transparent 51%) no-repeat, #0c0f1c;
}
#loginSection .btn-heart{
  height: 74px; font-weight: 900; letter-spacing: .2px; color:#111;
  background: linear-gradient(135deg, #c79bff, #8a7dff);
  box-shadow: 0 10px 24px rgba(138,125,255,.28), 0 0 0 2px rgba(255,255,255,.12) inset;
  clip-path: polygon(50% 100%, 35% 86%, 18% 74%, 6% 60%, 2% 45%, 6% 31%, 16% 21%, 30% 16%, 40% 18%, 50% 26%, 60% 18%, 70% 16%, 84% 21%, 94% 31%, 98% 45%, 94% 60%, 82% 74%, 65% 86%);
}
#loginSection .btn-heart:disabled { opacity: .6; cursor: not-allowed; }
#loginSection .btn-heart:not(:disabled):hover { filter: brightness(1.06); transform: translateY(-1px); }
@media (max-width: 420px){
  #loginSection .u-card { height: 76px; padding: 0 18px 10px; }
}

/* ---------- Aşk Notu ---------- */
.love-card{
  position: relative;
  border-radius: 24px;
  padding: clamp(18px, 3vw, 28px);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border: 1px solid rgba(255,194,209,.18);
  overflow: hidden;
}

/* Metin sabit (tıklanamaz) */
.love-note{
  pointer-events: none;          /* tık/focus almaz */
  user-select: text;             /* kopyalanabilir */
  position: relative;
  z-index: 0 !important;         /* diğer katmanları ezmesin */
  text-align: center;
  color: var(--text);
  text-shadow: 0 2px 12px rgba(0,0,0,.45);
  font-size: clamp(20px, 4.6vw, 34px);
  line-height: 1.35;
  font-weight: 800;
}
.love-note p { margin: .35em 0; }
.love-note .sig { font-weight: 700; font-size: clamp(16px, 3.4vw, 24px); opacity: .95; }

/* Eski yerel kalp efekti kapalı */
.love-card .love-hearts{ display: none !important; }

/* İpucu yazısını gizle */
#mesafe .muted{ display: none !important; }

/* ---------- Galeri / Harita ---------- */
.map { height: 340px; border-radius: 14px; border: 1px solid rgba(255,255,255,.06); }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width:560px){ .gallery { grid-template-columns: repeat(3, 1fr); } }

.media {
  position: relative; background:#0c0f1c;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px; overflow: hidden; cursor: pointer;
}
.media img, .media video { width: 100%; display: block; }
.media .del{
  position: absolute; right: 6px; top: 6px; border:0; border-radius:10px;
  background:#2b1a1a; color:#ffdede; padding:6px 8px; cursor:pointer;
}
.media .pin-hero{
  position: absolute; left: 8px; top: 8px; border:0; border-radius:8px;
  padding: 6px 8px; background: rgba(0,0,0,.45); color:#fff; cursor:pointer;
}

/* ---------- Sözler ---------- */
.quotes { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.quotes li{
  display: flex; justify-content: space-between; align-items: center;
  background: var(--card); border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px; padding: 10px;
}
.quotes li button{
  border: 0; border-radius: 10px; background:#2b1a1a; color:#ffdede; padding: 6px 10px; cursor: pointer;
}

/* ---------- Modal (Şifre Değiştir) ---------- */
.modal{
  position: fixed; inset: 0; display: grid; place-items: center;
  background: rgba(0,0,0,.55);
  z-index: var(--z-modal) !important;  /* her şeyin üstünde */
}
.modal-inner{
  position: relative;
  width: min(420px, 94vw);
  background: var(--card);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
}

/* ---------- Leaflet Avatar Marker ---------- */
.marker-avatar { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; border: 2px solid #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.25); }
.marker-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Lightbox ---------- */
.lightbox{
  position: fixed; inset: 0; background: rgba(0,0,0,.85);
  display: none; align-items: center; justify-content: center;
  padding: 22px; z-index: var(--z-lightbox);
}
.lightbox.open{ display: flex; }
.lightbox-inner{ max-width: 92vw; max-height: 88vh; display: grid; place-items: center; }
.lightbox-inner img, .lightbox-inner video{ max-width: 92vw; max-height: 88vh; border-radius: 12px; display: block; }

.heart-btn{ position: absolute; width: 64px; height: 64px; background: transparent; border: 0; cursor: pointer; }
.heart-btn .chev{
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  font-size: 30px; font-weight: 800; color: #fff; z-index: 2; user-select: none;
}
.heart-btn .heart-shape{
  position: absolute; left: 50%; top: 50%; width: 44px; height: 44px;
  transform: translate(-50%,-50%) rotate(-45deg);
  background: linear-gradient(145deg, #ff7aa8, #ff4f88);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(255,79,136,.35), 0 0 0 2px rgba(255,255,255,.18) inset;
}
.heart-btn .heart-shape::before,
.heart-btn .heart-shape::after{
  content:""; position:absolute; width:44px; height:44px; border-radius:50%; background: inherit;
}
.heart-btn .heart-shape::before{ top:-22px; left:0; }
.heart-btn .heart-shape::after { left:22px; top:0; }
.lb-prev{ left:16px; top:50%; transform: translateY(-50%); }
.lb-next{ right:16px; top:50%; transform: translateY(-50%); }
.lb-close{ top:14px; right:14px; width:56px; height:56px; }
.lb-close .chev{ font-size: 26px; }
.heart-btn:hover .heart-shape{ filter: brightness(1.06); }

/* ---------- Hero Slider ---------- */
.hero { padding: 18px 0 6px; }
.hero-slider{
  position: relative; width: min(1100px, 96vw);
  height: clamp(220px, 40vw, 420px); margin: 0 auto;
  border-radius: 18px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.08); background: #0c0f1c;
}
.hero-track{ display: flex; width: 100%; height: 100%; transition: transform .5s ease; }
.hero-slide{ min-width: 100%; height: 100%; position: relative; overflow: hidden; }
.hero-slide img{ width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.02); }
.hero-cap{
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 22px 24px; color: #fff; font-weight: 800;
  text-align: center; font-size: clamp(20px, 4.5vw, 34px);
  line-height: 1.25; text-shadow: 0 2px 10px rgba(0,0,0,.6);
}
.hero-remove{
  position: absolute; top: 10px; right: 10px; border: 0; border-radius: 10px;
  padding: 6px 10px; cursor: pointer; background: rgba(0,0,0,.45); color: #fff;
}
.hero-nav{
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  z-index: 5; background: rgba(0,0,0,.45); color: #fff; font-size: 26px; font-weight: 800;
}
.hero-nav.prev{ left: 12px; }
.hero-nav.next{ right: 12px; }
.hero-dots{
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 10px; display: flex; gap: 6px; z-index: 6;
}
.hero-dots button{ width: 8px; height: 8px; border-radius: 50%; border: 0; background: rgba(255,255,255,.35); cursor: pointer; }
.hero-dots button.active{ background: #fff; }

/* ---------- Global Kalp Çerçevesi ---------- */
.love-frame{
  position: fixed; inset: 0; pointer-events: none; z-index: var(--z-frame); overflow: hidden;
}
.love-frame::before{
  content:""; position:absolute; inset: var(--frame-gap);
  border-radius: 24px; border: 1px solid rgba(255,194,209,.18);
  box-shadow: 0 0 40px rgba(255,79,136,.10) inset;
}
.love-frame span{
  --s: 18px; --left: 5%; --delay: 0s; --dur: 13s;
  position: absolute; left: var(--left); bottom: -32px;
  width: var(--s); height: var(--s); transform: rotate(-45deg);
  background: linear-gradient(145deg, var(--primary), var(--primary2));
  border-radius: 5px; opacity: .85;
  animation: love-rise var(--dur) linear infinite;
  animation-delay: var(--delay);
  box-shadow: 0 6px 18px rgba(255,79,136,.35);
  filter: drop-shadow(0 3px 10px rgba(255,79,136,.2));
}
.love-frame span::before,
.love-frame span::after{
  content:""; position:absolute; width: var(--s); height: var(--s);
  background: inherit; border-radius: 50%;
}
.love-frame span::before{ top: calc(-1 * var(--s) / 2); left: 0; }
.love-frame span::after { left: calc(var(--s) / 2); top: 0; }

/* ---------- Animasyon ---------- */
@keyframes love-rise{
  0%   { transform: translateY(0) translateX(0) rotate(-45deg); opacity: 0; }
  10%  { opacity: .95; }
  100% { transform: translateY(-130%) translateX(60px) rotate(-45deg); opacity: 0; }
}

/* ---------- Lightbox Kalp Kontrol ---------- */
.heart-btn .heart-shape{
  background: linear-gradient(145deg, #ff7aa8, #ff4f88);
  box-shadow: 0 6px 20px rgba(255,79,136,.45), 0 0 0 2px rgba(255,255,255,.20) inset;
}
