/* POV Camera & In-Browser Remote Play Studio Modal */
.pov-studio-overlay {
  position: fixed;
  inset: 0;
  z-index: 999990;
  background: rgba(7, 11, 20, 0.88);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #e2e8f0;
}

.pov-studio-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.pov-studio-card {
  width: 100%;
  max-width: 1100px;
  max-height: 94vh;
  background: #0f1523;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  animation: povPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes povPopIn {
  from { transform: scale(0.96) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

/* Header & Tabs */
.pov-studio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: #0c111c;
}

.pov-bot-identity {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pov-bot-name {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.pov-bot-meta {
  font-size: 12px;
  color: #64748b;
  font-family: 'JetBrains Mono', monospace;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pov-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.pov-studio-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.03);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.pov-tab {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.pov-tab:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.06);
}

.pov-tab.active {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
  font-weight: 600;
}

.pov-close-btn {
  background: transparent;
  border: none;
  color: #64748b;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.pov-close-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* Studio Body */
.pov-studio-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pov-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pov-title-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pov-title {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.01em;
}

.pov-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pov-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  animation: povPulse 1.5s infinite;
}

@keyframes povPulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 6px #ef4444; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.pov-stream-mode-badge {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
}

.pov-stream-stats {
  font-size: 12px;
  color: #94a3b8;
  font-family: 'JetBrains Mono', monospace;
}

/* Video Viewport */
.pov-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 580px;
  background: #000000;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: crosshair;
  user-select: none;
}

.pov-viewport.pointer-locked {
  outline: 2px solid #3b82f6;
}

.pov-canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  display: block;
}

/* Center Crosshair */
.pov-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 10;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pov-crosshair::before,
.pov-crosshair::after {
  content: '';
  position: absolute;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.9);
}

.pov-crosshair::before {
  width: 16px;
  height: 2px;
}

.pov-crosshair::after {
  width: 2px;
  height: 16px;
}

/* Top Overlay: Manual Control Active Banner */
.pov-top-banner {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.4);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #34d399;
  letter-spacing: 0.02em;
}

.pov-top-banner.hidden {
  display: none;
}

.pov-banner-release-btn {
  background: rgba(239, 68, 68, 0.85);
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  margin-left: 6px;
  transition: all 0.15s;
}

.pov-banner-release-btn:hover {
  background: #dc2626;
}

/* F3 Telemetry HUD Overlay */
.pov-f3-hud {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 20;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 8px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  line-height: 1.5;
  color: #cbd5e1;
  pointer-events: none;
  transition: opacity 0.2s;
}

.pov-f3-hud.hidden {
  display: none;
}

.pov-f3-hud strong {
  color: #38bdf8;
}

/* Bottom Left Overlay: Keypad & Mouse Hint */
.pov-bottom-left {
  position: absolute;
  bottom: 14px;
  left: 14px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pov-keypad {
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: fit-content;
}

.pov-keypad-row {
  display: flex;
  gap: 4px;
  justify-content: center;
}

.pov-key {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  min-width: 26px;
  height: 26px;
  padding: 0 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.1s;
  user-select: none;
}

.pov-key.wide {
  min-width: 44px;
  font-size: 10px;
}

.pov-key:hover {
  background: rgba(255, 255, 255, 0.18);
}

.pov-key.active {
  background: #3b82f6 !important;
  color: #ffffff !important;
  border-color: #60a5fa !important;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.7);
  transform: translateY(1px);
}

.pov-control-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pov-mouse-hint {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

.pov-control-toggle-btn {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #60a5fa;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.pov-control-toggle-btn:hover {
  background: rgba(59, 130, 246, 0.35);
  color: #ffffff;
}

.pov-control-toggle-btn.active {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

/* Bottom Right Overlay: Resolution, HUD, Fullscreen */
.pov-bottom-right {
  position: absolute;
  bottom: 14px;
  right: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 8px;
  border-radius: 8px;
}

.pov-profile-select {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  padding: 4px 8px;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
}

.pov-profile-select option {
  background: #0f1523;
  color: #ffffff;
}

.pov-icon-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
}

.pov-icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.pov-icon-btn.active {
  background: #3b82f6;
  color: #ffffff;
  border-color: #60a5fa;
}

/* Bottom Controls Bar */
.pov-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
}

.pov-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pov-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pov-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}

.pov-btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.pov-btn-danger:hover {
  background: #ef4444;
  color: #ffffff;
}

.pov-btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.pov-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.pov-latency-badge {
  font-size: 11px;
  color: #10b981;
  font-family: 'JetBrains Mono', monospace;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 3px 8px;
  border-radius: 6px;
}
