/* Okno "Jak to dziala?" (React: site/src/guide). Korzysta ze zmiennych kolorow z app.css. */
body.gd-lock { overflow: hidden; }
.gd-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(8, 8, 12, .62); display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.gd-modal { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 18px; width: 100%; max-width: 720px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 18px 20px 20px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55); }
.gd-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gd-head h2 { margin: 0; font-size: 1.35rem; }
.gd-x { font: inherit; font-size: 1.6rem; line-height: 1; width: 44px; height: 44px; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 8px; }
.gd-x:hover { color: var(--text); background: var(--accent-soft); }

.gd-stage { margin: 12px 0 14px; border-radius: 14px; background: linear-gradient(135deg, #2b2358, #121226); padding: 18px; min-height: 230px; display: flex; align-items: center; justify-content: center; }
.gd-win { display: flex; gap: 14px; width: 100%; justify-content: center; flex-wrap: wrap; }
.gd-win.center .gd-dlg { flex: 1 1 200px; max-width: 260px; align-items: center; text-align: center; }
.gd-dlg { background: #1d1d24; color: #ececf1; border: 1px solid #34343f; border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 420px; font-size: .9rem; }
.gd-dlg b { font-size: 1rem; }
.gd-dlg small { color: #a4a4b0; }
.gd-warn { background: #3a1815; color: #ff9b92; border: 1px solid #6a2a25; border-radius: 8px; padding: 8px 10px; font-size: .82rem; }
.gd-field { display: flex; flex-direction: column; gap: 4px; }
.gd-input { background: #121218; border: 1px solid #34343f; border-radius: 8px; padding: 8px 10px; overflow-wrap: anywhere; font-family: ui-monospace, Menlo, monospace; font-size: .85rem; }
.gd-row { display: flex; gap: 8px; justify-content: flex-end; }
.gd-btn { border: 1px solid #44444f; border-radius: 8px; padding: 7px 14px; font-weight: 600; font-size: .85rem; }
.gd-btn.solid { background: #8b74ff; border-color: #8b74ff; color: #0f0f13; }
.gd-logo { border-radius: 8px; }
.gd-list { margin: 0; padding-left: 18px; text-align: left; color: #d3d3dc; }
.gd-chat { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 540px; }
.gd-bubble { border-radius: 14px; padding: 10px 14px; font-size: .92rem; max-width: 88%; }
.gd-bubble.me { align-self: flex-end; background: #34305c; color: #ececf1; }
.gd-bubble.ai { align-self: flex-start; background: #1d1d24; color: #ececf1; border: 1px solid #34343f; display: flex; gap: 10px; align-items: flex-start; }
.gd-bubble.ai .gd-logo { width: 24px; height: 24px; flex: none; }
.gd-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.gd-chip { background: #14301f; color: #55d08a; border-radius: 999px; padding: 4px 12px; font-size: .82rem; }

.gd-info { min-height: 96px; }
.gd-count { color: var(--muted); }
.gd-info h3 { margin: 2px 0 6px; font-size: 1.12rem; }
.gd-info p { margin: 0; color: var(--muted); }
.gd-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0; }
.gd-dots { display: flex; gap: 8px; }
.gd-dot { width: 14px; height: 14px; border-radius: 50%; border: 0; background: var(--line); cursor: pointer; padding: 0; }
.gd-dot[aria-current="true"] { background: var(--accent); }
.gd-nav .btn:disabled { opacity: .45; cursor: default; }
.gd-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.gd-actions .btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.gd-others { margin: 12px 0 6px; }
.gd-url { display: block; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; overflow-wrap: anywhere; font-size: .85rem; }
@media (max-width: 560px) {
  .gd-modal { padding: 14px; border-radius: 14px; }
  .gd-stage { padding: 12px; min-height: 0; }
  .gd-actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: no-preference) {
  .gd-modal { animation: gd-in .18s ease-out; }
  @keyframes gd-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}

/* efekty okna "Jak to dziala?" */
.gd-overlay { animation: gd-fade .25s ease both; backdrop-filter: blur(6px); }
.gd-modal { animation: gd-pop .4s cubic-bezier(.2, .8, .2, 1) both; box-shadow: 0 40px 90px -30px rgba(91, 61, 245, .55); }
.gd-stage { position: relative; overflow: hidden; }
.gd-stage::before { content: ""; position: absolute; inset: -30%; pointer-events: none; opacity: .55; background: radial-gradient(40% 40% at 25% 30%, rgba(139, 116, 255, .35), transparent 70%), radial-gradient(35% 35% at 80% 75%, rgba(226, 85, 197, .28), transparent 70%); animation: gd-drift 14s ease-in-out infinite alternate; }
.gd-stage > * { position: relative; }
.gd-win .gd-dlg, .gd-chat > *, .gd-badges > * { animation: gd-rise .45s cubic-bezier(.2, .7, .2, 1) both; }
.gd-win .gd-dlg:nth-child(2), .gd-chat > :nth-child(2) { animation-delay: .1s; }
.gd-chat > :nth-child(3) { animation-delay: .2s; }
.gd-dot { transition: width .25s ease, background-color .25s ease; }
.gd-dot[aria-current="true"] { width: 30px; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #e255c5); }
@keyframes gd-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes gd-pop { from { opacity: 0; translate: 0 24px; scale: .96; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes gd-rise { from { opacity: 0; translate: 0 12px; } to { opacity: 1; translate: 0 0; } }
@keyframes gd-drift { from { transform: translate3d(-4%, -3%, 0); } to { transform: translate3d(5%, 4%, 0); } }
@media (prefers-reduced-motion: reduce) { .gd-overlay, .gd-modal, .gd-stage::before, .gd-win .gd-dlg, .gd-chat > *, .gd-badges > * { animation: none !important; } .gd-dot { transition: none; } }

/* okno "Jak to dziala?": wiecej ruchu w krokach */
.gd-logo { animation: gd-bob 4s ease-in-out infinite; }
.gd-input { position: relative; }
.gd-input::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--accent); animation: gd-caret 1s steps(1) infinite; }
.gd-btn.solid { position: relative; overflow: hidden; isolation: isolate; box-shadow: 0 0 0 0 rgba(91, 61, 245, .5); animation: gd-beacon 2.6s ease-out infinite; }
.gd-btn.solid::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .35) 50%, transparent 65%); transform: translateX(-120%); animation: gd-sweep 4.5s ease-in-out infinite 1s; }
.gd-dlg { transition: transform .2s ease, box-shadow .25s ease; }
.gd-dlg:hover { transform: translateY(-3px); box-shadow: 0 18px 38px -22px rgba(91, 61, 245, .6); }
.gd-list li { animation: gd-rise .4s cubic-bezier(.2, .7, .2, 1) both; }
.gd-list li:nth-child(2) { animation-delay: .12s; } .gd-list li:nth-child(3) { animation-delay: .24s; } .gd-list li:nth-child(n+4) { animation-delay: .36s; }
.gd-chip { animation: gd-pop-chip .5s cubic-bezier(.3, 1.4, .5, 1) both .3s; }
.gd-badges > :nth-child(2) .gd-chip, .gd-chip:nth-child(2) { animation-delay: .5s; }
.gd-bubble.ai { box-shadow: 0 10px 28px -16px rgba(91, 61, 245, .6); }
@keyframes gd-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -3px; } }
@keyframes gd-caret { 50% { opacity: 0; } }
@keyframes gd-beacon { 0% { box-shadow: 0 0 0 0 rgba(91, 61, 245, .5); } 70%, 100% { box-shadow: 0 0 0 12px rgba(91, 61, 245, 0); } }
@keyframes gd-sweep { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@keyframes gd-pop-chip { from { opacity: 0; scale: .7; } to { opacity: 1; scale: 1; } }
@media (prefers-reduced-motion: reduce) { .gd-logo, .gd-input::after, .gd-btn.solid, .gd-btn.solid::after, .gd-list li, .gd-chip { animation: none !important; } .gd-dlg { transition: none; } .gd-dlg:hover { transform: none; } }

/* ---- Swiatlo WebGL w scenie okna i przechylane okienka (Guide.tsx + landing/light.ts) ---- */
.gd-stage > .light-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 1.4s ease; mix-blend-mode: screen; }
.gd-stage > .light-bg.on { opacity: .55; }
.gd-stage { --tx: 0deg; --ty: 0deg; perspective: 900px; }
.gd-win { transform: rotateX(var(--tx)) rotateY(var(--ty)); transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
@media (prefers-reduced-motion: reduce) { .gd-stage > .light-bg { display: none; } .gd-win { transform: none !important; transition: none; } }
