/* ==========================================================================
   KlavyeUstam - İnteraktif Sanal Klavye ve Tuş Aydınlatma Stilleri
   ========================================================================== */

.virtual-keyboard-wrapper {
  margin: 1.5rem auto 0 auto;
  max-width: 960px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  transition: var(--transition-normal);
}

.keyboard-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.keyboard-title {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.kb-badge {
  background: var(--accent-primary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.finger-guide-hint {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.finger-guide-hint .highlight-char {
  color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: var(--font-mono);
}

.keyboard-toggles {
  display: flex;
  gap: 0.4rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.25rem;
  border-radius: var(--radius-md);
}

.kb-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.kb-btn:hover {
  color: var(--text-primary);
}

.kb-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--accent-glow);
}

/* ==========================================================================
   Klavye Gövdesi ve Tuş Sıraları
   ========================================================================== */

.keyboard-board {
  display: flex;
  flex-direction: column;
  gap: 6px;
  user-select: none;
}

.kb-row {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.kb-key {
  position: relative;
  height: 48px;
  min-width: 44px;
  flex: 1;
  background: var(--key-bg);
  border: 1px solid var(--key-border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--key-text);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: transform 0.08s ease, background-color 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.kb-shift-char {
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1;
  margin-bottom: 2px;
}

.kb-main-char {
  line-height: 1;
}

/* F ve J veya A ve K kabartmaları (Homing bumps) */
.bump-bar {
  position: absolute;
  bottom: 5px;
  width: 14px;
  height: 2px;
  background: var(--accent-primary);
  border-radius: 2px;
  opacity: 0.85;
}

/* Geniş Tuş Tipleri */
.kb-wide-backspace { flex: 1.8; min-width: 76px; font-size: 0.8rem; }
.kb-wide-tab { flex: 1.4; min-width: 60px; font-size: 0.8rem; }
.kb-wide-caps { flex: 1.7; min-width: 72px; font-size: 0.8rem; }
.kb-wide-enter { flex: 2.1; min-width: 86px; font-size: 0.8rem; }
.kb-wide-shift-l { flex: 1.4; min-width: 60px; font-size: 0.8rem; }
.kb-wide-shift-r { flex: 2.4; min-width: 96px; font-size: 0.8rem; }
.kb-wide-space { flex: 6.5; min-width: 260px; font-size: 0.8rem; }
.kb-wide-ctrl { flex: 1.4; min-width: 58px; font-size: 0.8rem; }
.kb-wide-alt { flex: 1.3; min-width: 54px; font-size: 0.8rem; }

/* ==========================================================================
   Parmak Renk Kodları (Subtle Finger Indicators)
   ========================================================================== */

.kb-key.finger-lp { border-bottom: 3px solid #3b82f6; } /* Sol Serçe: Mavi */
.kb-key.finger-lr { border-bottom: 3px solid #06b6d4; } /* Sol Yüzük: Camgöbeği */
.kb-key.finger-lm { border-bottom: 3px solid #10b981; } /* Sol Orta: Zümrüt */
.kb-key.finger-li { border-bottom: 3px solid #f59e0b; } /* Sol İşaret: Amber */
.kb-key.finger-th { border-bottom: 3px solid #8b5cf6; } /* Başparmak: Mor */
.kb-key.finger-ri { border-bottom: 3px solid #f97316; } /* Sağ İşaret: Turuncu */
.kb-key.finger-rm { border-bottom: 3px solid #10b981; } /* Sağ Orta: Zümrüt */
.kb-key.finger-rr { border-bottom: 3px solid #06b6d4; } /* Sağ Yüzük: Camgöbeği */
.kb-key.finger-rp { border-bottom: 3px solid #3b82f6; } /* Sağ Serçe: Mavi */

/* ==========================================================================
   Hedef Tuş & Basılma Efektleri
   ========================================================================== */

/* Sıradaki Basılması Gereken Tuş (Target Key Glow) */
.kb-key.target-key {
  background: var(--accent-primary) !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 16px var(--accent-glow), 0 4px 12px rgba(0, 0, 0, 0.4) !important;
  transform: translateY(-2px);
  animation: keyPulse 1.2s infinite alternate ease-in-out;
  z-index: 2;
}

@keyframes keyPulse {
  0% { transform: translateY(-2px) scale(1); filter: brightness(1); }
  100% { transform: translateY(-3px) scale(1.03); filter: brightness(1.2); }
}

/* Tuşa Basıldığında Fiziksel Çökme (Active Mechanical Push) */
.kb-key.pressed {
  transform: translateY(3px) scale(0.97) !important;
  background-color: var(--accent-secondary) !important;
  color: #ffffff !important;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.4) !important;
}

/* ==========================================================================
   Parmak Rehberi Lejantı (Footer Legend)
   ========================================================================== */

.finger-legend-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.finger-lp, .legend-dot.finger-rp { background: #3b82f6; }
.legend-dot.finger-lr, .legend-dot.finger-rr { background: #06b6d4; }
.legend-dot.finger-lm, .legend-dot.finger-rm { background: #10b981; }
.legend-dot.finger-li { background: #f59e0b; }
.legend-dot.finger-ri { background: #f97316; }
.legend-dot.finger-th { background: #8b5cf6; }

/* Responsive Uyumluluk */
@media (max-width: 820px) {
  .kb-key {
    height: 38px;
    font-size: 0.8rem;
  }
  .finger-legend-bar {
    display: none;
  }
}
