@-webkit-keyframes animLand {
   0% { background-position: 0px 0px; }
   100% { background-position: -335px 0px; }
}
@-moz-keyframes animLand {
   0% { background-position: 0px 0px; }
   100% { background-position: -335px 0px; }
}
@-o-keyframes animLand {
   0% { background-position: 0px 0px; }
   100% { background-position: -335px 0px; }
}
@keyframes animLand {
   0% { background-position: 0px 0px; }
   100% { background-position: -335px 0px; }
}

@-webkit-keyframes animSky {
   0% { background-position: 0px 100%; }
   100% { background-position: -275px 100%; }
}
@-moz-keyframes animSky {
   0% { background-position: 0px 100%; }
   100% { background-position: -275px 100%; }
}
@-o-keyframes animSky {
   0% { background-position: 0px 100%; }
   100% { background-position: -275px 100%; }
}
@keyframes animSky {
   0% { background-position: 0px 100%; }
   100% { background-position: -275px 100%; }
}

@-webkit-keyframes animBird {
   from { background-position: 0px 0px; }
   to { background-position: 0px -96px; }
}
@-moz-keyframes animBird {
   from { background-position: 0px 0px; }
   to { background-position: 0px -96px; }
}
@-o-keyframes animBird {
   from { background-position: 0px 0px; }
   to { background-position: 0px -96px; }
}
@keyframes animBird {
   from { background-position: 0px 0px; }
   to { background-position: 0px -96px; }
}


@-webkit-keyframes animCeiling {
   0% { background-position: 0px 0px; }
   100% { background-position: -63px 0px; }
}
@-moz-keyframes animCeiling {
   0% { background-position: 0px 0px; }
   100% { background-position: -63px 0px; }
}
@-o-keyframes animCeiling {
   0% { background-position: 0px 0px; }
   100% { background-position: -63px 0px; }
}
@keyframes animCeiling {
   0% { background-position: 0px 0px; }
   100% { background-position: -63px 0px; }
}


*,
*:before,
*:after
{
   /* border box */
   -moz-box-sizing: border-box;
   -webkit-box-sizing: border-box;
   box-sizing: border-box;
   /* gpu acceleration */
   -webkit-transition: translate3d(0,0,0);
   /* select disable */
   -webkit-touch-callout: none;
   -webkit-user-select: none;
   -khtml-user-select: none;
   -moz-user-select: none;
   -ms-user-select: none;
   user-select: none;
}

html,
body
{
   height: 100%;
   overflow: hidden;
   overscroll-behavior: none;
   touch-action: manipulation;
   font-family: monospace;
   font-size: 12px;
   color: #fff;
}

/* boyut ve ölçek main.js boyutla(): mantıksal dünya en az 525 px yükseklik, transform ile ekrana sığar */
#gamecontainer
{
   position: absolute;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
   overflow: hidden;
   transform-origin: 0 0;
   touch-action: none;
   image-rendering: pixelated;
}

/*
Screen - Game
*/
#gamescreen
{
   position: absolute;
   width: 100%;
   height: 100%;
}

#sky
{
   position: absolute;
   top: 0;
   width: 100%;
   height: calc(100% - 105px);
   background-image: url('../assets/sky.png');
   background-repeat: repeat-x;
   background-position: 0px 100%;
   background-color: #4ec0ca;
   
   -webkit-animation: animSky 7s linear infinite;
   animation: animSky 7s linear infinite;
}

#flyarea
{
   position: absolute;
   bottom: 0;
   height: 420px;
   width: 100%;
}

#ceiling
{
   position: absolute;
   top: -16px;
   height: 16px;
   width: 100%;
   background-image: url('../assets/ceiling.png');
   background-repeat: repeat-x;
   
   -webkit-animation: animCeiling 481ms linear infinite;
   animation: animCeiling 481ms linear infinite;
}

#land
{
   position: absolute;
   bottom: 0;
   width: 100%;
   height: 105px;
   background-image: url('../assets/land.png');
   background-repeat: repeat-x;
   background-position: 0px 0px;
   background-color: #ded895;
   
   -webkit-animation: animLand 2516ms linear infinite;
   animation: animLand 2516ms linear infinite;
}

#bigscore
{
   position: absolute;
   top: calc(20px + var(--bant, 0px) / 2);
   left: 48%;
   z-index: 100;
}

#bigscore img
{
   display: inline-block;
   padding: 1px;
}

#splash
{
   position: absolute;
   opacity: 0;
   top: calc(75px + var(--bant, 0px));
   left: calc(50% - 94px);
   width: 188px;
   height: 170px;
   background-image: url('../assets/splash.png');
   background-repeat: no-repeat;
}

#scoreboard
{
   position: absolute;
   display: none;
   opacity: 0;
   top: calc(64px + var(--bant, 0px));
   left: calc(50% - 118px);
   width: 236px;
   height: 280px;
   background-image: url('../assets/scoreboard.png');
   background-repeat: no-repeat;
   
   z-index: 1000;
}

#medal
{
   position: absolute;
   opacity: 0;
   top: 114px;
   left: 32px;
   width: 44px;
   height: 44px;
}

#currentscore
{
   position: absolute;
   top: 105px;
   left: 107px;
   width: 104px;
   height: 14px;
   text-align: right;
}

#currentscore img
{
   padding-left: 2px;
}

#highscore
{
   position: absolute;
   top: 147px;
   left: 107px;
   width: 104px;
   height: 14px;
   text-align: right;
}

#highscore img
{
   padding-left: 2px;
}



.boundingbox
{
   position: absolute;
   display: none;
   top: 0;
   left: 0;
   width: 0;
   height: 0;
   border: 1px solid red;
}

#player
{
   left: 60px;
   top: 200px;
}

.bird
{
   position: absolute;
   width: 34px;
   height: 24px;
   background-image: url('../assets/bird.png');
   
   -webkit-animation: animBird 300ms steps(4) infinite;
   animation: animBird 300ms steps(4) infinite;
}

.pipe
{
   position: absolute;
   left: 0;
   top: 0;
   width: 52px;
   height: 100%;
   z-index: 10;
   will-change: transform;
}

.pipe_upper
{
   position: absolute;
   top: 0;
   width: 52px;
   background-image: url('../assets/pipe.png');
   background-repeat: repeat-y;
   background-position: center;
}

.pipe_upper:after
{
   content: "";
   position: absolute;
   bottom: 0;
   width: 52px;
   height: 26px;
   background-image: url('../assets/pipe-down.png');
}

.pipe_lower
{
   position: absolute;
   bottom: 0;
   width: 52px;
   background-image: url('../assets/pipe.png');
   background-repeat: repeat-y;
   background-position: center;
}

.pipe_lower:after
{
   content: "";
   position: absolute;
   top: 0;
   width: 52px;
   height: 26px;
   background-image: url('../assets/pipe-up.png');
}

#footer
{
   position: absolute;
   z-index: 50;
   bottom: 3px;
   left: 3px;
}

#footer a,
#footer a:link,
#footer a:visited,
#footer a:hover,
#footer a:active
{
   display: block;
   padding: 2px;
   text-decoration: none;
   color: #fff;
}
/* oyun düğmeleri (replay.png kalıbında): TEKRAR, REKORLAR; altlarında piksel yazı */
.oyun-dugme
{
   display: inline-block;
   width: 115px;
   text-align: center;
   cursor: pointer;
   outline: none;
}
.oyun-dugme img
{
   display: block;
   width: 115px;
   height: 70px;
}
.oyun-dugme span
{
   display: block;
   margin-top: -4px;
   font: 9px/12px 'Press Start 2P', monospace;
   color: #fff;
   text-shadow: 1px 0 #543847, -1px 0 #543847, 0 1px #543847, 0 -1px #543847, 1px 1px #543847, -1px -1px #543847, 1px -1px #543847, -1px 1px #543847, 0 2px #543847;
}
.oyun-dugme:active img, .oyun-dugme.basili img { transform: translateY(2px); }
.oyun-dugme:focus-visible img { filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 2px #e86101); }

/* açılış ekranında (Get Ready) rekor tablosu düğmesi */
#splash-rekor
{
   position: absolute;
   top: calc(258px + var(--bant, 0px));
   left: calc(50% - 57px);
   z-index: 20;
   opacity: 0;
   display: none;
}

/* skor paneli: tahta (scoreboard.png) + rekor kaydı + düğmeler */
#scoreboard.kayitli { top: calc(22px + var(--bant, 0px)); }
#dugmeler
{
   position: absolute;
   top: 196px;
   left: 0;
   width: 236px;
   display: flex;
   justify-content: space-between;
   opacity: 0;
}
#scoreboard.kayitli #dugmeler { top: 298px; }
#yeni-rekor
{
   position: absolute;
   display: none;
   top: 146px;
   left: 116px;
   padding: 3px 4px 2px;
   background: #e3242b;
   border: 2px solid #543847;
   border-radius: 3px;
   font: 7px/7px 'Press Start 2P', monospace;
   color: #fff;
}
#kayit-panel
{
   position: absolute;
   display: none;
   top: 194px;
   left: 5px;
   width: 226px;
   height: 94px;
   padding: 9px 10px 0;
   background: #ded895;
   border: 2px solid #543847;
   border-radius: 7px;
   box-shadow: inset 0 0 0 2px #f0eaa1, 0 3px 0 rgba(84,56,71,.35);
   opacity: 0;
}
#scoreboard.kayitli #kayit-panel { display: block; }
.kp-baslik
{
   font: 10px/12px 'Press Start 2P', monospace;
   color: #fc7858;
   text-align: center;
   margin-bottom: 8px;
}
.kp-satir { display: flex; gap: 6px; }
#isim
{
   flex: 1 1 auto;
   min-width: 0;
   height: 34px;
   padding: 0 6px;
   border: 2px solid #543847;
   border-radius: 4px;
   background: #fffbe0;
   box-shadow: inset 0 2px 0 #d3ce8e;
   font: 500 16px 'Pixelify Sans', monospace;
   color: #543847;
   text-align: center;
   outline: none;
   -webkit-user-select: text;
   user-select: text;
}
#isim::placeholder { color: #b3a978; }
#isim:focus { border-color: #e86101; }
#gonder
{
   flex: 0 0 auto;
   height: 34px;
   padding: 0 8px;
   border: 2px solid #543847;
   border-radius: 4px;
   background: #f87b1b;
   box-shadow: inset 0 2px 0 #ffb36b, inset 0 -3px 0 #c45400;
   font: 9px/1 'Press Start 2P', monospace;
   color: #fff;
   text-shadow: 0 2px 0 #9a3f00;
   cursor: pointer;
}
#gonder:active:not(:disabled) { box-shadow: inset 0 3px 0 #c45400; padding-top: 2px; }
#gonder:disabled { background: #c9bd88; box-shadow: none; text-shadow: none; cursor: default; }
#rekor-uyari
{
   min-height: 14px;
   margin-top: 7px;
   font: 700 12px/14px 'Pixelify Sans', monospace;
   color: #d0312d;
   text-align: center;
}
#kayit-panel.tamam .kp-satir { display: none; }
#kayit-panel.tamam #rekor-uyari { margin-top: 16px; font-size: 16px; line-height: 20px; color: #3f8f2a; }

/* sekme gizlenince duraklama */
#duraklat
{
   display: none;
   position: fixed;
   left: 0;
   top: 0;
   right: 0;
   bottom: 0;
   z-index: 900;
   align-items: center;
   justify-content: center;
   background: rgba(0,0,0,.35);
   font: 14px/22px 'Press Start 2P', monospace;
   color: #fff;
   text-shadow: 0 2px 0 #543847;
   text-align: center;
   padding: 16px;
}

/* rekor tablosu (embed/score çıktısı) tam ekran, ölçeklenmez */
#rekor-div #score-table{ position: fixed; z-index: 1002; touch-action: pan-y; }
