* { box-sizing: border-box; margin: 0; padding: 0; }
:root{
  --bg: #121212;
  --panel: #181818;
  --panel-2: #1f1f1f;
  --border: #2c2c2c;
  --text: #f3f3f3;
  --muted: #b8b8b8;
  --soft: #a7d8ea;
  --soft-2: #e8f4f8;
  --shadow: 0 20px 45px rgba(0,0,0,.35);
}
body {
  background:
    radial-gradient(circle at top, rgba(79, 157, 192, 0.16), transparent 28%),
    linear-gradient(180deg, #111 0%, #161616 100%);
  color: var(--text);
  font-family: Arial, sans-serif;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#topbar{
  display:grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(220px, .9fr) minmax(280px, 1fr);
  gap: 14px;
  padding: 14px;
}

.topbarCard,
#map-frame,
#side-panel,
.adCard,
#menuPanel,
.statsCard,
.menuControls,
.menuSection,
.instructionBox,
.infoMiniCard{
  background: rgba(24,24,24,.92);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.topbarCard{
  min-height: 112px;
  padding: 16px 18px;
}

.eyebrow,
.stageKicker,
.panelKicker,
.label,
.miniLabel,
.adTitle,
.statsLabel,
.menuLabel{
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}

.brandTitle,
.value,
.stageTitle{
  font-size: 26px;
  font-weight: 900;
  margin-top: 6px;
}

.brandSub,
#statusTextTop,
.stageHint,
.instructionBox p,
.menuHint{
  color: var(--muted);
  line-height: 1.45;
}

.brandSub{ margin-top: 8px; max-width: 34ch; }
.selectedCard .value{ font-size: 24px; }

.statusCard{
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap: 12px;
}

.statusPills{
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
}

#scorePill,
#streakPill{
  background: #101010;
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.topbarActions{
  display:flex;
  gap: 8px;
  align-items:center;
}

.quickActionBtn,
#menuBtn,
.menuItem,
#closeMenu{
  border: 1px solid var(--border);
  color: var(--text);
  background: #101010;
  cursor: pointer;
  transition: .18s ease;
}

.quickActionBtn{
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
}
.quickActionBtn:hover,
#menuBtn:hover,
.menuItem:hover,
#closeMenu:hover{ background:#262626; }
.quickActionBtn.ghost{ color: var(--muted); }

#menuBtn {
  border-radius: 12px;
  width: 46px;
  height: 44px;
  font-size: 20px;
  flex: 0 0 auto;
}

#content {
  flex: 1;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 320px;
  gap: 14px;
  padding: 0 14px 14px;
  min-height: 0;
}

#left-ads{
  display:flex;
  flex-direction:column;
  gap: 12px;
}
.adCard{
  padding: 12px;
  display:flex;
  flex-direction:column;
  gap: 10px;
}
.adSlot,
.adSlotMenu{
  border: 1px dashed #3a3a3a;
  border-radius: 14px;
  background: #101010;
  color: #bdbdbd;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.adSlot.tall{ height: 420px; }
.adSlot.box{ height: 200px; }
.adSlotMenu{ height: 110px; }

#map-frame {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  align-items: center;
  padding-bottom: 18px;
}

.mapStageTop{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 14px;
  padding: 16px 18px;
  width: 100%;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0));
}

.stageTitle{ font-size: 20px; margin-top: 4px; }
.stageHint{
  font-size: 13px;
  text-align: right;
  max-width: 24ch;
}

#map {
  width: min(100%, 760px);
  height: clamp(300px, 52vh, 560px);
  min-height: 300px;
  margin: 16px auto 0;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  flex: none;
}

#side-panel {
  padding: 16px;
  display:flex;
  flex-direction:column;
  gap: 14px;
  min-height: 0;
}

.panelIntro{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
}
.panelIntro h2{ font-size: 22px; margin-top: 4px; }
.panelBadge{
  padding: 7px 10px;
  border-radius: 999px;
  background: #102127;
  border: 1px solid #24424b;
  color: #9fdbeb;
  font-size: 12px;
  font-weight: 700;
}

.infoGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.infoMiniCard{
  padding: 12px;
  background: #131313;
  box-shadow: none;
}
.infoMiniCard strong{
  display:block;
  margin-top: 8px;
  font-size: 15px;
}

.instructionBox{
  padding: 12px 14px;
  background: rgba(167, 216, 234, .08);
  border-color: rgba(167, 216, 234, .25);
  box-shadow: none;
}
.instructionBox strong{ display:block; margin-bottom: 6px; }

#hintList {
  list-style: none;
  display:flex;
  flex-direction:column;
  gap: 10px;
  overflow:auto;
  padding-right: 4px;
}
#hintList li {
  background: #141414;
  border: 1px solid var(--border);
  padding: 12px 14px;
  border-radius: 14px;
  line-height: 1.5;
}

.leaflet-container { background: #bfe3ef; }

.toast{
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(16,16,16,.95);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 700;
  z-index: 10050;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.toast.show{
  opacity: 1;
  transform: translateX(-50%) translateY(8px);
}
.toast.good{ border-color: rgba(46, 204, 113, 0.6); }
.toast.bad{ border-color: rgba(231, 76, 60, 0.6); }

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  50% { transform: translateX(3px); }
  75% { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}
.shake{ animation: shake 0.22s ease; }

@keyframes pop {
  0% { transform: scale(1); }
  60% { transform: scale(1.06); }
  100% { transform: scale(1); }
}
.leaflet-interactive.pop{
  transform-origin: center;
  animation: pop 0.18s ease;
}

@keyframes hintIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
#hintList li.newHint{ animation: hintIn 0.18s ease; }

#menuPanel {
  position: fixed;
  left: 50%;
  top: 72px;
  transform: translateX(-50%) translateY(-140%);
  width: min(860px, calc(100% - 24px));
  max-height: calc(100vh - 120px);
  z-index: 9999;
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#menuPanel.open { transform: translateX(-50%) translateY(0); }

.menuHeader {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.menuTitle { font-weight: 800; font-size: 16px; }
#closeMenu {
  border-radius: 10px;
  width: 38px;
  height: 38px;
}
.menuBody {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
}
.menuStats .statsRow{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.statsCard{
  padding: 12px;
  background: #131313;
  box-shadow: none;
}
.statsValue{ font-size: 22px; font-weight: 900; margin-top: 8px; }
.menuControls{
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: none;
}
.menuSection {
  padding: 10px;
  box-shadow: none;
}
.menuSelect {
  width: 100%;
  background: #101010;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 11px 12px;
  border-radius: 12px;
  outline: none;
}
.menuButtonsRow{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.menuItem {
  padding: 12px 14px;
  border-radius: 12px;
  text-align: left;
  font-weight: 700;
}

#menuBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.46);
  z-index: 9998;
  display: none;
}
#menuBackdrop.show { display: block; }

.adFallbackLink,
.adFallbackImg{ display:block; width:100%; height:100%; }
.adFallbackImg{ object-fit: cover; }

@media (max-width: 1280px) {
  #content{
    grid-template-columns: minmax(0, 1fr) 320px;
  }
  #left-ads{ display:none; }
}

@media (max-width: 980px) {
  #topbar{
    grid-template-columns: 1fr;
  }
  #content{
    grid-template-columns: 1fr;
  }
  #map {
    width: min(100%, 680px);
    height: clamp(280px, 46vh, 460px);
    min-height: 280px;
  }
  #side-panel{
    max-height: none;
  }
  .stageHint{ text-align:left; max-width:none; }
  .mapStageTop{ align-items:flex-start; flex-direction:column; }
}

@media (max-width: 700px){
  .menuStats .statsRow{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .menuButtonsRow{ grid-template-columns: 1fr; }
  #menuPanel { top: 64px; }
  .topbarActions{
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  #topbar{ padding: 10px; }
  #content{ padding: 0 10px 10px; }
  .topbarCard,
  #side-panel,
  .adCard,
  #map-frame{ border-radius: 14px; }
  .brandTitle,
  .selectedCard .value{ font-size: 22px; }
  .infoGrid{ grid-template-columns: 1fr 1fr; }

  #map {
    width: 100%;
    height: clamp(240px, 38vh, 340px);
    min-height: 240px;
    border-radius: 14px;
  }

  .toast {
    width: calc(100% - 20px);
    text-align: center;
    border-radius: 14px;
  }
}
body {
  background:
    radial-gradient(circle at top, rgba(79,157,192,.18), transparent 30%),
    linear-gradient(180deg, #101317 0%, #1a2230 100%);
}

.gameShell {
  min-height: 100vh;
  display: block;
  width: 100%;
  padding: 24px 340px 110px;
}

.edgeAds {
  position: fixed;
  top: 24px;
  bottom: 24px;
  width: 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  z-index: 20;
}

.edgeAdsLeft {
  left: 24px;
}

.edgeAdsRight {
  right: 24px;
}

.edgeAdSlot {
  width: 300px;
  height: 300px;
  flex: 0 0 300px;
  border: 1px dashed rgba(255,255,255,.16);
  border-radius: 24px;
  background: rgba(7,10,16,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9fb2cb;
  text-align: center;
  padding: 12px;
  backdrop-filter: blur(8px);
  overflow: hidden;
}

.gameMain {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.heroSection {
  padding-top: 4px;
}

.heroTop {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: center;
  padding: 18px 22px;
  border-radius: 30px;
  border: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(18,24,35,.78), rgba(12,17,26,.62));
  box-shadow: 0 18px 40px rgba(0,0,0,.22);
}

.heroLogoWrap {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.gameLogo {
  max-width: 150px;
  max-height: 110px;
  object-fit: contain;
  display: none;
}

.gameLogo.show {
  display: block;
}

.gameLogoFallback {
  width: 120px;
  height: 84px;
  border-radius: 18px;
  border: 1px dashed rgba(255,255,255,.16);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cdd7e6;
  background: rgba(7,10,16,.35);
}

.heroCenter {
  text-align: center;
  padding-top: 0;
}

.heroTitle {
  font-size: clamp(30px, 4vw, 58px);
  line-height: 1.02;
  font-weight: 900;
  color: #f2f5fa;
  letter-spacing: -.02em;
}

.heroHowTo {
  margin-top: 10px;
  font-size: clamp(15px, 1.35vw, 22px);
  color: #d6dde9;
  line-height: 1.45;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.heroStats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-content: center;
}

.heroStatBox {
  min-height: 64px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(11,16,24,.82);
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #f0f4fb;
}

.heroActionRow {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.heroBtn {
  min-height: 54px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  transition: .18s ease;
}

.heroBtnPrimary {
  background: linear-gradient(180deg, #4fd446 0%, #2c9d2e 100%);
  color: #fff;
}

.heroBtnSecondary {
  background: linear-gradient(180deg, #515d72 0%, #343d4e 100%);
  color: #fff;
}

.heroBtn:hover {
  transform: translateY(-1px);
}

.playArea {
  display: grid;
  grid-template-columns: minmax(0, 760px) 260px;
  gap: 16px;
  align-items: start;
  justify-content: center;
}

.mapCard {
  padding: 0;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(16,21,30,.66);
  box-shadow: 0 18px 40px rgba(0,0,0,.26);
  overflow: hidden;
}

#map {
  width: 100%;
  height: min(48vw, 470px);
  min-height: 330px;
  max-height: 470px;
  border-radius: 0 0 28px 28px;
}

.hintPanel {
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(16,21,30,.66);
  box-shadow: 0 18px 40px rgba(0,0,0,.26);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hintPanelTitle {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: .02em;
  color: #f3f7ff;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(255,255,255,.12);
}

.hintList {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hintList li {
  background: linear-gradient(180deg, rgba(72,79,94,.9), rgba(48,54,67,.95));
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  padding: 16px 18px;
  font-size: 16px;
  line-height: 1.45;
  color: #f0f4fb;
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
}

.visualHintWrap {
  margin-top: 4px;
}

.visualHintTitle {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 10px;
  color: #f2f5fa;
}

.visualHintBox {
  min-height: 170px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(11,15,22,.5);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

#visualHintImage {
  max-width: 100%;
  max-height: 210px;
  object-fit: contain;
  display: none;
  border-radius: 14px;
}

#visualHintImage.show {
  display: block;
}

.visualHintEmpty {
  color: #9aa8bc;
  text-align: center;
  line-height: 1.45;
}

.bottomNav {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(640px, calc(100% - 24px));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-radius: 28px;
  background: rgba(18,23,33,.82);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 18px 40px rgba(0,0,0,.28);
  backdrop-filter: blur(10px);
  overflow: hidden;
  z-index: 1000;
}

.bottomNavBtn {
  min-height: 82px;
  background: transparent;
  border: 0;
  border-right: 1px solid rgba(255,255,255,.12);
  color: #f2f5fa;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.bottomNavBtn:last-child {
  border-right: 0;
}

.bottomNavBtn:hover {
  background: rgba(255,255,255,.04);
}

@media (max-width: 1400px) {
  .edgeAds {
    width: 220px;
    top: 16px;
    bottom: 16px;
  }

  .edgeAdsLeft {
    left: 12px;
  }

  .edgeAdsRight {
    right: 12px;
  }

  .edgeAdSlot {
    width: 220px;
    height: 220px;
    flex-basis: 220px;
  }

  .gameShell {
    padding: 24px 250px 110px;
  }
}

@media (max-width: 1180px) {
  .gameShell {
    padding: 18px 18px 110px;
  }

  .edgeAds {
    display: none;
  }

  .heroTop {
    grid-template-columns: 120px 1fr;
    gap: 14px;
    padding: 16px;
  }

  .heroStats {
    grid-column: 1 / -1;
  }

  .playArea {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .heroTop {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .heroLogoWrap {
    justify-content: center;
    min-height: auto;
  }

  .heroCenter {
    text-align: center;
  }

  .heroStats {
    grid-template-columns: 1fr 1fr;
  }

  .heroStatBox {
    min-height: 58px;
    font-size: 16px;
  }

  .heroBtn {
    min-height: 52px;
    font-size: 16px;
  }

  .playArea {
    grid-template-columns: 1fr;
  }

  #map {
    height: min(76vw, 420px);
    min-height: 280px;
  }

  .hintPanel {
    padding: 14px;
  }

  .bottomNavBtn {
    min-height: 70px;
    font-size: 16px;
  }
}
.hiddenSupportText {
  display: none;
}

.mapTopBar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(9,14,22,.72);
}

.mapTopLabel {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #91a0b7;
}

.mapSelectedCountry {
  font-size: 24px;
  font-weight: 900;
  color: #f4f7fc;
  line-height: 1.1;
  min-height: 28px;
}
.singleMenuNav {
  width: min(260px, calc(100% - 24px));
  grid-template-columns: 1fr;
}

.onlyMenuBtn {
  border-right: 0 !important;
}
/* =========================
   SABİT YAN REKLAMLAR - TEMİZ SON HAL
========================= */

.gameShell {
  min-height: 100vh;
  display: block;
  width: 100%;
  padding: 24px 340px 110px;
}

.edgeAds {
  position: fixed;
  top: 24px;
  bottom: 24px;
  width: 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  z-index: 20;
}

.edgeAdsLeft {
  left: 24px;
}

.edgeAdsRight {
  right: 24px;
}

.edgeAdSlot {
  width: 300px;
  height: 300px;
  flex: 0 0 300px;
  border: 1px dashed rgba(255,255,255,.16);
  border-radius: 24px;
  background: rgba(7,10,16,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9fb2cb;
  text-align: center;
  padding: 12px;
  backdrop-filter: blur(8px);
  overflow: hidden;
}

/* Yüksekliği kısa ekranlarda iki reklamın da görünmesi için küçült */
@media (max-height: 760px) {
  .edgeAds {
    width: 240px;
  }

  .edgeAdsLeft {
    left: 16px;
  }

  .edgeAdsRight {
    right: 16px;
  }

  .edgeAdSlot {
    width: 240px;
    height: 240px;
    flex-basis: 240px;
  }

  .gameShell {
    padding: 24px 280px 110px;
  }
}

/* Daha dar masaüstü */
@media (max-width: 1400px) {
  .edgeAds {
    width: 220px;
    top: 16px;
    bottom: 16px;
  }

  .edgeAdsLeft {
    left: 12px;
  }

  .edgeAdsRight {
    right: 12px;
  }

  .edgeAdSlot {
    width: 220px;
    height: 220px;
    flex-basis: 220px;
  }

  .gameShell {
    padding: 24px 250px 110px;
  }
}

/* Hem dar hem kısa ekran */
@media (max-width: 1400px) and (max-height: 760px) {
  .edgeAds {
    width: 180px;
  }

  .edgeAdSlot {
    width: 180px;
    height: 180px;
    flex-basis: 180px;
  }

  .gameShell {
    padding: 18px 210px 110px;
  }
}

/* Tablet ve mobilde reklamları gizle */
@media (max-width: 1180px) {
  .edgeAds {
    display: none;
  }

  .gameShell {
    padding: 18px 18px 110px;
  }
}
.countryLabel {
  background: rgba(0,0,0,.34);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 6px;
  box-shadow: none;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  text-align: center;
  pointer-events: none;
  backdrop-filter: blur(2px);
  white-space: nowrap;
}

.countryLabelSmall {
  font-size: 9px;
  padding: 1px 4px;
}
.menuSocialLinks {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.menuSocialLink {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #101010;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .18s ease;
}

.menuSocialLink:hover {
  background: #262626;
  transform: translateY(-1px);
}

.menuSocialLink img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}