/* Nova Düello Oyun v4 — katman düzeltmeleri, şerit yok, tam ekran final */

html:has(body.nova-duel-game-open),
html.nova-duel-game-open {
  overflow: hidden !important;
  height: 100% !important;
  max-height: 100% !important;
  width: 100% !important;
  background: #0a0f1c !important;
}

body.nova-duel-game-open {
  overflow: hidden !important;
  touch-action: none;
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  overscroll-behavior: none !important;
  zoom: 1 !important;
  transform: none !important;
  background: #0a0f1c !important;
}

/* Performans zoom’u düello oyununda kapat — siyah şeritlerin ana nedeni */
body.nova-duel-game-open #duel-game-screen,
body.nova-duel-game-open #duel-game-screen.nova-perf-sp-scope,
body.nova-perf-ultra.nova-duel-game-open #duel-game-screen,
body.nova-perf-performance.nova-duel-game-open #duel-game-screen,
body.nova-perf-ultra:not(.nova-perf-duel-medium-active).nova-duel-game-open #duel-game-screen {
  zoom: 1 !important;
  transform: none !important;
  scale: 1 !important;
}

body.nova-duel-game-open #duel-game-screen.duel-game-container {
  max-width: none !important;
  width: 100vw !important;
  min-width: 100vw !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  opacity: 1 !important;
  animation: none !important;
  transform: none !important;
}

body.nova-duel-game-open #main-screen,
body.nova-duel-game-open #nova-duel-epic-root,
body.nova-duel-game-open #duel-selection-screen,
body.nova-duel-game-open #matchmakingScreen {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Hazırlık / epik katman — oyun açıkken tamamen kapalı */
body.nova-duel-game-open #nova-duel-epic-root,
body.nova-duel-game-open #nova-duel-epic-root.ndep-open {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Sağ alttaki ölçek çubuğu / sürüklenebilir top — kapalı */
body.nova-duel-game-open #nova-duel-scale-toolbar,
#nova-duel-scale-toolbar {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#duel-game-screen.nova-duel-game-visible {
  touch-action: none;
  -webkit-overflow-scrolling: auto;
}

#duel-game-screen.duel-game-container,
#duel-game-screen {
  overflow: hidden !important;
  overscroll-behavior: none;
  isolation: isolate;
  position: relative;
}

/* —— Arena video arka plan (duello-bg-loop.mp4 seamless loop) —— */
#duel-game-screen .ndg-arena-video-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #060912;
}

#duel-game-screen .ndg-arena-video {
  position: absolute;
  inset: -1%;
  width: 102%;
  height: 102%;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-origin: center center;
}

#duel-game-screen .ndg-arena-video.is-front {
  opacity: 1;
}

#duel-game-screen .ndg-arena-video-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(6, 9, 18, 0.58) 0%,
      rgba(6, 9, 18, 0.12) 36%,
      rgba(6, 9, 18, 0.14) 64%,
      rgba(6, 9, 18, 0.52) 100%
    ),
    radial-gradient(ellipse 90% 70% at 50% 50%, rgba(6, 9, 18, 0.06), rgba(6, 9, 18, 0.3));
}

#duel-game-screen.ndg-arena-video-on {
  background-color: #0a0f1c !important;
  background-image: none !important;
  animation: none !important;
}

#duel-game-screen.ndg-arena-video-on > :not(.ndg-arena-video-layer) {
  position: relative;
  z-index: 2;
}

#duel-game-screen.ndg-duel-finished .ndg-arena-video-layer {
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  #duel-game-screen .ndg-arena-video-layer {
    display: none !important;
  }
}

/* Arka plan “top” / dış hale — kapat (soru kutusu animasyonlu çerçeve hariç) */
#duel-game-screen::before,
#duel-game-screen .question-container::after {
  display: none !important;
  content: none !important;
}

#duel-game-screen[style*='flex'],
#duel-game-screen.nova-duel-game-visible {
  position: fixed !important;
  inset: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: clamp(8px, 1.4vh, 12px) !important;
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  height: 100svh !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  max-height: none !important;
  margin: 0 !important;
  padding:
    max(8px, env(safe-area-inset-top))
    max(10px, env(safe-area-inset-right))
    max(8px, env(safe-area-inset-bottom))
    max(10px, env(safe-area-inset-left)) !important;
  box-sizing: border-box !important;
  background-color: #0a0f1c !important;
  background-image:
    radial-gradient(ellipse 100% 55% at 50% -8%, rgba(56, 189, 248, 0.18), transparent 58%),
    radial-gradient(ellipse 80% 45% at 10% 100%, rgba(251, 191, 36, 0.1), transparent 55%),
    radial-gradient(ellipse 80% 45% at 90% 100%, rgba(168, 85, 247, 0.12), transparent 55%),
    linear-gradient(168deg, #0c1224 0%, #151f3a 45%, #0a0f1c 100%) !important;
  animation: ndg-arena-bg 8s ease-in-out infinite alternate;
}

@media (pointer: coarse) {
  #duel-game-screen[style*='flex'],
  #duel-game-screen.nova-duel-game-visible {
    animation: none !important;
  }
}

@keyframes ndg-arena-bg {
  from { filter: brightness(1) saturate(1); }
  to { filter: brightness(1.06) saturate(1.08); }
}

#duel-game-screen .players-info-row,
#duel-game-screen #duel-question-text,
#duel-game-screen .progress-container,
#duel-game-screen #duel-final-container {
  display: none !important;
}

/* —— HUD + timer VS altında —— */
#duel-game-screen .nova-vs-hud {
  width: min(480px, 100%) !important;
  margin: 0 !important;
  flex-shrink: 0;
}

#duel-game-screen .nova-hud-center {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 4px !important;
  flex-shrink: 0 !important;
  min-width: 52px;
}

/* Premium geri sayım — VS altında daire */
#duel-game-screen .ndg-timer-ring {
  position: relative;
  width: clamp(36px, 9vw, 42px);
  height: clamp(36px, 9vw, 42px);
  margin: 2px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fb7185 0%, #dc2626 52%, #450a0a 100%);
  box-shadow:
    0 0 0 2px rgba(254, 202, 202, 0.45),
    0 0 0 5px rgba(239, 68, 68, 0.18),
    0 0 18px rgba(239, 68, 68, 0.5),
    inset 0 2px 6px rgba(255, 255, 255, 0.2);
  animation: ndg-timer-pulse 1.1s ease-in-out infinite;
}

#duel-game-screen .ndg-timer-ring::before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.22);
  pointer-events: none;
}

#duel-game-screen .ndg-timer-num,
#duel-game-screen #duel-timer.ndg-timer-num,
#duel-game-screen #duel-timer {
  all: unset;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 50% !important;
  background: transparent !important;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif !important;
  font-size: clamp(0.8rem, 3.2vw, 0.95rem) !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  color: #fff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45) !important;
  animation: none !important;
  cursor: default !important;
}

@keyframes ndg-timer-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow:
      0 0 0 2px rgba(254, 202, 202, 0.45),
      0 0 0 5px rgba(239, 68, 68, 0.18),
      0 0 16px rgba(239, 68, 68, 0.45),
      inset 0 2px 6px rgba(255, 255, 255, 0.2);
  }
  50% {
    transform: scale(1.06);
    box-shadow:
      0 0 0 2px rgba(254, 202, 202, 0.55),
      0 0 0 6px rgba(239, 68, 68, 0.28),
      0 0 22px rgba(239, 68, 68, 0.6),
      inset 0 2px 6px rgba(255, 255, 255, 0.25);
  }
}

#nova-vs-hud .nova-name {
  font-size: clamp(11px, 2.9vw, 13px) !important;
  font-weight: 800 !important;
}

#nova-vs-hud .nova-hp {
  height: 16px !important;
  border-radius: 999px !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

#nova-vs-hud .nova-hp-fill {
  background: linear-gradient(90deg, #0284c7, #38bdf8, #7dd3fc) !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.45);
}

#nova-vs-hud .nova-hud-side.right .nova-hp-fill {
  background: linear-gradient(90deg, #d97706, #fbbf24, #fde68a) !important;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.35);
}

#nova-vs-hud .nova-hp-count {
  font-weight: 900 !important;
  font-size: clamp(11px, 3vw, 13px) !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease, color 0.2s ease, text-shadow 0.2s ease;
}

#nova-vs-hud .nova-hp-count.ndg-score-pulse {
  animation: ndg-score-pop 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
  color: #bbf7d0 !important;
  text-shadow:
    0 0 14px rgba(74, 222, 128, 0.95),
    0 0 28px rgba(34, 197, 94, 0.55) !important;
}

@keyframes ndg-score-pop {
  0% { transform: translate(-50%, -50%) scale(1); }
  35% { transform: translate(-50%, -50%) scale(1.45); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

/* —— Soru sayacı + bar —— */
#duel-game-screen .ndg-meta-row {
  width: min(480px, 100%) !important;
  display: block !important;
  padding: 0 2px !important;
  flex-shrink: 0;
  z-index: 3;
}

#duel-game-screen .ndg-meta-row .timer-container {
  display: none !important;
}

#duel-game-screen .ndg-meta-left {
  flex: 1;
  min-width: 0;
}

#duel-game-screen .question-number {
  display: block !important;
  font-size: clamp(12px, 3.2vw, 14px) !important;
  font-weight: 900 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  color: #fde68a !important;
  opacity: 1 !important;
  margin: 0 0 6px !important;
  text-shadow: 0 0 14px rgba(251, 191, 36, 0.55);
}

#duel-game-screen .progress-bar {
  height: 8px !important;
  border-radius: 999px !important;
  background: rgba(15, 23, 42, 0.9) !important;
  border: 1px solid rgba(56, 189, 248, 0.25);
  overflow: hidden;
}

#duel-game-screen #duel-progress-bar-inner {
  background: linear-gradient(90deg, #f59e0b, #fbbf24, #fde68a, #22d3ee) !important;
  background-size: 200% 100% !important;
  animation: ndg-progress-flow 2.2s linear infinite;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.55);
}

@keyframes ndg-progress-flow {
  from { background-position: 0% 50%; }
  to { background-position: 200% 50%; }
}


/* —— Soru kutusu — kompakt; uzun soruda şıkların üstünde kalır —— */
#duel-game-screen .question-container {
  flex: 0 1 auto;
  align-self: center;
  width: min(480px, calc(100% - 4px)) !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  --ndg-q-font-scale: 1;
  --q-min-h: 0 !important;
  margin: 0 !important;
  padding: clamp(12px, 2vh, 16px) clamp(14px, 3vw, 18px) !important;
  overflow-x: hidden !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  border-radius: 18px !important;
  background:
    linear-gradient(165deg, rgba(17, 24, 39, 0.98), rgba(8, 12, 24, 0.99)) !important;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.2) inset,
    0 0 28px rgba(56, 189, 248, 0.12),
    0 14px 36px rgba(0, 0, 0, 0.48) !important;
  backdrop-filter: none !important;
  position: relative;
  isolation: isolate;
  z-index: 2;
}

/* Resimli soru — kutu büyür, resim kesilmez */
#duel-game-screen .question-container.ndg-has-image,
#duel-game-screen .question-container.ndg-has-info-image,
#duel-game-screen .question-container:has(.question-image),
#duel-game-screen .question-container:has(.question-info-image) {
  max-height: none !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  text-align: center;
}

#duel-game-screen .resimli-soru-banner {
  display: none !important;
}

#duel-game-screen .nova-q-type-badges {
  flex-shrink: 0;
  width: 100%;
  margin: 0 0 6px !important;
}

#duel-game-screen .nova-q-type-badge {
  font-size: 9px !important;
  padding: 3px 9px !important;
}

#duel-game-screen .question-container::before {
  display: block !important;
  content: '' !important;
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    120deg,
    rgba(56, 189, 248, 0.55),
    rgba(251, 191, 36, 0.65),
    rgba(168, 85, 247, 0.45),
    rgba(56, 189, 248, 0.55)
  );
  background-size: 220% 100%;
  animation: ndg-q-border 3.5s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 0;
}

@keyframes ndg-q-border {
  from { background-position: 0% 50%; }
  to { background-position: 220% 50%; }
}

#duel-game-screen .question-container.nova-q-enter {
  animation: ndg-q-pop 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

#duel-game-screen .question-container > * {
  position: relative;
  z-index: 1;
}

@keyframes ndg-q-pop {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

#duel-game-screen .question-text-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Öncül — okunaklı, gri kutu YOK */
#duel-game-screen .question-preamble-wrap {
  background: linear-gradient(135deg, rgba(8, 47, 73, 0.65), rgba(30, 64, 175, 0.45)) !important;
  border: 1px solid rgba(56, 189, 248, 0.5) !important;
  border-radius: 12px !important;
  padding: 10px 12px !important;
  margin: 0 !important;
}

#duel-game-screen .question-preamble-list {
  margin: 0 !important;
  padding-left: 1.1em !important;
  color: #e0f2fe !important;
}

#duel-game-screen .question-preamble-label {
  color: #7dd3fc !important;
  font-weight: 900 !important;
}

#duel-game-screen .question-preamble-item {
  background: linear-gradient(135deg, rgba(8, 47, 73, 0.75), rgba(30, 64, 175, 0.5)) !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
  font-size: calc(clamp(12px, 2.9vw, 14px) * var(--ndg-q-font-scale, 1)) !important;
}

#duel-game-screen .question-preamble-body,
#duel-game-screen .question-info-text {
  color: #f1f5f9 !important;
  font-size: calc(clamp(13px, 3.1vw, 15px) * var(--ndg-q-font-scale, 1)) !important;
  line-height: 1.45 !important;
  background: transparent !important;
  border: none !important;
  text-align: left !important;
}

#duel-game-screen .question-preamble-block--text {
  text-align: left !important;
  hyphens: auto;
  -webkit-hyphens: auto;
  hyphenate-character: "-";
  word-break: normal;
  overflow-wrap: break-word;
}

#duel-game-screen .question-divider {
  position: relative !important;
  width: min(92%, 520px) !important;
  height: 3px !important;
  margin: clamp(10px, 1.6vh, 14px) auto !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(251, 191, 36, 0.35) 18%,
    rgba(251, 191, 36, 0.95) 50%,
    rgba(251, 191, 36, 0.35) 82%,
    transparent 100%
  ) !important;
  opacity: 1;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.35);
}

#duel-game-screen .question-divider::after {
  content: "Soru";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fde68a;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(251, 191, 36, 0.5);
}

#duel-game-screen .question-actual-text,
#duel-game-screen .question-text.q-markup {
  color: #ffffff !important;
  font-size: calc(clamp(14px, 3.4vw, 17px) * var(--ndg-q-font-scale, 1)) !important;
  font-weight: 800 !important;
  line-height: 1.42 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

#duel-game-screen .question-actual-text.ndep-hide-generic {
  display: none !important;
}

#duel-game-screen .question-image,
#duel-game-screen .question-info-image {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: min(calc(100dvh - 360px), 320px) !important;
  margin: 0 auto !important;
  object-fit: contain !important;
  object-position: center center !important;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

#duel-game-screen .question-container.ndg-has-image .question-image,
#duel-game-screen .question-container:has(.question-image) .question-image {
  max-height: min(calc(100dvh - 380px), 300px) !important;
}

#duel-game-screen .ndg-q-image-caption,
#duel-game-screen .question-container.ndg-has-image .question-text {
  flex-shrink: 0;
  width: 100%;
  font-size: clamp(13px, 3.2vw, 15px) !important;
  line-height: 1.4 !important;
  color: #f1f5f9 !important;
  text-align: center;
}

#duel-game-screen .question-text-container {
  width: 100%;
  min-height: 0;
  flex: 0 1 auto;
}

/* —— Şıklar — ekranın altına sabitlenir —— */
#duel-game-screen .options-container {
  flex-shrink: 0;
  margin-top: auto !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 0 !important;
  width: min(480px, 100%) !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: clamp(8px, 1.5vh, 10px) !important;
  padding: 0 0 max(4px, env(safe-area-inset-bottom)) !important;
  z-index: 4;
}

#duel-game-screen .options-container .option-button:nth-child(3) {
  grid-column: 1 / -1;
}

/* Eski şık “beyaz çapraz şerit” efekti — KAPALI */
#duel-game-screen .option-button::before,
#duel-game-screen .option-button::after {
  display: none !important;
  content: none !important;
}

#duel-game-screen .option-button {
  flex: none !important;
  max-width: none !important;
  height: auto !important;
  min-height: 48px !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 10px 12px !important;
  white-space: normal !important;
  word-break: break-word !important;
  text-overflow: unset !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  line-height: 1.3 !important;
  font-size: clamp(12px, 3vw, 14px) !important;
  font-weight: 700 !important;
  border-radius: 14px !important;
  border: 1px solid rgba(56, 189, 248, 0.42) !important;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.99)) !important;
  color: #f8fafc !important;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
  transition:
    transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease !important;
  will-change: transform;
}

#duel-game-screen .option-button:active:not(.option-locked) {
  transform: scale(0.97) !important;
}

#duel-game-screen .option-button.nova-opt-enter {
  animation: ndg-opt-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes ndg-opt-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

#duel-game-screen .option-button .q-markup {
  line-height: 1.3 !important;
}

#duel-game-screen .option-button.option-chosen {
  border-color: rgba(251, 191, 36, 0.75) !important;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.35) !important;
}

#duel-game-screen .option-button.option-chosen.ndg-pick-correct {
  border-color: #4ade80 !important;
  background: linear-gradient(180deg, rgba(22, 101, 52, 0.5), rgba(15, 23, 42, 0.95)) !important;
}

#duel-game-screen .option-button.option-chosen.ndg-pick-wrong {
  border-color: #f87171 !important;
  background: linear-gradient(180deg, rgba(127, 29, 29, 0.45), rgba(15, 23, 42, 0.95)) !important;
  animation: ndg-shake 0.4s ease;
}

@keyframes ndg-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

#duel-game-screen .option-button.option-locked {
  pointer-events: none !important;
  opacity: 0.65 !important;
}

#duel-game-screen .option-button.correct {
  background: linear-gradient(180deg, #16a34a, #15803d) !important;
  border-color: #86efac !important;
  color: #fff !important;
  opacity: 1 !important;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.4) !important;
}

#duel-game-screen .option-button.wrong {
  opacity: 0.55 !important;
}

#duel-game-screen .option-button.option-chosen.wrong {
  background: linear-gradient(180deg, #dc2626, #991b1b) !important;
  opacity: 1 !important;
}

#duel-game-screen .options-container.nova-duel-waiting-opponent::after {
  content: 'Rakip cevaplıyor…';
  font-size: 13px;
  font-weight: 800;
  color: #7dd3fc;
  background: rgba(2, 6, 23, 0.72);
  border-radius: 12px;
}

/* +10 uçuş animasyonu — mobilde hafif CSS, masaüstünde WAAPI */
.ndg-fly-plus {
  position: fixed;
  z-index: 2147483001;
  left: 0;
  top: 0;
  transform: translate3d(-50%, -50%, 0) scale(0.2);
  pointer-events: none;
  opacity: 0;
  contain: layout style;
}

.ndg-fly-plus.ndg-fly-lite {
  animation: ndg-fly-lite 0.48s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes ndg-fly-lite {
  0% {
    transform: translate3d(-50%, -50%, 0) scale(0.45);
    opacity: 0;
  }
  18% {
    transform: translate3d(-50%, -50%, 0) scale(1.12);
    opacity: 1;
  }
  72% {
    transform: translate3d(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px)), 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate3d(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px)), 0) scale(0.55);
    opacity: 0;
  }
}

.ndg-fly-plus__num {
  position: relative;
  z-index: 2;
  display: block;
  font-size: clamp(28px, 8vw, 42px);
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #4ade80;
  text-shadow:
    0 0 20px rgba(74, 222, 128, 0.95),
    0 0 40px rgba(34, 197, 94, 0.65),
    0 2px 10px rgba(0, 0, 0, 0.55);
  -webkit-text-stroke: 1px rgba(20, 83, 45, 0.35);
}

.ndg-fly-plus__ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 140%;
  height: 140%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid rgba(74, 222, 128, 0.55);
  box-shadow: 0 0 24px rgba(74, 222, 128, 0.45);
  animation: ndg-fly-ring 0.9s ease-out forwards;
}

@keyframes ndg-fly-ring {
  from { transform: translate(-50%, -50%) scale(0.4); opacity: 0.9; }
  to { transform: translate(-50%, -50%) scale(1.6); opacity: 0; }
}

.ndg-fly-plus.ndg-fly-wrong .ndg-fly-plus__num {
  color: #f87171;
  font-size: clamp(24px, 7vw, 36px);
  text-shadow:
    0 0 16px rgba(248, 113, 113, 0.85),
    0 2px 8px rgba(0, 0, 0, 0.5);
}

.ndg-fly-spark {
  position: fixed;
  z-index: 2147483000;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fde68a;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.9);
  pointer-events: none;
  animation: ndg-spark-fly 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes ndg-spark-fly {
  from {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  to {
    transform: translate(calc(-50% + var(--sx)), calc(-50% + var(--sy))) scale(0);
    opacity: 0;
  }
}

@media (max-height: 640px) {
  #duel-game-screen[style*='flex'],
  #duel-game-screen.nova-duel-game-visible {
    gap: 6px !important;
    padding:
      max(6px, env(safe-area-inset-top))
      max(8px, env(safe-area-inset-right))
      max(6px, env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left)) !important;
  }

  #duel-game-screen .question-container:not(.ndg-has-image):not(.ndg-has-info-image) {
    padding: 10px 12px !important;
  }

  #duel-game-screen .option-button {
    min-height: 42px !important;
    font-size: 12px !important;
    padding: 8px 10px !important;
  }
}

@media (pointer: coarse) {
  #duel-game-screen .nova-vs-hud {
    flex-shrink: 0;
  }

  #duel-game-screen .ndg-meta-row {
    flex-shrink: 0;
  }

  #duel-game-screen .question-container {
    width: min(480px, 100%) !important;
  }

  #duel-game-screen .options-container {
    width: min(480px, 100%) !important;
  }
}

@media (max-width: 380px) {
  #duel-game-screen .options-container {
    grid-template-columns: 1fr;
  }

  #duel-game-screen .options-container .option-button:nth-child(3) {
    grid-column: auto;
  }
}

/* —— Bitiş ekranı: tek katman, oyun UI gizli —— */
#duel-game-screen.ndg-duel-finished {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  grid-template-rows: none !important;
}

#duel-game-screen.ndg-duel-finished .nova-vs-hud,
#duel-game-screen.ndg-duel-finished .ndg-meta-row,
#duel-game-screen.ndg-duel-finished .question-container,
#duel-game-screen.ndg-duel-finished .options-container,
#duel-game-screen.ndg-duel-finished .ndg-timer-ring,
#duel-game-screen.ndg-duel-finished .timer-container,
#duel-game-screen.ndg-duel-finished .players-info-row,
#duel-game-screen.ndg-duel-finished .explanation-container {
  display: none !important;
}

#duel-game-screen.ndg-duel-finished #duel-final-container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 16px !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 100 !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: max(16px, env(safe-area-inset-top)) 14px max(20px, env(safe-area-inset-bottom)) !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  background:
    radial-gradient(ellipse 90% 50% at 50% 0%, rgba(56, 189, 248, 0.1), transparent 55%),
    linear-gradient(168deg, #0c1224 0%, #151f3a 50%, #0a0f1c 100%) !important;
}

#duel-game-screen.ndg-duel-finished #duel-final-container .winner-message {
  display: none !important;
}

#duel-game-screen.ndg-duel-finished .nova-duel-epic-result {
  width: min(420px, 100%) !important;
  margin: 0 auto !important;
}

#duel-game-screen.ndg-duel-finished .nova-duel-result {
  display: none !important;
}

#duel-confetti,
body.nova-duel-game-open .confetti,
body.ndg-duel-finished .confetti {
  display: none !important;
}

/* —— Premium bitiş ekranı —— */
.ndg-final-premium {
  width: min(440px, 100%);
  margin: 0 auto;
  animation: ndg-final-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes ndg-final-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.ndg-final-headline {
  text-align: center;
  font-size: clamp(1.35rem, 5vw, 1.75rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
  color: #fde68a;
  text-shadow: 0 0 20px rgba(251, 191, 36, 0.35);
}

.ndg-final-headline.win { color: #86efac; text-shadow: 0 0 18px rgba(34, 197, 94, 0.4); }
.ndg-final-headline.lose { color: #fca5a5; text-shadow: 0 0 16px rgba(248, 113, 113, 0.35); }
.ndg-final-headline.tie { color: #93c5fd; text-shadow: 0 0 16px rgba(59, 130, 246, 0.35); }

.ndg-final-board {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 14px;
}

.ndg-final-player {
  border-radius: 16px;
  padding: 12px 10px;
  text-align: center;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.ndg-final-player.winner {
  border-color: rgba(74, 222, 128, 0.55);
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.25);
}

.ndg-final-player.loser {
  opacity: 0.72;
  border-color: rgba(248, 113, 113, 0.35);
}

.ndg-final-player.tie {
  border-color: rgba(147, 197, 253, 0.4);
}

.ndg-final-player img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  margin: 0 auto 8px;
  display: block;
  border: 2px solid rgba(56, 189, 248, 0.35);
}

.ndg-final-player.winner img {
  border-color: rgba(74, 222, 128, 0.65);
}

.ndg-final-player .ndg-fp-name {
  font-weight: 800;
  font-size: clamp(11px, 2.8vw, 13px);
  color: #f8fafc;
  margin-bottom: 4px;
  line-height: 1.25;
}

.ndg-final-player .ndg-fp-role {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.ndg-final-player.winner .ndg-fp-role { color: #4ade80; }
.ndg-final-player.loser .ndg-fp-role { color: #f87171; }
.ndg-final-player.tie .ndg-fp-role { color: #93c5fd; }

.ndg-final-player .ndg-fp-score {
  font-size: clamp(1.6rem, 5vw, 2rem);
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

.ndg-final-player .ndg-fp-score-lbl {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 2px;
}

.ndg-final-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #64748b;
  font-size: 12px;
}

.ndg-final-premium .nova-duel-report {
  margin-bottom: 14px;
}

#duel-game-screen.ndg-duel-finished #duel-final-back-button,
.ndg-final-premium .ndg-final-menu-btn {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  display: block;
  padding: 14px 20px;
  border: none;
  border-radius: 14px;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 0.06em;
  color: #0f172a;
  background: linear-gradient(180deg, #fde68a, #fbbf24);
  box-shadow: 0 8px 24px rgba(251, 191, 36, 0.35);
  cursor: pointer;
}
