/* Nefes AI guide on top of the TalepNET page. Every selector is prefixed (.nai-) so the
   site's own styles are never touched; Tailwind preflight is neutralised inside .nai-root. */
@property --nai-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

.nai-root, .nai-root * { box-sizing: border-box; }
.nai-root {
  --nai-p1: #9460ff; --nai-p2: #864ffe; --nai-p3: #5b2fd6; --nai-teal: #22d3ee; --nai-green: #12b981;
  --nai-ink: #0b0a14; --nai-muted: #5d5b6e; --nai-line: rgba(120, 96, 200, .16);
  --nai-card: rgba(255, 255, 255, .86); --nai-card-solid: #fff; --nai-soft: #f4efff;
  --nai-ease: cubic-bezier(.2, 1.25, .35, 1);
  font-family: Manrope, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--nai-ink); line-height: 1.55; -webkit-font-smoothing: antialiased;
}
.nai-root button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; margin: 0; }
.nai-root a { color: inherit; text-decoration: none; }
.nai-root [hidden] { display: none !important; }

/* ---------- frosted veil with a spotlight hole ---------- */
.nai-veil {
  position: fixed; inset: 0; z-index: 2147483000;
  background: radial-gradient(120% 80% at 50% 0%, rgba(76, 40, 170, .30), rgba(14, 10, 32, .42));
  -webkit-backdrop-filter: blur(10px) saturate(1.15); backdrop-filter: blur(10px) saturate(1.15);
  opacity: 0; transition: opacity .45s ease;
}
.nai-veil.nai-on { opacity: 1; }
.nai-ring {
  position: fixed; z-index: 2147483001; pointer-events: none; border-radius: 18px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .95), 0 0 0 6px rgba(148, 96, 255, .45), 0 0 46px 6px rgba(148, 96, 255, .55);
  transition: top .45s var(--nai-ease), left .45s var(--nai-ease), width .45s var(--nai-ease), height .45s var(--nai-ease), opacity .3s;
  animation: nai-ring 2.2s ease-in-out infinite;
}
@keyframes nai-ring { 50% { box-shadow: 0 0 0 2px rgba(255, 255, 255, .95), 0 0 0 9px rgba(148, 96, 255, .28), 0 0 64px 10px rgba(34, 211, 238, .45); } }

/* ---------- the bubble ---------- */
.nai-bubble {
  position: fixed; z-index: 2147483002; left: 50%; top: 22px;
  width: min(580px, calc(100vw - 24px));
  transform: translateX(-50%);
  border-radius: 26px; border: 1.5px solid transparent;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, .97), rgba(250, 247, 255, .93)) padding-box,
    conic-gradient(from var(--nai-a), #864ffe, #22d3ee, #12b981, #c084fc, #864ffe) border-box;
  box-shadow: 0 40px 90px -24px rgba(40, 16, 110, .55), 0 10px 30px -12px rgba(40, 16, 110, .35), inset 0 1px 0 #fff;
  animation: nai-spin 6s linear infinite;
  transition: top .45s var(--nai-ease);
}
@keyframes nai-spin { to { --nai-a: 360deg; } }
.nai-bubble.nai-enter { animation: nai-spin 6s linear infinite, nai-pop .7s var(--nai-ease) both; }
@keyframes nai-pop {
  from { opacity: 0; transform: translateX(-50%) translateY(-18px) scale(.9); filter: blur(8px); }
  to { opacity: 1; transform: translateX(-50%); filter: none; }
}
.nai-bubble::before { /* soft aura */
  content: ""; position: absolute; inset: -30px -40px; z-index: -1; border-radius: 60px; pointer-events: none;
  background: radial-gradient(50% 60% at 30% 40%, rgba(148, 96, 255, .45), transparent 70%),
              radial-gradient(40% 50% at 75% 60%, rgba(34, 211, 238, .30), transparent 70%);
  filter: blur(24px); opacity: .8;
}
.nai-arrow {
  position: absolute; width: 18px; height: 18px; left: 50%; margin-left: -9px; bottom: -9px; transform: rotate(45deg);
  background: #faf7ff; border-right: 1.5px solid rgba(134, 79, 254, .55); border-bottom: 1.5px solid rgba(34, 211, 238, .55);
  border-radius: 0 0 5px 0; transition: left .35s var(--nai-ease);
}
.nai-bubble.nai-below .nai-arrow { bottom: auto; top: -9px; transform: rotate(225deg); }
.nai-bubble.nai-noarrow .nai-arrow { display: none; }

.nai-in { padding: 20px 22px 18px; position: relative; overflow: hidden; border-radius: 24px; }
.nai-in::after { /* shimmer line on top */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(148, 96, 255, .9), rgba(34, 211, 238, .9), transparent);
  background-size: 50% 100%; background-repeat: no-repeat; animation: nai-shine 3.2s ease-in-out infinite;
}
@keyframes nai-shine { from { background-position: -60% 0; } to { background-position: 160% 0; } }

.nai-head { display: flex; align-items: center; gap: 12px; }
.nai-who { flex: 1; min-width: 0; }
.nai-who b { display: block; font-size: 15.5px; font-weight: 800; letter-spacing: -.01em; }
.nai-who small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--nai-muted); font-weight: 600; }
.nai-who small::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--nai-green); box-shadow: 0 0 0 3px rgba(18, 185, 129, .18); }
.nai-chip {
  font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
  color: var(--nai-p2); background: var(--nai-soft); border: 1px solid rgba(134, 79, 254, .18); padding: 5px 10px; border-radius: 99px;
}
.nai-x {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none;
  color: var(--nai-muted); background: rgba(120, 96, 200, .08); transition: background .2s, color .2s;
}
.nai-x:hover { background: rgba(120, 96, 200, .16); color: var(--nai-ink); }

/* animated orb avatar */
.nai-orb {
  position: relative; width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(from var(--nai-a), #9460ff, #22d3ee, #12b981, #c084fc, #9460ff);
  animation: nai-spin 4s linear infinite; box-shadow: 0 8px 22px -6px rgba(134, 79, 254, .7);
}
.nai-orb::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: radial-gradient(circle at 32% 28%, #fff 0, #e9dcff 22%, #9460ff 62%, #4b23c0 100%); }
.nai-orb::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid rgba(148, 96, 255, .45); animation: nai-pulse 2.4s ease-out infinite; }
.nai-orb svg { position: relative; z-index: 1; width: 22px; height: 22px; }
.nai-orb.nai-talk::before { animation: nai-breathe .9s ease-in-out infinite; }
@keyframes nai-pulse { 0% { transform: scale(.9); opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } }
@keyframes nai-breathe { 50% { transform: scale(.9); } }
.nai-orb.nai-sm { width: 36px; height: 36px; }
.nai-orb.nai-sm svg { width: 18px; height: 18px; }

.nai-body { margin-top: 14px; transition: opacity .2s, transform .2s; }
.nai-body.nai-swap { opacity: 0; transform: translateY(6px); }
.nai-title { margin: 0; font-size: clamp(19px, 2.4vw, 23px); font-weight: 800; letter-spacing: -.02em; line-height: 1.25; min-height: 1.25em; }
.nai-title .nai-g { background: linear-gradient(120deg, #864ffe, #5b2fd6 45%, #0ea5b7); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nai-text { margin: 8px 0 0; font-size: 15px; color: #3f3d52; min-height: 1.55em; }
.nai-caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -2px; background: var(--nai-p2); animation: nai-blink .8s steps(1) infinite; }
@keyframes nai-blink { 50% { opacity: 0; } }

.nai-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 7px; }
.nai-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: #3f3d52; animation: nai-rise .4s var(--nai-ease) both; }
.nai-list li b { color: var(--nai-ink); }
.nai-list li i {
  flex: none; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-style: normal;
  font-size: 11.5px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--nai-p1), var(--nai-p3));
}
@keyframes nai-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.nai-prods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.nai-prod {
  display: block; padding: 10px 11px; border-radius: 14px; background: #fff; border: 1px solid var(--nai-line);
  font-size: 12.5px; line-height: 1.35; transition: transform .2s, box-shadow .2s, border-color .2s; animation: nai-rise .45s var(--nai-ease) both;
}
.nai-prod:hover { transform: translateY(-2px); border-color: rgba(134, 79, 254, .45); box-shadow: 0 12px 26px -14px rgba(76, 40, 170, .5); }
.nai-prod span { display: block; font-size: 18px; margin-bottom: 3px; }
.nai-prod b { display: block; font-size: 12.5px; color: var(--nai-ink); }

.nai-foot { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.nai-dots { display: flex; gap: 5px; flex: 1; min-width: 90px; }
.nai-dots i { height: 5px; flex: 1; max-width: 26px; border-radius: 9px; background: rgba(120, 96, 200, .18); transition: background .3s; }
.nai-dots i.nai-done { background: rgba(134, 79, 254, .5); }
.nai-dots i.nai-now { background: linear-gradient(90deg, var(--nai-p1), var(--nai-teal)); }
.nai-btns { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.nai-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 11px 18px; border-radius: 13px;
  font-size: 14.5px !important; font-weight: 700 !important; transition: transform .18s, box-shadow .18s, background .18s;
}
.nai-btn:hover { transform: translateY(-1px); }
.nai-btn:focus-visible, .nai-x:focus-visible, .nai-chipbtn:focus-visible { outline: 3px solid rgba(134, 79, 254, .45); outline-offset: 2px; }
.nai-btn-p {
  color: #fff !important; background: linear-gradient(135deg, var(--nai-p1), var(--nai-p3)) !important;
  box-shadow: 0 10px 24px -10px rgba(110, 60, 240, .9), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.nai-btn-p:hover { box-shadow: 0 14px 30px -10px rgba(110, 60, 240, 1), inset 0 1px 0 rgba(255, 255, 255, .25); }
.nai-btn-o { color: var(--nai-ink) !important; background: rgba(120, 96, 200, .09) !important; }
.nai-btn-o:hover { background: rgba(120, 96, 200, .16) !important; }
.nai-btn-l { color: var(--nai-muted) !important; padding-left: 8px; padding-right: 8px; }
.nai-btn-l:hover { color: var(--nai-ink) !important; }
.nai-kbd { font-size: 11.5px; color: var(--nai-muted); margin-top: 10px; text-align: right; }
.nai-kbd kbd { font: 700 10.5px ui-monospace, monospace; padding: 1px 5px; border-radius: 5px; border: 1px solid var(--nai-line); background: #fff; }

/* ---------- launcher + chat panel ---------- */
.nai-launch {
  position: fixed; right: 20px; bottom: 20px; z-index: 2147482990; display: flex; align-items: center; gap: 10px;
  padding: 7px 18px 7px 7px; border-radius: 99px; color: #fff !important; font-size: 14.5px; font-weight: 800;
  background: linear-gradient(135deg, var(--nai-p1), var(--nai-p3)) !important;
  box-shadow: 0 16px 36px -12px rgba(110, 60, 240, .9); animation: nai-pop2 .6s var(--nai-ease) both;
}
.nai-launch .nai-orb { width: 38px; height: 38px; }
.nai-launch .nai-orb svg { width: 18px; height: 18px; }
@keyframes nai-pop2 { from { opacity: 0; transform: translateY(16px) scale(.9); } to { opacity: 1; transform: none; } }

.nai-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 2147482995; width: 410px; max-width: calc(100vw - 32px);
  height: min(660px, calc(100vh - 40px)); display: flex; flex-direction: column; overflow: hidden; border-radius: 26px;
  border: 1.5px solid transparent;
  background: linear-gradient(#fbf9ff, #fbf9ff) padding-box, conic-gradient(from var(--nai-a), #864ffe, #22d3ee, #12b981, #c084fc, #864ffe) border-box;
  animation: nai-spin 6s linear infinite; box-shadow: 0 40px 90px -24px rgba(40, 16, 110, .55);
  transform-origin: bottom right; transition: transform .3s var(--nai-ease), opacity .25s;
}
.nai-panel.nai-closed { opacity: 0; transform: scale(.88) translateY(20px); pointer-events: none; visibility: hidden; }
@media (max-width: 560px) { .nai-panel { right: 8px; left: 8px; bottom: 8px; width: auto; max-width: none; height: calc(100dvh - 16px); } }
.nai-phead { display: flex; align-items: center; gap: 11px; padding: 14px 12px 14px 14px; color: #fff; background: linear-gradient(135deg, #8b55ff, #5b2fd6 70%, #2f7fd0); }
.nai-phead .nai-who small { color: rgba(255, 255, 255, .85); }
.nai-phead .nai-who small::before { background: #5fffc4; box-shadow: none; }
.nai-hb { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 255, 255, .16) !important; color: #fff !important; font-size: 15px; }
.nai-hb:hover, .nai-hb[aria-pressed="true"] { background: rgba(255, 255, 255, .32) !important; }
.nai-pprog { height: 3px; background: rgba(120, 96, 200, .14); }
.nai-pprog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--nai-p1), var(--nai-teal)); transition: width .4s; }
.nai-pbody { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.nai-msg { max-width: 88%; padding: 10px 14px; border-radius: 17px; font-size: 14.5px; white-space: pre-line; animation: nai-rise .3s ease-out both; }
.nai-msg.nai-bot { background: #fff; border: 1px solid var(--nai-line); border-bottom-left-radius: 6px; align-self: flex-start; box-shadow: 0 4px 14px -10px rgba(76, 40, 170, .4); }
.nai-msg.nai-me { background: linear-gradient(135deg, var(--nai-p1), var(--nai-p3)); color: #fff; border-bottom-right-radius: 6px; align-self: flex-end; }
.nai-msg a { color: var(--nai-p2); font-weight: 700; text-decoration: underline; }
.nai-typing { display: inline-flex; gap: 4px; padding: 13px 14px; }
.nai-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--nai-p1); animation: nai-dot 1.2s infinite; }
.nai-typing i:nth-child(2) { animation-delay: .2s; } .nai-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes nai-dot { 0%, 80%, 100% { opacity: .25; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }
.nai-chips { display: flex; flex-wrap: wrap; gap: 8px; align-self: flex-start; max-width: 100%; }
.nai-chipbtn {
  border: 1px solid rgba(134, 79, 254, .35) !important; background: #fff !important; color: var(--nai-p2) !important;
  font-size: 13.5px !important; font-weight: 700 !important; padding: 8px 13px !important; border-radius: 99px; transition: background .15s;
}
.nai-chipbtn:hover { background: var(--nai-soft) !important; }
.nai-chipbtn.nai-on, .nai-chipbtn.nai-go { background: linear-gradient(135deg, var(--nai-p1), var(--nai-p3)) !important; color: #fff !important; border-color: transparent !important; }
.nai-rec { background: #fff; border: 1px solid var(--nai-line); border-radius: 16px; padding: 12px 14px; align-self: stretch; animation: nai-rise .3s ease-out both; }
.nai-rec .nai-rt { font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--nai-green); }
.nai-rec .nai-rt.nai-tn { color: var(--nai-p2); }
.nai-rec b { display: block; margin: 2px 0 4px; font-size: 15px; }
.nai-rec p { margin: 0 0 10px; font-size: 13.5px; color: var(--nai-muted); }
.nai-rec a { display: inline-block; font-size: 12.5px; font-weight: 800; padding: 7px 12px; border-radius: 10px; color: #fff !important; background: linear-gradient(135deg, var(--nai-p1), var(--nai-p3)); }
.nai-pform { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--nai-line); background: #fff; margin: 0; }
.nai-pform input {
  flex: 1; min-width: 0; border: 1px solid var(--nai-line); background: #f7f4ff; color: var(--nai-ink); border-radius: 13px;
  padding: 11px 13px; font: 500 14.5px Manrope, ui-sans-serif, sans-serif; outline: none;
}
.nai-pform input:focus { border-color: var(--nai-p1); box-shadow: 0 0 0 3px rgba(148, 96, 255, .18); }
.nai-pform button { width: 46px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(135deg, var(--nai-p1), var(--nai-p3)) !important; }
.nai-pnote { font-size: 11px; color: var(--nai-muted); text-align: center; padding: 0 12px 10px; background: #fff; margin: 0; }

@media (max-width: 560px) {
  .nai-bubble { top: 10px; border-radius: 22px; }
  .nai-in { padding: 16px 16px 14px; }
  .nai-prods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nai-kbd { display: none; }
  .nai-bubble .nai-who b { white-space: nowrap; }
  .nai-bubble .nai-who small { display: none; }
  .nai-btn { padding: 10px 14px; }
  .nai-launch { right: 12px; bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .nai-root *, .nai-root *::before, .nai-root *::after { animation: none !important; transition: none !important; }
}
