body {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.container {
    max-width: 800px;
    padding-top: 20px;
}

.card {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    overflow: hidden;
}

.tuner-display {
    position: relative;
    height: 300px;
    margin: 20px 0;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

#tunerCanvas {
    width: 100%;
    height: 100%;
}

.string-buttons {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
}

.string-btn {
    flex: 1;
    margin: 0 5px;
    padding: 10px;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.3s ease;
}

.string-btn.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
    transform: scale(1.05);
}

.string-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.2);
}

.in-tune-indicator {
    text-align: center;
    padding: 15px;
    background-color: rgba(76, 175, 80, 0.3);
    border-radius: 10px;
    margin: 20px 0;
    display: none;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

.tuning-info {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
}

.btn-microphone {
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
    border-radius: 50px;
    margin: 10px 0;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.note-display {
    text-align: center;
    font-size: 2.5rem;
    font-weight: bold;
    margin: 10px 0;
    height: 60px;
}

.frequency-display {
    text-align: center;
    font-size: 1.2rem;
    opacity: 0.8;
}

.confidence-display {
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 10px;
}

.debug-info {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    font-size: 0.8rem;
}

.status-message {
    text-align: center;
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
}

.status-info {
    background: rgba(33, 150, 243, 0.3);
}

.status-error {
    background: rgba(244, 67, 54, 0.3);
}

.status-success {
    background: rgba(76, 175, 80, 0.3);
}

.tips {
    background: rgba(255, 193, 7, 0.2);
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
}

.smoothing-controls {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
}

.detection-quality {
    height: 4px;
    background: #333;
    border-radius: 2px;
    margin: 5px 0;
    overflow: hidden;
}

.quality-bar {
    height: 100%;
    background: #4CAF50;
    width: 0%;
    transition: width 0.3s ease;
}

.range-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #4CAF50;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.range-indicator.out-of-range {
    background: #ff6b6b;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
    animation: pulse-red 1s infinite;
}

@keyframes pulse-red {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Hide debug info by default */
.debug-info {
    display: none;
}

/* Hide sensitivity controls by default */
.smoothing-controls {
    display: none;
}

/* Show debug toggle */
.debug-toggle {
    text-align: center;
    margin: 10px 0;
}

/* Developer features panel */
.developer-features {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
    display: none;
}

.mobile-optimized {
    display: none;
}

@media (max-width: 768px) {
    .mobile-optimized {
        display: block;
    }

    .desktop-only {
        display: none;
    }

    .string-buttons {
        flex-wrap: wrap;
    }

    .string-btn {
        flex: 1 0 45%;
        margin: 5px;
    }
}

.instrument-visual {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
}

.instrument-strings {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.string-visual {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px 15px;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.string-visual.active {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.02);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.string-line {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
    margin: 0 15px;
    position: relative;
}

.string-visual.active .string-line {
    background: #4CAF50;
    height: 4px;
    box-shadow: 0 0 10px #4CAF50;
}

.string-label {
    min-width: 40px;
    text-align: center;
    font-weight: bold;
}

.string-note {
    min-width: 40px;
    text-align: center;
    opacity: 0.8;
}

/* Mobile optimization */
@media (max-width: 768px) {
    .instrument-strings {
        gap: 10px;
    }

    .string-visual {
        padding: 6px 12px;
    }

    .string-line {
        margin: 0 10px;
    }
}
