/* NeuroTranslator PT-EN - Estilos Responsivos */
/* Mobile-first approach */

:root {
    --primary-color: #3b82f6;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --background-color: #0a0a0a;
    --surface-color: #1a1a1a;
    --surface-light: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --border-color: #404040;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --glass-bg: rgba(26, 26, 26, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--background-color) 0%, #111111 50%, var(--background-color) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    backdrop-filter: blur(10px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Header */
.header {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 30%, #2a2a2a 70%, #0a0a0a 100%);
    color: white;
    padding: 1.5rem 1.5rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    min-height: 90px;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(2px 2px at 20px 30px, #ffffff, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #ffffff, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 160px 30px, #ffffff, transparent),
        radial-gradient(1px 1px at 200px 60px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 240px 90px, #ffffff, transparent),
        radial-gradient(2px 2px at 280px 20px, rgba(255,255,255,0.9), transparent),
        radial-gradient(1px 1px at 320px 70px, #ffffff, transparent),
        radial-gradient(1px 1px at 360px 40px, rgba(255,255,255,0.8), transparent),
        radial-gradient(2px 2px at 400px 80px, #ffffff, transparent),
        radial-gradient(1px 1px at 440px 30px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 480px 60px, #ffffff, transparent),
        radial-gradient(2px 2px at 520px 90px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 560px 20px, #ffffff, transparent);
    background-repeat: repeat;
    background-size: 600px 120px;
    animation: twinkle 4s ease-in-out infinite alternate;
}

.header-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.header h1 {
    font-size: 2.5rem;
    margin: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(74, 144, 226, 0.5);
}

.header .subtitle {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    transition: var(--transition);
}

/* Main Content - Single Column Layout */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Translation Section - Full Width */
.translation-section {
    width: 100%;
    max-width: 1200px;
    background: rgba(42, 42, 42, 0.3);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}


    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 10, 0.9);
    transition: var(--transition);
    backdrop-filter: blur(10px);
    border-radius: 50%;
}

.camera-circle .camera-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.camera-circle .btn-camera {
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.camera-circle .btn-camera:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

@keyframes twinkle {
    0% { opacity: 0.3; }
    100% { opacity: 0.8; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
    50% { opacity: 0.5; }
}
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.logo {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
    animation: logoFloat 4s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.1) rotate(5deg);
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-8px) rotate(2deg); }
    50% { transform: translateY(-15px) rotate(0deg); }
    75% { transform: translateY(-8px) rotate(-2deg); }
}

.header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    background: linear-gradient(45deg, #ffffff, #e0f2fe, #bfdbfe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShimmer 3s ease-in-out infinite;
}

@keyframes textShimmer {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

.header h1 i {
    color: #3b82f6;
    filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.8)) drop-shadow(0 0 5px rgba(59, 130, 246, 1));
    animation: brainPulse 2s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
    -webkit-text-fill-color: #3b82f6;
}

@keyframes brainPulse {
    0%, 100% { 
        transform: scale(1);
        filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.8)) drop-shadow(0 0 5px rgba(59, 130, 246, 1));
    }
    50% { 
        transform: scale(1.1);
        filter: drop-shadow(0 0 20px rgba(59, 130, 246, 1)) drop-shadow(0 0 10px rgba(59, 130, 246, 1));
    }
}

.header .subtitle {
    margin: 0;
    font-size: 1.4rem;
    opacity: 0.95;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
}

.header-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
}

.header .subtitle {
    margin: 0;
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
    color: white;
}

.subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.author-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.author-info a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.author-info a:hover {
    color: var(--primary-dark);
    transform: scale(1.1);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Camera Section */
/* Translation Section */
.translation-section {
    background: var(--glass-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
}

.language-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.language-option {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 120px;
}

.language-option label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.language-option select {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--surface-color);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.language-option select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Translation Section (Center Column) */
.translation-section {
    background: rgba(42, 42, 42, 0.3);
    border-radius: 15px;
    padding: 30px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.text-areas {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.input-area, .output-area {
    flex: 1;
}

.area-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.area-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--surface-color);
    color: var(--text-primary);
    font-size: 0.9rem;
    resize: vertical;
    min-height: 120px;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea::placeholder {
    color: var(--text-secondary);
}

.speech-status, .translation-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
}

.btn-camera {
    background: var(--primary-color);
    color: white;
}

.btn-camera:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.btn-camera.active {
    background: var(--error-color);
}

.btn-neuro-assistant {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: white;
    margin-left: 0.5rem;
}

.btn-neuro-assistant:hover {
    background: linear-gradient(135deg, #7c3aed, #9333ea);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

.btn-neuro-assistant.active {
    background: linear-gradient(135deg, #10b981, #059669);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.btn-swap {
    background: var(--surface-light);
    color: var(--text-primary);
    padding: 0.75rem;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    justify-content: center;
}

.btn-swap:hover {
    background: var(--border-color);
    transform: rotate(180deg);
}

.btn-speech {
    background: var(--success-color);
    color: white;
}

.btn-speech:hover {
    background: #059669;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

/* Voice Gender Selector - Versão Aprimorada */
.voice-gender-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 0;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border-radius: 12px;
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 380px;
    position: relative;
    transition: all 0.3s ease;
}

.voice-gender-selector:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.voice-gender-selector label {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.voice-select {
    background: var(--surface-light);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
    font-weight: 500;
    position: relative;
}

.voice-select:hover {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.02);
}

.voice-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    background: rgba(255, 255, 255, 0.12);
}

/* Indicador de status da voz */
.voice-status-indicator {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--success-color);
    border: 2px solid var(--surface-dark);
    animation: pulse-voice 2s infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.voice-status-indicator.active {
    opacity: 1;
}

@keyframes pulse-voice {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* Tooltip para informações da voz */
.voice-tooltip {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.voice-gender-selector:hover .voice-tooltip {
    opacity: 1;
}

/* Melhorias para o feedback visual */
.voice-select option {
    padding: 8px;
    background: var(--surface-dark);
    color: var(--text-primary);
}

.voice-select option:hover {
    background: var(--primary-color);
    color: white;
}

.btn-speech.active {
    background: var(--error-color);
    animation: pulse 2s infinite;
}

.btn-translate {
    background: var(--primary-color);
    color: white;
}

.btn-translate:hover {
    background: var(--primary-dark);
}

.btn-clear, .btn-copy, .btn-clear-history {
    background: var(--surface-light);
    color: var(--text-secondary);
}

.btn-clear:hover, .btn-copy:hover, .btn-clear-history:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

/* Options */
.options {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    justify-content: center;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.checkbox-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

/* History Section - Full Width */
.history-section {
    width: 100%;
    max-width: 1200px;
    background: var(--glass-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.history-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.history-container {
    max-height: 300px;
    overflow-y: auto;
}

.no-history {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 2rem;
}

.history-item {
    background: var(--glass-bg);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-left: 4px solid var(--primary-color);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.history-item-content {
    display: grid;
    gap: 0.5rem;
}

.history-original, .history-translation {
    padding: 0.5rem;
    background: var(--glass-bg);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0 1rem;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        gap: 1.5rem;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .translation-section,
    .history-section {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 15px;
    }
    
    .header {
        padding: 1.5rem 1rem;
        min-height: 100px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .logo {
        width: 60px;
        height: 60px;
    }
    
    .translation-section,
    .history-section {
        padding: 1rem;
    }
}

/* Tablet Styles */
@media (min-width: 768px) {
    .container {
        padding: 2rem;
    }
    
    .header h1 {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .text-areas {
        flex-direction: row;
    }
    
    .camera-container {
        max-width: 500px;
    }
    
    .language-selector {
        justify-content: space-between;
    }
    
    .language-option {
        flex: 0 0 200px;
    }
    
    .options {
        justify-content: flex-start;
    }
}

/* Desktop Styles */
@media (min-width: 1024px) {
    .main-content {
        gap: 2rem;
    }
    
    .header h1 {
        font-size: 3rem;
    }
    
    textarea {
        min-height: 150px;
    }
}

/* Large Desktop */
@media (min-width: 1280px) {
    .container {
        padding: 3rem;
    }
    
    .main-content {
        gap: 3rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .btn {
        border: 1px solid transparent;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode support (already dark by default) */
@media (prefers-color-scheme: light) {
    /* Users can override if they prefer light mode */
}

/* Aviso de segurança */
.security-warning {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(251, 191, 36, 0.3);
    animation: slideInRight 0.5s ease-out;
}

.warning-content {
    padding: 16px 20px;
    color: #1f2937;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
}

.warning-content i {
    color: #dc2626;
    margin-right: 8px;
    font-size: 16px;
}

.warning-content code {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.close-warning {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 20px;
    color: #1f2937;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-warning:hover {
    background: rgba(0, 0, 0, 0.1);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Print styles */
@media print {
    .camera-section,
    .btn {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .translation-section,
    .history-section {
        background: white !important;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}
/* Diálogo de ajuda para dispositivos móveis */
.mobile-permission-help {
    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;
    padding: 20px;
    box-sizing: border-box;
}

.help-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

.help-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.help-header i {
    font-size: 24px;
}

.help-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.help-body {
    padding: 20px;
    line-height: 1.6;
    color: #333;
}

.help-body p {
    margin: 0 0 15px 0;
}

.help-body ul {
    margin: 10px 0;
    padding-left: 20px;
}

.help-body li {
    margin: 8px 0;
}

.help-body strong {
    color: #667eea;
    font-weight: 600;
}

.help-footer {
    padding: 15px 20px 20px;
    text-align: center;
}

.btn-help-close {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-help-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-help-close:active {
    transform: translateY(0);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Modern Animations and Effects */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px var(--primary-color);
    }
    50% {
        box-shadow: 0 0 20px var(--primary-color), 0 0 30px var(--primary-color);
    }
}

/* Apply animations to sections */
.camera-section, .translation-section, .history-section {
    animation: fadeInUp 0.6s ease-out;
}

.history-item {
    animation: slideInRight 0.4s ease-out;
}

/* Enhanced hover effects */
.btn:hover {
    transform: translateY(-3px) scale(1.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* Smooth focus effects */
textarea:focus, select:focus {
    animation: glow 2s ease-in-out infinite;
}

/* Modern scrollbar */
.history-container::-webkit-scrollbar {
    width: 8px;
}

.history-container::-webkit-scrollbar-track {
    background: var(--surface-color);
    border-radius: 4px;
}

.history-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.history-container::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.btn-help-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Print styles */
@media print {
    .camera-section,
    .btn {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .translation-section,
    .history-section {
        background: white !important;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}
/* Diálogo de ajuda para dispositivos móveis */
.mobile-permission-help {
    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;
    padding: 20px;
    box-sizing: border-box;
}

.help-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

.help-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.help-header i {
    font-size: 24px;
}

.help-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.help-body {
    padding: 20px;
    line-height: 1.6;
    color: #333;
}

.help-body p {
    margin: 0 0 15px 0;
}

.help-body ul {
    margin: 10px 0;
    padding-left: 20px;
}

.help-body li {
    margin: 8px 0;
}

.help-body strong {
    color: #667eea;
    font-weight: 600;
}

.help-footer {
    padding: 15px 20px 20px;
    text-align: center;
}

.btn-help-close {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-help-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-help-close:active {
    transform: translateY(0);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Animação de pulso para feedback visual em mobile */
@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Melhorias para dispositivos móveis */
@media (max-width: 768px) {
    .mobile-permission-help {
        padding: 10px;
    }
    
    .help-content {
        max-height: 90vh;
        margin: 0;
    }
    
    .help-header {
        padding: 15px;
    }
    
    .help-header h3 {
        font-size: 16px;
    }
    
    .help-body {
        padding: 15px;
        font-size: 14px;
    }
    
    .help-body ul {
        padding-left: 15px;
    }
    
    .btn-help-close {
        padding: 10px 25px;
        font-size: 14px;
    }
    
    .btn {
        min-height: 44px; /* Tamanho mínimo recomendado para toque */
        font-size: 1rem;
    }
    
    .speech-status {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
    
    .btn-speech.active {
        animation: pulse-mobile 1.5s infinite;
    }
}

@keyframes pulse-mobile {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}