:root {
    --bg: #f6f5fd;
    --surface: #ffffff;
    --surface-2: #eeecfa;
    --text: #17152b;
    --muted: #5f5b7a;
    --border: #dfdcf0;
    --accent: #7c3aed;
    --accent-2: #0891b2;
    --accent-strong: #6d28d9;
    --accent-soft: #ede9fe;
    --warn: #b7791f;
    --good: #15803d;
    --mono: ui-monospace, SFMono-Regular, "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
    --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b0a1f;
        --surface: #14122e;
        --surface-2: #1c1940;
        --text: #e8e6f5;
        --muted: #9a96b8;
        --border: #2a2752;
        --accent: #a78bfa;
        --accent-2: #22d3ee;
        --accent-strong: #c4b5fd;
        --accent-soft: #2a2157;
        --warn: #f0b860;
        --good: #4ade80;
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    line-height: 1.55;
}
a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: var(--mono); font-size: .92em; }
pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; overflow-x: auto; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); margin: .2em 0 .4em; }
h2 { font-size: 1.35rem; margin: 1.8em 0 .6em; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.main { padding-top: 12px; padding-bottom: 40px; min-height: 60vh; }
.muted { color: var(--muted); }
.sub { color: var(--muted); font-size: .85rem; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 1.15rem; color: var(--text); }
.brand:hover { text-decoration: none; }
/* Logo (Shared/_Logo.cshtml): halkadaki parlama ve uydu döner. "Hareketi azalt" açıksa durur; uydu sabit yerinde görünür. */
.brand-logo { flex: none; display: block; }
.brand-logo .logo-still { display: none; }
@media (prefers-reduced-motion: reduce) {
    .brand-logo .logo-live { display: none; }
    .brand-logo .logo-still { display: inline; }
}
.nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--text); font-size: .95rem; }

.btn {
    display: inline-block; background: var(--accent); color: #fff; border-radius: 8px;
    padding: 10px 18px; font-weight: 600; border: 0; cursor: pointer;
}
.btn:hover { background: var(--accent-strong); text-decoration: none; }
@media (prefers-color-scheme: dark) { .btn { color: #0b0a1f; } }
.nav a.btn { color: inherit; }
.btn-small { padding: 6px 12px; font-size: .9rem; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface-2); }

.hero { padding: 28px 0 8px; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 720px; }
.hero .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.card h3 { margin: 0 0 6px; font-size: 1.02rem; }
.card p { margin: 0; color: var(--muted); font-size: .93rem; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 800px) { .grid-2 { grid-template-columns: 1fr; } }

.big-score { font-size: clamp(3rem, 10vw, 4.5rem); font-weight: 800; color: var(--accent); font-family: var(--mono); line-height: 1; }
.score-caption { color: var(--muted); }

.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-family: var(--mono); white-space: nowrap; }
td.score { font-weight: 700; color: var(--accent-strong); }
.machine-link { font-weight: 600; }
@media (max-width: 700px) { .hide-sm { display: none; } }

dl.specs { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dl.specs dt { color: var(--muted); }
dl.specs dd { margin: 0; overflow-wrap: anywhere; }

.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 104px 1fr 56px; gap: 10px; align-items: center; }
.bar-label { font-size: .9rem; }
.bar-track { position: relative; height: 12px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.bar-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 6px; }
.bar-ref { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--text); opacity: .35; }
.bar-value { text-align: right; font-family: var(--mono); font-weight: 600; }

/* Filtre çubuğu: tüm filtreler tek panelde, gruplar yan yana; sığmayan grup alt satıra geçer. */
.filter-bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin: 12px 0 16px; padding: 10px 14px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
}
.filter-group { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; margin: 0; }
.filter-label { color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
/* Segment: bitişik seçenekler. Dar ekranda kendi içinde yatay kayar. */
.seg {
    display: inline-flex; min-width: 0; max-width: 100%; overflow-x: auto; scrollbar-width: none;
    border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
}
.seg::-webkit-scrollbar { display: none; }
.seg a { padding: 4px 11px; font-size: .84rem; line-height: 1.4; color: var(--text); white-space: nowrap; }
.seg a + a { border-left: 1px solid var(--border); }
.seg a:hover { text-decoration: none; background: var(--surface-2); }
.seg a.active { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
.seg a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.filter-group .select { font-size: .84rem; padding: 4px 10px; }

.pager { display: flex; gap: 10px; justify-content: center; margin: 18px 0; }

.share { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

.ad { margin: 16px 0; min-height: 90px; display: flex; justify-content: center; }
.ad > ins { width: 100%; }
.ad-placeholder {
    align-items: center; border: 1px dashed var(--border); border-radius: 10px; color: var(--muted);
    font-size: .85rem; background: repeating-linear-gradient(45deg, transparent, transparent 8px, var(--surface-2) 8px, var(--surface-2) 16px);
}

.os-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.os-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.os-card h3 { margin: 0; }
.os-card .links { display: flex; flex-wrap: wrap; gap: 8px; }

.site-footer { border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: .88rem; }
.footer-inner { padding: 18px 16px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; }
.footer-inner p { margin: 0; }

.ad-html { min-height: 0; }

.offers { margin: 26px 0; }
.offers-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.offers-head h2 { margin: 0 0 10px; }
.sponsored-tag {
    font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
    border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px;
}
.offer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.offer {
    display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    padding: 14px; color: var(--text);
}
.offer:hover { text-decoration: none; border-color: var(--accent); }
.offer img { width: 72px; height: 72px; object-fit: contain; flex: none; border-radius: 8px; background: #fff; }
.offer-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.offer-reason { font-size: .85rem; color: var(--warn); }
.offer-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; }
.offer-price { font-family: var(--mono); font-weight: 700; }
.disclosure { margin-top: 8px; }

/* Yönetim paneli */
.admin .nav a.active { color: var(--accent-strong); font-weight: 600; }
.inline-form { display: inline; margin: 0; }
.narrow { max-width: 420px; margin: 30px auto; }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 5px; font-weight: 600; font-size: .92rem; }
.form label.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.form input:not([type=checkbox]), .form select, .form textarea {
    font: inherit; font-weight: 400; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
    background: var(--surface); color: var(--text); width: 100%;
}
.form textarea { font-family: var(--mono); font-size: .88rem; min-height: 110px; }
.form .hint { font-weight: 400; color: var(--muted); font-size: .82rem; }
.form fieldset { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; display: grid; gap: 12px; }
.form legend { font-weight: 700; padding: 0 6px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.form-error, .field-error { color: #c0392b; }
.field-error { font-size: .85rem; font-weight: 400; }
.notice { background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 10px; padding: 10px 14px; }
.btn-danger { background: #c0392b; color: #fff; }
.btn-danger:hover { background: #a93226; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.stat .value { font-size: 1.6rem; font-weight: 800; font-family: var(--mono); }
.pill { display: inline-block; font-size: .78rem; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border); }
.pill.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }

/* Yerel AI kodlama testi */
/* Coding models: makine seçici ve model tablosu */
.machine-picker h2 { margin-top: 0; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-top: 12px; }
.picker { display: grid; gap: 8px; align-content: start; border: 1px solid var(--border); border-radius: 10px; padding: 14px; background: var(--surface-2); }
.picker h3 { margin: 0; font-size: 1rem; }
.picker p { margin: 0; }
.picker label { font-size: .85rem; font-weight: 600; }
.picker input, .picker select {
    font: inherit; font-size: .93rem; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px;
    background: var(--surface); color: var(--text); width: 100%; min-width: 0;
}
.picker .btn { justify-self: start; }
.picker-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.picker-row > div { display: grid; gap: 6px; align-content: start; }
.notice-warn { background: transparent; border-color: var(--warn); }
.link-button { font: inherit; color: var(--accent-strong); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
table.models td:first-child { min-width: 230px; }
table.models th.num { white-space: normal; min-width: 92px; }
table.models .th-sub { font-size: .72rem; text-transform: none; letter-spacing: 0; font-weight: 400; }
table.models td.num .sub { font-size: .72rem; font-family: var(--sans); }
table.models td.fit-good { color: var(--good); font-weight: 600; }
table.models td.fit-ok { color: var(--warn); font-weight: 600; }
table.models td.fit-bad { color: var(--muted); }
.score-link { font-weight: 700; color: var(--text); }
.use-cases { margin-top: 4px; }
.tag-use { margin-left: 0; margin-right: 4px; }
.status { display: inline-block; font-size: .82rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.status.fit-neutral { color: var(--accent-strong); }
.quant { display: inline-block; margin: 1px 8px 1px 0; white-space: nowrap; font-family: var(--mono); font-size: .86rem; }
.quant-ref { color: var(--accent-strong); font-weight: 700; }
.other-score { display: inline-block; margin-right: 10px; white-space: nowrap; }

/* Ülke: bayrak görseli (4:3 SVG) + kod. İnce kenar, beyaz ağırlıklı bayrakların (JP, PL) zeminde kaybolmasını önler. */
.country { margin-left: 6px; font-size: .8rem; color: var(--muted); white-space: nowrap; }
dd .country { margin-left: 0; font-size: inherit; color: inherit; }
.flag {
    display: inline-block; width: 1.333em; height: 1em; vertical-align: -.15em; margin-right: 1px;
    border-radius: 2px; box-shadow: 0 0 0 1px var(--border); object-fit: cover;
}
/* Ülke bilinmiyor: bayrakla aynı kutuda dünya simgesi, kenarsız. */
.country-unknown { margin-left: 6px; font-size: .8rem; color: var(--muted); white-space: nowrap; }
dd .country-unknown { margin-left: 0; font-size: inherit; }
.flag.globe { border-radius: 0; box-shadow: none; }
.select {
    font: inherit; font-size: .9rem; padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px;
    background: var(--surface); color: var(--text); max-width: 100%;
}
.tag { display: inline-block; vertical-align: 1px; margin-left: 6px; font-size: .72rem; padding: 0 7px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.fit { font-weight: 600; }
.fit-good { color: var(--good); }
.fit-ok { color: var(--warn); }
.fit-bad { color: var(--muted); }
.ai-teaser { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; }
@media (max-width: 640px) { .ai-teaser { grid-template-columns: 1fr; } }

/* Palet: gece moru (uygulamayla aynı). Mor vurgu, camgöbeği ikincil renk; skorlar ve çubuklar geçişli. */
/* Yerel AI öne çıkan bölümler */
.eyebrow { margin: 0; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-strong); }
.hero h1 em, .big-score {
    font-style: normal; color: var(--accent-strong);
    background: linear-gradient(100deg, var(--accent-strong), var(--accent-2));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.big-score { display: inline-block; }
@media (prefers-color-scheme: dark) {
    body { background: linear-gradient(135deg, #0b0a1f 0%, #15103a 55%, #081e33 100%) fixed; }
}
.insights { margin-bottom: 8px; }
.insights .card h3 { font-size: .98rem; }
table.matrix td:first-child { min-width: 190px; }
table.matrix th.num { white-space: normal; min-width: 96px; }
table.matrix td:nth-child(3) { white-space: normal; }
table.matrix .th-sub { font-size: .72rem; text-transform: none; letter-spacing: 0; font-weight: 400; }
table.matrix td.num .sub { font-size: .72rem; font-family: var(--sans); }
table.matrix td.fit-good { color: var(--good); font-weight: 600; }
table.matrix td.fit-ok { color: var(--warn); font-weight: 600; }
table.matrix td.fit-bad { color: var(--muted); }
ul.tips { padding-left: 1.2em; }
ul.tips li { margin: 6px 0; }
