/* ==================================================================
   Ortak bileşenler (bütün oyunlar): oyuncu kartı, efektler, onay pencereleri, hediye paneli.
   Bu dosya ortak.tpl.css şablonundan üretilir (köşe süsleri tavla.css'ten alınır).
   ================================================================== */

/* ---------------------------------------------------------------- Oyuncu kartı (tavladaki kartla aynı tasarım) */
.okart { position: relative; display: flex; flex-direction: column; align-items: center; gap: .35em; width: 11.5em; padding: .8em .6em .5em; border-radius: .9em;
  font: 400 var(--okart-fs, 12px)/1.2 system-ui, sans-serif; color: #f6ead0; box-sizing: border-box;
  background: 
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23c9974a' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M4 30C4 15 15 4 30 4'/%3E%3Cpath d='M9 30c0-11 10-21 21-21'/%3E%3Cpath d='M30 4c4 0 6 3 4 6M4 30c0 4 3 6 6 4'/%3E%3Cpath d='M16 18c-2-4 2-7 5-4M18 16c-4-2-7 2-4 5'/%3E%3C/g%3E%3C/svg%3E") .35em .35em / 2.3em no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg transform='matrix(-1 0 0 1 40 0)' fill='none' stroke='%23c9974a' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M4 30C4 15 15 4 30 4'/%3E%3Cpath d='M9 30c0-11 10-21 21-21'/%3E%3Cpath d='M30 4c4 0 6 3 4 6M4 30c0 4 3 6 6 4'/%3E%3Cpath d='M16 18c-2-4 2-7 5-4M18 16c-4-2-7 2-4 5'/%3E%3C/g%3E%3C/svg%3E") right .35em top .35em / 2.3em no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg transform='matrix(1 0 0 -1 0 40)' fill='none' stroke='%23c9974a' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M4 30C4 15 15 4 30 4'/%3E%3Cpath d='M9 30c0-11 10-21 21-21'/%3E%3Cpath d='M30 4c4 0 6 3 4 6M4 30c0 4 3 6 6 4'/%3E%3Cpath d='M16 18c-2-4 2-7 5-4M18 16c-4-2-7 2-4 5'/%3E%3C/g%3E%3C/svg%3E") left .35em bottom .35em / 2.3em no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg transform='matrix(-1 0 0 -1 40 40)' fill='none' stroke='%23c9974a' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M4 30C4 15 15 4 30 4'/%3E%3Cpath d='M9 30c0-11 10-21 21-21'/%3E%3Cpath d='M30 4c4 0 6 3 4 6M4 30c0 4 3 6 6 4'/%3E%3Cpath d='M16 18c-2-4 2-7 5-4M18 16c-4-2-7 2-4 5'/%3E%3C/g%3E%3C/svg%3E") right .35em bottom .35em / 2.3em no-repeat,
    radial-gradient(120% 80% at 50% 0%, #3a2414, #24150b 60%, #1b0f07);
  border: .14em solid #a87d3e; box-shadow: inset 0 0 0 .14em #1a0e06, inset 0 0 0 .2em #c9974a55, 0 .5em 1em #000b;
  transition: box-shadow .25s, border-color .25s, filter .2s; }
.okart.turn { border-color: #ffc85a; animation: okBlink 1.1s ease-in-out infinite; }
@keyframes okBlink {
  0%, 100% { box-shadow: inset 0 0 0 .14em #1a0e06, inset 0 0 0 .2em #ffd27a88, 0 0 .6em #ffb53acc, 0 0 1.8em #ff9d1a77, 0 .5em 1em #000b; }
  50% { box-shadow: inset 0 0 0 .14em #1a0e06, inset 0 0 0 .2em #ffd27a33, 0 0 .2em #ffb53a55, 0 0 .5em #ff9d1a22, 0 .5em 1em #000b; border-color: #a87d3e; }
}
.okart.away { filter: grayscale(.7) brightness(.8); }
.okart .ok-av { position: relative; width: 5.2em; height: 5.2em; border-radius: 50%; display: grid; place-items: center; flex: none; padding: .22em; box-sizing: border-box;
  background: linear-gradient(160deg, #ffe7a8, #a8742a 45%, #f6d48a 60%, #7a4c16); box-shadow: 0 0 0 .1em #1a0e06, 0 0 0 .2em #c9974a66, 0 .3em .6em #000a; }
.okart.turn .ok-av { background: conic-gradient(#ffd37a calc(var(--p, 1) * 1turn), #4a3018 0); }
.okart.turn.low .ok-av { background: conic-gradient(#ff5a4a calc(var(--p, 1) * 1turn), #4a3018 0); }
.okart .ok-av > .av { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font-size: 2.6em; }
.okart .ok-av img, .okart .ok-av svg { width: 100%; height: 100%; object-fit: cover; }
.okart .ok-secs { position: absolute; left: 50%; bottom: -.95em; width: 2.8em; height: 2.35em; margin-left: -1.4em; display: grid; place-items: center; padding-top: .1em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 50'%3E%3Cg fill='%23d9a441' stroke='%237a4c10' stroke-width='.6'%3E%3Cellipse cx='9' cy='34' rx='5' ry='2.3' transform='rotate(-35 9 34)'/%3E%3Cellipse cx='7' cy='26' rx='5' ry='2.3' transform='rotate(-70 7 26)'/%3E%3Cellipse cx='14' cy='41' rx='5' ry='2.3' transform='rotate(-10 14 41)'/%3E%3Cellipse cx='51' cy='34' rx='5' ry='2.3' transform='rotate(35 51 34)'/%3E%3Cellipse cx='53' cy='26' rx='5' ry='2.3' transform='rotate(70 53 26)'/%3E%3Cellipse cx='46' cy='41' rx='5' ry='2.3' transform='rotate(10 46 41)'/%3E%3C/g%3E%3Cpath d='M30 3L47 9v16c0 11-8 18-17 22-9-4-17-11-17-22V9z' fill='%237d1624' stroke='%23f0c467' stroke-width='2.6'/%3E%3C/svg%3E") center / contain no-repeat; color: #fff3d6; font: 700 1.05em/1 Georgia, serif; text-shadow: 0 .06em .1em #000; }
.okart.low .ok-secs { animation: okSecs .8s ease-in-out infinite; }
@keyframes okSecs { 50% { transform: scale(1.12); } }
.okart .ok-plate { width: calc(100% + 1em); display: flex; flex-direction: column; align-items: center; margin-top: .45em; }
.okart .ok-plate .plate { font-size: .82em; width: 100%; min-width: 0; padding: 0 1.6em; }
.okart .ok-plate .plate > b { font-size: 1.28em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.okart .ok-bot { margin-top: .25em; padding: 0 .6em; border-radius: 99px; background: #3a4a5c; color: #d8e6f5; font: 700 .8em/1.6 system-ui; }
.okart .ok-stat { display: flex; align-items: center; justify-content: center; gap: .5em; font: 700 1.05em/1.2 Georgia, serif; color: #f6ead0; text-align: center; }
.okart .ok-foot { min-height: 1.4em; display: flex; justify-content: center; }
.okart .ok-st { padding: .1em .7em; border-radius: 99px; font: 700 .85em/1.4 system-ui; color: #d9c8a6; background: #00000055; white-space: nowrap; }
.okart .ok-st.turn { color: #2a1606; background: linear-gradient(#ffd77a, #eaa93d); animation: okPulse 1.1s ease-in-out infinite; }
.okart .ok-st.think { color: #ffe7a8; }
.okart .ok-st.think i { font-style: normal; animation: okDot 1.2s infinite; }
.okart .ok-st.think i:nth-child(2) { animation-delay: .2s; } .okart .ok-st.think i:nth-child(3) { animation-delay: .4s; }
.okart .ok-st.warn { color: #ffb09f; }
@keyframes okPulse { 50% { transform: scale(1.08); } }
@keyframes okDot { 0%, 60%, 100% { opacity: .2; } 30% { opacity: 1; } }
/* Dar yerlerde yatay kart */
.okart.row { flex-direction: row; width: auto; max-width: 16em; gap: .5em; padding: .35em .8em .35em .35em; border-radius: 99em; }
.okart.row .ok-av { width: 3.2em; height: 3.2em; }
.okart.row .ok-plate { width: auto; margin: 0; align-items: flex-start; min-width: 0; }
.okart.row .ok-plate .plate { padding: 0 1em; }
.okart.row .ok-foot { min-height: 0; }
.okart.row .ok-secs { bottom: -.7em; font-size: .85em; }

/* ---------------------------------------------------------------- Efektler */
.fx-layer { position: fixed; inset: 0; z-index: 900; pointer-events: none; }
.fx-layer canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.fx-layer.dim { background: radial-gradient(circle, #0000 30%, #000a); transition: background .4s; }
.fx-layer.lose { background: radial-gradient(circle, #0000 20%, #3a0000aa); }
.fx-text { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%) scale(.4); opacity: 0; text-align: center; white-space: nowrap; }
.fx-text b { display: block; font: 900 clamp(38px, 11vw, 120px)/1 Georgia, serif; letter-spacing: .02em; }
.fx-text small { display: block; margin-top: .3em; font: 700 clamp(16px, 3.6vw, 34px)/1.2 system-ui, sans-serif; color: #fff3d6; text-shadow: 0 2px 8px #000; }
.fx-text.on { animation: fxIn .5s cubic-bezier(.2, 1.6, .4, 1) forwards, fxBlink .5s .6s 4 alternate; }
.fx-text.win b, .fx-text.hand b, .fx-text.big b { color: #ffd34d; -webkit-text-stroke: 2px #7a4210; text-shadow: 0 0 18px #ffb53a, 0 6px 0 #7a4210, 0 10px 24px #000; }
.fx-text.lose b { color: #ff6a5a; -webkit-text-stroke: 2px #5a0a04; text-shadow: 0 0 18px #ff3a2a, 0 6px 0 #5a0a04, 0 10px 24px #000; }
.fx-text.hand b { font-size: clamp(30px, 7vw, 80px); }
.fx-text.hand.other b { color: #e8dcc0; -webkit-text-stroke: 1px #3a2a1a; text-shadow: 0 4px 12px #000; }
.fx-text.big b { font-size: clamp(54px, 16vw, 170px); }
.fx-text.big.red b { color: #ff6a5a; -webkit-text-stroke-color: #5a0a04; }
@keyframes fxIn { to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
@keyframes fxBlink { to { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .fx-text.on { animation: fxIn .01s forwards; } .okart.turn { animation: none; box-shadow: 0 0 0 .2em #ffc85a; } }

/* ---------------------------------------------------------------- Onay / uyarı pencereleri */
.dlg-bg { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: #0d0805c8; animation: dlgIn .16s ease-out; }
.dlg-bg.out { opacity: 0; transition: opacity .15s; }
.dlg { width: min(420px, 100%); max-height: 88vh; overflow: auto; padding: 22px 20px 18px; border-radius: 16px; color: #f3e6cc; text-align: center; box-sizing: border-box;
  background: linear-gradient(#2a1a0e, #1a0f08); border: 2px solid #c99a4f; box-shadow: 0 20px 60px #000c; font: 16px/1.45 system-ui, sans-serif; }
.dlg h3 { margin: 0 0 10px; font: 700 22px Georgia, serif; color: #ffd77a; }
.dlg p { margin: 0 0 14px; color: #e4d3b1; }
.dlg-in { width: 100%; height: 46px; padding: 0 12px; margin-bottom: 14px; border-radius: 10px; background: #120a05; border: 1.5px solid #6a5034; color: #f6ead0; font: 600 16px system-ui; box-sizing: border-box; }
.dlg-in:focus { outline: none; border-color: #f2b544; }
.dlg-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.dlg-btns button, .dlg-opt { min-width: 110px; min-height: 46px; padding: 0 16px; border-radius: 10px; font: 700 16px system-ui; cursor: pointer; }
.dlg-ok { background: linear-gradient(#ffd77a, #eaa93d 55%, #d48d22); color: #2a1606; border: 1.5px solid #ffe2a0; }
.dlg-ok.danger { background: linear-gradient(#ff8a7a, #d0402c 55%, #a8261a); color: #fff; border-color: #ffb09f; }
.dlg-no { background: #1c120a; color: #f3d48c; border: 2px solid #6a5034; }
.dlg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; margin-bottom: 14px; }
.dlg-opt { min-width: 0; background: #1c120a; color: #f6ead0; border: 2px solid #6a5034; font: 700 20px Georgia, serif; }
.dlg-opt.on, .dlg-opt:hover { border-color: #f2b544; color: #ffd77a; }
@keyframes dlgIn { from { opacity: 0; } }

/* ---------------------------------------------------------------- Hediye paneli */
.hd-bg { position: fixed; inset: 0; z-index: 950; display: flex; align-items: center; justify-content: center; padding: 16px; background: #0d0805c0; }
.hd { position: relative; width: min(460px, 100%); max-height: 90vh; overflow: auto; padding: 20px 18px 16px; border-radius: 16px; color: #f3e6cc; box-sizing: border-box;
  background: linear-gradient(#2a1a0e, #1a0f08); border: 2px solid #c99a4f; box-shadow: 0 20px 60px #000c; font: 15px/1.4 system-ui, sans-serif; }
.hd h3 { margin: 0 0 10px; font: 700 22px Georgia, serif; color: #ffd77a; }
.hd-x { position: absolute; right: 8px; top: 6px; width: 36px; height: 36px; border: 0; background: none; color: #c9b18a; font-size: 26px; cursor: pointer; }
.hd-to { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.hd-to span { color: #a8916f; }
.hd-to button { height: 34px; padding: 0 12px; border-radius: 99px; border: 1.5px solid #6a5034; background: #1c120a; color: #e4d3b1; font: 600 14px system-ui; cursor: pointer; }
.hd-to button.on { border-color: #f2b544; color: #ffd77a; } .hd-to button:disabled { opacity: .4; }
.hd-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.hd-grid button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 10px; border: 2px solid #4a3220; background: #1c120a; color: #f3e6cc; cursor: pointer; }
.hd-grid button.on { border-color: #f2b544; background: #2a1a0e; }
.hd-grid i { width: 44px; height: 44px; background: center / contain no-repeat; }
.hd-grid b { font-size: 13px; } .hd-grid small { color: #f2b544; font-size: 12px; }
.hd-note { margin: 10px 0 4px; color: #c9b18a; font-size: 13.5px; }
.hd-err { min-height: 1em; color: #ff9a85; font-size: 14px; }
.hd-send { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; margin-top: 6px; border-radius: 10px; border: 1.5px solid #ffe2a0; box-sizing: border-box;
  background: linear-gradient(#ffd77a, #eaa93d 55%, #d48d22); color: #2a1606; font: 700 16px system-ui; cursor: pointer; text-decoration: none; }
.hd-send:disabled { opacity: .5; cursor: default; }
.hd-fly { position: fixed; left: 50%; top: 50%; width: 120px; height: 120px; margin: -60px 0 0 -60px; z-index: 960; pointer-events: none; background: center / contain no-repeat;
  animation: hdFly 2.4s cubic-bezier(.3, .9, .4, 1) forwards; filter: drop-shadow(0 6px 14px #000c); }
@keyframes hdFly { 0% { transform: scale(.2); opacity: 0; } 25% { transform: scale(1.4); opacity: 1; } 55% { transform: scale(1.1); } 100% { transform: translate(var(--tx), var(--ty)) scale(.45); opacity: 0; } }
.hd-toast { position: fixed; left: 50%; top: 14%; transform: translateX(-50%); z-index: 961; padding: 8px 16px; border-radius: 99px; background: #1c120ae8; border: 1.5px solid #f2b544;
  color: #ffe7a8; font: 700 15px system-ui; pointer-events: none; animation: dlgIn .3s; white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) { .hd-grid { grid-template-columns: repeat(3, 1fr); } }

/* Efekt katmanı bir sahnenin içine çizildiğinde (Efekt.root) sahneyi kaplar */
.fx-layer.in-root { position: absolute; }
