/* ============================================================================
   LLVIP VIP REMOTE - KUMANDA PANELİ
   16.5.2026 v20260516
   ----------------------------------------------------------------------------
   Gizli açılış: Q tuşuna basılı tut + 123 yaz
   Draggable + Resizable
   ============================================================================ */

/* Ana panel */
#llvipVipRemote {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 340px;
  min-width: 280px;
  max-width: 500px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: rgba(8, 11, 18, 0.94);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid rgba(0, 255, 136, 0.25);
  border-radius: 16px;
  padding: 16px;
  z-index: 2147483000;
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, 'Courier New', monospace;
  color: #e8eef5;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255,255,255,0.04) inset,
    0 0 40px rgba(0, 255, 136, 0.08);
  user-select: none;
  -webkit-user-select: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,255,136,0.3) transparent;
  display: none;
  resize: both;
  overflow: auto;
}

#llvipVipRemote.is-open { display: block; }

#llvipVipRemote::-webkit-scrollbar { width: 6px; }
#llvipVipRemote::-webkit-scrollbar-thumb { background: rgba(0,255,136,0.3); border-radius: 3px; }

#llvipVipRemote.minimized {
  max-height: 50px;
  min-height: 50px;
  overflow: hidden;
  padding: 12px 16px;
  resize: none;
}

/* Header - sürüklenebilir alan */
.vr-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  cursor: move;
}

.vr-title {
  font-size: 11px;
  letter-spacing: 2.5px;
  color: #00ff88;
  text-transform: uppercase;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vr-title::before {
  content: '';
  width: 8px; height: 8px;
  background: #00ff88;
  border-radius: 50%;
  box-shadow: 0 0 8px #00ff88;
  animation: vrPulse 2s infinite;
}

@keyframes vrPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.vr-actions { display: flex; gap: 6px; }

.vr-icon-btn {
  width: 30px; height: 30px;
  background: transparent;
  border: 1px solid rgba(0,255,136,0.3);
  color: #00ff88;
  border-radius: 7px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.vr-icon-btn:hover {
  background: rgba(0,255,136,0.12);
  border-color: #00ff88;
}

/* Bölümler */
.vr-section {
  margin-bottom: 14px;
}

.vr-section-title {
  font-size: 9px;
  color: #5b6577;
  letter-spacing: 2px;
  margin-bottom: 8px;
  text-transform: uppercase;
  font-weight: 700;
}

/* Seçili eleman bilgi kartı */
.vr-info-card {
  background: linear-gradient(135deg, rgba(0,255,136,0.08), rgba(0,255,136,0.02));
  border: 1px solid rgba(0,255,136,0.25);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.vr-info-id {
  color: #00ff88;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

.vr-info-meta {
  color: #8b95a8;
  font-size: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.vr-info-meta span { color: #c8d1de; }

/* Item listesi */
.vr-item-list {
  max-height: 120px;
  overflow-y: auto;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.05);
  padding: 4px;
}

.vr-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 11px;
  transition: background 0.1s;
}

.vr-item-row:hover { background: rgba(255,255,255,0.04); }
.vr-item-row.active { background: rgba(0,255,136,0.15); color: #00ff88; }

.vr-item-type {
  font-size: 9px;
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(255,255,255,0.06);
  color: #8b95a8;
  letter-spacing: 0.5px;
}

.vr-item-row.active .vr-item-type { background: rgba(0,255,136,0.2); color: #00ff88; }

/* D-Pad */
.vr-dpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 5px;
  width: 150px;
  height: 150px;
  margin: 0 auto;
}

.vr-dpad button {
  background: linear-gradient(135deg, #1a2030, #0d1219);
  border: 1px solid rgba(0,255,136,0.2);
  color: #00ff88;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.08s;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vr-dpad button:hover {
  background: rgba(0,255,136,0.15);
  border-color: #00ff88;
}

.vr-dpad button:active {
  transform: scale(0.92);
  background: rgba(0,255,136,0.3);
}

.vr-dpad .up { grid-column: 2; grid-row: 1; }
.vr-dpad .left { grid-column: 1; grid-row: 2; }
.vr-dpad .ok { 
  grid-column: 2; grid-row: 2;
  background: linear-gradient(135deg, #00ff88, #00cc6f);
  color: #0a0e1a;
  font-weight: 700;
  font-size: 11px;
}
.vr-dpad .right { grid-column: 3; grid-row: 2; }
.vr-dpad .down { grid-column: 2; grid-row: 3; }

/* Kontrol satırları */
.vr-ctrl-row {
  display: grid;
  grid-template-columns: 40px 1fr 28px 50px 28px;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.vr-ctrl-label {
  font-size: 11px;
  color: #8b95a8;
  font-weight: 600;
}

.vr-ctrl-bar {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.vr-ctrl-bar-fill {
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  background: linear-gradient(90deg, #00ff88, #00cc6f);
  border-radius: 2px;
  width: 50%;
  transition: width 0.15s;
}

.vr-ctrl-value {
  font-size: 10px;
  color: #00ff88;
  text-align: center;
  font-weight: 600;
}

.vr-mini-btn {
  width: 26px; height: 26px;
  background: rgba(0,255,136,0.08);
  border: 1px solid rgba(0,255,136,0.25);
  color: #00ff88;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s;
}

.vr-mini-btn:hover { background: rgba(0,255,136,0.2); }
.vr-mini-btn:active { transform: scale(0.92); }

/* Step seçici */
.vr-step-selector {
  display: flex;
  gap: 4px;
  margin-bottom: 4px;
}

.vr-step-btn {
  flex: 1;
  padding: 6px 0;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  color: #8b95a8;
  border-radius: 6px;
  cursor: pointer;
  font-size: 10px;
  font-family: inherit;
  font-weight: 600;
  transition: all 0.1s;
}

.vr-step-btn.active {
  background: rgba(0,255,136,0.18);
  border-color: #00ff88;
  color: #00ff88;
}

.vr-step-btn:hover:not(.active) {
  background: rgba(255,255,255,0.06);
  color: #c8d1de;
}

/* Renk paleti */
.vr-color-palette {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 5px;
}

.vr-color-swatch {
  aspect-ratio: 1;
  border-radius: 6px;
  cursor: pointer;
  border: 1.5px solid rgba(255,255,255,0.08);
  transition: all 0.12s;
  position: relative;
}

.vr-color-swatch:hover {
  transform: scale(1.18);
  z-index: 1;
  border-color: rgba(255,255,255,0.4);
}

.vr-color-swatch.active {
  border-color: #00ff88;
  box-shadow: 0 0 0 2px rgba(0,255,136,0.3);
}

.vr-color-input-row {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

#llvipVipRemote input[type="color"] {
  width: 40px;
  height: 32px;
  border: 1px solid rgba(255,255,255,0.1);
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  padding: 2px;
}

#llvipVipRemote input[type="text"],
#llvipVipRemote select {
  flex: 1;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.08);
  color: #e8eef5;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-family: inherit;
}

#llvipVipRemote input[type="text"]:focus,
#llvipVipRemote select:focus {
  outline: none;
  border-color: rgba(0,255,136,0.5);
}

/* JSON I/O butonlar */
.vr-io-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 6px;
}

.vr-io-btn {
  background: linear-gradient(135deg, #1a2030, #0d1219);
  border: 1px solid rgba(0,255,136,0.25);
  color: #e8eef5;
  border-radius: 7px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 11px;
  font-family: inherit;
  font-weight: 600;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.vr-io-btn:hover {
  background: rgba(0,255,136,0.12);
  border-color: #00ff88;
  color: #00ff88;
}

.vr-io-btn.danger { border-color: rgba(255,80,80,0.3); }
.vr-io-btn.danger:hover {
  background: rgba(255,80,80,0.12);
  border-color: #ff5050;
  color: #ff5050;
}

/* Toast bildirim */
#vrToast {
  position: fixed;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,255,136,0.95);
  color: #0a0e1a;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  z-index: 2147483001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  font-family: 'JetBrains Mono', monospace;
}

#vrToast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-10px);
}

/* Resize handle görünürlüğü */
#llvipVipRemote::-webkit-resizer {
  background: linear-gradient(135deg, transparent 50%, rgba(0,255,136,0.3) 50%);
  border-radius: 0 0 16px 0;
}

/* Mobil */
@media (max-width: 600px) {
  #llvipVipRemote {
    width: calc(100vw - 24px);
    right: 12px;
    top: 12px;
    max-height: 60vh;
  }
}
