/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #007bff;
    /* VLibras Blueish */
    --hover-color: #0056b3;
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --text-color: #333333;
    --text-secondary: #666666;
    --accent-color: #28a745;
    --error-color: #dc3545;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 12px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: var(--card-bg);
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    position: relative;
    overflow: hidden;
}

header h1 {
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

header p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn {
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--hover-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-danger {
    background-color: var(--error-color);
    color: white;
    opacity: 0.5;
    pointer-events: none;
}

.btn-danger.active {
    opacity: 1;
    pointer-events: auto;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Microphone Animation */
.recording-pulse {
    position: relative;
}

.recording-pulse::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    border-radius: 50px;
    border: 2px solid var(--primary-color);
    opacity: 0;
    z-index: -1;
}

.is-recording .recording-pulse::after {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        width: 100%;
        height: 100%;
        opacity: 1;
    }

    100% {
        width: 140%;
        height: 150%;
        opacity: 0;
    }
}

.output-area {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: var(--radius);
    padding: 1.5rem;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: border-color 0.3s;
}

.output-area:hover {
    border-color: var(--primary-color);
}

.output-text {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--text-color);
    width: 100%;
    text-align: left;
    white-space: pre-wrap;
}

.placeholder {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    width: 100%;
}

.status-indicator {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    height: 20px;
}

/* Accessibility Focus */
button:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 1.5rem;
        margin: 10px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .controls {
        flex-direction: column;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 2rem;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    transition: color 0.2s;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--text-color);
    text-decoration: none;
    cursor: pointer;
}

.app-logo {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-5px);
    }

    100% {
        transform: translateY(0px);
    }
}