/* Ortak modül stilleri: devam düğmesi, öğretmen ipucu, terimler, hızlı mod. Kaynak: game/shared/common.css */

/* Maça devam et (giriş ekranı) */
.resume-btn { display: inline-flex; align-items: center; gap: 12px; margin: 10px auto 0; padding: 8px 18px 8px 12px; border-radius: 999px; border: 1px solid rgba(31, 143, 66, .45); background: #e3f6e8; color: #1f8f42; cursor: pointer; text-align: left; font: inherit; box-shadow: 0 6px 18px rgba(31, 143, 66, .18); animation: resumeIn .4s ease-out; }
.resume-btn:hover { filter: brightness(1.03); } .resume-btn:active { transform: scale(.98); }
.resume-btn .rs-play { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: #1f8f42; color: #fff; font-size: 13px; flex: none; }
.resume-btn .rs-text { display: flex; flex-direction: column; line-height: 1.2; }
.resume-btn .rs-text b { font-size: 15px; } .resume-btn .rs-text small { font-size: 12px; color: #3d7a4e; font-weight: 500; }
html.ui-classic .resume-btn { background: rgba(40, 110, 60, .35); color: #b8ffbf; border-color: rgba(111, 207, 127, .5); }
html.ui-classic .resume-btn .rs-text small { color: #9fd9a8; }
@keyframes resumeIn { from { opacity: 0; transform: translateY(6px); } }

/* Öğretmen ipucu (ilk oyunlar) */
.tutor-tip { position: fixed; left: 16px; right: 16px; margin: 0 auto; width: fit-content; min-width: min(300px, calc(100vw - 32px)); bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 32; display: flex; align-items: flex-start; gap: 10px; max-width: min(440px, calc(100vw - 32px)); padding: 10px 10px 10px 14px; border-radius: 14px; background: linear-gradient(180deg, #fff8e6, #ffeec4); color: #4a3310; border: 1px solid rgba(138, 98, 36, .35); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); font-size: 14px; line-height: 1.4; opacity: 0; pointer-events: none; transform: translateY(10px); transition: .3s; }
.tutor-tip.show { opacity: 1; pointer-events: auto; transform: none; }
.tutor-tip .tt-ic { font-size: 20px; line-height: 1; margin-top: 1px; }
.tutor-tip .tt-text { flex: 1 1 auto; min-width: 0; font-weight: 600; }
.tutor-tip .tt-close { flex: none; width: 28px; height: 28px; border-radius: 50%; border: none; background: rgba(0, 0, 0, .08); color: inherit; font-size: 18px; line-height: 1; cursor: pointer; margin: -3px -3px 0 0; }
.tutor-ready { margin: 10px 0 4px; padding: 10px 12px; border-radius: 12px; background: rgba(212, 169, 79, .18); border: 1px solid rgba(212, 169, 79, .45); color: #f3d98f; font-weight: 600; }
html.ui-modern .tutor-ready { background: #fff3cf; border-color: rgba(138, 98, 36, .35); color: #6b4c18; }

/* Terimler */
.term { text-decoration: underline dotted; text-decoration-thickness: 1.5px; text-underline-offset: 3px; cursor: help; color: inherit; }
.term:hover, .term:focus-visible { text-decoration-style: solid; }
.term-pop { position: fixed; z-index: 60; display: flex; flex-direction: column; gap: 4px; padding: 10px 14px; border-radius: 12px; background: #1d140c; color: #f3e9d6; font-size: 13px; line-height: 1.4; box-shadow: 0 12px 30px rgba(0, 0, 0, .35); opacity: 0; pointer-events: none; transform: translateY(4px); transition: .18s; text-align: left; }
.term-pop.show { opacity: 1; pointer-events: auto; transform: none; }
.term-pop b { color: #f3d98f; font-size: 13px; }
.glossary { margin-top: 10px; }
.glossary-list { display: grid; gap: 6px; margin: 6px 0 0; }
.glossary-list div { padding: 8px 10px; border-radius: 10px; background: rgba(0, 0, 0, .22); }
.glossary-list dt { font-weight: 700; color: var(--gold-light, #f3d98f); }
.glossary-list dd { margin: 2px 0 0; font-size: 14px; color: #e2d6bf; }
html.ui-modern .glossary-list div { background: #faf7f0; }
html.ui-modern .glossary-list dt { color: #1d140c; } html.ui-modern .glossary-list dd { color: #3d3226; }

/* Hızlı mod: oyun ekranındaki geçişler kısalır */
html.fast #game * { transition-duration: 60ms !important; }
html.fast .toast { transition-duration: .12s !important; }
.variant-diff { margin-top: 8px; font-size: 13px; line-height: 1.4; max-width: 520px; }
.hero-diff { margin: 6px auto 0; color: #5a4a36; text-align: center; }

/* Yüksek kontrast görünüm (Modern üzerine): siyah/beyaz, kalın kenarlar, büyük yazı */
html.ui-contrast { --text: #000; --muted: #222; --line: #000; --gold: #7a5200; --gold-light: #7a5200; }
html.ui-contrast body { background: #fff; color: #000; font-size: 17px; }
html.ui-contrast .menu-card, html.ui-contrast .modal-card { background: #fff; box-shadow: 0 0 0 3px #000; color: #000; }
html.ui-contrast .card-title, html.ui-contrast .modal-card h2, html.ui-contrast .modal-card p, html.ui-contrast .rules p, html.ui-contrast .rules li, html.ui-contrast .hint, html.ui-contrast .status-line, html.ui-contrast .status, html.ui-contrast .hero-sub, html.ui-contrast .cta-note, html.ui-contrast .hero-links button, html.ui-contrast .glossary-list dd, html.ui-contrast .glossary-list dt, html.ui-contrast .variant-diff { color: #000 !important; }
html.ui-contrast .btn, html.ui-contrast .tool, html.ui-contrast .ctrl-btn, html.ui-contrast .seg button, html.ui-contrast .back, html.ui-contrast .icon-btn, html.ui-contrast .lang-switch button, html.ui-contrast .gcard, html.ui-contrast .resume-btn, html.ui-contrast .setting-row { background: #fff !important; color: #000 !important; border: 2px solid #000 !important; box-shadow: none !important; text-shadow: none !important; }
html.ui-contrast .seg button.on, html.ui-contrast .lang-switch button.on, html.ui-contrast .btn-green, html.ui-contrast .btn-gold, html.ui-contrast .cta, html.ui-contrast .btn-red { background: #000 !important; color: #fff !important; border-color: #000 !important; }
html.ui-contrast .cta .icon, html.ui-contrast .btn-green .icon, html.ui-contrast .btn-gold .icon { filter: brightness(10); }
html.ui-contrast .toggle i { border: 2px solid #000; }
html.ui-contrast .coach-line, html.ui-contrast .turn-pill, html.ui-contrast .skill-badge, html.ui-contrast .fair-badge, html.ui-contrast .last-move { background: #fff !important; color: #000 !important; border: 2px solid #000 !important; }
html.ui-contrast .coach-line.error, html.ui-contrast .coach-line.blunder { background: #000 !important; color: #fff !important; }
html.ui-contrast .toast { background: #000 !important; color: #fff !important; border: 2px solid #fff; }
html.ui-contrast .tutor-tip { background: #fff; color: #000; border: 2px solid #000; }
html.ui-contrast .term { text-decoration-thickness: 2px; }
html.ui-contrast .term-pop { background: #000; color: #fff; border: 2px solid #fff; }
html.ui-contrast .seat-box .plate { background: #fff !important; color: #000 !important; border: 2px solid #000 !important; }
html.ui-contrast .seat-box.active .plate { background: #000 !important; color: #fff !important; }
html.ui-contrast .seat-box .avatar { border: 2px solid #000; }
html.ui-contrast .hero-board, html.ui-contrast .demo-board-wrap, html.ui-contrast .demo-rack { opacity: .25; }
html.ui-contrast :focus-visible { outline: 3px solid #000; outline-offset: 2px; }
/* Oyun tahtaları */
html.ui-contrast .sq.light { background: #fff !important; } html.ui-contrast .sq.dark { background: #555 !important; }
html.ui-contrast .piece.p0::before { background: #fff !important; border: 3px solid #000 !important; box-shadow: none !important; }
html.ui-contrast .piece.p1::before { background: #000 !important; border: 3px solid #fff !important; box-shadow: 0 0 0 2px #000 !important; }
html.ui-contrast .pit, html.ui-contrast .store { background: #fff !important; border: 2px solid #000 !important; box-shadow: none !important; }
html.ui-contrast .pit.legal { outline: 3px solid #000; outline-offset: 2px; }
html.ui-contrast .tile, html.ui-contrast .dtile { background: #fff !important; border: 2px solid #000 !important; box-shadow: none !important; }
html.ui-contrast .tile.legal, html.ui-contrast .dtile.legal { outline: 3px solid #000; outline-offset: 2px; }
html.ui-contrast .rack, html.ui-contrast .my-rack, html.ui-contrast .hand, html.ui-contrast .table, html.ui-contrast .chain-wrap { background: #fff !important; }
html.ui-contrast .slot { background: #eee !important; box-shadow: inset 0 0 0 1px #000 !important; }

/* Tahtanın altında gerçek metin (arama motoru ve ilk gelen için) */
.about { padding: 28px 20px 40px; background: #f6f1e7; border-top: 1px solid rgba(0, 0, 0, .06); }
.about-inner { max-width: 760px; margin: 0 auto; color: #3d3226; font-size: 15px; line-height: 1.55; }
.about h2 { margin: 0 0 8px; font-size: 20px; color: #1d140c; }
.about p { margin: 6px 0; } .about a { color: #1f5fb3; font-weight: 600; }
html[lang="tr"] .about [lang="en"], html[lang="en"] .about [lang="tr"] { display: none; }
html.ui-classic .about { background: #160f0a; border-top-color: rgba(212, 169, 79, .25); }
html.ui-classic .about-inner, html.ui-classic .about h2 { color: #e2d6bf; }
/* Kural sayfaları: başlangıç dizilimi, sözlük, SSS */
.rules-dl dt { font-weight: 700; margin-top: 10px; }
.rules-dl dd { margin: 2px 0 0 0; }
.rules-list { margin: 6px 0; padding-left: 22px; } .rules-list li { margin: 4px 0; }
.faq h3 { font-size: 18px; margin: 18px 0 4px; }
.quick { margin: 14px 0 4px; padding: 12px 16px; background: #fff; border: 1px solid rgba(0,0,0,.12); border-left: 4px solid #1f8f42; border-radius: 10px; }
.quick h2 { font-size: 17px; margin: 0 0 6px; }
.quick dl { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 4px 14px; font-size: 15px; }
.quick dt { font-weight: 700; } .quick dd { margin: 0; }
@media (max-width: 520px) { .quick dl { grid-template-columns: 1fr; } .quick dd { margin-bottom: 6px; } }
.rules-toc { font-size: 15px; margin: 10px 0 0; } .rules-toc a { margin-right: 12px; display: inline-block; }
/* Tüm oyunlar menüsü (shared/seo.js derlemede ekler) */
.about nav.games { margin-top: 18px; padding-top: 12px; border-top: 1px dashed rgba(0,0,0,.12); font-size: 14px; }
.about nav.games p { margin: 4px 0; }
.about nav.games a { display: inline-block; margin-right: 12px; font-weight: 500; }
.about nav.games a[aria-current] { color: inherit; font-weight: 700; text-decoration: none; }
html.ui-classic .about nav.games { border-top-color: rgba(212, 169, 79, .25); }
html.ui-classic .about nav.games a { color: #d4a94f; }

/* Marka çubuğu: Snug Table */
.site-bar { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; max-width: 1100px; margin: 0 auto; padding: 10px 20px 0; font-size: 13px; color: #6b5a45; }
.site-brand { font-weight: 800; font-size: 15px; letter-spacing: .02em; color: #1d140c; text-decoration: none; }
.site-brand::before { content: "▣"; margin-right: 6px; color: #1f8f42; }
.site-brand:hover { color: #1f8f42; }
.site-tag { opacity: .85; }
html.ui-contrast .site-bar { color: #000; } html.ui-contrast .site-brand { color: #000; }
.about .brand-about { margin-top: 12px; padding-top: 10px; border-top: 1px dashed rgba(0,0,0,.12); }

/* Hareket efektleri katmanı (GC.fx): tüm ekran, tıklanamaz */
.fx-layer { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 65; overflow: visible; }
.fx-layer .fx-ripple { fill: none; stroke: #fff; stroke-width: 3; filter: drop-shadow(0 0 2px rgba(0,0,0,.35)); }
.fx-layer .fx-ripple.hit { stroke: #e25b4a; stroke-width: 4; }
.fx-layer .fx-trail { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 2 9; opacity: 0; filter: drop-shadow(0 0 2px rgba(0,0,0,.35)); }
html.ui-modern .fx-layer .fx-ripple { stroke: #1f8f42; filter: none; }
html.ui-modern .fx-layer .fx-ripple.hit { stroke: #c2402f; }
html.ui-modern .fx-layer .fx-trail { stroke: #1d140c; filter: none; }
html.ui-modern .fx-layer .fx-ripple.on-dark, html.ui-modern .fx-layer .fx-trail.on-dark { stroke: #fff; }
@media (prefers-reduced-motion: reduce) { .fx-layer { display: none; } }
.site-link { margin-left: auto; color: inherit; font-size: 13px; }
.site-link:hover { color: #1f8f42; }
html.ui-contrast .site-link { color: #000; }
/* Tek dil (shared/site.js TR_ENABLED=false): dil seçiciler gizli */
html.one-lang .lang-switch, html.one-lang .top .lang, html.one-lang .setting-block:has(.lang-switch) { display: none !important; }
button.is-soon { opacity: .72; }

/* Pencereler küçük ekrana sığmazsa arka plan kayar; kart üstten kesilmez (Ayarlar 860+ px) */
.modal { overflow-y: auto; overscroll-behavior: contain; align-items: flex-start; }
.modal > .modal-card { margin: auto; flex: none; }
/* Modern görünümde altın düğme koyu zeminli: Ayarlar'daki OK metni beyaz kalsın */
html.ui-modern #settingsClose { color: #fff; }

/* Kutlama: büyük yazı + konfeti */
.celebrate { position: fixed; left: 50%; top: 40%; z-index: 70; transform: translate(-50%, -50%) scale(.6); opacity: 0; pointer-events: none; padding: 14px 26px; border-radius: 18px; background: rgba(29, 20, 12, .88); color: #f3d98f; font: 800 clamp(26px, 7vw, 44px)/1.1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; letter-spacing: -.5px; text-align: center; max-width: calc(100vw - 32px); box-shadow: 0 16px 40px rgba(0, 0, 0, .35); transition: transform .35s cubic-bezier(.2, .9, .3, 1.4), opacity .3s; }
.celebrate.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.celebrate.badge { font-size: clamp(18px, 4.5vw, 26px); top: 22%; color: #fff; background: linear-gradient(180deg, #2fbd5a, #1f8f42); }
.confetti { position: fixed; z-index: 69; width: 8px; height: 12px; margin: -6px 0 0 -4px; border-radius: 2px; pointer-events: none; }

/* İstatistik kartı (giriş ekranı) ve maç sonu satırları */
.stats-card { margin: 10px auto 0; max-width: 520px; width: fit-content; border-radius: 16px; background: rgba(255, 255, 255, .75); border: 1px solid rgba(0, 0, 0, .08); box-shadow: 0 6px 18px rgba(0, 0, 0, .08); text-align: left; color: #1d140c; }
.stats-card[open] { width: min(520px, calc(100vw - 32px)); }
.stats-card summary { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; padding: 9px 16px; cursor: pointer; font-weight: 700; font-size: 14px; list-style: none; }
.stats-card summary::-webkit-details-marker { display: none; }
.stats-card summary::after { content: '▾'; opacity: .5; } .stats-card[open] summary::after { content: '▴'; }
.st-body { padding: 0 12px 12px; }
.st-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 10px; }
.st-table th, .st-table td { padding: 5px 4px; text-align: center; border-bottom: 1px solid rgba(0, 0, 0, .07); }
.st-table thead th { font-size: 11px; font-weight: 600; color: #6b5a44; } .st-table tbody th { text-align: left; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.badge-chip { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; padding: 6px 9px; border-radius: 12px; background: #fff3cf; border: 1px solid rgba(138, 98, 36, .3); font-size: 13px; font-weight: 700; color: #4a3310; }
.badge-chip b { font-size: 16px; } .badge-chip small { flex-basis: 100%; font-weight: 500; font-size: 11px; color: #7a6650; }
.badge-chip.locked { background: #f1ede6; border-color: rgba(0, 0, 0, .06); color: #8a7d6c; filter: grayscale(1); }
.st-streak { font-weight: 700; color: #f3d98f; } html.ui-modern .st-streak { color: #c0661a; }
.st-new { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 8px 0; }
.badge-chip.new { background: linear-gradient(180deg, #e3f6e8, #c9efd4); border-color: #2fbd5a; color: #1f6b35; animation: resumeIn .5s ease-out; }
html.ui-classic .stats-card { background: rgba(0, 0, 0, .3); color: #f3e9d6; border-color: rgba(212, 169, 79, .3); }
html.ui-classic .st-table thead th { color: #d9c9a8; }

/* Günlük meydan okuma */
.daily-btn { display: inline-flex; align-items: center; gap: 10px; margin: 10px auto 0; padding: 8px 18px 8px 12px; border-radius: 999px; border: 1px solid rgba(42, 122, 217, .4); background: #e6f0fc; color: #1d4f8f; cursor: pointer; text-align: left; font: inherit; box-shadow: 0 6px 18px rgba(42, 122, 217, .15); }
.daily-btn:hover { filter: brightness(1.03); } .daily-btn:active { transform: scale(.98); }
.daily-btn .dl-ic { font-size: 22px; line-height: 1; } .daily-btn .rs-text { display: flex; flex-direction: column; line-height: 1.2; }
.daily-btn .rs-text b { font-size: 15px; } .daily-btn .rs-text small { font-size: 12px; font-weight: 500; opacity: .85; }
.daily-btn.done { background: #eef6ee; border-color: rgba(31, 143, 66, .35); color: #1f6b35; }
html.ui-classic .daily-btn { background: rgba(42, 122, 217, .25); color: #cfe3ff; border-color: rgba(120, 170, 240, .5); }
.daily-result { margin: 10px 0; padding: 10px 12px; border-radius: 12px; background: rgba(42, 122, 217, .12); border: 1px solid rgba(42, 122, 217, .35); }
.daily-result p { margin: 4px 0 !important; } .daily-result .btn { margin-top: 6px; width: 100%; }
.daily-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #2a7ad9; color: #fff; font-size: 11px; font-weight: 700; vertical-align: middle; }

/* Maç sonu inceleme */
.review { margin: 10px 0; text-align: left; } .review h3 { margin: 0 0 6px; font-size: 15px; }
.review ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 13px; line-height: 1.4; }
.review small { opacity: .75; }
.rv-g { display: inline-block; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #fff; background: #c98a2b; }
.rv-g.error { background: #d9534f; } .rv-g.blunder { background: #8e1f1b; }
.review-clean { font-weight: 700; color: #1f8f42; }
.bot-quote { margin: 8px 0; font-style: italic; } .bot-quote b { font-style: normal; }
.persona-line { margin-top: 6px; font-size: 13px; opacity: .85; }
.hotseat-btn { display: block; margin: 8px auto 0; padding: 6px 14px; border: none; border-radius: 999px; background: transparent; color: inherit; font: inherit; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; opacity: .8; cursor: pointer; }
.hotseat-btn:hover { opacity: 1; }
