/*
Theme Name: HaberiOku Link Kisaltici
Theme URI: https://haberioku.net
Description: TinyURL mantığında link kısaltıcı. haberioku.net/abc123 formatı, Facebook önizleme desteği.
Version: 5.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: haberioku
*/

/* =====================================================
   RESET
   ===================================================== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1a1a2e;
  background: #f8fafc;
}
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }

/* =====================================================
   LAYOUT
   ===================================================== */
.site-wrap { min-height: 100vh; display: flex; flex-direction: column; }

/* =====================================================
   HEADER
   ===================================================== */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 16px 20px;
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: 960px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 20px; font-weight: 800; color: #2563eb; text-decoration: none;
}
.logo svg { color: #2563eb; }
.logo:hover { text-decoration: none; color: #1d4ed8; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; }
.main-nav a { color: #374151; font-size: 14px; font-weight: 500; }
.main-nav a:hover { color: #2563eb; text-decoration: none; }

/* =====================================================
   HERO
   ===================================================== */
.hero {
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 50%, #fdf2f8 100%);
  border-bottom: 1px solid #e5e7eb;
  padding: 60px 20px 50px;
  text-align: center;
}
.hero h1 {
  font-size: 42px; font-weight: 800; color: #111827;
  margin: 0 0 12px; letter-spacing: -1px; line-height: 1.15;
}
.hero h1 span { color: #2563eb; }
.hero p.lead {
  font-size: 17px; color: #6b7280;
  margin: 0 auto 36px; max-width: 520px;
}

/* =====================================================
   KISALTICI KARTI
   ===================================================== */
.shortener-wrap { max-width: 680px; margin: 0 auto; }
.shortener-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 4px 24px rgba(0,0,0,.06);
}
.shortener-form { display: flex; gap: 8px; flex-wrap: wrap; }
.shortener-form input[type="url"] {
  flex: 1; min-width: 220px;
  padding: 13px 16px;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  font-size: 15px; outline: none;
  transition: border .15s, box-shadow .15s;
  color: #111827;
}
.shortener-form input[type="url"]:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.shortener-form input[type="url"]::placeholder { color: #9ca3af; }

.btn-shorten {
  padding: 13px 24px; border: 0; border-radius: 10px;
  background: #2563eb; color: #fff;
  font-weight: 700; font-size: 15px; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(37,99,235,.3);
  transition: background .15s, transform .15s, box-shadow .15s;
}
.btn-shorten:hover { background: #1d4ed8; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(37,99,235,.4); }
.btn-shorten:active { transform: translateY(0); }
.btn-shorten:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* Sonuç */
.result-box {
  margin-top: 16px;
  padding: 16px;
  background: #f0fdf4;
  border: 1.5px solid #10b981;
  border-radius: 12px;
  display: none;
  animation: fadeUp .25s ease;
}
.result-box.show { display: block; }
.result-label { font-size: 12px; color: #059669; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.result-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.result-url {
  flex: 1; min-width: 160px;
  padding: 10px 14px;
  background: #fff; border: 1px solid #d1fae5; border-radius: 8px;
  font-family: ui-monospace, 'SF Mono', monospace; font-size: 14px; font-weight: 600;
  color: #111827; word-break: break-all;
}
.btn-copy {
  padding: 10px 18px; border: 0; border-radius: 8px;
  background: #10b981; color: #fff; font-weight: 600; font-size: 14px;
  transition: background .15s;
}
.btn-copy:hover { background: #059669; }

/* Hata */
.error-box {
  margin-top: 16px; padding: 13px 16px;
  background: #fef2f2; border: 1.5px solid #fca5a5;
  border-radius: 12px; color: #991b1b;
  font-weight: 500; font-size: 14px;
  display: none; animation: fadeUp .25s ease;
}
.error-box.show { display: block; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* =====================================================
   ÖZELLİKLER
   ===================================================== */
.features-section { padding: 50px 20px; background: #fff; border-top: 1px solid #e5e7eb; }
.features-inner { max-width: 960px; margin: 0 auto; }
.features-title { text-align: center; font-size: 24px; font-weight: 700; margin: 0 0 32px; color: #111827; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 680px) { .features-grid { grid-template-columns: 1fr; } }
.feature-item {
  background: #f9fafb; border: 1px solid #e5e7eb;
  border-radius: 14px; padding: 24px;
}
.feature-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 14px;
}
.fi-blue { background: #eff6ff; }
.fi-green { background: #f0fdf4; }
.fi-purple { background: #f5f3ff; }
.feature-item h3 { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: #111827; }
.feature-item p { margin: 0; font-size: 14px; color: #6b7280; line-height: 1.5; }

/* =====================================================
   ÖNIZLEME SAYFASI (preview/slug)
   ===================================================== */
.preview-wrap {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #eff6ff, #f5f3ff);
}
.preview-card {
  max-width: 560px; width: 100%;
  background: #fff; border: 1px solid #e5e7eb;
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,.1);
}
.preview-image {
  width: 100%; aspect-ratio: 16/9;
  object-fit: cover; display: block;
  background: #f3f4f6;
}
.preview-image-placeholder {
  width: 100%; aspect-ratio: 16/9;
  background: linear-gradient(135deg, #eff6ff, #f5f3ff);
  display: flex; align-items: center; justify-content: center;
  color: #9ca3af; font-size: 48px;
}
.preview-body { padding: 24px; }
.preview-domain {
  font-size: 12px; color: #9ca3af; font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px;
}
.preview-title { font-size: 20px; font-weight: 700; color: #111827; margin: 0 0 8px; line-height: 1.3; }
.preview-desc { font-size: 14px; color: #6b7280; margin: 0 0 20px; line-height: 1.5; }
.preview-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.btn-goto {
  flex: 1; padding: 12px 20px; border: 0; border-radius: 10px;
  background: #2563eb; color: #fff; font-weight: 700; font-size: 15px;
  box-shadow: 0 2px 8px rgba(37,99,235,.3);
  transition: background .15s, transform .15s;
  text-align: center; text-decoration: none; display: inline-block;
}
.btn-goto:hover { background: #1d4ed8; transform: translateY(-1px); text-decoration: none; color: #fff; }
.btn-outline-sm {
  padding: 12px 16px; border: 1.5px solid #e5e7eb;
  background: #fff; color: #374151; border-radius: 10px;
  font-weight: 500; font-size: 14px;
  transition: border-color .15s;
}
.btn-outline-sm:hover { border-color: #2563eb; color: #2563eb; }

.preview-timer {
  text-align: center; margin-top: 16px;
  font-size: 13px; color: #9ca3af;
}
.preview-timer strong { color: #2563eb; }

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer {
  background: #fff; border-top: 1px solid #e5e7eb;
  padding: 24px 20px; text-align: center;
  color: #9ca3af; font-size: 13px;
}

/* =====================================================
   GENEL
   ===================================================== */
.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.page-content { flex: 1; padding: 40px 20px; }
.content-card {
  max-width: 760px; margin: 0 auto;
  background: #fff; border: 1px solid #e5e7eb;
  border-radius: 16px; padding: 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.page-404 { text-align: center; padding: 80px 20px; }
.page-404 .code { font-size: 100px; font-weight: 900; color: #e5e7eb; line-height: 1; margin: 0; }
.page-404 h2 { font-size: 22px; margin: 10px 0 16px; }

@media (max-width: 600px) {
  .hero h1 { font-size: 30px; }
  .hero p.lead { font-size: 15px; }
  .shortener-card { padding: 18px; }
  .preview-body { padding: 18px; }
}
