/* ==========================================================================
   Bynkoo Game Turbo Engine - Ultra-Smooth Mobile & Browser Game Runtime CSS
   ========================================================================== */

/* Hardware Accelerated Containers */
.bynkoo-gpu-accelerated {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-perspective: 1000;
  perspective: 1000;
  will-change: transform;
  contain: layout paint;
}

/* Touch Action Override for Zero-Latency Controls */
.bynkoo-touch-optimized {
  touch-action: none !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  overscroll-behavior: none !important;
}

/* --------------------------------------------------------------------------
   Game Turbo HUD Badge
   -------------------------------------------------------------------------- */
.bynkoo-turbo-badge {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(10, 15, 26, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(99, 102, 241, 0.4);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 10px rgba(99, 102, 241, 0.2);
  border-radius: 20px;
  padding: 4px 12px;
  z-index: 9999;
  cursor: pointer;
  user-select: none;
  font-family: var(--font-main, -apple-system, BlinkMacSystemFont, sans-serif);
  font-size: 0.75rem;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.bynkoo-turbo-badge:hover,
.bynkoo-turbo-badge:active {
  transform: translateX(-50%) scale(1.05);
  border-color: rgba(236, 72, 153, 0.6);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

.bynkoo-fps-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.bynkoo-fps-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
  animation: bynkoo-pulse 1.8s infinite;
}

.bynkoo-fps-dot.warn {
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
}

.bynkoo-fps-dot.bad {
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
}

@keyframes bynkoo-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

.bynkoo-turbo-mode-label {
  background: linear-gradient(135deg, #6366f1, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 0.7rem;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Game Turbo Settings Drawer / Modal
   -------------------------------------------------------------------------- */
.bynkoo-turbo-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 90%;
  max-width: 360px;
  background: rgba(13, 18, 30, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(99, 102, 241, 0.25);
  border-radius: 20px;
  padding: 18px 20px;
  z-index: 10000;
  color: #fff;
  font-family: var(--font-main, sans-serif);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.bynkoo-turbo-panel.active {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.bynkoo-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bynkoo-panel-title {
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #a5b4fc, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bynkoo-panel-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: background 0.15s;
}

.bynkoo-panel-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.bynkoo-panel-section {
  margin-bottom: 14px;
}

.bynkoo-section-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
  margin-bottom: 8px;
  display: block;
}

.bynkoo-mode-chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.bynkoo-mode-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px 4px;
  text-align: center;
  cursor: pointer;
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.2s;
  user-select: none;
}

.bynkoo-mode-chip.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(236, 72, 153, 0.3));
  border-color: #818cf8;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
}

.bynkoo-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.bynkoo-toggle-label {
  font-size: 0.82rem;
  font-weight: 500;
}

.bynkoo-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
}

.bynkoo-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.bynkoo-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 22px;
  transition: 0.25s;
}

.bynkoo-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.25s;
}

.bynkoo-switch input:checked + .bynkoo-slider {
  background-color: #6366f1;
}

.bynkoo-switch input:checked + .bynkoo-slider:before {
  transform: translateX(20px);
}

/* --------------------------------------------------------------------------
   Virtual Mobile Gamepad Controls Overlay
   -------------------------------------------------------------------------- */
.bynkoo-gamepad-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9990;
  display: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.bynkoo-gamepad-overlay.active {
  display: block;
}

/* Floating Joystick Zone (Bottom Left) */
.bynkoo-joystick-zone {
  position: absolute;
  left: 20px;
  bottom: 30px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, rgba(15, 23, 42, 0.45) 80%);
  border: 2px dashed rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(99, 102, 241, 0.15);
  pointer-events: auto;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bynkoo-joystick-thumb {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(168, 85, 247, 0.9));
  border: 2px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6), 0 0 12px rgba(168, 85, 247, 0.5);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: none;
  transition: transform 0.05s ease-out;
}

/* Action Buttons Zone (Bottom Right) */
.bynkoo-action-zone {
  position: absolute;
  right: 20px;
  bottom: 30px;
  width: 140px;
  height: 140px;
  pointer-events: none;
}

.bynkoo-action-btn {
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(18, 24, 38, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 2px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-family: var(--font-main, sans-serif);
  font-size: 0.95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  transition: all 0.08s ease-out;
}

.bynkoo-action-btn:active,
.bynkoo-action-btn.pressed {
  transform: scale(0.92);
  filter: brightness(1.3);
}

.bynkoo-btn-a {
  bottom: 0px;
  right: 65px;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.85), rgba(244, 63, 94, 0.85));
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 16px rgba(236, 72, 153, 0.45);
}

.bynkoo-btn-b {
  bottom: 45px;
  right: 0px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.85), rgba(79, 70, 229, 0.85));
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.45);
}

/* Quick Gamepad Toggle Button in Player Controls */
.bynkoo-gamepad-toggle-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
}

.bynkoo-gamepad-toggle-btn.active {
  background: linear-gradient(135deg, #6366f1, #ec4899);
  border-color: transparent;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* 1-Click Native Mobile Engine Install Button */
.native-engine-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(236, 72, 153, 0.2));
  border: 1px solid rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
  border-radius: 20px;
  padding: 5px 12px;
  color: #ffffff;
  font-family: var(--font-main, sans-serif);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  animation: bynkoo-glow 2.5s infinite alternate;
}

.native-engine-install-btn:hover,
.native-engine-install-btn:active {
  transform: scale(1.04);
  border-color: #ec4899;
  box-shadow: 0 0 18px rgba(236, 72, 153, 0.45);
}

@keyframes bynkoo-glow {
  0% { box-shadow: 0 0 8px rgba(99, 102, 241, 0.2); }
  100% { box-shadow: 0 0 18px rgba(236, 72, 153, 0.5); }
}

@media (max-width: 480px) {
  .native-engine-install-btn span:last-child {
    display: none;
  }
  .native-engine-install-btn {
    padding: 6px 10px;
  }
}

