/* =========================
   Shared UI Theme (Index / Site / Contact)
   Single source of truth
========================= */

/* Vars */
:root{
  --r-card: 22px;
  --r-pill: 999px;

  --ink: #0f172a;
  --muted: #55657d;

  --g1:#2563eb;
  --g2:#7c3aed;

  --shadow: 0 18px 50px rgba(15, 23, 42, .10);
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, .08);

  --heroH: 200px;
  --shellW: 1260px;
}

/* Breakpoints */
@media (max-width: 576px){ :root{ --heroH: 280px; } }
@media (max-width: 420px){ :root{ --heroH: 300px; } }

/* Base */
html, body { height: 100%; }
body{
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  min-height: 100svh;
  display:flex;
  flex-direction:column;
  color: var(--ink);
  position: relative;
  overflow-x: clip;

  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(59,130,246,.10), transparent 60%),
    radial-gradient(900px 500px at 80% 0%, rgba(168,85,247,.08), transparent 55%),
    radial-gradient(900px 600px at 70% 90%, rgba(34,197,94,.06), transparent 55%),
    linear-gradient(180deg, #f5f7fb 0%, #f5f7fb 100%);
}

body::before{
  content:"";
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--heroH);
  z-index: -1;
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(59,130,246,.22), transparent 60%),
    radial-gradient(900px 500px at 80% 0%, rgba(168,85,247,.18), transparent 55%),
    linear-gradient(180deg, #0b1220 0%, #0b1220 100%);
}

body::after{
  content:"";
  position: fixed;
  inset: auto 0 0 0;
  height: 60vh;
  z-index: -2;
  background: radial-gradient(900px 600px at 70% 90%, rgba(34,197,94,.08), transparent 60%);
}

/* Layout helpers */
.page-wrap{ padding: 26px 0 46px; }
.shell{ max-width: var(--shellW); }

/* Links */
a, a:hover, a:focus, a:active{ text-decoration:none !important; }
.link-cover{ text-decoration:none; color:inherit; display:block; }
.link-cover:hover{ color:inherit; }

/* Focus ring */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible{
  outline: 3px solid rgba(37,99,235,.35);
  outline-offset: 3px;
  border-radius: 12px;
}

/* Topbar */
.topbar{
  color: #e5e7eb;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  padding: 14px 16px;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
}
.brand-dot{
  width: 10px; height: 10px; border-radius: 999px;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  box-shadow: 0 0 0 6px rgba(96,165,250,.15);
  display:inline-block;
  margin-right: 10px;
  flex: 0 0 auto;
}

/* Buttons */
.btn-pill{ border-radius: var(--r-pill); padding: .72rem 1.05rem; }

.btn-ghost{
  color:#e5e7eb;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.06);
  text-decoration:none !important;
}
.btn-ghost:hover{ background: rgba(255,255,255,.10); color:#fff; }

.btn-primaryish{
  color:#fff;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  border:none;
  box-shadow: var(--shadow-soft);
  text-decoration:none !important;
  transition: transform .15s ease, filter .15s ease;
}
.btn-primaryish:hover{ filter: brightness(1.02); transform: translateY(-1px); }
.btn-primaryish:active{ transform: translateY(0); }

/* Cards */
.glass-card{
  border: 1px solid rgba(15,23,42,.08);
  border-radius: var(--r-card);
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.glass-head{
  padding: 16px 18px;
  background: linear-gradient(180deg, rgba(15,23,42,.06), rgba(15,23,42,0));
  border-bottom: 1px solid rgba(15,23,42,.06);
}
.glass-body{ padding: 16px; }
.hint{ color: var(--muted); font-size:.92rem; }

/* Listing cards */
.cardx{
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 18px;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow-soft);
  overflow:hidden;
  height:100%;
  position:relative;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  will-change: transform;
}
.cardx::before{
  content:"";
  position:absolute; left:0; right:0; top:0;
  height: 4px;
  background: linear-gradient(90deg, var(--g1), var(--g2));
  opacity:.95;
  z-index:2;
}
.cardx:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(15,23,42,.14);
  border-color: rgba(37,99,235,.16);
}

/* Thumbnail (netlik koru, blur yok, stabil ölçü) */
.thumb-wrap{
  width: 100%;
  height: 160px;
  background: #fff;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border-bottom: 1px solid rgba(15,23,42,.06);
}
@media (max-width: 768px){
  .thumb-wrap{ height: 150px; }
}
.thumb{
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display:block;
  filter:none !important;
  image-rendering: auto;
}

/* Title */
.title-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:.75rem;
  min-width: 0;
}
.title-grad{
  font-weight: 820;
  font-size: .98rem;
  line-height: 1.25;
  letter-spacing: .2px;
  background: linear-gradient(90deg, var(--g1), var(--g2));
  -webkit-background-clip:text;
  background-clip:text;
  color: transparent;
}
.host-pill{
  padding:.22rem .45rem;
  border-radius: var(--r-pill);
  border: 1px solid rgba(124,58,237,.20);
  background: rgba(124,58,237,.08);
  color: #3b0764;
  font-size:.72rem;
  white-space:nowrap;
  flex: 0 0 auto;
}

/* URL row (hiza + taşma güvenli) */
.url-open-row{
  display:grid;
  grid-template-columns: 1fr auto;
  align-items:center;
  gap: .65rem;
  margin-top: .65rem;
  min-width: 0;
}
@media (max-width: 420px){
  .url-open-row{ grid-template-columns: 1fr; gap: .55rem; }
  .btn-open{ width: 100%; justify-content:center; }
}
.url-chip{
  display:flex;
  align-items:center;
  gap:.5rem;
  padding:.28rem .5rem;
  border-radius: 12px;
  border: 1px solid rgba(37,99,235,.18);
  background: rgba(37,99,235,.06);
  color: #334155;
  font-size:.78rem;
  line-height:1.2;
  min-width: 0;
  max-width: 100%;
}
.url-dot{
  width:10px; height:10px; border-radius:999px;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  box-shadow: 0 0 0 5px rgba(37,99,235,.12);
  flex: 0 0 auto;
}
.url-text{
  min-width: 0;
  overflow-wrap:anywhere;
  word-break: break-word;
}
.btn-open{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius: var(--r-pill);
  padding:.48rem .9rem;
  font-size:.82rem;
  color:#fff;
  border:none;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  box-shadow: var(--shadow-soft);
  text-decoration:none !important;
  white-space:nowrap;
  flex: 0 0 auto;
  transition: transform .15s ease, filter .15s ease;
}
.btn-open:hover{ filter: brightness(1.03); transform: translateY(-1px); }

/* Detail page hero */
.hero{
  border: 1px solid rgba(15,23,42,.08);
  border-radius: var(--r-card);
  background: rgba(255,255,255,.88);
  box-shadow: var(--shadow-soft);
  overflow:hidden;
}
.hero-img{
  width:100%;
  height: clamp(200px, 26vw, 360px);
  background:rgba(15,23,42,.08);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border-bottom: 1px solid rgba(15,23,42,.06);
}
.hero-img img{
  width:100%;
  height:100%;
  object-fit: contain;
  object-position:center;
  display:block;
  filter:none !important;
  image-rendering:auto;
}
.meta-row{
  display:flex;
  flex-wrap:wrap;
  gap:.55rem;
  align-items:center;
  margin-top:.45rem;
}
.desc{
  color:#334155;
  line-height: 1.6;
  margin-top: .8rem;
  white-space: pre-wrap;
}

/* Contact form polish */
.form-control{
  border-radius: 14px;
  border-color: rgba(15,23,42,.14);
  padding: .9rem 1rem;
}
.form-control:focus{
  border-color: rgba(59,130,246,.55);
  box-shadow: 0 0 0 .25rem rgba(59,130,246,.15);
}
.alert{
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: 0 10px 24px rgba(15,23,42,.06);
}
.footer-note{
  color:#94a3b8;
  font-size: .9rem;
  margin-top: 10px;
}
.captcha-box{
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(15,23,42,.92), rgba(15,23,42,.78));
  color: #fff;
  padding: 12px 14px;
  letter-spacing: 3px;
  font-weight: 750;
  text-align: center;
  box-shadow: 0 12px 28px rgba(2,6,23,.22);
  user-select: none;
}

/* Empty state */
.empty{
  border-radius: 18px;
  border: 1px dashed rgba(15,23,42,.22);
  background: rgba(255,255,255,.75);
  padding: 18px;
  color:#475569;
}

/* Motion safe */
@media (prefers-reduced-motion: reduce){
  .cardx, .btn-open, .btn-primaryish{ transition: none !important; }
  .cardx:hover, .btn-open:hover, .btn-primaryish:hover{ transform: none !important; }
}