/* VisualLLM — kuvarssoft.com tasarim tokenlari: koyu #0a0f1c zemin, #0ea5e9 vurgu, Inter + JetBrains Mono */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500&display=swap");

:root {
    --indigo: #0284c7;            /* vurgu (isim eski, deger Kuvarssoft teal/sky) */
    --indigo-dark: #0369a1;
    --indigo-soft: rgba(14, 165, 233, 0.12);
    --on-accent: #ffffff;
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-2: #f1f5f9;
    --border: #e2e8f0;
    --text: #0f172a;
    --text-soft: #475569;
    --ok: #059669;
    --warn: #d97706;
    --err: #e11d48;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 24px rgba(15, 23, 42, 0.06);
}

@media (prefers-color-scheme: dark) {
    :root {
        --indigo: #0ea5e9;
        --indigo-dark: #38bdf8;
        --indigo-soft: rgba(14, 165, 233, 0.14);
        --on-accent: #04121f;
        --bg: #0a0f1c;
        --surface: #0f1623;
        --surface-2: #131c2c;
        --border: #1f2a40;
        --text: #f0f4fa;
        --text-soft: #94a3b8;
        --ok: #10b981;
        --warn: #f59e0b;
        --err: #f43f5e;
        --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.3);
    }
}

* { box-sizing: border-box; }
input[type=range] { accent-color: var(--indigo); }

body {
    margin: 0;
    font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------------------------------------------------------------- header */
header.site {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 20;
}

header.site .wrap {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 62px;
    flex-wrap: wrap;
}

.brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.brand:hover { text-decoration: none; }
.brand .dot {
    width: 11px; height: 11px; border-radius: 50%;
    background: var(--indigo);
    box-shadow: 0 0 0 4px var(--indigo-soft);
}

nav.main { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-wrap: wrap; }
nav.main a, nav.main button.linkish {
    padding: 7px 13px;
    border-radius: 999px;
    color: var(--text-soft);
    font-weight: 500;
    font-size: 0.94rem;
    border: none;
    background: none;
    font-family: inherit;
    cursor: pointer;
}
nav.main a:hover, nav.main button.linkish:hover {
    background: var(--surface-2);
    color: var(--text);
    text-decoration: none;
}
nav.main a.active { background: var(--indigo-soft); color: var(--indigo-dark); }

.lang { display: flex; gap: 2px; margin-left: 6px; }
.lang a {
    padding: 4px 9px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.lang a.on { background: var(--indigo); color: var(--on-accent); }

/* ----------------------------------------------------------------- bits */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 20px;
    border-radius: 999px;
    background: var(--indigo);
    color: var(--on-accent);
    font-weight: 600;
    font-family: inherit;
    font-size: 0.95rem;
    border: 1px solid var(--indigo);
    cursor: pointer;
    transition: background 0.15s ease;
}
.btn:hover { background: var(--indigo-dark); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--indigo); }
.btn.ghost:hover { background: var(--indigo-soft); }
.btn.quiet {
    background: var(--surface-2); color: var(--text-soft); border-color: var(--border);
}
.btn.quiet:hover { background: var(--border); color: var(--text); }
.btn.danger { background: transparent; color: var(--err); border-color: var(--border); }
.btn.danger:hover { background: rgba(220, 38, 38, 0.1); }
.btn.sm { padding: 6px 14px; font-size: 0.85rem; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}

.grid { display: grid; gap: 16px; }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-soft);
    white-space: nowrap;
}
.pill.ok { background: rgba(22, 163, 74, 0.12); color: var(--ok); border-color: transparent; }
.pill.warn { background: rgba(217, 119, 6, 0.12); color: var(--warn); border-color: transparent; }
.pill.err { background: rgba(220, 38, 38, 0.12); color: var(--err); border-color: transparent; }
.pill.indigo { background: var(--indigo-soft); color: var(--indigo-dark); border-color: transparent; }

.muted { color: var(--text-soft); }
.small { font-size: 0.87rem; }
code, pre, .mono {
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.86em;
}
code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }
pre {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    overflow-x: auto;
    line-height: 1.5;
}
pre code { background: none; padding: 0; }

/* ---------------------------------------------------------------- forms */
label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number],
select, textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: 0.97rem;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--indigo);
    box-shadow: 0 0 0 3px var(--indigo-soft);
}
.field { margin-bottom: 16px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 160px; }
.row > .shrink { flex: 0 0 auto; }
.hp { position: absolute; left: -9999px; }

/* --------------------------------------------------------------- tables */
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-soft); }
tr:last-child td { border-bottom: none; }
.scroll-x { overflow-x: auto; }

/* --------------------------------------------------------------- flashes */
.flash {
    padding: 12px 16px;
    border-radius: 11px;
    margin-bottom: 12px;
    font-weight: 500;
    border: 1px solid transparent;
}
.flash.success { background: rgba(22, 163, 74, 0.1); color: var(--ok); }
.flash.error { background: rgba(220, 38, 38, 0.1); color: var(--err); }
.flash.warning { background: rgba(217, 119, 6, 0.1); color: var(--warn); }

/* ------------------------------------------------------------------ hero */
.hero { padding: 64px 0 40px; text-align: center; }
.hero h1 {
    font-size: clamp(2rem, 5vw, 3.1rem);
    line-height: 1.15;
    margin: 0 0 16px;
    letter-spacing: -0.02em;
}
.hero p.sub {
    font-size: 1.1rem;
    color: var(--text-soft);
    max-width: 660px;
    margin: 0 auto 28px;
}
.hero .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.price-tag {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 6px 18px;
    border-radius: 999px;
    background: var(--indigo-soft);
    color: var(--indigo-dark);
    font-weight: 700;
    margin-bottom: 22px;
}

.stats { display: flex; gap: 36px; justify-content: center; flex-wrap: wrap; margin: 36px 0; }
.stats .stat { text-align: center; }
.stats .num { font-size: 2.1rem; font-weight: 700; line-height: 1; color: var(--indigo); }
.stats .lbl { font-size: 0.86rem; color: var(--text-soft); }

section { padding: 28px 0; }
section h2 { font-size: 1.5rem; margin: 0 0 6px; }
section > .wrap > p.lead { color: var(--text-soft); margin: 0 0 20px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* --------------------------------------------------------------- pricing */
.plans { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.plan { position: relative; }
.plan.featured { border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-soft), var(--shadow); }
.plan .badge {
    position: absolute; top: -12px; right: 20px;
    background: var(--indigo); color: var(--on-accent);
    padding: 3px 14px; border-radius: 999px;
    font-size: 0.78rem; font-weight: 600;
}
.plan .amount { font-size: 2.6rem; font-weight: 700; line-height: 1; }
.plan ul { list-style: none; padding: 0; margin: 18px 0; }
.plan li { padding: 6px 0 6px 26px; position: relative; color: var(--text-soft); }
.plan li::before {
    content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700;
}

/* ------------------------------------------------------------ playground */
.pg { display: grid; grid-template-columns: 260px 1fr; gap: 18px; align-items: start; }
@media (max-width: 820px) { .pg { grid-template-columns: 1fr; } }

.chat {
    display: flex; flex-direction: column;
    height: min(66vh, 620px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.messages { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 80%; padding: 11px 15px; border-radius: 15px; white-space: pre-wrap; word-wrap: break-word; }
.msg.user { align-self: flex-end; background: var(--indigo); color: var(--on-accent); border-bottom-right-radius: 5px; }
.msg.bot { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 5px; }
.msg.err { align-self: center; background: rgba(220, 38, 38, 0.1); color: var(--err); font-size: 0.9rem; }
.msg .who { font-size: 0.72rem; opacity: 0.7; display: block; margin-bottom: 3px; }
.composer { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--border); background: var(--surface); }
.composer textarea { resize: none; min-height: 46px; max-height: 140px; }
.composer .btn { flex: 0 0 auto; align-self: stretch; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-soft); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: 0.2s; }
.typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }

/* ------------------------------------------------------------- key reveal */
.reveal {
    background: var(--indigo-soft);
    border: 1px dashed var(--indigo);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 18px;
}
.reveal .keybox {
    display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap;
}
.reveal input { font-family: "JetBrains Mono", ui-monospace, monospace; background: var(--surface); }

footer.site {
    border-top: 1px solid var(--border);
    margin-top: 48px;
    padding: 26px 0;
    color: var(--text-soft);
    font-size: 0.88rem;
}
footer.site .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------------------------------------------------------- arama kaynaklari */
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--indigo); }
.sources { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; font-size: 0.82rem; }
.sources a { color: var(--indigo); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sources-head { color: var(--text-soft); font-size: 0.78rem; margin-top: 8px; }

/* ------------------------------------------------------------------- gorsel */
.imgout { min-height: 320px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.imgout img { max-width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--border); }


/* ============================================================== ikonlar */
.ic {
    width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor;
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
    vertical-align: -0.22em; margin-right: 0.4em;
}
nav.main a { display: inline-flex; align-items: center; }
nav.main a .ic { margin-right: 6px; opacity: 0.85; }
label .ic, h3 .ic, .muted .ic { color: var(--indigo); }
.ico {
    display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
    background: var(--indigo-soft); color: var(--indigo); margin-bottom: 12px;
    transition: transform 0.35s cubic-bezier(.34, 1.56, .64, 1), background 0.3s;
}
.ico .ic { width: 22px; height: 22px; margin: 0; }
.card:hover .ico { transform: translateY(-2px) rotate(-7deg) scale(1.1); background: var(--indigo); color: var(--on-accent); }

/* ========================================================== animasyonlar */
:root { --ring: rgba(14, 165, 233, 0.45); }

@keyframes fx-up    { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fx-left  { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes fx-right { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes pop      { 0% { opacity: 0; transform: scale(0.92) translateY(6px); } 100% { opacity: 1; transform: none; } }
@keyframes ring     { 0% { box-shadow: 0 0 0 0 var(--ring); } 70% { box-shadow: 0 0 0 9px rgba(14, 165, 233, 0); } 100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0); } }
@keyframes float    { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes drift-a  { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(46px, 34px) scale(1.18); } }
@keyframes drift-b  { 0%, 100% { transform: translate(0, 0) scale(1.1); } 50% { transform: translate(-50px, -28px) scale(0.92); } }
@keyframes shimmer  { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Marka noktasi nabiz atar */
.brand .dot { animation: ring 2.4s ease-out infinite; }

/* Hero: iki yanda suzulen isik kureleri + sirali giris */
.hero { position: relative; overflow: hidden; }
.hero::before, .hero::after {
    content: ""; position: absolute; width: 440px; height: 440px; border-radius: 50%;
    pointer-events: none; z-index: 0; opacity: 0.55;
}
/* Yumusak radyal degrade: kenara tasmaz, hero siniri boyunca sert kesik olusmaz */
.hero::before { left: -180px; top: 24px; background: radial-gradient(closest-side, rgba(14, 165, 233, 0.5), transparent); animation: drift-a 14s ease-in-out infinite; }
.hero::after  { right: -180px; bottom: 44px; background: radial-gradient(closest-side, rgba(16, 185, 129, 0.45), transparent); animation: drift-b 17s ease-in-out infinite; }
.hero .wrap { position: relative; z-index: 1; }
.hero .price-tag { animation: fx-up 0.6s both, float 4.5s 0.9s ease-in-out infinite; }
.hero h1      { animation: fx-up 0.7s 0.08s both; }
.hero .sub    { animation: fx-up 0.7s 0.18s both; }
.hero .actions{ animation: fx-up 0.7s 0.28s both; }
.hero .stats  { animation: fx-up 0.7s 0.38s both; }
.hero .chips  { animation: fx-up 0.7s 0.48s both; }

/* Yan paneller kayarak girer */
.pg > .card:first-child { animation: fx-left 0.55s cubic-bezier(.2, .8, .2, 1) both; }
.pg > .chat, .pg > .imgout { animation: fx-right 0.55s 0.08s cubic-bezier(.2, .8, .2, 1) both; }

/* Sohbet balonlari ve kaynaklar */
.msg { animation: pop 0.28s ease-out both; }
.sources a { transition: transform 0.2s, color 0.2s; }
.sources a:hover { transform: translateX(3px); }

/* Kartlar: kaydirinca belirir (html.js ile), uzerine gelince hafifce kalkar */
.js .fx { opacity: 0; transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.2, .8, .2, 1);
    transition-delay: calc(var(--i, 0) * 80ms); }
.js .fx.in { opacity: 1; transform: none; }
.grid > .card, .plan { transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease; }
.grid > .card:hover, .plan:hover { transform: translateY(-3px); border-color: var(--indigo); box-shadow: 0 10px 30px -14px var(--ring); }

/* Butonlar */
.btn { transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease; }
.btn:not([disabled]):hover { transform: translateY(-1px); box-shadow: 0 8px 20px -8px var(--ring); }
.btn:not([disabled]):active { transform: scale(0.97); box-shadow: none; }

/* Gorsel sayfasi: uretilirken iskelet, gelince belirir */
.imgout.working::after {
    content: ""; width: 100%; max-width: 520px; aspect-ratio: 1; border-radius: var(--radius);
    background: linear-gradient(100deg, var(--surface-2) 30%, var(--border) 50%, var(--surface-2) 70%);
    background-size: 200% 100%; animation: shimmer 1.5s linear infinite;
}
.imgout img { animation: pop 0.45s ease-out both; }

/* Hareket azaltma tercihi */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .js .fx { opacity: 1; transform: none; }
}

.speak { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; padding: 3px 9px; font-size: 0.78rem;
  border: 1px solid var(--border, rgba(127,127,127,.35)); border-radius: 999px; background: transparent; color: inherit; cursor: pointer; opacity: .8; }
.speak:hover { opacity: 1; }
.speak.on { background: var(--indigo); color: var(--on-accent); opacity: 1; }
.speak svg { width: 14px; height: 14px; }
