* {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    body {
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, 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: white;
        border-radius: 20px;
        box-shadow: 0 20px 60px rgba(0,0,0,0.3);
        max-width: 800px;
        width: 100%;
        padding: 40px;
    }

    h1 {
        text-align: center;
        color: #333;
        margin-bottom: 30px;
        font-size: 2em;
    }

    .controls {
        display: flex;
        gap: 15px;
        margin-bottom: 30px;
        flex-wrap: wrap;
        justify-content: center;
    }

    button {
        padding: 12px 24px;
        border: none;
        border-radius: 8px;
        font-size: 16px;
        cursor: pointer;
        transition: all 0.3s ease;
        font-weight: 600;
    }

    .btn-primary {
        background: #667eea;
        color: white;
    }

    .btn-primary:hover {
        background: #5a67d8;
        transform: translateY(-2px);
    }

    .btn-danger {
        background: #e53e3e;
        color: white;
    }

    .btn-danger:hover {
        background: #c53030;
        transform: translateY(-2px);
    }

    .btn-secondary {
        background: #718096;
        color: white;
    }

    .btn-secondary:hover {
        background: #4a5568;
        transform: translateY(-2px);
    }

    .btn-demo {
        background: #8b5cf6;
        color: white;
    }

    .btn-demo:hover {
        background: #7c3aed;
        transform: translateY(-2px);
    }

    button:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none !important;
    }

    .language-selector {
        margin-bottom: 20px;
        text-align: center;
    }

    select {
        padding: 10px 15px;
        border: 2px solid #e2e8f0;
        border-radius: 8px;
        font-size: 16px;
        background: white;
        cursor: pointer;
    }

    .output-container {
        background: #f7fafc;
        border: 2px solid #e2e8f0;
        border-radius: 12px;
        padding: 20px;
        min-height: 200px;
        margin-bottom: 20px;
        position: relative;
    }

    #output {
        font-size: 18px;
        line-height: 1.6;
        color: #2d3748;
        white-space: pre-wrap;
        word-wrap: break-word;
    }

    .interim {
        color: #718096;
        font-style: italic;
    }

    .status {
        text-align: center;
        padding: 10px;
        border-radius: 8px;
        margin-bottom: 20px;
        font-weight: 600;
    }

    .status.listening {
        background: #c6f6d5;
        color: #22543d;
    }

    .status.error {
        background: #fed7d7;
        color: #742a2a;
    }

    .status.idle {
        background: #e2e8f0;
        color: #4a5568;
    }

    .visualizer {
        height: 60px;
        background: #f7fafc;
        border: 2px solid #e2e8f0;
        border-radius: 8px;
        margin-bottom: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        position: relative;
    }

    .wave {
        display: none;
        width: 100%;
        height: 100%;
    }

    .wave.active {
        display: block;
    }

    .stats {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
        margin-top: 20px;
    }

    .stat-card {
        background: #f7fafc;
        padding: 15px;
        border-radius: 8px;
        text-align: center;
    }

    .stat-value {
        font-size: 24px;
        font-weight: bold;
        color: #667eea;
    }

    .stat-label {
        font-size: 14px;
        color: #718096;
        margin-top: 5px;
    }

    .compatibility-warning {
        background: #fef5e7;
        border: 1px solid #f9e79f;
        border-radius: 8px;
        padding: 15px;
        margin-bottom: 20px;
        display: none;
    }

        .compatibility-warning.show {
            display: block;
        }

        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.05); }
            100% { transform: scale(1); }
        }

        .recording {
            animation: pulse 1.5s infinite;
        }

        /* Modal Styles */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 10000;
            backdrop-filter: blur(5px);
        }

        .modal-content {
            background: white;
            border-radius: 15px;
            max-width: 600px;
            width: 90%;
            max-height: 80vh;
            overflow-y: auto;
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
            animation: modalSlideIn 0.3s ease-out;
        }

        @keyframes modalSlideIn {
            from {
                opacity: 0;
                transform: translateY(-50px) scale(0.9);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 25px;
            border-bottom: 1px solid #e2e8f0;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-radius: 15px 15px 0 0;
        }

        .modal-header h3 {
            margin: 0;
            font-size: 1.3em;
            font-weight: 600;
        }

        .modal-close {
            background: none;
            border: none;
            color: white;
            font-size: 24px;
            cursor: pointer;
            padding: 0;
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: background 0.3s ease;
        }

        .modal-close:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        .modal-body {
            padding: 25px;
        }

        .modal-body p {
            margin-bottom: 20px;
            color: #4a5568;
            line-height: 1.6;
        }

        .modal-options {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-top: 20px;
        }

        .option-card {
            background: #f7fafc;
            border: 2px solid #e2e8f0;
            border-radius: 12px;
            padding: 20px;
            text-align: center;
            transition: all 0.3s ease;
        }

        .option-card:hover {
            border-color: #667eea;
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
        }

        .option-card h4 {
            margin: 0 0 10px 0;
            color: #2d3748;
            font-size: 1.1em;
        }

        .option-card p {
            margin: 0 0 15px 0;
            color: #718096;
            font-size: 0.9em;
        }

        .option-card button {
            width: 100%;
            margin-top: 10px;
        }