:root {
            --primary-color: #3498db;
            --secondary-color: #2ecc71;
            --accent-color: #e74c3c;
            --hover-color: #2980b9;
            --bg-color: #ecf0f1;
            --card-bg: #ffffff;
            --text-color: #2c3e50;
            --border-radius: 12px;
            --box-shadow: 0 10px 20px rgba(0,0,0,0.1);
            --transition: all 0.3s ease;
        }

        /* Dark mode variables for future implementation */
        @media (prefers-color-scheme: dark) {
            :root {
                --bg-color: #2c3e50;
                --card-bg: #34495e;
                --text-color: #ecf0f1;
            }
        }

        body {
            font-family: 'Montserrat', 'Segoe UI', sans-serif;
            margin: 0;
            padding: 0;
            background-color: var(--bg-color);
            color: var(--text-color);
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
        }

        .container {
            max-width: 900px;
            width: 90%;
            background: var(--card-bg);
            padding: 30px;
            border-radius: var(--border-radius);
            box-shadow: var(--box-shadow);
            margin: 20px;
            position: relative;
            overflow: hidden;
        }

        .title {
            text-align: center;
            color: var(--text-color);
            margin-bottom: 30px;
            font-size: 2.2rem;
            font-weight: 600;
            position: relative;
        }

        .title::after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            width: 100px;
            height: 4px;
            background: var(--primary-color);
            border-radius: 2px;
        }

        .controls {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 15px;
            margin-bottom: 25px;
        }

        button {
            padding: 14px 20px;
            border: none;
            border-radius: var(--border-radius);
            background-color: var(--primary-color);
            color: white;
            cursor: pointer;
            transition: var(--transition);
            font-weight: 500;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }

        button i {
            font-size: 1.1rem;
        }

        #convertAudio {
            background-color: var(--secondary-color);
        }

        #convertAudio:hover {
            background-color: #27ae60;
            transform: translateY(-3px);
        }

        button:hover {
            background-color: var(--hover-color);
            transform: translateY(-3px);
            box-shadow: 0 6px 12px rgba(0,0,0,0.15);
        }

        button:active {
            transform: translateY(-1px);
        }

        button:disabled {
            background-color: #bdc3c7;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }

        .recording {
            animation: pulse 1.5s infinite;
            background-color: var(--accent-color) !important;
        }

        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.05); box-shadow: 0 8px 15px rgba(231, 76, 60, 0.3); }
            100% { transform: scale(1); }
        }

        #audioPlayer {
            width: 100%;
            height: 50px;
            margin: 20px 0;
            border-radius: var(--border-radius);
            background-color: #f6f6f6;
        }

        #textOutput {
            width: 100%;
            min-height: 220px;
            padding: 15px;
            border: 1px solid #e0e0e0;
            border-radius: var(--border-radius);
            margin: 20px 0;
            resize: vertical;
            font-size: 1.05em;
            line-height: 1.5;
            background-color: rgba(236, 240, 241, 0.3);
            color: var(--text-color);
            box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
            transition: var(--transition);
        }

        #textOutput:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.25);
        }

        #downloadFormat {
            padding: 12px;
            border-radius: var(--border-radius);
            border: 1px solid #e0e0e0;
            background-color: white;
            width: 100%;
            transition: var(--transition);
            cursor: pointer;
            color: var(--text-color);
        }

        #downloadFormat:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.25);
        }

        .status {
            text-align: center;
            margin: 15px 0;
            padding: 10px;
            color: var(--text-color);
            border-radius: var(--border-radius);
            font-weight: 500;
            min-height: 20px;
        }

        .visualizer {
            width: 100%;
            height: 80px;
            margin: 15px 0;
            display: none;
            background: rgba(236, 240, 241, 0.5);
            border-radius: var(--border-radius);
            overflow: hidden;
        }

        .progress-bar {
            width: 100%;
            height: 10px;
            background-color: rgba(189, 195, 199, 0.3);
            border-radius: 5px;
            overflow: hidden;
            margin: 15px 0;
            display: none;
        }

        .progress-bar-fill {
            height: 100%;
            background-color: var(--primary-color);
            width: 0%;
            transition: width 0.3s ease;
            border-radius: 5px;
        }

        .version-indicator {
            position: absolute;
            top: 10px;
            right: 10px;
            background-color: var(--primary-color);
            color: white;
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 0.9em;
            font-weight: 600;
            box-shadow: 0 3px 6px rgba(0,0,0,0.1);
            display: flex;
            align-items: center;
            gap: 5px;
            z-index: 100;
        }

        .version-indicator i {
            font-size: 0.9em;
        }

        /* Card animations */
        .container {
            animation: fadeIn 0.8s ease;
        }

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

        /* Responsive styles */
        @media (max-width: 768px) {
            .container {
                width: calc(100% - 40px);
                padding: 20px;
                margin: 10px;
            }

            .title {
                font-size: 1.8rem;
            }

            .controls {
                grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
                gap: 10px;
            }

            button {
                padding: 12px 15px;
                font-size: 0.9em;
            }
        }

        @media (max-width: 480px) {
            .container {
                width: calc(100% - 20px);
                padding: 15px;
                margin: 5px;
                border-radius: 10px;
            }

            .title {
                font-size: 1.5rem;
                margin-bottom: 20px;
            }

            .title::after {
                width: 80px;
                height: 3px;
            }

            button {
                padding: 10px;
                font-size: 0.85em;
            }

            #textOutput {
                min-height: 180px;
                font-size: 0.95em;
            }
        }

        /* Accessible touch targets */
        @media (hover: none) and (pointer: coarse) {
            button, 
            select {
                min-height: 48px;
            }
        }

        /* Footer */
        .footer {
            text-align: center;
            margin-top: 20px;
            font-size: 0.85em;
            color: #7f8c8d;
        }

        /* Tooltip styles */
        .tooltip {
            position: relative;
        }

        .tooltip:hover::after {
            content: attr(data-tooltip);
            position: absolute;
            bottom: 125%;
            left: 50%;
            transform: translateX(-50%);
            background-color: rgba(44, 62, 80, 0.9);
            color: white;
            padding: 5px 10px;
            border-radius: 5px;
            font-size: 0.8em;
            white-space: nowrap;
            z-index: 100;
        }