* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 800px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    backdrop-filter: blur(10px);
}

/* Status */
.status-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #e74c3c;
    transition: all 0.3s ease;
    box-shadow: 0 0 8px rgba(231, 76, 60, 0.5);
}

.status-dot.connected {
    background: #2ecc71;
    box-shadow: 0 0 12px rgba(46, 204, 113, 0.6);
    animation: pulse-green 2s infinite;
}

.status-dot.connecting {
    background: #f39c12;
    box-shadow: 0 0 12px rgba(243, 156, 18, 0.6);
    animation: pulse-yellow 1s infinite;
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 12px rgba(46, 204, 113, 0.6); }
    50% { box-shadow: 0 0 20px rgba(46, 204, 113, 0.8); }
}

@keyframes pulse-yellow {
    0%, 100% { box-shadow: 0 0 12px rgba(243, 156, 18, 0.6); }
    50% { box-shadow: 0 0 20px rgba(243, 156, 18, 0.8); }
}

.status-text {
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
}

.connection-info {
    font-size: 12px;
    color: #7f8c8d;
    font-family: 'Courier New', monospace;
}

/* Oscilloscope */
.oscilloscope-container {
    background: #1a1a2e;
    border-radius: 12px;
    height: 120px;
    overflow: hidden;
    position: relative;
}

#oscilloscope {
    width: 100%;
    height: 100%;
    display: block;
}

/* Transcription */
.transcription-container {
    background: #f8f9fa;
    border-radius: 12px;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    padding: 20px;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease;
}

.transcription-container.active {
    border-color: #667eea;
}

#transcriptionDisplay {
    font-size: 18px;
    line-height: 1.8;
    color: #2c3e50;
    min-height: 160px;
}

.placeholder-text {
    color: #adb5bd;
    text-align: center;
    font-style: italic;
    padding: 40px 20px;
}

.transcription-segment {
    margin-bottom: 8px;
    animation: fadeIn 0.3s ease;
}

.transcription-segment.final {
    opacity: 1;
}

.transcription-segment.partial {
    opacity: 0.7;
    font-style: italic;
    color: #667eea;
}

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

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    padding: 10px 0;
}

.mic-button {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: none;
    background: #667eea;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.mic-button:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.mic-button:active:not(:disabled) {
    transform: scale(0.95);
}

.mic-button.recording {
    background: #e74c3c;
    animation: pulse-red 1.5s infinite;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

@keyframes pulse-red {
    0%, 100% { box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4); }
    50% { box-shadow: 0 4px 25px rgba(231, 76, 60, 0.6); }
}

.mic-button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    opacity: 0.6;
}

.mic-button svg {
    fill: currentColor;
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        padding: 15px;
        gap: 15px;
        border-radius: 15px;
    }

    .status-container {
        padding: 8px 12px;
    }

    .status-text {
        font-size: 12px;
    }

    .oscilloscope-container {
        height: 80px;
    }

    .transcription-container {
        min-height: 150px;
        max-height: 300px;
        padding: 15px;
    }

    #transcriptionDisplay {
        font-size: 16px;
        line-height: 1.6;
    }

    .mic-button {
        width: 60px;
        height: 60px;
    }

    .mic-button svg {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 400px) {
    .container {
        padding: 10px;
        gap: 10px;
        border-radius: 12px;
    }

    .status-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .oscilloscope-container {
        height: 60px;
    }

    .transcription-container {
        min-height: 120px;
        max-height: 250px;
        padding: 10px;
    }

    #transcriptionDisplay {
        font-size: 14px;
    }

    .mic-button {
        width: 56px;
        height: 56px;
    }

    .mic-button svg {
        width: 24px;
        height: 24px;
    }
}

/* Scrollbar personnalisée */
.transcription-container::-webkit-scrollbar {
    width: 8px;
}

.transcription-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.transcription-container::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.transcription-container::-webkit-scrollbar-thumb:hover {
    background: #5a6fd6;
}