/* ===== 2048 Düşen: sayfaya uyarlanmış sürüm ===== */


/* Oyun kartı: navbar ile footer arasında ortada durur */
.app{
  width:calc(100% - 24px);
  max-width:380px;
  margin:28px auto 40px;
  padding:16px;
  background:var(--bg);
  color:var(--ink);
  font-family:"Trebuchet MS","Segoe UI",system-ui,sans-serif;
  border-radius:20px;
  border: 10px solid #0D6EFD;
  box-shadow: 0 0 15px #0d6efd, 0 0 35px rgba(13, 110, 253, 0.4);
  touch-action:manipulation;
}

.app header{
  display:flex;align-items:center;justify-content:space-between;
  gap:8px;margin-bottom:10px;
}
.app img{
  box-sizing: border-box;
  font-family:inherit;font-size:22px; height:80px;
  letter-spacing:-.5px;line-height:1.2;margin:0;color:inherit;
}

.app .stats{display:flex;gap:6px}
.app .stat{
  background:var(--panel);border-radius:8px;
  padding:5px 10px;text-align:center;min-width:64px;
}
.app .stat small{display:block;font-size:11px;color:var(--mute)}
.app .stat b{font-size:17px}

.app .next{
  display:flex;align-items:center;gap:8px;
  font-size:13px;color:var(--mute);margin-bottom:8px;
}
.app #nx{
  width:34px;height:34px;border-radius:7px;
  display:flex;align-items:center;justify-content:center;
  font-weight:800;font-size:14px;color:#fff;
}

.app .wrap{position:relative}
.app canvas{
  width:100%;display:block;border-radius:12px;
  background:var(--panel);touch-action:none;
}

.app .over{

  position:absolute;
  inset: 0;
  border-radius:12px;
  background:rgba(20,18,16,.78);
  color:#fff;
  display:none;
  flex-direction:column;
  align-items: center;
  justify-content: space-between;
  text-align:center;

}
.app .over.show{
  display:flex;
}
.app .over h2{
  margin-top: 30px;
  font-size:xx-large;
  color:#fff;
}
.over .scr{
  display: flex;
  flex-direction: column;
  position: absolute;
  margin-top: 70px;
  font-size: larger;
}

.over .scro, .over .scrt{
  margin: 15px;
}

.over .try-ag {
  display: flex;
  width: 200px;
  height: auto;
  padding: 12px 20px; /* İçerideki yazı ve ikonun rahat durması için */
  background-color: #0D6EFD;
  color: #ffffff;
  top: 0;
  margin-bottom: 20px;
  text-align: center;
  justify-content: center;
  align-items: center; /* İkon ve yazıyı dikeyde ortalar */
  gap: 8px; /* İkon ve yazı arası boşluk */
  border: none;
  border-radius: 10px; /* Köşeleri yumuşatır */
  cursor: pointer;

  /* Kendi renginde yumuşak alt gölge */
  box-shadow: 0 0 15px rgba(13, 110, 253, 0.4);

  /* Animasyonun yumuşak geçişi (yaylanma hissiyatlı) */
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* İmleç üzerine geldiğinde (Hover) */
.over .try-ag:hover {
  background-color: #0b5ed7; /* Maviyi hafif koyulaştırır */
  transform: translateY(-4px) scale(1.03); /* Hafif yukarı kalkar ve büyür */
}

/* Butona tıklandığı an (Active) basılma hissi */
.over .try-ag:active {
  transform: translateY(-1px) scale(0.98);
  box-shadow: 0 4px 10px rgba(13, 110, 253, 0.4);
}

/* Bonus: İçindeki Font Awesome refresh ikonu varsa üzerine gelince dönsün */
.over .try-ag i {
  transition: transform 0.4s ease;
}

.over .try-ag:hover i {
  transform: rotate(180deg);
}


.over .close-icon-btn{
  display: flex;
  position: absolute;
  margin-top: 10px;
  right: 0px;
  cursor: pointer;

}

/* Butonlar sadece oyun kartının içinde etkilenir */
.app button{
  font:inherit;border:0;border-radius:10px;
  background:var(--btn);color:var(--btnink);
  padding:10px 18px;font-weight:700;cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.app button:focus-visible{outline:3px solid #4c8dff;outline-offset:2px}

.app .ctrl{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;margin-top:10px}
.app .ctrl button{font-size:22px;padding:12px}

.app p.hint{
  font-size:12px;color:var(--mute);
  margin:10px 0 0;text-align:center;line-height:1.4;
}

@media (max-width:420px){
  .app{margin:16px auto 28px;padding:12px;border-radius:16px}
}
