/* Sihirli Köprü — yatay tam ekran cümle köprüsü */
.birles-kopru {
  position: fixed !important;
  inset: 0 !important;
  z-index: 14100 !important;
  display: none;
  background: #050b14;
  pointer-events: none;
}

.birles-kopru.is-open {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto;
}

.birles-kopru__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.birles-kopru__panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #050b14;
  overflow: hidden;
}

.birles-kopru__bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: max(10px, env(safe-area-inset-top)) 12px 10px;
  color: #fff7ed;
  background: linear-gradient(180deg, rgba(5, 11, 20, 0.82) 0%, rgba(5, 11, 20, 0) 100%);
  pointer-events: none;
}

.birles-kopru__bar > * {
  pointer-events: auto;
}

.birles-kopru__titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  font-family: "ComfortaaOkul", "Comfortaa", "Baloo 2", sans-serif;
}

.birles-kopru__titles strong {
  font-size: clamp(1.05rem, 3.2vw, 1.35rem);
  font-weight: 900;
}

.birles-kopru__titles span {
  font-size: clamp(0.78rem, 2.2vw, 0.95rem);
  opacity: 0.85;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.birles-kopru__stats {
  display: flex;
  gap: 12px;
  align-items: center;
  font-family: "ComfortaaOkul", "Comfortaa", "Baloo 2", sans-serif;
  font-size: clamp(0.95rem, 2.8vw, 1.2rem);
  font-weight: 800;
  white-space: nowrap;
}

.birles-kopru__stats [data-kp-lives] {
  color: #fb7185;
  letter-spacing: 1px;
}

.birles-kopru__iconbtn,
.birles-kopru__chipbtn {
  border: 0;
  cursor: pointer;
  font-family: "ComfortaaOkul", "Comfortaa", "Baloo 2", sans-serif;
  font-weight: 800;
  -webkit-tap-highlight-color: transparent;
}

.birles-kopru__iconbtn {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.birles-kopru__chipbtn {
  border-radius: 999px;
  padding: 10px 16px;
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 4px 0 #075985;
  flex-shrink: 0;
}

.birles-kopru__chipbtn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #075985;
}

.birles-kopru__stage {
  position: relative;
  flex: 1;
  min-height: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #050b14;
}

.birles-kopru__world {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: min(100%, calc((100% - 132px) * 16 / 9));
  max-height: calc(100% - 132px);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #050b14 center / cover no-repeat;
}

.birles-kopru.is-phone .birles-kopru__stage {
  align-items: stretch;
  justify-content: stretch;
}

.birles-kopru.is-phone .birles-kopru__world {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  flex: none;
}

.birles-kopru.is-phone .birles-kopru__dock {
  padding: 6px 10px max(8px, env(safe-area-inset-bottom));
  gap: 7px;
}

.birles-kopru.is-phone .birles-kopru__slots,
.birles-kopru.is-phone .birles-kopru__tray {
  gap: 8px;
}

.birles-kopru.is-phone .birles-kopru__chip,
.birles-kopru.is-phone .birles-kopru__slot {
  min-width: clamp(72px, 18.5vh, 124px);
  min-height: clamp(42px, 10vh, 54px);
  padding: 6px 12px;
  border-radius: 13px;
  font-size: clamp(1rem, 3.5vh, 1.25rem);
  box-shadow: 0 4px 0 #b45309;
}

.birles-kopru.is-phone .birles-kopru__chip--inslot {
  min-height: clamp(36px, 8.5vh, 46px);
  box-shadow: 0 3px 0 #b45309;
}

.birles-kopru.is-phone .birles-kopru__chip-ph--tray {
  min-width: clamp(72px, 18.5vh, 124px);
  min-height: clamp(42px, 10vh, 54px);
}

.birles-kopru.is-phone .birles-kopru__bar {
  top: 0;
  padding: max(2px, env(safe-area-inset-top, 0px)) 8px 4px;
  gap: 5px;
  align-items: center;
}

.birles-kopru.is-phone .birles-kopru__iconbtn {
  width: 34px;
  height: 34px;
  font-size: 0.95rem;
  border-radius: 10px;
}

.birles-kopru.is-phone .birles-kopru__chipbtn {
  padding: 6px 11px;
  font-size: 0.82rem;
}

.birles-kopru__bgvid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  z-index: 0;
}

.birles-kopru__canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  background: transparent;
}

.birles-kopru__dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 14px max(14px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(5, 11, 20, 0) 0%, rgba(5, 11, 20, 0.82) 28%, rgba(5, 11, 20, 0.95) 100%);
  pointer-events: none;
}

.birles-kopru__dock > * {
  pointer-events: auto;
}

.birles-kopru__slots,
.birles-kopru__tray {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.birles-kopru__slot {
  position: relative;
  min-width: clamp(118px, 22vw, 188px);
  min-height: 72px;
  padding: 8px;
  border-radius: 18px;
  border: 2.5px dashed rgba(125, 211, 252, 0.5);
  background: rgba(8, 47, 73, 0.5);
  color: #e0f2fe;
  font-family: "ComfortaaOkul", "Comfortaa", "Baloo 2", sans-serif;
  font-size: clamp(1.35rem, 4.2vw, 1.85rem);
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}

.birles-kopru__slot.is-drop {
  border-style: solid;
  border-color: #fbbf24;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.28);
  background: rgba(69, 26, 3, 0.35);
}

.birles-kopru__slot.is-filled {
  border-style: solid;
  border-color: rgba(253, 224, 71, 0.55);
  background: rgba(8, 47, 73, 0.25);
  padding: 6px;
}

.birles-kopru__chip-ph {
  flex: 0 0 auto;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px dashed rgba(255, 255, 255, 0.18);
  box-sizing: border-box;
}

.birles-kopru__chip-ph--tray {
  min-width: clamp(118px, 21vw, 180px);
  min-height: 68px;
}

.birles-kopru__chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: clamp(118px, 21vw, 180px);
  min-height: 68px;
  padding: 12px 18px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffbeb 0%, #fde68a 100%);
  color: #1c1917;
  font-family: "ComfortaaOkul", "Comfortaa", "Baloo 2", sans-serif;
  font-size: clamp(1.4rem, 4.4vw, 1.95rem);
  font-weight: 900;
  line-height: 1.1;
  box-shadow: 0 6px 0 #b45309;
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.birles-kopru__chip--inslot {
  width: 100%;
  min-width: 0;
  min-height: 56px;
  box-shadow: 0 4px 0 #b45309;
}

.birles-kopru__chip.is-dragging {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: grabbing;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42), 0 0 0 2px rgba(251, 191, 36, 0.9);
  background: linear-gradient(180deg, #fff7ed 0%, #fcd34d 100%);
  will-change: transform;
}

.birles-kopru.is-dragging {
  cursor: grabbing;
}

.birles-kopru__end {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(5, 11, 20, 0.78);
  color: #fffbeb;
  font-family: "ComfortaaOkul", "Comfortaa", "Baloo 2", sans-serif;
  text-align: center;
  z-index: 6;
  pointer-events: auto;
  padding: 24px;
}

.birles-kopru__end[hidden] {
  display: none !important;
}

.birles-kopru__end p:first-child {
  margin: 0;
  font-size: clamp(2.4rem, 8vw, 4.2rem);
  font-weight: 900;
  line-height: 1.05;
}

.birles-kopru__end p + p {
  margin: 0 0 8px;
  font-size: clamp(1.1rem, 3.4vw, 1.7rem);
  font-weight: 700;
  max-width: 28rem;
  line-height: 1.35;
}

.birles-kopru__chipbtn--gold {
  background: linear-gradient(180deg, #fde68a 0%, #f59e0b 100%);
  color: #422006;
  box-shadow: 0 5px 0 #b45309;
}

.birles-kopru__boot {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background:
    radial-gradient(circle at 50% 40%, rgba(56, 189, 248, 0.18), transparent 52%),
    rgba(5, 11, 20, 0.9);
  color: #ecfeff;
  text-align: center;
  font-family: "ComfortaaOkul", "Comfortaa", "Baloo 2", sans-serif;
  transition: background 0.35s ease;
}

.birles-kopru.is-ready .birles-kopru__boot {
  background:
    radial-gradient(circle at 50% 42%, rgba(251, 191, 36, 0.22), transparent 55%),
    rgba(5, 11, 20, 0.42);
}

.birles-kopru__boot[hidden] {
  display: none !important;
}

.birles-kopru__boot-orb {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 5px solid rgba(125, 211, 252, 0.25);
  border-top-color: #38bdf8;
  animation: kpBootSpin 0.85s linear infinite;
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.35);
}

.birles-kopru__boot-orb[hidden] {
  display: none !important;
}

.birles-kopru__boot p {
  margin: 0;
}

.birles-kopru__boot p:first-of-type {
  font-size: clamp(1.6rem, 5vw, 2.3rem);
  font-weight: 900;
}

.birles-kopru__boot p + p {
  font-size: clamp(0.95rem, 2.8vw, 1.2rem);
  font-weight: 700;
  opacity: 0.82;
}

.birles-kopru__startbtn {
  margin-top: 8px;
  min-width: min(240px, 72vw);
  min-height: 58px;
  padding: 12px 28px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, #fef3c7 0%, #fbbf24 55%, #f59e0b 100%);
  color: #422006;
  font-family: "ComfortaaOkul", "Comfortaa", "Baloo 2", sans-serif;
  font-size: clamp(1.45rem, 4.8vw, 2rem);
  font-weight: 900;
  box-shadow: 0 7px 0 #b45309, 0 12px 28px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.birles-kopru__startbtn:active {
  transform: translateY(3px);
  box-shadow: 0 4px 0 #b45309, 0 8px 18px rgba(0, 0, 0, 0.3);
}

.birles-kopru__startbtn[hidden] {
  display: none !important;
}

@keyframes kpBootSpin {
  to {
    transform: rotate(360deg);
  }
}

.birles-kopru.is-booting .birles-kopru__bar,
.birles-kopru.is-booting .birles-kopru__dock {
  visibility: hidden;
}

body.birles-kopru-fs {
  overflow: hidden !important;
}

body.birles-kopru-fs #birles-zoom-mask {
  display: none !important;
}

.birles-kopru.is-phone .birles-kopru__titles strong {
  font-size: clamp(0.9rem, 2.7vw, 1.12rem);
}

.birles-kopru.is-phone .birles-kopru__titles span {
  font-size: clamp(0.66rem, 1.9vw, 0.8rem);
}

.birles-kopru.is-phone .birles-kopru__stats {
  font-size: clamp(0.82rem, 2.5vw, 1.02rem);
  gap: 8px;
}

@media (max-height: 430px) {
  .birles-kopru__dock {
    gap: 6px;
    padding-top: 4px;
  }

  .birles-kopru:not(.is-phone) .birles-kopru__chip,
  .birles-kopru:not(.is-phone) .birles-kopru__slot {
    min-height: 58px;
  }
}
