/* DRAGON AUDIO SYSTEM - UI STYLES 🎵🐉 */

/* Audio control panel */
.audio-controls {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    padding: 10px;
    z-index: 9999;
    display: flex;
    gap: 5px;
    align-items: center;
}

.audio-control-btn {
    background: #333;
    border: 1px solid #666;
    border-radius: 5px;
    color: white;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
}

.audio-control-btn:hover {
    background: #555;
    transform: scale(1.05);
}

.audio-control-btn:active {
    background: #777;
    transform: scale(0.95);
}

/* Volume control */
.volume-control {
    display: flex;
    align-items: center;
    gap: 5px;
    color: white;
    font-size: 12px;
}

.volume-slider {
    width: 60px;
    height: 4px;
    background: #333;
    outline: none;
    border-radius: 2px;
}

/* Sound indicator */
.sound-indicator {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 215, 0, 0.9);
    color: black;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 10001;
}

.sound-indicator.show {
    opacity: 1;
    top: -30px;
}

/* Dragon hover audio effect */
.dragon-card,
.dragon-item,
.dragon-slot {
    position: relative;
    transition: all 0.2s ease;
}

.dragon-card:hover,
.dragon-item:hover,
.dragon-slot:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}

/* Audio wave animation */
@keyframes audioWave {
    0%, 100% { transform: scaleY(1); opacity: 0.6; }
    50% { transform: scaleY(1.5); opacity: 1; }
}

.audio-wave {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 5px;
}

.audio-wave span {
    width: 3px;
    height: 10px;
    background: #00ff88;
    border-radius: 1px;
    animation: audioWave 0.6s ease-in-out infinite;
}

.audio-wave span:nth-child(2) { animation-delay: 0.1s; }
.audio-wave span:nth-child(3) { animation-delay: 0.2s; }
.audio-wave span:nth-child(4) { animation-delay: 0.3s; }

/* Element specific audio indicators */
.audio-indicator {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dragon-card:hover .audio-indicator,
.dragon-item:hover .audio-indicator {
    opacity: 1;
}

/* Element colors for audio indicators */
.audio-indicator.fire { background: #ff6b35; }
.audio-indicator.water { background: #4fc3f7; }
.audio-indicator.earth { background: #8bc34a; }
.audio-indicator.wind { background: #9c27b0; }
.audio-indicator.ice { background: #00bcd4; }
.audio-indicator.light { background: #ffc107; }
.audio-indicator.dark { background: #424242; }

/* Skill sound preview */
.skill-sound-preview {
    position: absolute;
    top: -35px;
    left: 0;
    right: 0;
    text-align: center;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 5px;
    border-radius: 5px;
    font-size: 11px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 1000;
}

.skill-item:hover .skill-sound-preview {
    opacity: 1;
    transform: translateY(0);
}

/* Audio test panel */
.audio-test-panel {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #666;
    border-radius: 10px;
    padding: 15px;
    color: white;
    min-width: 250px;
    z-index: 9998;
    display: none;
}

.audio-test-panel.visible {
    display: block;
}

.audio-test-panel h4 {
    margin: 0 0 10px 0;
    color: #ffd700;
    text-align: center;
}

.test-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}

.test-btn {
    background: #333;
    border: 1px solid #666;
    border-radius: 5px;
    color: white;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 11px;
    text-align: center;
}

.test-btn:hover {
    background: #555;
    border-color: #888;
}

.test-btn:active {
    background: #777;
    transform: scale(0.95);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .audio-controls {
        top: 60px;
        right: 5px;
        padding: 5px;
        flex-direction: column;
    }
    
    .audio-control-btn {
        padding: 3px 6px;
        font-size: 10px;
    }
    
    .audio-test-panel {
        bottom: 10px;
        left: 10px;
        right: 10px;
        min-width: auto;
    }
    
    .test-buttons {
        grid-template-columns: 1fr;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .dragon-card:hover,
    .dragon-item:hover,
    .dragon-slot:hover {
        transform: none;
    }
    
    .audio-wave span {
        animation: none;
    }
    
    .sound-indicator,
    .skill-sound-preview {
        transition: none;
    }
}