/* STRAI PWA — açık tema, lacivert/mavi marka; DISC renkleri yalnız profil rozetlerinde. */
/* Koyu tema (tek tema): derin lacivert zemin, canlı gradyan vurgular. DISC renkleri rozetlerde. */
:root {
  --bg: #0b1020; --s1: #141a30; --s2: #1b2340; --s3: #243055; --line: #273156; --line-2: #35427a;
  --fg: #eef2ff; --mute: #94a0c8; --brand: #4f7cff; --brand-2: #22d3ee; --brand-ink: #ffffff;
  --mor: #8b5cf6; --pembe: #ec4899; --turuncu: #fb923c;
  --ok: #34d399; --bad: #f87171;
  --kirmizi: #f05252; --mavi: #3b82f6; --yesil: #22c55e; --sari: #fbbf24;
  --grad-brand: linear-gradient(135deg, #4f7cff 0%, #22d3ee 100%);
  --grad-mor: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  --grad-yesil: linear-gradient(135deg, #22c55e 0%, #22d3ee 100%);
  --grad-sicak: linear-gradient(135deg, #fb923c 0%, #f05252 100%);
  --glow: 0 10px 30px -10px rgba(79, 124, 255, .55);
  --r: 18px; --r-s: 12px; --ease: cubic-bezier(.2,.7,.2,1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body { background-image: radial-gradient(900px 500px at 80% -10%, rgba(79,124,255,.16), transparent 60%); background-repeat: no-repeat; }
body { font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; min-height: 100dvh; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { font: inherit; color: inherit; }

.app { max-width: 560px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; padding: 0 16px; padding-top: env(safe-area-inset-top); }
.bar { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: .12em; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand img { border-radius: 8px; }
.bar-right { display: flex; align-items: center; gap: 8px; }
.icon-btn { background: none; border: 0; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; cursor: pointer; color: var(--mute); }
.icon-btn:hover { background: var(--s2); color: var(--fg); }

.view { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 8px 0 max(24px, env(safe-area-inset-bottom)); animation: rise .3s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

h1 { font-size: 26px; line-height: 1.15; margin: 8px 0 4px; letter-spacing: -.01em; }
h2 { font-size: 18px; margin: 14px 0 6px; }
p { margin: 0 0 8px; }
.mute { color: var(--mute); }
.small { font-size: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

.card { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; animation: pop .45s var(--ease) both; }
.view > *:nth-child(1) { animation-delay: 0ms } .view > *:nth-child(2) { animation-delay: 40ms } .view > *:nth-child(3) { animation-delay: 80ms } .view > *:nth-child(4) { animation-delay: 120ms } .view > *:nth-child(5) { animation-delay: 160ms } .view > *:nth-child(6) { animation-delay: 200ms } .view > *:nth-child(7) { animation-delay: 240ms } .view > *:nth-child(n+8) { animation-delay: 280ms }
.list > *:nth-child(1) { animation-delay: 60ms } .list > *:nth-child(2) { animation-delay: 110ms } .list > *:nth-child(3) { animation-delay: 160ms } .list > *:nth-child(4) { animation-delay: 210ms } .list > *:nth-child(n+5) { animation-delay: 260ms }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.card.tap { cursor: pointer; transition: transform .15s var(--ease), border-color .15s; text-decoration: none; display: block; color: inherit; }
.card.tap:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(0,0,0,.8), var(--glow); }
.card.tap:active { transform: scale(.99); }
.card.quiet { background: var(--s2); border-color: transparent; }

.btn { appearance: none; border: 0; border-radius: var(--r-s); padding: 0 18px; height: 52px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; transition: transform .15s var(--ease), background .2s, opacity .2s; }
.btn:active { transform: scale(.985); }
.btn.pri { background: var(--grad-brand); color: var(--brand-ink); box-shadow: var(--glow); }
.btn.pri:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn.sec { background: var(--s1); border: 1px solid var(--line-2); }
.btn.sec:hover { background: var(--s2); }
.btn.ghost { background: none; color: var(--mute); height: 44px; }
.btn.ok { background: var(--grad-yesil); color: #06281c; }
.btn.bad { background: var(--s1); border: 1px solid var(--bad); color: var(--bad); }
.btn.sm { height: 40px; padding: 0 14px; width: auto; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.actions { display: flex; gap: 10px; }
.actions .btn { flex: 1; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 13px; font-weight: 600; color: var(--mute); letter-spacing: .02em; }
.field input, .field textarea, .field select { width: 100%; background: var(--s1); border: 1px solid var(--line-2); border-radius: var(--r-s); color: var(--fg); font: inherit; font-size: 17px; padding: 13px 14px; outline: 0; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-2) 22%, transparent); }
.field textarea { min-height: 96px; resize: vertical; line-height: 1.4; }
.err { color: var(--bad); font-size: 14px; min-height: 1.2em; }

/* renk rozetleri */
.renk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 3px 9px 3px 6px; border-radius: 999px; background: var(--s2); color: var(--fg); white-space: nowrap; }
.renk i { width: 10px; height: 10px; border-radius: 50%; background: var(--mute); display: inline-block; }
.renk.kirmizi i { background: var(--kirmizi); } .renk.mavi i { background: var(--mavi); } .renk.yesil i { background: var(--yesil); } .renk.sari i { background: var(--sari); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; background: var(--mute); }
.dot.kirmizi { background: var(--kirmizi); } .dot.mavi { background: var(--mavi); } .dot.yesil { background: var(--yesil); } .dot.sari { background: var(--sari); }
.card.renkli { border-left: 5px solid var(--mute); }
.card.renkli.kirmizi { border-left-color: var(--kirmizi); } .card.renkli.mavi { border-left-color: var(--mavi); } .card.renkli.yesil { border-left-color: var(--yesil); } .card.renkli.sari { border-left-color: var(--sari); }

/* durum */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--s2); color: var(--mute); }
.pill.yapildi { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.pill.yapilamadi { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }
.pill.bekliyor { background: color-mix(in srgb, var(--brand-2) 14%, transparent); color: var(--brand-2); }

/* anket */
.soru { font-size: 18px; font-weight: 700; margin: 6px 0 12px; }
.secenek { display: block; width: 100%; text-align: left; background: var(--s1); border: 1px solid var(--line-2); border-radius: var(--r-s); padding: 14px 16px; margin-bottom: 10px; cursor: pointer; font-size: 16px; line-height: 1.35; transition: border-color .15s, background .15s; }
.secenek:hover { border-color: var(--brand-2); }
.secenek.sel { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--s1)); }
.ilerleme { height: 6px; border-radius: 3px; background: var(--s2); overflow: hidden; }
.ilerleme i { display: block; height: 100%; background: var(--grad-brand); transition: width .3s var(--ease); }

/* büyük renk kartı (anket sonucu) */
.sonuc { text-align: center; padding: 28px 18px; border-radius: var(--r); color: #fff; }
.sonuc { box-shadow: 0 20px 50px -20px rgba(0,0,0,.8); }
.sonuc.kirmizi { background: linear-gradient(135deg, #f05252, #fb923c); } .sonuc.mavi { background: linear-gradient(135deg, #3b82f6, #22d3ee); } .sonuc.yesil { background: linear-gradient(135deg, #22c55e, #22d3ee); color: #06281c; } .sonuc.sari { background: linear-gradient(135deg, #fbbf24, #fb923c); color: #2a1a00; }
.sonuc b { display: block; font-size: 32px; letter-spacing: .04em; }
.skorlar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.skorlar > div { background: var(--s1); border: 1px solid var(--line); border-radius: 10px; padding: 8px 6px; text-align: center; font-size: 13px; }
.skorlar b { display: block; font-size: 18px; }

/* liste */
.list { display: flex; flex-direction: column; gap: 10px; }
.kisi { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--s1); cursor: pointer; }
.kisi.sel { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--s1)); }
.kisi .ad { font-weight: 700; }
.kisi input { width: 20px; height: 20px; accent-color: var(--brand); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--s3); flex: none; font-size: 15px; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--line-2); }
.avatar.kirmizi { background: var(--kirmizi); } .avatar.mavi { background: var(--mavi); } .avatar.yesil { background: var(--yesil); } .avatar.sari { background: var(--sari); }

.mesaj { white-space: pre-wrap; line-height: 1.5; font-size: 17px; }
.mesaj-edit textarea { min-height: 120px; }

.stat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat > div { background: var(--s1); border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: var(--r-s); padding: 12px 8px; text-align: center; animation: pop .45s var(--ease) both; }
.stat > div:nth-child(2) { border-top-color: var(--ok); } .stat > div:nth-child(3) { border-top-color: var(--sari); }
.stat b { display: block; font-size: 24px; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font-size: 12px; color: var(--mute); }

/* antrenman: sohbet */
.sohbet { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }
.balon { max-width: 86%; padding: 12px 14px; border-radius: 16px; line-height: 1.45; font-size: 16px; white-space: pre-wrap; }
.balon.musteri { align-self: flex-start; background: var(--s1); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.balon.satisci, .balon.lider { align-self: flex-end; background: var(--grad-brand); color: var(--brand-ink); border-bottom-right-radius: 6px; box-shadow: var(--glow); }
.balon.koc { align-self: flex-start; background: linear-gradient(135deg, rgba(139,92,246,.22), rgba(236,72,153,.12)); border: 1px solid rgba(139,92,246,.45); border-bottom-left-radius: 6px; }
.balon { animation: pop .35s var(--ease) both; }
.balon small { display: block; font-size: 11px; opacity: .65; margin-bottom: 3px; letter-spacing: .04em; text-transform: uppercase; }
.yaziyor { align-self: flex-start; color: var(--mute); font-size: 14px; padding: 6px 4px; }
.giris-kutu { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0 max(10px, env(safe-area-inset-bottom)); display: flex; gap: 8px; align-items: flex-end; }
.giris-kutu textarea { flex: 1; min-height: 48px; max-height: 140px; resize: none; background: var(--s1); border: 1px solid var(--line-2); border-radius: 14px; padding: 12px 14px; font: inherit; font-size: 16px; color: var(--fg); outline: 0; }
.giris-kutu textarea:focus { border-color: var(--brand-2); }
.giris-kutu .btn { width: 48px; height: 48px; padding: 0; border-radius: 14px; flex: none; }
.senaryo { display: block; width: 100%; text-align: left; background: var(--s1); border: 1px solid var(--line-2); border-radius: var(--r); padding: 14px 16px; margin-bottom: 10px; cursor: pointer; }
.senaryo:hover { border-color: var(--brand-2); }
.senaryo.sel { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--s1)); }
.senaryo b { display: block; margin-bottom: 2px; }
.karne { display: grid; gap: 10px; }
.olcek { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; font-size: 14px; }
.olcek .bar { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--s2); overflow: hidden; }
.olcek .bar i { display: block; height: 100%; background: var(--grad-brand); border-radius: 4px; animation: buyu .9s var(--ease) both; transform-origin: left; }
@keyframes buyu { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.olcek b { font-size: 15px; }
.etiketler { display: flex; flex-wrap: wrap; gap: 6px; }
.etiket { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--s2); color: var(--mute); }
.etiket.on { background: color-mix(in srgb, var(--brand-2) 16%, transparent); color: var(--brand-2); }
.taahhut { border-left: 4px solid var(--ok); padding: 10px 14px; background: color-mix(in srgb, var(--ok) 8%, var(--s1)); border-radius: 10px; font-weight: 600; }
details.dokum summary { cursor: pointer; font-weight: 700; color: var(--mute); padding: 6px 0; }

.empty { text-align: center; padding: 36px 16px; color: var(--mute); }
.hero { text-align: center; padding: 24px 0 8px; }
.hero img { width: 88px; height: 88px; border-radius: 22px; }

.toast { position: fixed; left: 50%; bottom: max(90px, env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--grad-brand); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; box-shadow: 0 8px 30px rgba(0,0,0,.25); animation: rise .25s var(--ease) both; z-index: 9; max-width: calc(100vw - 32px); }
.spin { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .view, .toast, .card, .balon, .stat > div, .olcek .bar i { animation: none; } .ilerleme i, .btn, .card.tap { transition: none; } }
@media (min-width: 720px) { .app { padding-top: 12px; } }
/* ses */
.giris-kutu .btn.mic { width: 48px; color: var(--mute); }
.giris-kutu .btn.mic.on { color: #fff; background: var(--bad); border-color: var(--bad); animation: nabiz 1.2s ease-in-out infinite; }
@keyframes nabiz { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--bad) 45%, transparent); } 50% { box-shadow: 0 0 0 8px transparent; } }
.btn.oku { justify-content: flex-start; padding-left: 4px; gap: 6px; }
.btn.oku.on { color: var(--brand-2); }
@media (prefers-reduced-motion: reduce) { .giris-kutu .btn.mic.on { animation: none; } }
.giris-kutu .btn.mic.mod { border-color: var(--brand-2); color: var(--brand-2); }
