/* Microphone Test Tool Styles */

.mic-test-container {
    max-width: 900px;
    margin: 2rem auto;
}

.mic-status-card {
    background: linear-gradient(135deg, #f4f8fb 0%, #e8f4f0 100%);
    border: 2px solid #ccdac9;
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.mic-icon-wrapper {
    display: inline-block;
    background: #3d8a59;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 4px 15px rgba(61, 138, 89, 0.3);
    transition: all 0.3s ease;
}

.mic-icon {
    font-size: 3rem;
    color: white;
}

.mic-icon-wrapper.active {
    animation: pulse 2s infinite;
    background: #2d5a27;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(61, 138, 89, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 25px rgba(61, 138, 89, 0.5);
    }
}

.mic-status-text {
    font-size: 1.2rem;
    color: #2d5a27;
    font-weight: 500;
    margin: 0;
}

.visualizer-container {
    background: #ffffff;
    border: 2px solid #ccdac9;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.visualizer-container h3 {
    margin-top: 0;
    color: #2d5a27;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

#visualizer {
    width: 100%;
    height: 200px;
    background: #f7f9fb;
    border-radius: 8px;
    display: block;
    border: 1px solid #e3eaf2;
}

.volume-meter {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.volume-meter label {
    font-weight: 600;
    color: #2d5a27;
    min-width: 110px;
}

.volume-bar-container {
    flex: 1;
    height: 30px;
    background: #e3eaf2;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    border: 1px solid #ccdac9;
}

.volume-bar {
    height: 100%;
    background: linear-gradient(90deg, #3d8a59 0%, #2d5a27 100%);
    width: 0%;
    transition: width 0.1s ease;
    border-radius: 15px;
    position: relative;
}

.volume-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.volume-value {
    font-weight: 700;
    color: #2d5a27;
    min-width: 50px;
    text-align: right;
    font-size: 1.1rem;
}

.recording-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.record-btn, .play-btn, .download-btn {
    padding: 0.9rem 1.8rem;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.record-btn {
    background: #dc3545;
    color: white;
}

.record-btn:hover:not(:disabled) {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.record-btn.recording {
    background: #6c757d;
    animation: recordPulse 1.5s infinite;
}

@keyframes recordPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.play-btn {
    background: #3d8a59;
    color: white;
}

.play-btn:hover:not(:disabled) {
    background: #2d5a27;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(61, 138, 89, 0.3);
}

.download-btn {
    background: #007bff;
    color: white;
}

.download-btn:hover:not(:disabled) {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.record-btn:disabled,
.play-btn:disabled,
.download-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mic-info {
    background: #f4f8fb;
    border: 1px solid #ccdac9;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.mic-info h3 {
    margin-top: 0;
    color: #2d5a27;
    font-size: 1.2rem;
}

.mic-info p {
    margin: 0.5rem 0;
    color: #333;
}

.status-active {
    color: #3d8a59;
    font-weight: 600;
}

.status-inactive {
    color: #dc3545;
    font-weight: 600;
}

/* Troubleshooting Section */
.troubleshooting {
    margin: 3rem 0;
}

.troubleshooting h3 {
    color: #2d5a27;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.trouble-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.trouble-card {
    background: white;
    border: 1px solid #ccdac9;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.trouble-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #3d8a59;
}

.trouble-card i {
    font-size: 2rem;
    color: #3d8a59;
    margin-bottom: 1rem;
}

.trouble-card h4 {
    color: #2d5a27;
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.trouble-card p {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* How to Use Section */
.how-to-use {
    background: #f4f8fb;
    border-left: 4px solid #3d8a59;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 4px;
}

.how-to-use h3 {
    margin-top: 0;
    color: #2d5a27;
}

.how-to-use ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.how-to-use li {
    margin: 0.5rem 0;
    line-height: 1.6;
    color: #333;
}

/* Dark Mode Support */
.dark-mode .mic-status-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d3748 100%);
    border-color: #4a5568;
}

.dark-mode .mic-status-text {
    color: #a8d5ba;
}

.dark-mode .visualizer-container {
    background: #1a1a1a;
    border-color: #4a5568;
}

.dark-mode #visualizer {
    background: #2d3748;
    border-color: #4a5568;
}

.dark-mode .volume-bar-container {
    background: #2d3748;
    border-color: #4a5568;
}

.dark-mode .mic-info {
    background: #1a1a1a;
    border-color: #4a5568;
}

.dark-mode .trouble-card {
    background: #1a1a1a;
    border-color: #4a5568;
}

.dark-mode .trouble-card:hover {
    border-color: #3d8a59;
}

.dark-mode .how-to-use {
    background: #1a1a1a;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .mic-status-card {
        padding: 2rem 1.5rem;
    }

    .mic-icon-wrapper {
        width: 80px;
        height: 80px;
    }

    .mic-icon {
        font-size: 2.5rem;
    }

    .mic-status-text {
        font-size: 1.1rem;
    }

    .visualizer-container {
        padding: 1.5rem;
    }

    #visualizer {
        height: 150px;
    }

    .volume-meter {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .volume-meter label {
        min-width: auto;
    }

    .recording-controls {
        flex-direction: column;
        gap: 0.8rem;
    }

    .record-btn, .play-btn, .download-btn {
        width: 100%;
        justify-content: center;
        padding: 1rem 1.5rem;
    }

    .trouble-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .mic-test-container {
        margin: 1rem 0;
    }

    .mic-status-card {
        padding: 1.5rem 1rem;
    }

    .visualizer-container h3 {
        font-size: 1.1rem;
    }

    .troubleshooting h3 {
        font-size: 1.3rem;
    }
}
