/* Kılıf Poligonu (YupCase) — web tanıtım sürümü. Sahne kuralları yayın sürümünden (index.html) alınmıştır;
   sayfa düzeni, deneme paneli ve TikTok alan kılavuzu çıkarılmış, sonda web ekleri vardır. */
:root {
  --yazi: #f2f4f6; --soluk: #93a0ad; --amber: #ffb020; --lazer: #ff2d2d; --yesil: #37d67a;
  --panel: rgba(10, 13, 16, .78); --cizgi: rgba(255, 255, 255, .14);
}
/* Sahne 360x640 çizilir, pencereye göre büyütülür (yayında 1080x1920 = 3 kat) */
#kap { position: relative; flex: none; overflow: hidden; }
#sahne { position: absolute; left: 0; top: 0; width: 360px; height: 640px; overflow: hidden;
         background: #0f1418; transform-origin: 0 0; }
#sahne > svg { position: absolute; inset: 0; width: 100%; height: 100%; }

.baslik { position: absolute; left: 0; right: 0; top: 46px; text-align: center; z-index: 3; }
.baslik .ad { font-size: 26px; font-weight: 700; letter-spacing: .07em; line-height: 1; white-space: nowrap; }
.baslik .ad span { color: var(--amber); }
.baslik .ad em { font-style: normal; color: #5b9bff; }
/* Maskot: zemini saydam (maskot.png, icon-512.png dosyasından üretildi); vuruşta zıplar, her vuruşta öbür yana yatar */
#maskot { display: block; flex: none; width: 68px; height: 82px; margin: -7px 0 -3px; transform-origin: 50% 85%;
          filter: drop-shadow(0 0 calc(3px + var(--bas) * 9px) rgba(47, 107, 255, .9)) drop-shadow(0 6px 8px rgba(0, 0, 0, .55));
          translate: 0 calc(var(--vurus) * -7px); scale: calc(1 + var(--vurus) * .1);
          rotate: calc(var(--yon, 1) * 7deg); transition: rotate .2s cubic-bezier(.3, 1.6, .5, 1); }
.baslik .marka { display: flex; justify-content: center; align-items: center; gap: 10px; margin-bottom: 16px; }
/* Logo: siyah "Case" koyu sahnede okunsun diye çevresine beyaz kontur verilir (çıkartma görünümü) */
#logo { height: 46px; width: auto; scale: calc(1 + var(--vurus) * .06); transform-origin: 0 60%;
        filter: drop-shadow(1.6px 0 0 #fff) drop-shadow(-1.6px 0 0 #fff) drop-shadow(0 1.6px 0 #fff) drop-shadow(0 -1.6px 0 #fff) drop-shadow(0 5px 8px rgba(0, 0, 0, .55)); }

.hap { position: absolute; left: 50%; transform: translateX(-50%); top: 78px; z-index: 3; white-space: nowrap;
       max-width: 330px; background: var(--panel); border: 1px solid var(--cizgi); border-radius: 999px;
       padding: 7px 14px; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.hap b { color: var(--amber); font-weight: 700; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.sn { background: var(--amber); color: #15110a; border-radius: 999px; font-weight: 700; padding: 1px 9px;
      font-size: 13px; min-width: 30px; text-align: center; }
.sn.az { background: var(--lazer); color: #fff; }

.kart { position: absolute; z-index: 3; background: var(--panel); border: 1px solid var(--cizgi); border-radius: 14px; }
.komut { left: 24px; right: 24px; top: 162px; padding: 7px 14px; text-align: center; font-size: 15px; }
.komut kbd { display: inline-block; background: var(--amber); color: #15110a; font: inherit; font-weight: 700;
             border-radius: 7px; padding: 2px 10px; margin: 0 3px; letter-spacing: .06em; }
.gunun { left: 24px; right: 24px; top: 201px; padding: 9px 12px 11px; }
.etiket { font-size: 10px; letter-spacing: .26em; color: var(--soluk); text-transform: uppercase; text-align: center; margin-bottom: 8px; }
/* Kılıf görseli: dikey 1:2 çerçeve, köşeleri yuvarlak; tasarım çerçeveyi doldurur */
.kilif { object-fit: cover; border-radius: 14% / 7%; background: #05070a;
         box-shadow: 0 0 0 1.5px #05070a, 0 0 0 2.5px rgba(255, 255, 255, .22), 0 5px 10px rgba(0, 0, 0, .6); }
.simdiki { display: flex; justify-content: flex-start; gap: 16px; padding-left: 12px; }
.simdiki img { width: 48px; height: 96px; }

/* ---- Bekleme ekranının hareketi. --vurus: müziğin vuruşunda 1'e çıkıp sönen değer, --bas: bas düzeyi (0-1) ---- */
#sahne { --vurus: 0; --bas: 0; }
.baslik .ad { display: inline-block; scale: calc(1 + var(--vurus) * .06);
              text-shadow: 0 0 calc(var(--vurus) * 20px) rgba(255, 176, 32, .6); }
.komut { animation: cagri 1.8s ease-in-out infinite; }
@keyframes cagri { 0%, 100% { border-color: var(--cizgi); box-shadow: none; }
                   50% { border-color: rgba(255, 176, 32, .75); box-shadow: 0 0 18px rgba(255, 176, 32, .28); } }
.komut kbd { scale: calc(1 + var(--vurus) * .2); box-shadow: 0 0 calc(4px + var(--vurus) * 18px) rgba(255, 176, 32, .8); }
/* Kılıflar telde asılı gibi salınır; nişangah vuruşla birinden ötekine atlar, hedefteki kılıf öne çıkar */
.simdikiKap { position: relative; margin-top: 12px; }
.simdikiKap::before { content: ""; position: absolute; left: 2px; right: 70px; top: -7px; height: 1.5px; background: #aab4be; }
.simdiki img { transform-origin: 50% -7px; animation: sallan 2.8s ease-in-out infinite;
               filter: brightness(.72) saturate(.85); transition: scale .22s cubic-bezier(.3, 1.6, .5, 1), filter .22s; }
.simdiki img:nth-child(2) { animation-duration: 3.3s; animation-delay: -1.1s; }
.simdiki img:nth-child(3) { animation-duration: 2.5s; animation-delay: -.6s; }
.simdiki img:nth-child(4) { animation-duration: 3s; animation-delay: -1.7s; }
.simdiki img.hedef { scale: calc(1.1 + var(--vurus) * .06); filter: none; }
@keyframes sallan { 0%, 100% { rotate: -4deg; } 50% { rotate: 4deg; } }
#nisangah { position: absolute; top: 25px; width: 44px; height: 44px; margin-left: -22px; border-radius: 50%; pointer-events: none;
            border: 2px solid var(--lazer); box-shadow: 0 0 10px rgba(255, 45, 45, .8), inset 0 0 8px rgba(255, 45, 45, .45);
            scale: calc(1.12 - var(--vurus) * .22); transition: left .24s cubic-bezier(.3, 1.5, .5, 1); }
#nisangah::before, #nisangah::after { content: ""; position: absolute; background: var(--lazer); }
#nisangah::before { left: 50%; top: -7px; bottom: -7px; width: 2px; margin-left: -1px;
                    -webkit-mask: linear-gradient(#000 0 12px, transparent 12px calc(100% - 12px), #000 calc(100% - 12px)); mask: linear-gradient(#000 0 12px, transparent 12px calc(100% - 12px), #000 calc(100% - 12px)); }
#nisangah::after { top: 50%; left: -7px; right: -7px; height: 2px; margin-top: -1px;
                   -webkit-mask: linear-gradient(90deg, #000 0 12px, transparent 12px calc(100% - 12px), #000 calc(100% - 12px)); mask: linear-gradient(90deg, #000 0 12px, transparent 12px calc(100% - 12px), #000 calc(100% - 12px)); }
.rozet { position: absolute; right: 0; top: 18px; width: 62px; height: 62px; border-radius: 50%; background: var(--yesil); color: #06240f;
         display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; rotate: 10deg;
         scale: calc(1 + var(--vurus) * .12); box-shadow: 0 0 0 3px rgba(55, 214, 122, .25), 0 0 calc(8px + var(--bas) * 22px) rgba(55, 214, 122, .7); }
.rozet span { font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; line-height: 1.15; }
.rozet b { font-size: 16px; font-weight: 700; margin-bottom: 2px; letter-spacing: -.02em; }
#tesvik { display: inline-block; }
#tesvik.gir { animation: tesvikGir .45s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes tesvikGir { 0% { opacity: 0; translate: 0 9px; } 100% { opacity: 1; translate: 0 0; } }
/* Sahne: yoldaki şeritler hedefe doğru akar, tavan ışıkları basla parlar */
#sahne[data-asama="bekleme"] #yol line { stroke-dasharray: 16 12; stroke-opacity: .6; animation: ak .8s linear infinite; }
@keyframes ak { to { stroke-dashoffset: -28; } }
#sahne[data-asama="bekleme"] #tavan { opacity: calc(.6 + var(--bas) * .9); }
#sahne[data-asama="bekleme"] #spotIsik { opacity: calc(var(--vurus) * .28); }
.degisim { font-size: 10px; color: var(--soluk); text-align: center; margin-top: 7px; }
.degisim b { color: var(--yazi); font-variant-numeric: tabular-nums; }
.adimlar { left: 24px; right: 24px; top: 372px; padding: 8px 10px; font-size: 12.5px; text-align: center; white-space: nowrap; overflow: hidden; }
.adimlar i { font-style: normal; color: var(--amber); font-weight: 700; margin: 0 5px; }

.ipucu { position: absolute; z-index: 3; left: 0; right: 0; top: 116px; text-align: center; font-size: 14px; color: var(--soluk); }
.ipucu b { color: var(--yazi); }
.izgara { position: absolute; z-index: 3; left: 16px; right: 16px; top: 148px; display: grid;
           grid-template-columns: repeat(3, 1fr); gap: 14px 10px; }
.secenek { position: relative; background: var(--panel); border: 1px solid var(--cizgi); border-radius: 14px;
           height: 206px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.secenek img { width: 80px; height: 160px; }
.secenek .adi { font-size: 11px; max-width: 92%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.secenek .no { position: absolute; left: -5px; top: -7px; width: 26px; height: 26px; border-radius: 50%;
               background: var(--amber); color: #15110a; font-weight: 700; font-size: 16px;
               display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }

/* Seçilen kılıfın poligonun dibine gidişi */
#ucan { position: absolute; z-index: 5;
        transition: left 1.6s cubic-bezier(.5, 0, .3, 1), top 1.6s cubic-bezier(.5, 0, .3, 1),
                    width 1.6s cubic-bezier(.5, 0, .3, 1), height 1.6s cubic-bezier(.5, 0, .3, 1); }

.durbun { position: absolute; z-index: 3; left: 6px; top: 136px; width: 176px; height: 176px; border-radius: 50%;
          transform: scale(1.125); transform-origin: 0 0;   /* 198 px: iç ölçüler aynı kalır */
          overflow: hidden; background: #262f38; border: 3px solid #05070a;
          box-shadow: 0 0 0 2px #3a444e, 0 10px 24px rgba(0, 0, 0, .6); }
.durbun .tel { position: absolute; left: 0; right: 0; height: 2px; background: #aab4be; }
.durbun .klips { position: absolute; width: 14px; height: 18px; border-radius: 3px;
                 background: var(--amber); box-shadow: 0 0 0 1px #6b4a05; }
.durbun img { position: absolute; width: 78px; height: 156px; }
.durbun img.dusuyor { transition: transform .9s cubic-bezier(.5, 0, .9, .6); transform: scale(2.1); }
.durbun .kareler { position: absolute; inset: 22px; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); }
.durbun .kareler span { border: 1px solid rgba(255, 255, 255, .4); font-size: 15px; font-weight: 700;
                        padding: 1px 4px; text-shadow: 0 1px 3px #000, 0 0 6px #000; }
.durbun .kareler span.sec { background: rgba(255, 176, 32, .28); border-color: var(--amber); }
.nokta { position: absolute; width: 12px; height: 12px; border-radius: 50%; margin: -6px 0 0 -6px;
         background: var(--lazer); box-shadow: 0 0 8px 4px rgba(255, 45, 45, .65), 0 0 0 1px #fff3; }
.delik { position: absolute; width: 10px; height: 10px; border-radius: 50%; margin: -5px 0 0 -5px;
         background: #05070a; box-shadow: 0 0 0 2px rgba(5, 7, 10, .45), 0 0 0 4px rgba(255, 255, 255, .12); }
.parla { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.parla.var { animation: parla .28s ease-out; }
@keyframes parla { 0% { opacity: .75; } 100% { opacity: 0; } }

.yan { left: 208px; right: 16px; padding: 10px 12px; }
.ruzgar { top: 138px; }
.ruzgar .ok { font-size: 26px; font-weight: 700; color: #6cbcff; line-height: 1.1; }
.ruzgar .ne { font-size: 13px; }
.ruzgar .rsat { display: flex; align-items: center; gap: 9px; }
.ruzgar .rsat svg { flex: none; width: 46px; height: 46px; overflow: visible; }
.ruzgar.durgun .ok { color: var(--soluk); }
/* Dürbünün içinden geçen esinti çizgileri: kap rüzgarın yönüne döndürülür */
.esinti { position: absolute; inset: 0; pointer-events: none; }
.esinti svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.esinti path { fill: none; stroke: url(#esintiRenk); stroke-width: 1.5; stroke-linejoin: round; }
.atis { top: 240px; font-size: 13px; line-height: 1.45; }
.atis b { color: var(--amber); font-size: 20px; display: block; letter-spacing: .04em; }
.tahmin { position: absolute; z-index: 3; left: 0; right: 0; top: 114px; font-size: 12px; color: var(--soluk); text-align: center; }
.tahmin b { color: var(--yazi); }

.sonuc { position: absolute; z-index: 4; left: 0; right: 0; top: 96px; text-align: center; }
.sonuc .kim { font-size: 18px; padding: 0 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sonuc .kim b { color: var(--amber); }
.sonuc .yuzde { font-size: 104px; font-weight: 700; line-height: .95; color: var(--yesil);
                text-shadow: 0 6px 0 #0c3b22, 0 12px 26px rgba(0, 0, 0, .6); letter-spacing: -.02em;
                animation: buyu .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes buyu { 0% { transform: scale(.6); } 100% { transform: scale(1); } }
.sonuc .soz { font-size: 26px; font-weight: 700; letter-spacing: .14em; }
.sonuc .mesaj { display: inline-block; margin-top: 12px; background: var(--panel); border: 1px solid var(--cizgi);
                border-radius: 999px; padding: 7px 16px; font-size: 14px; }
.sonuc.iska .yuzde { color: #c9d1d9; font-size: 84px; text-shadow: 0 6px 0 #1b2229, 0 12px 26px rgba(0, 0, 0, .6); letter-spacing: .06em; }

.konfeti { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.konfeti i { position: absolute; top: -20px; width: 7px; height: 12px; border-radius: 1px;
             animation: yag linear forwards; }
@keyframes yag { to { transform: translateY(700px) rotate(720deg); } }
/* Havai fişek parçası: patlama noktasından dışarı saçılır, hafifçe düşerek söner */
.konfeti b { position: absolute; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; opacity: 0;
             background: currentColor; box-shadow: 0 0 6px 2px currentColor; animation: patla 1.15s cubic-bezier(.1, .7, .3, 1) forwards; }
@keyframes patla { 0% { opacity: 1; transform: translate(0, 0) scale(1.3); } 65% { opacity: 1; }
                   100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.3); } }
/* İsabette kılıf sol yanda yakın planda durur; yüzde ve yazılar sağ sütuna geçer */
.sonuc.vurdu { left: 162px; right: 6px; top: 112px; }
.sonuc.vurdu .kim { padding: 0 2px; font-size: 16px; }
.sonuc.vurdu .yuzde { font-size: 82px; margin-top: 14px; }
.sonuc.vurdu .soz { font-size: 22px; margin-top: 4px; }
.sonuc.vurdu .mesaj { display: block; margin: 16px 4px 0; padding: 9px 8px 10px; border-radius: 14px; line-height: 1.2;
                      background: var(--amber); border-color: #ffd98a; color: #15110a; font-size: 17px; font-weight: 700; text-wrap: balance;
                      box-shadow: 0 0 0 3px rgba(255, 176, 32, .28), 0 8px 18px rgba(0, 0, 0, .55);
                      animation: nabiz 1.1s ease-in-out .5s infinite; }
@keyframes nabiz { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 3px rgba(255, 176, 32, .28), 0 8px 18px rgba(0, 0, 0, .55); }
                   50% { transform: scale(1.07); box-shadow: 0 0 0 8px rgba(255, 176, 32, .16), 0 8px 18px rgba(0, 0, 0, .55); } }

.sirada { position: absolute; z-index: 3; right: 8px; top: 414px; width: 92px; font-size: 11px; color: var(--soluk);
          background: var(--panel); border: 1px solid var(--cizgi); border-radius: 10px; padding: 7px 8px; line-height: 1.5; }
.sirada b { color: var(--yazi); font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sirada em { font-style: normal; letter-spacing: .2em; font-size: 9px; color: var(--amber); display: block; }
.sirada .son { border-top: 1px solid var(--cizgi); margin-top: 5px; padding-top: 4px; font-size: 10px; }
.sirada.yeni { border-color: var(--amber); }

#tufek.tepme { animation: tepme .32s ease-out; }
@keyframes tepme { 0% { transform: translateY(0); } 25% { transform: translateY(12px); } 100% { transform: translateY(0); } }
#namluAtes.var { animation: namluAtes .22s ease-out; }
@keyframes namluAtes { 0% { opacity: .95; } 100% { opacity: 0; } }
#uzakKilif.dusuyor { transform-box: fill-box; transform-origin: center; animation: dus .8s cubic-bezier(.6, 0, 1, .6) forwards; }
@keyframes dus { to { transform: translateY(64px) rotate(72deg); } }

/* ================= Web ekleri ================= */
/* Sahne sayfanın içinde durur: yazı tipi ve satır yüksekliği sayfadan değil yayın sürümünden gelir */
#sahne { font-family: Bahnschrift, "Segoe UI", Arial, sans-serif; color: var(--yazi); line-height: normal;
         -webkit-user-select: none; user-select: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
#sahne img { max-width: none; }

/* Ziyaretçinin dokunabildiği yerler */
#sahne[data-asama="bekleme"] .komut { cursor: pointer; }
#sahne .ben { display: none; }
#sahne.benim .ben { display: inline; }
#sahne.benim .yayin { display: none; }
#sahne.benim .atis b.ben { display: block; }
#sahne.benim[data-asama="secim"] .secenek { cursor: pointer; border-color: rgba(255, 176, 32, .7); animation: cagri 1.4s ease-in-out infinite; }
#sahne.benim[data-asama="secim"] .secenek:active { transform: scale(.97); }
#sahne.benim[data-asama="nisan"] .kareler span { cursor: pointer; }
#sahne.benim[data-asama="nisan"] .kareler span:hover,
#sahne.benim[data-asama="nisan"] .kareler span:active { background: rgba(255, 176, 32, .22); border-color: var(--amber); }
#sahne.benim[data-asama="nisan"] .durbun { box-shadow: 0 0 0 2px var(--amber), 0 0 18px rgba(255, 176, 32, .45), 0 10px 24px rgba(0, 0, 0, .6); }

/* Oyun bloğu: sahne ve altındaki dokunma çubuğu */
.oy-oyun { background: #05070a; }
.oy-oyun #kap { margin: 0 auto; }
.oy-cubuk { position: sticky; bottom: 0; z-index: 6; background: #10151a; border-top: 1px solid rgba(255, 255, 255, .14);
            padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); color: #f2f4f6; }
.oy-durum { font-size: .86rem; line-height: 1.35; color: #c3ccd5; min-height: 2.7em; }
.oy-durum b { color: #ffb020; font-weight: 700; }
.oy-dugmeler { display: flex; gap: 8px; margin-top: 8px; align-items: stretch; }
.oy-dugmeler button { font: inherit; font-weight: 700; min-height: 48px; border-radius: 10px; cursor: pointer;
                      border: 1px solid rgba(255, 255, 255, .18); background: #1b2229; color: #f2f4f6; padding: 0 14px; }
.oy-dugmeler button:focus-visible { outline: 3px solid #6cbcff; outline-offset: 2px; }
.oy-dugmeler .oy-ana { flex: 1; background: #ffb020; color: #15110a; border-color: #ffd98a; font-size: 1rem; }
.oy-dugmeler .oy-ana:disabled { background: #2a323a; color: #93a0ad; border-color: rgba(255, 255, 255, .14); cursor: default; }
.oy-sec { flex: 1; display: flex; gap: 8px; }
.oy-sec button { flex: 1; background: #ffb020; color: #15110a; border-color: #ffd98a; font-size: 1.15rem; }
.oy-dugmeler .oy-ses { flex: none; font-size: .86rem; font-weight: 600; white-space: nowrap; }
.oy-dugmeler .oy-ses[aria-pressed="true"] { border-color: rgba(55, 214, 122, .6); color: #37d67a; }
