/* Guitar Tuner Styles */

/* טיונר - ממורכז בתוך עמוד הכלי */
.tuner-page-anchor{
    width: 100%;
    display: flex;
    justify-content: center;
    direction: rtl;
}

/* כרטיס טיונר בתוך עמוד הכלי */
.tuner-container {
    background: linear-gradient(135deg, #f0f8ff, #e6f3ff);
    border: 1px solid #4a90e2;
    border-radius: 8px;
    padding: 12px;
    margin: 0;
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.2);
    width: min(720px, 100%);
}

.tuner-container.tuner-open {
    border-width: 2px;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
}

.tuner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    gap: 6px;
}

.tuner-container.tuner-open .tuner-header {
    margin-bottom: 10px;
}

.tuner-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.tuner-container.tuner-open .tuner-header h3 {
    font-size: 14px;
    gap: 6px;
}

.tuner-toggle-btn {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 1px 4px rgba(74, 144, 226, 0.3);
    white-space: nowrap;
}

.tuner-container.tuner-open .tuner-toggle-btn {
    padding: 6px 12px;
    font-size: 11px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.3);
}

.tuner-toggle-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(74, 144, 226, 0.4);
    background: linear-gradient(135deg, #357abd, #2a5f8f);
}

.tuner-toggle-btn.active {
    background: linear-gradient(135deg, #dc3545, #c82333);
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.3);
}

.tuner-toggle-btn.active:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    box-shadow: 0 3px 10px rgba(220, 53, 69, 0.4);
}

.tuner-content {
    animation: fadeIn 0.3s ease-out;
}

.tuner-display {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 12px;
    text-align: center;
}

.frequency-display {
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.frequency-label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 600;
}

.frequency-value {
    font-size: 16px;
    color: #2c3e50;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.note-display {
    margin-bottom: 15px;
}

.current-note {
    font-size: 48px;
    font-weight: 700;
    color: #4a90e2;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(74, 144, 226, 0.3);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.target-note {
    font-size: 12px;
    color: #6c757d;
    font-weight: 600;
}

.tuner-gauge-wrapper {
    margin: 15px 0;
}

.gauge-labels {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    direction: ltr;
    font-size: 12px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 6px;
}

.gauge-labels span {
    text-align: center;
}

.tuner-gauge {
    position: relative;
    width: 100%;
    height: 60px;
    background: linear-gradient(to right, 
        #dc3545 0%, 
        #ffc107 25%, 
        #28a745 45%, 
        #28a745 55%, 
        #ffc107 75%, 
        #dc3545 100%);
    border-radius: 30px;
    margin: 0;
    overflow: hidden;
    border: 2px solid #dee2e6;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gauge-center {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #2c3e50;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

.gauge-needle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 80%;
    background: #2c3e50;
    transform: translate(-50%, -50%);
    transform-origin: center;
    transition: transform 0.1s ease-out;
    z-index: 3;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
    border-radius: 2px;
}

.gauge-needle::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 10px solid #2c3e50;
}

.gauge-needle.in-tune {
    background: #28a745;
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.8);
}

.gauge-needle.in-tune::before {
    border-top-color: #28a745;
}

.gauge-needle.close {
    background: #ffc107;
    box-shadow: 0 0 8px rgba(255, 193, 7, 0.8);
}

.gauge-needle.close::before {
    border-top-color: #ffc107;
}

.gauge-needle.out-of-tune {
    background: #dc3545;
    box-shadow: 0 0 8px rgba(220, 53, 69, 0.8);
}

.gauge-needle.out-of-tune::before {
    border-top-color: #dc3545;
}

.cents-display {
    font-size: 14px;
    font-weight: 700;
    color: #2c3e50;
    margin-top: 8px;
    font-family: 'Courier New', monospace;
}

.tuning-direction {
    min-height: 22px;
    font-size: 15px;
    font-weight: 800;
    color: #2c3e50;
}

.string-selector {
    margin-bottom: 12px;
}

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

.string-btn {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 8px 4px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.string-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-color: #4a90e2;
    background: linear-gradient(135deg, #e6f3ff, #d6ebff);
}

.string-btn.active {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    border-color: #2a5f8f;
    color: white;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
    transform: translateY(-2px);
}

.string-number {
    font-size: 18px;
    font-weight: 700;
}

.string-name {
    font-size: 14px;
    font-weight: 600;
}

.tuner-info {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}

.info-text {
    margin: 4px 0;
    font-size: 10px;
    color: #856404;
    font-weight: 600;
    line-height: 1.4;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tuner-container:not(.tuner-open) {
        padding: 4px 6px;
    }
    
    .tuner-container.tuner-open {
        padding: 8px;
    }
    
    .tuner-header h3 {
        font-size: 10px;
    }
    
    .tuner-container.tuner-open .tuner-header h3 {
        font-size: 12px;
    }
    
    .tuner-toggle-btn {
        padding: 3px 6px;
        font-size: 9px;
    }
    
    .tuner-container.tuner-open .tuner-toggle-btn {
        padding: 4px 8px;
        font-size: 10px;
    }
    
    .current-note {
        font-size: 36px;
        min-height: 50px;
    }
    
    .string-buttons {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
    }
    
    .string-btn {
        padding: 6px 2px;
    }
    
    .string-number {
        font-size: 16px;
    }
    
    .string-name {
        font-size: 12px;
    }
}
