/* PORTFUN – ortak arayüz stili (2026-11-07). AdminLTE/Bootstrap bağımlılığı yok. */
:root {
  --pf-bg: #f4f2fb;
  --pf-bg-2: #fbf4f9;
  --pf-card: #ffffff;
  --pf-ink: #1b1535;
  --pf-muted: #6b6684;
  --pf-line: #e6e2f3;
  --pf-primary: #5b2be0;
  --pf-primary-dark: #4720b8;
  --pf-accent: #e0187a;
  --pf-grad: linear-gradient(135deg, #5b2be0 0%, #a21fb5 55%, #e0187a 100%);
  --pf-radius: 18px;
  --pf-shadow: 0 10px 30px rgba(60, 30, 140, 0.10);
  --pf-shadow-sm: 0 3px 12px rgba(60, 30, 140, 0.08);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--pf-ink);
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(91, 43, 224, 0.14), transparent 60%),
    radial-gradient(800px 500px at 110% 0%, rgba(224, 24, 122, 0.12), transparent 60%),
    linear-gradient(180deg, var(--pf-bg) 0%, var(--pf-bg-2) 100%);
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
}

a { color: var(--pf-primary); text-decoration: none; }
a:hover { color: var(--pf-primary-dark); }
img { max-width: 100%; display: block; }

/* Üst çubuk */
.pf-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--pf-line);
}
.pf-header-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pf-logo img { height: 40px; width: auto; }
.pf-nav { display: flex; gap: 6px; }
.pf-nav a {
  font-size: 13px;
  font-weight: 600;
  color: var(--pf-muted);
  padding: 7px 12px;
  border-radius: 999px;
}
.pf-nav a:hover { background: var(--pf-bg); color: var(--pf-primary); }

/* Sayfa gövdesi */
.pf-main { flex: 1; width: 100%; }
.pf-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 22px 16px 36px;
}
.pf-container.narrow { max-width: 460px; }

.pf-card {
  background: var(--pf-card);
  border: 1px solid var(--pf-line);
  border-radius: var(--pf-radius);
  box-shadow: var(--pf-shadow-sm);
  padding: 22px 20px;
}
.pf-card + .pf-card, .pf-card + .pf-grid, .pf-grid + .pf-card { margin-top: 16px; }

.pf-center { text-align: center; }
.pf-muted { color: var(--pf-muted); }
.pf-small { font-size: 13px; }

h1.pf-title, h2.pf-title {
  margin: 0 0 6px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
h1.pf-title { font-size: 28px; }
h2.pf-title { font-size: 20px; }
.pf-title .grad {
  background: var(--pf-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.pf-lead { margin: 0 0 18px; color: var(--pf-muted); font-size: 16px; }

/* Düğmeler */
.pf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.pf-btn:active { transform: translateY(1px); }
.pf-btn-primary {
  color: #fff;
  background: var(--pf-grad);
  box-shadow: 0 8px 20px rgba(91, 43, 224, 0.28);
}
.pf-btn-primary:hover { color: #fff; box-shadow: 0 10px 26px rgba(91, 43, 224, 0.36); }
.pf-btn-ghost {
  color: var(--pf-primary);
  background: #fff;
  border-color: var(--pf-line);
}
.pf-btn-ghost:hover { background: var(--pf-bg); }
.pf-btn-block { width: 100%; }
.pf-btn[disabled] { opacity: .6; cursor: default; }

/* Formlar */
.pf-field { margin-bottom: 14px; text-align: left; }
.pf-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--pf-muted);
  margin-bottom: 6px;
}
.pf-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--pf-line);
  border-radius: 12px;
  font: inherit;
  color: var(--pf-ink);
  background: #fff;
  outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.pf-input:focus {
  border-color: var(--pf-primary);
  box-shadow: 0 0 0 3px rgba(91, 43, 224, 0.15);
}
.pf-alert {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 14px;
}
.pf-alert-error { background: #fdecf2; color: #a3123f; border: 1px solid #f7c7d8; }

/* Özellik rozetleri (index) */
.pf-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 18px 0 4px; }
.pf-chip {
  font-size: 13px;
  font-weight: 600;
  color: var(--pf-primary-dark);
  background: #f1ecfd;
  border-radius: 999px;
  padding: 6px 12px;
}

/* Günün ipucu */
.pf-tip {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--pf-grad);
  border: 0;
  box-shadow: var(--pf-shadow);
}
.pf-tip::after {
  content: "";
  position: absolute;
  right: -40px; top: -40px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}
.pf-tip-head {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .9;
  margin-bottom: 6px;
}
.pf-tip-text { font-size: 17px; line-height: 1.5; margin: 0; position: relative; }

/* Kategori ızgarası */
.pf-section-title {
  margin: 22px 4px 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--pf-muted);
}
.pf-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 600px) { .pf-grid { grid-template-columns: 1fr 1fr; } }
.pf-cat {
  display: block;
  background: var(--pf-card);
  border: 1px solid var(--pf-line);
  border-radius: var(--pf-radius);
  overflow: hidden;
  box-shadow: var(--pf-shadow-sm);
  color: var(--pf-ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.pf-cat:hover { transform: translateY(-2px); box-shadow: var(--pf-shadow); color: var(--pf-ink); }
.pf-cat img { width: 100%; aspect-ratio: 10 / 3; object-fit: cover; }
.pf-cat-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
}
.pf-cat-title { font-weight: 700; font-size: 15px; }
.pf-cat-sub { font-size: 12px; color: var(--pf-muted); margin-top: 2px; }
.pf-cat-arrow {
  flex: 0 0 auto;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: #f1ecfd;
  color: var(--pf-primary);
  font-weight: 700;
}

/* AI Asistanlar hero kartı */
.pf-ai-hero {
  position: relative;
  display: block;
  margin-top: 16px;
  min-height: 210px;
  border-radius: var(--pf-radius);
  overflow: hidden;
  color: #fff;
  background: #2a1460;
  box-shadow: 0 14px 34px rgba(60, 30, 140, 0.28);
  transition: transform .18s ease, box-shadow .18s ease;
  isolation: isolate;
}
.pf-ai-hero:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 18px 40px rgba(60, 30, 140, 0.36); }
.pf-ai-hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 70% 50%;
  z-index: -2;
  transform: scale(1.02);
  transition: transform .6s ease;
}
.pf-ai-hero:hover .pf-ai-hero-bg { transform: scale(1.06); }
.pf-ai-hero::before {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(28, 12, 70, 0.88) 0%, rgba(28, 12, 70, 0.62) 48%, rgba(28, 12, 70, 0.12) 100%);
}
.pf-ai-hero-inner {
  position: relative;
  padding: 20px 20px 18px;
  max-width: 78%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 210px;
  justify-content: center;
}
.pf-ai-badge {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.pf-ai-hero-title {
  margin: 4px 0 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.1;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}
.pf-ai-hero-sub {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.86);
}
.pf-ai-hero-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.pf-ai-avatars { display: flex; }
.pf-ai-avatars img {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid #fff;
  object-fit: cover;
  margin-left: -10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  background: #fff;
}
.pf-ai-avatars img:first-child { margin-left: 0; }
.pf-ai-cta {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #fff;
  color: var(--pf-primary-dark);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}
@media (min-width: 600px) {
  .pf-ai-hero, .pf-ai-hero-inner { min-height: 240px; }
  .pf-ai-hero-inner { padding: 26px 28px; max-width: 62%; }
  .pf-ai-hero-title { font-size: 32px; }
  .pf-ai-hero-sub { font-size: 15px; }
}

/* Kategori şeridi (üst çubuk altı) */
.pf-catnav {
  position: sticky;
  top: 61px;
  z-index: 15;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--pf-line);
}
.pf-catnav-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 12px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.pf-catnav-inner::-webkit-scrollbar { display: none; }
.pf-catchip {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--pf-muted);
  background: #fff;
  border: 1px solid var(--pf-line);
  border-radius: 999px;
  padding: 6px 13px;
  white-space: nowrap;
}
.pf-catchip:hover { color: var(--pf-primary); border-color: #d7cdf5; }
.pf-catchip.active { color: #fff; background: var(--pf-grad); border-color: transparent; }

/* Bölüm başlığı + "tümünü gör" */
.pf-section { margin-top: 22px; }
.pf-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0 4px 10px;
}
.pf-section-head .pf-section-title { margin: 0; }
.pf-section-more { font-size: 13px; font-weight: 600; white-space: nowrap; }

/* İçerik kartları */
.pf-items-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 600px) { .pf-items-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 760px) { .pf-items-grid { grid-template-columns: repeat(4, 1fr); } }
.pf-items-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.pf-items-scroll > .pf-item { flex: 0 0 46%; scroll-snap-align: start; }
@media (min-width: 600px) { .pf-items-scroll > .pf-item { flex-basis: 31%; } }
@media (min-width: 760px) { .pf-items-scroll > .pf-item { flex-basis: 23%; } }

.pf-item {
  background: var(--pf-card);
  border: 1px solid var(--pf-line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--pf-shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.pf-item:hover { transform: translateY(-2px); box-shadow: var(--pf-shadow); }
.pf-item-link { color: var(--pf-ink); display: flex; flex-direction: column; flex: 1; }
.pf-item-link:hover { color: var(--pf-ink); }
.pf-item-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #ece7fb, #fbe5f0);
  overflow: hidden;
}
.pf-item-wallpaper .pf-item-media { aspect-ratio: 3 / 4; }
.pf-item-video .pf-item-media { aspect-ratio: 16 / 10; background: #1b1535; }
.pf-item-media img, .pf-item-media video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.pf-item-ph {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-weight: 700; color: var(--pf-primary);
}
.pf-play {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.9);
  color: var(--pf-primary);
  font-size: 16px;
  padding-left: 3px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.pf-item-body { padding: 10px 12px 12px; }
.pf-item-title {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pf-item-sub { font-size: 12px; color: var(--pf-muted); margin-top: 3px; }
.pf-audio { width: 100%; height: 36px; margin: 0 0 10px; padding: 0 8px; box-sizing: border-box; }
.pf-audio-lg { height: 44px; margin: 14px 0 6px; padding: 0; }

/* Sayfalama */
.pf-pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 22px 0 6px; }
.pf-page {
  min-width: 38px; height: 38px;
  padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--pf-line);
  font-size: 14px; font-weight: 600;
  color: var(--pf-muted);
}
.pf-page:hover { color: var(--pf-primary); }
.pf-page.active { color: #fff; background: var(--pf-grad); border-color: transparent; }
.pf-page.disabled, .pf-page.gap { opacity: .5; border-color: transparent; background: transparent; }

/* İçerik detayı */
.pf-crumb { margin: 2px 4px 12px; }
.pf-crumb a { color: var(--pf-muted); }
.pf-detail { padding: 16px; }
.pf-detail-media {
  border-radius: 14px;
  overflow: hidden;
  background: #1b1535;
  max-height: 70vh;
}
.pf-detail-media img, .pf-detail-media video { width: 100%; height: 100%; object-fit: contain; display: block; max-height: 70vh; }
.pf-detail-square { max-width: 320px; margin: 0 auto; aspect-ratio: 1 / 1; background: linear-gradient(135deg, #ece7fb, #fbe5f0); }
.pf-detail-square img { object-fit: cover; }
.pf-detail-tall { max-width: 420px; margin: 0 auto; }
.pf-detail-title { font-size: 22px; margin: 16px 0 4px; text-align: center; }
.pf-detail-meta { text-align: center; color: var(--pf-muted); font-size: 14px; margin: 0 0 8px; }
.pf-stars { color: #f5a623; letter-spacing: 1px; }
.pf-detail-desc { color: var(--pf-ink); font-size: 15px; line-height: 1.6; margin: 10px 0 0; }
.pf-detail-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
.pf-detail-actions .pf-btn-block { width: 100%; }

/* Uygulama listesi (apps) */
.pf-app { display: flex; flex-direction: column; gap: 10px; }
.pf-app p { margin: 0; color: var(--pf-muted); font-size: 15px; }
.pf-app-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-app-actions .pf-btn { min-height: 42px; padding: 9px 16px; font-size: 14px; }
.pf-prose p { margin: 0 0 12px; }
.pf-prose ul { margin: 6px 0 0 20px; padding: 0; }

/* Alt bilgi */
.pf-footer {
  border-top: 1px solid var(--pf-line);
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--pf-muted);
}
.pf-footer a { color: var(--pf-muted); text-decoration: underline; }

/* ---- AI asistan sayfası ---- */
body.pf-fixed {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}
body.pf-fixed .pf-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
body.pf-fixed .pf-footer { padding: 10px 16px; }
.ai-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 10px 12px 8px;
}
.ai-roles {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scrollbar-width: none;
}
.ai-roles::-webkit-scrollbar { display: none; }
.ai-role {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  border: 1px solid var(--pf-line);
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--pf-ink);
  transition: box-shadow .12s ease, border-color .12s ease;
}
.ai-role img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.ai-role.active {
  border-color: transparent;
  background: var(--pf-grad);
  color: #fff;
  box-shadow: 0 6px 16px rgba(91, 43, 224, 0.3);
}
.ai-chat {
  flex: 1;
  min-height: 200px;
  overflow-y: auto;
  background: var(--pf-card);
  border: 1px solid var(--pf-line);
  border-radius: var(--pf-radius);
  box-shadow: var(--pf-shadow-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ai-row { display: flex; align-items: flex-end; gap: 8px; }
.ai-row.user { flex-direction: row-reverse; }
.ai-row img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.ai-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.ai-row.bot .ai-bubble { background: #f1ecfd; color: var(--pf-ink); border-bottom-left-radius: 6px; }
.ai-row.user .ai-bubble { background: var(--pf-grad); color: #fff; border-bottom-right-radius: 6px; }
.ai-row.error .ai-bubble { background: #fdecf2; color: #a3123f; }
.ai-typing span {
  display: inline-block; width: 6px; height: 6px; margin: 0 2px;
  border-radius: 50%; background: var(--pf-primary); opacity: .4;
  animation: ai-blink 1.2s infinite;
}
.ai-typing span:nth-child(2) { animation-delay: .2s; }
.ai-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes ai-blink { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.ai-input {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.ai-input .pf-input { border-radius: 999px; padding-left: 18px; }
.ai-send {
  flex: 0 0 auto;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 0;
  background: var(--pf-grad);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(91, 43, 224, 0.3);
}
.ai-send[disabled] { opacity: .55; cursor: default; }
.ai-hint { text-align: center; font-size: 11px; color: var(--pf-muted); margin: 6px 0 0; }
.ai-bubble strong { font-weight: 700; }

/* Gizlilik metni */
.pf-legal h1 { font-size: 26px; margin: 0 0 4px; }
.pf-legal h2 { font-size: 18px; margin: 22px 0 6px; color: var(--pf-primary-dark); }
.pf-legal p, .pf-legal li { font-size: 15px; color: var(--pf-ink); }
.pf-legal ul { margin: 6px 0 10px 20px; padding: 0; }
