/* Finger Position Mapping Visualization - Tesla Tema Uyumlu */
/* Tesla tema değişkenlerini kullan */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f4;
    --text-primary: #171a20;
    --text-secondary: #5c5e62;
    --border-color: #e4e4e7;
    --shadow-light: rgba(0, 0, 0, 0.04);
    --shadow-medium: rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] {
    --bg-primary: #000000;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #d6d6d6;
    --border-color: #333333;
    --shadow-light: rgba(255, 255, 255, 0.04);
    --shadow-medium: rgba(255, 255, 255, 0.08);
}

.finger-key-mapping {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: var(--bg-secondary);
    border-radius: 10px;
    box-shadow: 0 3px 10px var(--shadow-medium);
    border: 1px solid var(--border-color);
}

.keyboard-visualization {
    position: relative;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    background-color: var(--bg-tertiary);
    border-radius: 12px;
    padding: 30px 20px;
    box-shadow: inset 0 0 20px var(--shadow-light);
    border: 1px solid var(--border-color);
}

.keyboard-hands {
    position: absolute;
    top: 40px;
    left: 0;
    width: 100%;
    height: 120px;
    z-index: 2;
    pointer-events: none;
    display: flex;
    justify-content: center;
}

.hand-outline {
    position: absolute;
    height: 140px;
    opacity: 0.7;
    transition: all 0.5s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.hand-outline.left-hand {
    left: 120px;
    transform: rotate(15deg);
}

.hand-outline.right-hand {
    right: 120px;
    transform: scaleX(-1) rotate(15deg);
}

/* El vurgulaması */
.hands-active .hand-outline {
    filter: drop-shadow(0 0 8px rgba(108, 92, 231, 0.6));
}

.finger-tip {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    border: 2px solid;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    z-index: 3;
    transform: translateY(-10px) scale(1);
    transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

/* Parmak renkleri - daha tutarlı ve uyumlu */
.finger-left-pinky { 
    border-color: #ff6b6b; 
    background-color: rgba(255, 107, 107, 0.2);
}
.finger-left-ring { 
    border-color: #10ac84; 
    background-color: rgba(16, 172, 132, 0.2);
}
.finger-left-middle { 
    border-color: #2e86de; 
    background-color: rgba(46, 134, 222, 0.2);
}
.finger-left-index { 
    border-color: #feca57; 
    background-color: rgba(254, 202, 87, 0.2);
}
.finger-left-thumb { 
    border-color: #a29bfe; 
    background-color: rgba(162, 155, 254, 0.2);
}
.finger-right-thumb { 
    border-color: #a29bfe; 
    background-color: rgba(162, 155, 254, 0.2);
}
.finger-right-index { 
    border-color: #feca57; 
    background-color: rgba(254, 202, 87, 0.2);
}
.finger-right-middle { 
    border-color: #2e86de; 
    background-color: rgba(46, 134, 222, 0.2);
}
.finger-right-ring { 
    border-color: #10ac84; 
    background-color: rgba(16, 172, 132, 0.2);
}
.finger-right-pinky { 
    border-color: #ff6b6b; 
    background-color: rgba(255, 107, 107, 0.2);
}

/* Aktif parmak durumu */
.finger-tip.active {
    transform: translateY(-5px) scale(1.5);
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    z-index: 10;
    animation: pulse 0.5s infinite alternate;
}

@keyframes pulse {
    0% { transform: translateY(-5px) scale(1.5); }
    100% { transform: translateY(-5px) scale(1.6); box-shadow: 0 0 20px rgba(0,0,0,0.3); }
}

/* Colored key mapping */
.key[data-finger="left-pinky"] { border-left: 3px solid #ff6b6b; }
.key[data-finger="left-ring"] { border-left: 3px solid #4ecdc4; }
.key[data-finger="left-middle"] { border-left: 3px solid #45b7d1; }
.key[data-finger="left-index"] { border-left: 3px solid #f9ca24; }
.key[data-finger="right-index"] { border-right: 3px solid #f9ca24; }
.key[data-finger="right-middle"] { border-right: 3px solid #45b7d1; }
.key[data-finger="right-ring"] { border-right: 3px solid #4ecdc4; }
.key[data-finger="right-pinky"] { border-right: 3px solid #ff6b6b; }
.key[data-finger="thumbs"] { border-bottom: 3px solid #6c5ce7; }

/* Active key state */
.key.active {
    background-color: #e9f3ff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.key.correct {
    background-color: #e6ffec;
    color: #22863a;
}

.key.error {
    background-color: #ffebe9;
    color: #d73a49;
}

/* Finger guide visual */
.finger-guide-visual {
    padding: 1.5rem;
    background-color: #f8fafc;
    border-radius: 8px;
    margin: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.hands-visual {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.hand-visual {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.finger-visual {
    margin-bottom: 0.8rem;
    padding: 0.8rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.finger-visual.active-finger {
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.pinky { background-color: rgba(255, 107, 107, 0.1); border-left: 4px solid #ff6b6b; }
.ring { background-color: rgba(16, 172, 132, 0.1); border-left: 4px solid #10ac84; }
.middle { background-color: rgba(46, 134, 222, 0.1); border-left: 4px solid #2e86de; }
.index { background-color: rgba(254, 202, 87, 0.1); border-left: 4px solid #feca57; }
.thumb { background-color: rgba(162, 155, 254, 0.1); border-left: 4px solid #a29bfe; }

.finger-name {
    font-weight: 600;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    color: #2d3436;
}

.finger-keys {
    font-family: monospace;
    font-size: 0.85rem;
    color: #444;
    background-color: #f7f7f7;
    padding: 0.7rem;
    border-radius: 6px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    word-break: break-all;
}

/* Legend section */
.finger-color-legend {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.2rem;
    margin-top: 1.5rem;
    padding: 1.2rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
    width: 100%;
}

.legend-item {
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
    border-radius: 6px;
    background-color: #f8fafc;
    border-left: 4px solid;
}

.legend-item:nth-child(1) { border-left-color: #ff6b6b; }
.legend-item:nth-child(2) { border-left-color: #4ecdc4; }
.legend-item:nth-child(3) { border-left-color: #45b7d1; }
.legend-item:nth-child(4) { border-left-color: #f9ca24; }
.legend-item:nth-child(5) { border-left-color: #6c5ce7; }
.legend-item:nth-child(6) { border-left-color: #6c5ce7; }
.legend-item:nth-child(7) { border-left-color: #f9ca24; }
.legend-item:nth-child(8) { border-left-color: #45b7d1; }
.legend-item:nth-child(9) { border-left-color: #4ecdc4; }
.legend-item:nth-child(10) { border-left-color: #ff6b6b; }

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
}

.legend-item > span {
    display: flex;
    align-items: center;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.finger-keys {
    font-family: monospace;
    font-size: 0.85rem;
    color: #64748b;
    background-color: rgba(0, 0, 0, 0.03);
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    margin-top: 0.25rem;
    line-height: 1.4;
}

/* Parmak ipucu balonu */
.finger-tooltip {
    position: absolute;
    background-color: rgba(108, 92, 231, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 100;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    animation: tooltip-appear 0.3s ease;
}

.finger-tooltip::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 10px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgba(108, 92, 231, 0.9);
}

@keyframes tooltip-appear {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .keyboard-visualization {
        width: 100%;
        overflow-x: auto;
    }
    
    .hands-visual {
        flex-direction: column;
    }
}
