/* ==========================================================================
   ESTILOS GERAIS & VARIÁVEIS (Design System Dark Mode)
   ========================================================================== */

:root {
    --bg-gradient: radial-gradient(circle at top, #1e1b4b 0%, #09090b 100%);
    --bg-color: #09090b;
    --card-bg: rgba(24, 24, 27, 0.6);
    --card-border: rgba(255, 255, 255, 0.08);
    
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --text-muted: #52525b;

    /* Cores dos botões PTT */
    --btn-pt-bg: linear-gradient(135deg, #064e3b 0%, #022c22 100%);
    --btn-pt-hover: linear-gradient(135deg, #059669 0%, #047857 100%);
    --btn-pt-glow: rgba(16, 185, 129, 0.25);
    
    --btn-ja-bg: linear-gradient(135deg, #701a75 0%, #4a044e 100%);
    --btn-ja-hover: linear-gradient(135deg, #db2777 0%, #be185d 100%);
    --btn-ja-glow: rgba(219, 39, 119, 0.25);

    --btn-recording-bg: linear-gradient(135deg, #7f1d1d 0%, #450a0a 100%);
    --btn-recording-glow: rgba(239, 68, 68, 0.4);

    --led-red-glow: #ef4444;
    --led-red-off: #7f1d1d;

    /* Transições */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-color);
    background-image: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    overflow-x: hidden;
}

/* ==========================================================================
   CONTAINER DA APLICAÇÃO (SPA)
   ========================================================================== */

.app-container {
    width: 100%;
    max-width: 680px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 32px;
    animation: fadeIn 0.5s ease-out;
    position: relative; /* Necessário para posicionar o botão absolute */
}

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

/* ==========================================================================
   HEADER / TÍTULO
   ========================================================================== */

.app-header {
    text-align: center;
}

.app-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.flags-icon {
    font-size: 2.2rem;
    letter-spacing: 4px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.title-text {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(to right, #ffffff, #a1a1aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   SEÇÃO DE BOTÕES (PUSH-TO-TALK)
   ========================================================================== */

.buttons-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.ptt-btn {
    width: 100%;
    min-height: 120px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    color: var(--text-primary);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Estilo Individual: Português */
.pt-btn {
    background: var(--btn-pt-bg);
}

.pt-btn:hover {
    background: var(--btn-pt-hover);
    box-shadow: 0 0 25px var(--btn-pt-glow);
    border-color: rgba(16, 185, 129, 0.2);
}

/* Estilo Individual: Japonês */
.ja-btn {
    background: var(--btn-ja-bg);
}

.ja-btn:hover {
    background: var(--btn-ja-hover);
    box-shadow: 0 0 25px var(--btn-ja-glow);
    border-color: rgba(219, 39, 119, 0.2);
}

/* Efeito ao Pressionar (Push-To-Talk) */
.ptt-btn:active, .ptt-btn.recording {
    transform: scale(0.97);
    background: var(--btn-recording-bg);
    box-shadow: 0 0 35px var(--btn-recording-glow);
    border-color: rgba(239, 68, 68, 0.4);
}

/* Conteúdo interno do Botão */
.btn-content {
    display: flex;
    align-items: center;
    gap: 20px;
    pointer-events: none; /* Evita que subelementos interfiram no clique/touch */
}

.flag {
    font-size: 2.8rem;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.btn-label {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-align: left;
}

/* ==========================================================================
   INDICADORES DE GRAVAÇÃO (LED & ONDAS SONORAS)
   ========================================================================== */

.recording-indicator {
    display: flex;
    align-items: center;
    gap: 20px;
    pointer-events: none;
}

/* LED Vermelho */
.led-red {
    width: 14px;
    height: 14px;
    background-color: var(--text-muted);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

/* Ativação do LED ao gravar */
.ptt-btn:active .led-red, .ptt-btn.recording .led-red {
    background-color: var(--led-red-glow);
    box-shadow: 0 0 10px var(--led-red-glow), 0 0 20px var(--led-red-glow);
    animation: pulseLed 0.8s infinite alternate;
}

@keyframes pulseLed {
    from { opacity: 0.4; }
    to { opacity: 1; }
}

/* Ondas Sonoras (Soundwave) */
.soundwave {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 30px;
}

.wave-bar {
    width: 3px;
    height: 4px;
    background-color: var(--text-muted);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* Ativação das ondas sonoras */
.ptt-btn:active .wave-bar, .ptt-btn.recording .wave-bar {
    background-color: var(--text-primary);
    animation: soundWave 1.2s infinite ease-in-out;
}

.ptt-btn:active .wave-bar:nth-child(1), .ptt-btn.recording .wave-bar:nth-child(1) { animation-delay: 0.1s; }
.ptt-btn:active .wave-bar:nth-child(2), .ptt-btn.recording .wave-bar:nth-child(2) { animation-delay: 0.3s; }
.ptt-btn:active .wave-bar:nth-child(3), .ptt-btn.recording .wave-bar:nth-child(3) { animation-delay: 0.5s; }
.ptt-btn:active .wave-bar:nth-child(4), .ptt-btn.recording .wave-bar:nth-child(4) { animation-delay: 0.2s; }
.ptt-btn:active .wave-bar:nth-child(5), .ptt-btn.recording .wave-bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes soundWave {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(6); }
}

/* ==========================================================================
   CAIXAS DE TEXTO (STATUS / TRANSCRIÇÃO / TRADUÇÃO)
   ========================================================================== */

.text-boxes-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.text-box-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px;
}

.box-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
}

.copy-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.copy-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.copy-btn:active {
    transform: scale(0.9);
}

/* Feedback verde de cópia realizada com sucesso */
.copy-btn.success {
    color: #10b981 !important;
    background: rgba(16, 185, 129, 0.1);
}

.text-box {
    width: 100%;
    min-height: 110px;
    max-height: 200px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 16px;
    font-size: 1.15rem;
    line-height: 1.6;
    overflow-y: auto;
    word-break: break-word;
    color: var(--text-primary);
    transition: border-color var(--transition-normal), background-color var(--transition-normal);
}

.text-box:focus-within {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

.romaji-wrapper {
    border-left: 3px solid rgba(56, 189, 248, 0.45);
    padding-left: 12px;
}

.romaji-box {
    min-height: 74px;
    max-height: 150px;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    color: #bae6fd;
    background: rgba(56, 189, 248, 0.055);
    border-color: rgba(56, 189, 248, 0.16);
}

/* Placeholder via CSS para Div ContentEditable */
.text-box:empty::before {
    content: attr(data-placeholder);
    color: var(--text-muted);
    font-weight: 300;
    pointer-events: none;
}

/* Custom Scrollbar para as caixas de texto */
.text-box::-webkit-scrollbar {
    width: 6px;
}

.text-box::-webkit-scrollbar-track {
    background: transparent;
}

.text-box::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.text-box::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   BARRA DE STATUS (INFERIOR)
   ========================================================================== */

.status-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
}

.app-credits {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.65;
    letter-spacing: 0.5px;
    font-weight: 400;
}

.app-credits strong {
    color: var(--text-primary);
    font-weight: 600;
}

.app-credits em {
    color: #38bdf8;
    font-style: normal;
    font-weight: 600;
    margin-left: 4px;
}

.status-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all var(--transition-normal);
}

.status-icon {
    font-size: 1.1rem;
}

/* Estados de Status Diferenciados */
.status-bar.ouvind {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.05);
}

.status-bar.reconhecend {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
}

.status-bar.traduzind {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.status-bar.faland {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

.status-bar.erro {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* ==========================================================================
   HISTÓRICO DE CONVERSAS (PERSISTENTE)
   ========================================================================== */

.history-section {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.clear-history-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.clear-history-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.history-list {
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 4px;
}

.history-list:empty::before {
    content: attr(data-empty-placeholder);
    color: var(--text-muted);
    font-size: 0.95rem;
    text-align: center;
    display: block;
    padding: 20px 0;
    font-weight: 300;
}

.history-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: background-color var(--transition-fast);
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.history-item-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
    min-width: 0;
}

.history-item-row {
    font-size: 0.95rem;
    line-height: 1.4;
    word-break: break-word;
    color: var(--text-primary);
}

.history-item-row.translation {
    color: var(--text-secondary);
    border-top: 1px dashed rgba(255, 255, 255, 0.05);
    padding-top: 4px;
    margin-top: 4px;
}

.history-item-row.romaji {
    color: #bae6fd;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
}

.history-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.whatsapp-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(37, 211, 102, 0.1);
    border: 1px solid rgba(37, 211, 102, 0.2);
    color: #25d366;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.whatsapp-share-btn:hover {
    background: #25d366;
    color: #fff;
    box-shadow: 0 0 12px rgba(37, 211, 102, 0.3);
}

.play-history-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.play-history-btn:hover {
    background: #38bdf8;
    color: #000;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.delete-history-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.delete-history-btn:hover {
    background: #ef4444;
    color: #fff;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}

/* Custom scrollbar para o histórico */
.history-list::-webkit-scrollbar {
    width: 4px;
}

.history-list::-webkit-scrollbar-track {
    background: transparent;
}

.history-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   RESPONSIVIDADE (MEDIA QUERIES)
   ========================================================================== */

/* Telas de Tablets ou menores (Menos de 768px) */
@media (max-width: 768px) {
    .app-container {
        padding: 24px;
        gap: 24px;
        border-radius: 20px;
    }

    .flags-icon {
        font-size: 1.8rem;
    }

    .title-text {
        font-size: 1.35rem;
    }

    .ptt-btn {
        min-height: 110px;
        padding: 0 20px;
        border-radius: 16px;
    }

    .flag {
        font-size: 2.2rem;
    }

    .btn-label {
        font-size: 1.05rem;
    }
    
    .recording-indicator {
        gap: 12px;
    }
}

/* Telas de Celulares Pequenos (Menos de 480px) */
@media (max-width: 480px) {
    body {
        padding: 8px;
    }

    .app-container {
        padding: 16px;
        gap: 20px;
        border-radius: 16px;
    }

    .flags-icon {
        font-size: 1.6rem;
    }

    .title-text {
        font-size: 1.15rem;
    }

    .ptt-btn {
        min-height: 100px;
        padding: 0 16px;
        border-radius: 14px;
    }

    .flag {
        font-size: 2rem;
    }

    .btn-label {
        font-size: 0.9rem;
        letter-spacing: 0.5px;
    }

    .text-box {
        min-height: 100px;
        font-size: 1.05rem;
    }
    
    .recording-indicator {
        gap: 8px;
    }

    .soundwave {
        display: none; /* Oculta ondas sonoras em telas muito pequenas para economizar espaço */
    }
}

/* TVs Touch e Telas Grandes */
@media (min-width: 1200px) {
    .app-container {
        max-width: 760px;
        padding: 40px;
    }
    
    .ptt-btn {
        min-height: 130px;
    }
    
    .btn-label {
        font-size: 1.4rem;
    }
}

/* ==========================================================================
   SELETOR DE IDIOMA (MENSAGENS MULTILÍNGUE)
   ========================================================================== */
.mode-selector-section {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.mode-selector {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 4px;
    border-radius: 30px;
    display: inline-flex;
    gap: 4px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.mode-btn {
    background: transparent;
    border: none;
    outline: none;
    color: #94a3b8;
    padding: 8px 20px;
    border-radius: 25px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.mode-btn.active {
    background: #38bdf8;
    color: #0f172a;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.35);
}

.mode-flag {
    font-size: 1.1rem;
}

/* Botão de Atualizar App (Inatividade) */
.refresh-app-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px 12px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    z-index: 100;
}

.refresh-app-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.refresh-app-btn:active {
    transform: translateY(0);
}

.refresh-app-btn.pulse {
    animation: refresh-pulse 2.5s infinite ease-in-out;
    border-color: rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
}

@keyframes refresh-pulse {
    0% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(56, 189, 248, 0); }
    100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

@media (max-width: 480px) {
    .refresh-app-btn {
        position: static;
        margin-bottom: -10px;
        align-self: flex-start;
    }
}

/* Seção de Digitação Manual */
.manual-input-section {
    width: 100%;
    margin: -2px 0 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.manual-toggle-btn {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 10px 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    transition: all var(--transition-normal);
}

.manual-toggle-btn:hover,
.manual-toggle-btn[aria-expanded="true"] {
    color: var(--text-primary);
    border-color: rgba(56, 189, 248, 0.35);
    background: rgba(56, 189, 248, 0.12);
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.08);
}

.manual-toggle-icon {
    font-size: 1rem;
    line-height: 1;
}

.manual-input-wrapper {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all var(--transition-normal);
}

.manual-input-wrapper[hidden] {
    display: none;
}

.manual-input-wrapper:focus-within {
    border-color: rgba(56, 189, 248, 0.45);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(56, 189, 248, 0.1);
}

.manual-textarea {
    width: 100%;
    height: 80px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 0;
    font-family: inherit;
    font-size: 1.05rem;
    line-height: 1.5;
    resize: none;
    outline: none;
}

.manual-textarea::placeholder {
    color: var(--text-muted);
    font-weight: 300;
}

.manual-input-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 0 -16px; /* Offsets padding of the wrapper */
}

.manual-input-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.manual-clear-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.manual-clear-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.manual-btn-translate {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    color: var(--text-primary);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.manual-btn-translate.left-lang {
    background: var(--manual-left-bg, linear-gradient(135deg, #064e3b 0%, #022c22 100%));
}

.manual-btn-translate.left-lang:hover {
    background: var(--manual-left-hover, linear-gradient(135deg, #059669 0%, #047857 100%));
    box-shadow: 0 0 15px var(--manual-left-glow, rgba(16, 185, 129, 0.25));
    transform: translateY(-1px);
}

.manual-btn-translate.right-lang {
    background: var(--manual-right-bg, linear-gradient(135deg, #701a75 0%, #4a044e 100%));
}

.manual-btn-translate.right-lang:hover {
    background: var(--manual-right-hover, linear-gradient(135deg, #db2777 0%, #be185d 100%));
    box-shadow: 0 0 15px var(--manual-right-glow, rgba(219, 39, 119, 0.25));
    transform: translateY(-1px);
}

.manual-btn-translate:active {
    transform: translateY(0) scale(0.97);
}

/* Definição de Variáveis para Modos Manuais dependendo de data-mode */
.app-container[data-mode="pt-ja"] {
    --manual-left-bg: linear-gradient(135deg, #064e3b 0%, #022c22 100%);
    --manual-left-hover: linear-gradient(135deg, #059669 0%, #047857 100%);
    --manual-left-glow: rgba(16, 185, 129, 0.25);
    
    --manual-right-bg: linear-gradient(135deg, #701a75 0%, #4a044e 100%);
    --manual-right-hover: linear-gradient(135deg, #db2777 0%, #be185d 100%);
    --manual-right-glow: rgba(219, 39, 119, 0.25);
}

.app-container[data-mode="pt-en"] {
    --manual-left-bg: linear-gradient(135deg, #064e3b 0%, #022c22 100%);
    --manual-left-hover: linear-gradient(135deg, #059669 0%, #047857 100%);
    --manual-left-glow: rgba(16, 185, 129, 0.25);
    
    --manual-right-bg: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    --manual-right-hover: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
    --manual-right-glow: rgba(56, 189, 248, 0.25);
}

.app-container[data-mode="en-ja"] {
    --manual-left-bg: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    --manual-left-hover: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
    --manual-left-glow: rgba(56, 189, 248, 0.25);
    
    --manual-right-bg: linear-gradient(135deg, #701a75 0%, #4a044e 100%);
    --manual-right-hover: linear-gradient(135deg, #db2777 0%, #be185d 100%);
    --manual-right-glow: rgba(219, 39, 119, 0.25);
}
