@font-face {
  font-family: "fulboargenta";
  src: url("fonts/fulbo-argenta.woff2") format("woff2"), url("fonts/fulbo-argenta.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "MontserratLocal";
  src: url("fonts/montserrat.woff2") format("woff2");
  font-display: swap;
}

:root {
  background: #07121c;
  color: #f7f8fb;
  font-family: "MontserratLocal", Arial, sans-serif;
  touch-action: none;
  overscroll-behavior: none;
}

* { box-sizing: border-box; }

html, body, #app-shell {
  width: 100%;
  min-width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: #07121c;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body { position: fixed; inset: 0; }

#app-shell, #game, #canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#app-shell { outline: none; }
#game { z-index: 1; overflow: hidden; }

.ooyna-brand {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  z-index: 10010;
  display: block;
  width: clamp(64px, 10vw, 118px);
  height: clamp(64px, 10vw, 118px);
  padding: 4px;
  border-radius: 16px;
  background: rgba(5, 21, 33, .65);
  box-shadow: 0 5px 18px rgba(0, 0, 0, .34);
  cursor: pointer;
  transition: transform .18s ease, background-color .18s ease;
}
.ooyna-brand:hover, .ooyna-brand:focus-visible { transform: scale(1.04); background: rgba(5, 21, 33, .86); }
.ooyna-brand:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.ooyna-brand img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ooyna-brand[hidden] { display: none !important; }

/* Tarayıcı uyumluluk katmanı: Canvas düğmelerine güvenilir fare/dokunma alanı ekler. */
#web-controls {
  position: fixed;
  inset: 0;
  z-index: 10005;
  pointer-events: none;
}
.web-control-hit {
  position: absolute;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: transparent;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.web-control-hit[hidden] { display: none !important; pointer-events: none !important; }
.web-control-hit:focus-visible {
  outline: 3px solid rgba(255, 255, 255, .95);
  outline-offset: 2px;
}
#MoreGames { pointer-events: none !important; }

#canvas {
  display: block;
  z-index: 2;
  object-fit: contain;
  -ms-interpolation-mode: nearest-neighbor;
  image-rendering: auto;
  touch-action: none;
}

.status-screen, .orientation-screen {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: radial-gradient(circle at 50% 35%, rgba(50, 117, 91, .94), rgba(5, 16, 28, .98) 70%);
}

.status-screen[hidden], .orientation-screen[hidden], .protocol-note[hidden] { display: none; }

.status-card {
  width: min(560px, 94vw);
  text-align: center;
  padding: clamp(22px, 4vw, 40px);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 24px;
  background: rgba(5, 21, 33, .86);
  box-shadow: 0 22px 80px rgba(0, 0, 0, .5);
}

.loading-logo { display: block; width: min(230px, 50vw); max-height: 130px; object-fit: contain; margin: 0 auto 12px; }
.loading-title { font-family: "fulboargenta", Arial, sans-serif; color: #ffd75e; font-size: clamp(28px, 6vw, 52px); letter-spacing: 2px; text-shadow: 0 3px 0 #723f0c; }
.status-card p { margin: 15px 0 0; font-size: clamp(14px, 2.3vw, 18px); line-height: 1.45; }
.status-card h1 { margin: 0 0 12px; font-size: clamp(24px, 4vw, 36px); color: #ffcf5d; }
.error-card { border-color: rgba(255, 114, 92, .8); }

.progress { width: min(360px, 100%); height: 13px; margin: 25px auto 0; overflow: hidden; border: 2px solid rgba(255,255,255,.45); border-radius: 99px; background: #112333; }
.progress span { display: block; width: 8%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffc84b, #fff3ac); transition: width .18s ease; }

.shell-button { min-width: 170px; margin-top: 22px; padding: 12px 22px; border: 0; border-radius: 12px; background: #ffc84b; color: #142332; font: 700 17px "MontserratLocal", Arial, sans-serif; cursor: pointer; box-shadow: 0 4px 0 #a56a12; }
.shell-button:active { transform: translateY(2px); box-shadow: 0 2px 0 #a56a12; }
.shell-button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.orientation-card { width: min(560px, 90vw); text-align: center; padding: 18px; border-radius: 20px; color: #fff; background: rgba(4, 14, 23, .92); font-size: clamp(17px, 4vw, 24px); line-height: 1.35; }
.orientation-card img { display: block; width: min(250px, 70vw); margin: 0 auto 16px; border-radius: 12px; }

.protocol-note { position: fixed; z-index: 10030; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 12px; max-width: min(620px, calc(100vw - 24px)); padding: 10px 12px; border: 1px solid rgba(255, 211, 102, .7); border-radius: 10px; background: rgba(24, 31, 40, .96); color: #fff0c3; font-size: 13px; line-height: 1.35; }
.protocol-note button { border: 0; background: transparent; color: #fff; font-size: 23px; line-height: 1; cursor: pointer; }
.noscript { position: fixed; inset: 0; z-index: 20000; display: grid; place-items: center; margin: 0; padding: 25px; color: #fff; text-align: center; background: #07121c; }

/* Runtime compatibility: the legacy engine uses these IDs/classes. */
#ajaxbar { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; }
#play { position: absolute; inset: 0; width: 100%; height: 100%; display: none; z-index: 1000; }
.horizontal-seperator { height: 10px; width: 100%; }
.ig_debug { display: none !important; }

@media (orientation: portrait) and (max-width: 760px) {
  .orientation-screen[hidden] { display: none !important; pointer-events: none !important; }
  .orientation-screen:not([hidden]) { display: grid; }
}
@media (orientation: landscape), (min-width: 761px) {
  .orientation-screen { display: none !important; pointer-events: none !important; }
}
