/* cbsoybas.com uygulama sayfaları.
   Sudoku App: kareli defter, sarı fosforlu kalem, mavi kurşun kalem; özellikler bir Sudoku ızgarasında.
   PlaneChat: gökyüzü ve iOS mesaj balonları; özellikler bir sohbet, SSS soru-cevap balonları, gizlilik bir biniş kartı.
   2048: bej oyun tahtası ve renkli kareler; başlık dört kareden, özellikler 2'den 256'ya kareler, gizlilik özeti altın bir 2048 karesi. */

/* ---------- Tokenlar ---------- */
.app-sudoku {
  --bg: #E9EEF3; --surface: #FBFCFD; --ink: #18212C; --muted: #5B6878; --line: #C6CFDA; --line-strong: #18212C;
  --accent: #2A5BB5; --accent-ink: #FFFFFF; --mark: #F0C53E; --mark-ink: #2A2206; --soft: #E3EAF8;
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --hand: "Caveat", "Bradley Hand", "Comic Sans MS", cursive;
}
.app-planechat {
  --bg: #F2F7FD; --surface: #FFFFFF; --ink: #0B1B2E; --muted: #5A6B80; --line: #DCE6F2; --line-strong: #0B1B2E;
  --accent: #1A84F2; --accent-ink: #FFFFFF; --mark: #1A84F2; --mark-ink: #FFFFFF; --soft: #E7F1FD;
  --bubble-a: #2F8FFF; --bubble-b: #18B4F5; --bubble-in: #E9EDF2; --bubble-in-ink: #0B1B2E;
  --sky-a: #64BEFF; --sky-b: #2F8BF0; --cloud: rgba(255,255,255,.55);
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Figtree", "Segoe UI", system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Figtree", "Segoe UI", system-ui, sans-serif;
  --hand: "Caveat", "Bradley Hand", cursive;
}
@media (prefers-color-scheme: dark) {
  .app-sudoku {
    --bg: #10151C; --surface: #18202A; --ink: #E5EAF0; --muted: #8D9AA9; --line: #2B3643; --line-strong: #C9D3DE;
    --accent: #8FB5FF; --accent-ink: #0E1A33; --mark: #E3B934; --mark-ink: #221B04; --soft: #1E2A3D;
    color-scheme: dark;
  }
  .app-planechat {
    --bg: #07111E; --surface: #0F1F33; --ink: #EAF2FC; --muted: #8FA3BC; --line: #1D3350; --line-strong: #EAF2FC;
    --accent: #4AA6FF; --accent-ink: #04111F; --mark: #4AA6FF; --mark-ink: #04111F; --soft: #12304F;
    --bubble-in: #1A2C43; --bubble-in-ink: #EAF2FC;
    --sky-a: #0E2A52; --sky-b: #061528; --cloud: rgba(160,200,255,.12);
    color-scheme: dark;
  }
}

.app-g2048 {
  --bg: #FAF8EF; --surface: #FFFDF8; --ink: #5E554C; --muted: #8A7F73; --line: #E6DCCD; --line-strong: #776E65;
  --accent: #8F7A66; --accent-ink: #FFFFFF; --mark: #EDC22E; --mark-ink: #3B2F00; --soft: #F3EBDD;
  --board: #BBADA0; --empty: #CDC1B4; --t-ink: #776E65;
  --t2: #EEE4DA; --t4: #EDE0C8;
  --display: "Bricolage Grotesque", "SF Pro Rounded", "Avenir Next", system-ui, sans-serif;
  --body: "Figtree", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --hand: "Caveat", "Bradley Hand", cursive;
}
@media (prefers-color-scheme: dark) {
  .app-g2048 {
    --bg: #1C1A17; --surface: #26221E; --ink: #F2EBE3; --muted: #B5A797; --line: #3B342E; --line-strong: #CDC1B4;
    --accent: #D9B98F; --accent-ink: #1C1A17; --mark: #EDC22E; --mark-ink: #2A2100; --soft: #2F2A25;
    --board: #3B342E; --empty: #4D453E; --t-ink: #F2EBE3;
    --t2: #6B6057; --t4: #7D6D5A;
    color-scheme: dark;
  }
}

/* ---------- Temel ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; padding-inline: 18px;
  padding-block: env(safe-area-inset-top, 0px) env(safe-area-inset-bottom, 0px);
  background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--body);
}
.app-sudoku {
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 24px 24px;
}
img { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.wrap { max-width: 68rem; margin-inline: auto; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; line-height: 1.05; }
p { margin: 0; }

/* Üst menü */
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-block: 22px; }
.brand { font: 800 1.15rem var(--display); color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.brand span { background: linear-gradient(transparent 58%, var(--mark) 58%, var(--mark) 90%, transparent 90%); }
.app-planechat .brand span { background: none; position: relative; }
.app-planechat .brand span::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; border-radius: 2px; background: var(--accent); }
.top nav { display: flex; gap: 6px 16px; align-items: center; flex-wrap: wrap; font-weight: 600; font-size: .95rem; }
.top nav > a { color: var(--muted); text-decoration: none; }
.top nav > a:hover { color: var(--ink); }
.lang-switch { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.lang-switch a { font-size: .76rem; font-weight: 700; letter-spacing: .05em; color: var(--muted); text-decoration: none; padding: 4px 10px; border-radius: 999px; }
.lang-switch a:hover { color: var(--ink); }
.lang-switch a[aria-current="true"] { background: var(--ink); color: var(--bg); }

/* Butonlar */
.buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font-weight: 700; text-decoration: none; background: var(--mark); color: var(--mark-ink); border: 1.5px solid transparent; transition: transform .2s; }
.button:hover { transform: translateY(-2px); }
.button.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); font-weight: 600; }
.app-planechat .button:not(.ghost) { background: linear-gradient(135deg, var(--bubble-a), var(--bubble-b)); color: #fff; box-shadow: 0 10px 22px -12px rgba(26,132,242,.8); }

/* ---------- Tanıtım sayfası: giriş ---------- */
.hero { display: grid; grid-template-columns: 1fr 1.05fr; gap: 40px; align-items: center; padding-block: 40px 70px; position: relative; }
.hero > * { min-width: 0; }
.hero-copy { display: grid; gap: 18px; justify-items: start; position: relative; z-index: 1; }
.hero-copy .icon { width: 108px; height: 108px; border-radius: 25px; box-shadow: 0 14px 30px -14px rgba(10,20,40,.55); }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); font-weight: 800; letter-spacing: -.04em; }
.app-sudoku .hero h1 span { background: linear-gradient(transparent 56%, var(--mark) 56%, var(--mark) 92%, transparent 92%); padding-inline: 4px; margin-inline: -4px; }
.hero .lead { font-size: 1.25rem; color: var(--muted); max-width: 30rem; }
.hero-shots { position: relative; height: 520px; z-index: 1; }
.shot { position: absolute; top: 0; width: 46%; max-width: 230px; border-radius: 30px; padding: 7px; background: #0C0F14; box-shadow: 0 30px 50px -28px rgba(10,20,40,.7); }
.shot img { display: block; width: 100%; height: auto; border-radius: 24px; }
.shot:nth-child(1) { left: 2%; top: 60px; transform: rotate(-7deg); }
.shot:nth-child(2) { left: 27%; z-index: 2; }
.shot:nth-child(3) { right: 2%; top: 60px; transform: rotate(7deg); }

/* PlaneChat gökyüzü */
.app-planechat .hero { padding-inline: clamp(18px, 4vw, 48px); border-radius: 36px; overflow: hidden; margin-bottom: 20px; }
.app-planechat .hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--sky-a), var(--sky-b)); z-index: 0; }
.app-planechat .hero h1, .app-planechat .hero .lead { color: #fff; }
.app-planechat .hero .lead { opacity: .9; }
.app-planechat .hero .button.ghost { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.4); }
.app-planechat .hero .button:not(.ghost) { background: #fff; color: #0B5ED7; box-shadow: 0 10px 22px -12px rgba(0,30,80,.6); }
.sky { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.sky .cloud { position: absolute; height: 26px; border-radius: 999px; background: var(--cloud); }
.sky .cloud::before { content: ""; position: absolute; width: 46%; height: 160%; left: 18%; bottom: 30%; border-radius: 999px; background: inherit; }
.sky svg.route { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.sky .route path { fill: none; stroke: rgba(255,255,255,.55); stroke-width: 2.5; stroke-dasharray: 2 12; stroke-linecap: round; }
.sky .plane { position: absolute; width: 34px; height: 34px; color: #fff; offset-path: path("M -60 70 C 260 10, 620 110, 1300 30"); offset-rotate: auto 90deg; animation: fly 16s linear infinite; }
@keyframes fly { from { offset-distance: 0%; } to { offset-distance: 100%; } }
.app-planechat .shot { background: #02060C; }

/* ---------- Özellikler ---------- */
.section-h { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 800; letter-spacing: -.03em; margin-bottom: 26px; }

/* Sudoku: özellikler bir ızgarada */
.grid9 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 3px solid var(--line-strong); border-radius: 14px; overflow: hidden; }
.cell { position: relative; padding: 40px 22px 24px; background: var(--surface); min-width: 0; transition: background .2s; }
.cell:hover { background: var(--soft); }
.cell .n { position: absolute; top: 8px; left: 14px; font: 700 1.6rem/1 var(--hand); color: var(--accent); }
.cell p { font-size: 1.02rem; }
.cell.empty { display: grid; grid-template-columns: repeat(3, 1fr); place-items: center; padding: 22px; font: 600 1.05rem/1 var(--hand); color: var(--muted); }
.cell.empty span { opacity: .55; }
.cell.empty:hover { background: transparent; }

/* PlaneChat: özellikler bir sohbet */
.thread { max-width: 46rem; margin-inline: auto; display: grid; gap: 10px; padding: 0; list-style: none; margin-block: 0; }
.day { justify-self: center; font-size: .82rem; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--line); padding: 4px 14px; border-radius: 999px; margin-bottom: 10px; }
.thread li.in, .thread li.out { max-width: min(78%, 34rem); padding: 11px 16px; border-radius: 22px; font-size: 1.02rem; line-height: 1.45; position: relative; }
.thread li.in { justify-self: start; background: var(--bubble-in); color: var(--bubble-in-ink); border-bottom-left-radius: 7px; }
.thread li.out { justify-self: end; background: linear-gradient(135deg, var(--bubble-a), var(--bubble-b)); color: #fff; border-bottom-right-radius: 7px; padding-right: 40px; }
.thread li.out svg { position: absolute; right: 13px; bottom: 10px; width: 17px; height: 17px; opacity: .9; }
.typing { justify-self: start; display: flex; gap: 5px; padding: 14px 16px; border-radius: 22px; border-bottom-left-radius: 7px; background: var(--bubble-in); }
.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); animation: dot 1.3s infinite; }
.typing i:nth-child(2) { animation-delay: .18s; } .typing i:nth-child(3) { animation-delay: .36s; }
@keyframes dot { 30% { transform: translateY(-4px); opacity: .5; } }

.features-sec { padding-block: 30px 70px; }

/* ---------- Gizlilik ve destek ---------- */
.doc { max-width: 48rem; margin-inline: auto; padding-block: 30px 60px; display: grid; gap: 22px; }
.doc-head { display: flex; align-items: center; gap: 18px; }
.doc-head img { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 10px 22px -12px rgba(10,20,40,.5); flex: none; }
.doc-head div { min-width: 0; }
.doc h1 { font-size: clamp(2rem, 5.5vw, 3.2rem); font-weight: 800; letter-spacing: -.035em; }
.muted { color: var(--muted); font-size: .92rem; margin-top: 6px; }
.doc .lead { font-size: 1.15rem; color: var(--muted); }

.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: clamp(20px, 4vw, 36px); }
.sheet h3 { font-size: 1.12rem; margin: 24px 0 6px; }
.sheet h3:first-child { margin-top: 0; }
.sheet p { max-width: 65ch; }
.app-sudoku .sheet { position: relative; padding-left: clamp(36px, 6vw, 56px); }
.app-sudoku .sheet::before { content: ""; position: absolute; top: 0; bottom: 0; left: clamp(18px, 3.5vw, 30px); width: 2px; background: #E57373; opacity: .55; }

/* Özet: Sudoku'da fosforlu not, PlaneChat'te biniş kartı */
.summary { font-size: 1.15rem; line-height: 1.5; }
.app-sudoku .summary { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px; }
.app-sudoku .summary strong { background: linear-gradient(transparent 55%, var(--mark) 55%, var(--mark) 92%, transparent 92%); color: var(--ink); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.pass { display: grid; grid-template-columns: 1fr auto; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 0 18px 36px -26px rgba(0,40,100,.45); }
.pass-main { padding: 22px 24px; position: relative; }
.pass-main::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: linear-gradient(180deg, var(--bubble-a), var(--bubble-b)); }
.pass-stub { display: grid; place-items: center; gap: 6px; padding: 18px 26px; border-left: 2px dashed var(--line); background: var(--soft); color: var(--accent); font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; position: relative; }
.pass-stub::before, .pass-stub::after { content: ""; position: absolute; left: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); }
.pass-stub::before { top: -10px; } .pass-stub::after { bottom: -10px; }
.pass-stub svg { width: 34px; height: 34px; transform: rotate(45deg); }

/* SSS */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 52px 16px 20px; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 20px; top: 50%; width: 12px; height: 12px; margin-top: -8px; border-right: 2.5px solid var(--muted); border-bottom: 2.5px solid var(--muted); transform: rotate(45deg); transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq .a { padding: 0 20px 18px; color: var(--ink); }
.app-sudoku .faq details[open] { border-color: var(--line-strong); }
.app-sudoku .faq summary::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 10px; background: var(--mark); border-radius: 2px; transform: rotate(45deg) translateY(-1px); }

/* PlaneChat SSS: soru gelen balon, cevap giden balon */
.app-planechat .faq details { background: transparent; border: 0; overflow: visible; display: grid; gap: 8px; }
.app-planechat .faq summary { justify-self: start; max-width: 85%; background: var(--bubble-in); color: var(--bubble-in-ink); border-radius: 22px; border-bottom-left-radius: 7px; padding: 12px 46px 12px 18px; }
.app-planechat .faq summary::after { right: 18px; }
.app-planechat .faq .a { justify-self: end; max-width: 85%; padding: 12px 18px; border-radius: 22px; border-bottom-right-radius: 7px; background: linear-gradient(135deg, var(--bubble-a), var(--bubble-b)); color: #fff; }
.app-planechat .faq .a a { color: #fff; }
.app-planechat .faq { gap: 14px; }

footer { border-top: 1px solid var(--line); padding-block: 26px 36px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .9rem; }
footer a { color: var(--ink); }

/* ---------- 2048 ---------- */
/* Kare renkleri (uygulamanın Klasik teması) */
.app-g2048 .v2 { background: var(--t2); color: var(--t-ink); }
.app-g2048 .v4 { background: var(--t4); color: var(--t-ink); }
.v8 { background: #F2B179; color: #fff; } .v16 { background: #F59563; color: #fff; }
.v32 { background: #F67C5F; color: #fff; } .v64 { background: #F65E3B; color: #fff; }
.v128 { background: #EDCF72; color: #5E4A00; } .v256 { background: #EDCC61; color: #5E4A00; }
.v512 { background: #EDC850; color: #5E4A00; } .v1024 { background: #EDC53F; color: #4A3A00; }
.v2048 { background: #EDC22E; color: #3B2F00; }

.app-g2048 .brand span { background: none; position: relative; }
.app-g2048 .brand span::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 4px; border-radius: 2px; background: var(--mark); }
.app-g2048 .button:not(.ghost) { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 22px -14px rgba(90,70,40,.7); }

/* Giriş: oyun tahtasının bej zemini ve ızgarası */
.app-g2048 .hero { padding-inline: clamp(18px, 4vw, 48px); border-radius: 36px; overflow: hidden; margin-bottom: 20px; }
.felt { position: absolute; inset: 0; z-index: 0; background-color: var(--soft);
  background-image: linear-gradient(var(--bg) 10px, transparent 10px), linear-gradient(90deg, var(--bg) 10px, transparent 10px);
  background-size: 88px 88px; background-position: -5px -5px; opacity: .9; }
.felt::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 90% at 25% 30%, var(--soft) 30%, transparent 75%); }
.tiles { display: inline-flex; gap: clamp(6px, 1.2vw, 12px); }
.tiles .t { display: grid; place-items: center; width: clamp(3.2rem, 9vw, 5.6rem); aspect-ratio: 1; border-radius: 16px; font-weight: 800; box-shadow: 0 10px 18px -12px rgba(90,70,40,.6); animation: tile-in .5s cubic-bezier(.3,1.5,.6,1) both; }
.tiles .t:nth-child(2) { animation-delay: .08s; } .tiles .t:nth-child(3) { animation-delay: .16s; } .tiles .t:nth-child(4) { animation-delay: .24s; box-shadow: 0 0 30px -4px rgba(237,194,46,.7); }
@keyframes tile-in { from { transform: scale(.2); opacity: 0; } }
.app-g2048 .shot { background: #2A2520; }
@media (prefers-color-scheme: dark) { .app-g2048 .felt { opacity: .35; } }

/* Özellikler: 2048 tahtası */
.board16 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 14px; background: var(--board); border-radius: 22px; }
.tile { position: relative; border-radius: 14px; padding: 46px 18px 20px; min-width: 0; font-size: 1rem; line-height: 1.45; transition: transform .2s; }
.tile:hover { transform: scale(1.03); }
.tile .n { position: absolute; top: 10px; left: 16px; font: 800 1.35rem/1 var(--display); opacity: .85; }
.tile p { font-weight: 500; }

/* Gizlilik özeti: altın 2048 karesi */
.gold { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px; }
.gold .badge { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 16px; background: #EDC22E; color: #3B2F00; font: 800 1.45rem var(--display); box-shadow: 0 0 26px -6px rgba(237,194,46,.8); }
.app-g2048 .summary { font-size: 1.12rem; }

/* SSS: her soru bir sayı karesiyle başlar */
.chip { display: inline-grid; place-items: center; min-width: 2.2rem; height: 2.2rem; padding: 0 6px; margin-right: 12px; border-radius: 9px; font: 800 .85rem var(--display); vertical-align: middle; }
.app-g2048 .faq summary { display: flex; align-items: center; padding-block: 12px; }
.app-g2048 .faq details[open] { border-color: var(--line-strong); }
.app-g2048 .sheet { border-top: 6px solid var(--board); }

/* ---------- Duyarlı ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 30px; padding-block: 24px 50px; }
  .app-planechat .hero { margin-inline: -18px; padding-inline: 18px; border-radius: 0 0 28px 28px; padding-top: 60px; }
  .hero-shots { height: 430px; }
  .grid9 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cell.empty:last-child { display: none; }
  .app-g2048 .hero { margin-inline: -18px; padding-inline: 18px; border-radius: 0 0 28px 28px; }
  .board16 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .hero-shots { height: 340px; }
  .shot { border-radius: 22px; padding: 5px; }
  .shot img { border-radius: 18px; }
  .grid9 { grid-template-columns: 1fr; }
  .cell.empty { display: none; }
  .thread li.in, .thread li.out { max-width: 88%; }
  .pass { grid-template-columns: 1fr; }
  .pass-stub { border-left: 0; border-top: 2px dashed var(--line); grid-auto-flow: column; }
  .pass-stub::before, .pass-stub::after { display: none; }
  .board16 { grid-template-columns: 1fr; gap: 10px; padding: 10px; }
  .gold { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
