        * { margin: 0; padding: 0; box-sizing: border-box; }
        body { font-family: Arial, sans-serif; background: #0f172a; color: white; font-size: 16px; }
        .container { max-width: 600px; margin: 0 auto; height: 100vh; display: flex; flex-direction: column; }
        .header { background: #1e3a8a; border-bottom: 2px solid #d4af37; flex-shrink: 0; }
        .message { padding: 8px 12px; margin: 5px 0; border-radius: 15px; max-width: 80%; }
        .sent { background: #22c55e; margin-left: auto; }
        .received { background: #334155; }
        .message-image { max-width: 200px; border-radius: 10px; cursor: pointer; }
        .message-file { background: #0f172a; padding: 8px; border-radius: 8px; display: inline-block; }
        .input-buttons { display: flex; gap: 8px; padding: 8px; background: #1e293b; }
        .input-buttons textarea { flex: 1; padding: 10px; border-radius: 20px; background: #0f172a; color: white; border: none; }
        button { background: #334155; border: none; padding: 10px; border-radius: 50%; cursor: pointer; color: white; }
        .action-buttons { display: flex; gap: 8px; justify-content: center; padding: 8px; background: #1e293b; }
        .modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.9); display: flex; align-items: center; justify-content: center; z-index: 1000; }
        .modal-card { background: #1e293b; border-radius: 20px; width: 90%; max-width: 400px; padding: 20px; }
        .sidebar { position: fixed; top: 0; left: 0; width: 280px; height: 100%; background: #1e293b; z-index: 1002; transform: translateX(-100%); transition: transform 0.3s ease; border-right: 2px solid #d4af37; }
        .sidebar.open { transform: translateX(0); }
        .sidebar-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.7); z-index: 1001; display: none; }
        .sidebar-overlay.open { display: block; }

/* ============================================ */
/* LOGIN MODAL - CORRIGIDO E BONITO */
/* ============================================ */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.login-card {
    background: #1e293b;
    padding: 40px 35px;
    border-radius: 24px;
    text-align: center;
    border: 2px solid #d4af37;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    animation: fadeInUp 0.5s ease;
}

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

.login-card .logo {
    font-size: 4rem;
    margin-bottom: 5px;
}

.login-card h1 {
    color: #d4af37;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.login-card .subtitle {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 25px;
    border-bottom: 1px solid #334155;
    padding-bottom: 15px;
}

.login-card .input-group {
    margin-bottom: 12px;
    text-align: left;
}

.login-card .input-group label {
    display: block;
    color: #94a3b8;
    font-size: 0.8rem;
    margin-bottom: 4px;
    font-weight: 600;
}

.login-card input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 2px solid #334155;
    background: #0f172a;
    color: white;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.3s;
}

.login-card input:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.login-card input::placeholder {
    color: #64748b;
}

.login-card .btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #d4af37, #b8860b);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    margin-top: 15px;
    color: #0f172a;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-card .btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}

.login-card .btn-login:active {
    transform: scale(0.98);
}

.login-card .footer-text {
    color: #64748b;
    font-size: 0.7rem;
    margin-top: 15px;
}

/* ============================================ */
/* SIDEBAR MENU HAMBURGER - CORRIGIDO E BONITO */
/* ============================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: #1e293b;
    z-index: 10002;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 2px solid #d4af37;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    padding: 30px 20px 20px;
    text-align: center;
    border-bottom: 1px solid #334155;
    background: linear-gradient(180deg, #0f172a, transparent);
}

.sidebar-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4af37, #b8860b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    border: 2px solid #d4af37;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.2);
}

.sidebar-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #d4af37;
}

.sidebar-phone {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 4px;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

.sidebar-menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 20px;
    border-bottom: 1px solid #1e293b;
    cursor: pointer;
    transition: all 0.2s;
    color: #e2e8f0;
}

.sidebar-menu-item:hover {
    background: #334155;
    border-left: 3px solid #d4af37;
    padding-left: 17px;
}

.sidebar-menu-item:active {
    transform: scale(0.98);
}

.sidebar-icon {
    font-size: 1.2rem;
    min-width: 30px;
}

.sidebar-text {
    font-size: 0.95rem;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid #334155;
    text-align: center;
}

.sidebar-footer .version {
    font-size: 0.65rem;
    color: #64748b;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    display: none;
    backdrop-filter: blur(4px);
}

.sidebar-overlay.open {
    display: block;
}

/* Botão Hamburger */
.menu-btn {
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: white;
    padding: 5px 10px;
    transition: all 0.2s;
    border-radius: 8px;
}

.menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #d4af37;
}

/* ============================================ */
/* HEADER - CORRIGIDO */
/* ============================================ */
.header {
    background: linear-gradient(135deg, #1e3a8a, #1e293b);
    border-bottom: 2px solid #d4af37;
    flex-shrink: 0;
    padding: 8px 12px;
}

#chat-contact-status.typing {
    color: #fbbf24 !important;
    font-weight: bold;
    animation: pulse 1s infinite;
}

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

/* ============================================ */
/* ESTILOS PARA TRADUÇÃO DE MENSAGENS           */
/* ============================================ */

/* Texto da mensagem */
.message-text {
    word-break: break-word;
    line-height: 1.4;
}

/* Tradução abaixo da mensagem */
.message-translation {
    font-size: 0.65rem;
    color: #94a3b8;
    margin-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 4px;
    opacity: 0.8;
    font-style: italic;
}

/* Idioma da tradução */
.message-translation-lang {
    font-size: 0.55rem;
    color: #64748b;
    margin-left: 4px;
}

/* Mensagens enviadas (verde) */
.message.sent .message-translation {
    border-top-color: rgba(255, 255, 255, 0.2);
    color: #d1fae5;
}

/* Mensagens recebidas (cinza) */
.message.received .message-translation {
    border-top-color: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}

/* Animações para modais */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ============================================
   RESPONSIVIDADE MOBILE
   ============================================ */

/* ESCONDER BOTÃO SAIR EM DISPOSITIVOS MÓVEIS */
@media (max-width: 768px) {
    .hide-on-mobile {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .hide-on-mobile {
        display: none !important;
    }
}


/* ============================================
   ANIMAÇÕES PARA O MODAL DE AVATAR EXPANDIDO
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ============================================
   TELA DE LOGIN - ESTILO BRICS
   ============================================ */

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 20px;
}

.login-box {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.login-box h1 {
    color: #fff;
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 5px;
    font-weight: 700;
}

.login-box .subtitle {
    color: #8892b0;
    text-align: center;
    font-size: 0.9em;
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.login-box .form-group {
    margin-bottom: 20px;
}

.login-box .form-group label {
    display: block;
    color: #ccd6f6;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.login-box .form-group input,
.login-box .form-group select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 1em;
    transition: all 0.3s ease;
}

.login-box .form-group input:focus,
.login-box .form-group select:focus {
    outline: none;
    border-color: #64ffda;
    box-shadow: 0 0 0 3px rgba(100, 255, 218, 0.1);
}

.login-box .form-group input::placeholder {
    color: #495670;
}

.login-box .btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #64ffda, #00b4d8);
    border: none;
    border-radius: 10px;
    color: #1a1a2e;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-box .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(100, 255, 218, 0.2);
}

/* ============================================
   BUSCA DE PAÍSES
   ============================================ */

.country-search {
    position: relative;
}

.country-search input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 1em;
    transition: all 0.3s ease;
    cursor: pointer;
}

.country-search input:focus {
    outline: none;
    border-color: #64ffda;
    box-shadow: 0 0 0 3px rgba(100, 255, 218, 0.1);
}

.country-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-top: 5px;
    z-index: 1000;
    display: none;
    scrollbar-width: thin;
    scrollbar-color: #64ffda transparent;
}

.country-dropdown::-webkit-scrollbar {
    width: 6px;
}

.country-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.country-dropdown::-webkit-scrollbar-thumb {
    background: #64ffda;
    border-radius: 10px;
}

.country-item {
    padding: 10px 16px;
    color: #ccd6f6;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.country-item:hover {
    background: rgba(100, 255, 218, 0.1);
}

.country-item .code {
    color: #64ffda;
    font-size: 0.8em;
}

.country-item.brics {
    background: rgba(255, 215, 0, 0.1);
    border-left: 3px solid #ffd700;
}

.country-item.brics:hover {
    background: rgba(255, 215, 0, 0.2);
}

.country-group-title {
    padding: 8px 16px;
    color: #64ffda;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(100, 255, 218, 0.05);
}

.country-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin: 5px 16px;
}

.country-empty {
    padding: 20px;
    text-align: center;
    color: #495670;
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */

@media (max-width: 480px) {
    .login-box {
        padding: 30px 20px;
    }
    
    .login-box h1 {
        font-size: 2em;
    }
}


/* ============================================
   AJUSTE DE INPUT
   ============================================ */

#messageInput {
    resize: none;
    overflow-y: auto;
    min-height: 36px;
    max-height: 120px;
    line-height: 1.5;
    padding: 8px 12px;
    transition: height 0.1s ease;
}

/* ============================================
   TEMA CLARO - APLICA EM TODA A INTERFACE
   ============================================ */

/* 🔥 FUNDO GERAL */
body.light-theme {
    background: #f1f5f9;
    color: #1e293b;
}

/* 🔥 HEADER */
body.light-theme .header {
    background: #ffffff !important;
    border-bottom-color: #d4af37 !important;
}

body.light-theme .header .logo {
    color: #1e293b !important;
}

body.light-theme .header .menu-btn {
    color: #1e293b !important;
}

body.light-theme .header button {
    color: #1e293b !important;
}

/* 🔥 SIDEBAR */
body.light-theme #sidebar {
    background: #ffffff !important;
    border-right-color: #d4af37 !important;
}

body.light-theme .sidebar-header {
    background: #f8fafc !important;
}

body.light-theme .sidebar-name {
    color: #1e293b !important;
}

body.light-theme .sidebar-phone {
    color: #64748b !important;
}

body.light-theme .sidebar-menu-item {
    color: #334155 !important;
}

body.light-theme .sidebar-menu-item:hover {
    background: #f1f5f9 !important;
}

body.light-theme .sidebar-footer {
    border-top-color: #e2e8f0 !important;
}

body.light-theme .version {
    color: #94a3b8 !important;
}

/* 🔥 CHAT AREA */
body.light-theme .chat-area {
    background: #f8fafc !important;
}

body.light-theme .chat-header {
    background: #ffffff !important;
    border-bottom-color: #e2e8f0 !important;
}

body.light-theme .chat-header #chat-contact-name {
    color: #1e293b !important;
}

body.light-theme .chat-header button {
    color: #1e293b !important;
}

/* 🔥 MENSAGENS */
body.light-theme #messages-area {
    background: #f8fafc !important;
}

body.light-theme .message.sent {
    background: #d4af37 !important;
    color: #0f172a !important;
}

body.light-theme .message.received {
    background: #e2e8f0 !important;
    color: #1e293b !important;
}

body.light-theme .message-time {
    color: #64748b !important;
}

/* 🔥 INPUT DO CHAT */
body.light-theme #chatInput {
    background: #ffffff !important;
    border-top-color: #e2e8f0 !important;
}

body.light-theme #chatInput .chat-input-wrapper {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
}

body.light-theme #messageInput {
    color: #1e293b !important;
}

body.light-theme #messageInput::placeholder {
    color: #94a3b8 !important;
}

/* 🔥 BOTÕES DO HEADER */
body.light-theme .header #audioBtn,
body.light-theme .header #videoBtn {
    background: #e2e8f0 !important;
    color: #1e293b !important;
}

body.light-theme .header #audioBtn:hover,
body.light-theme .header #videoBtn:hover {
    background: #cbd5e1 !important;
}

/* 🔥 BOTÃO DE TEMA NO SIDEBAR */
body.light-theme #themeBtnSidebar {
    border-color: #cbd5e1 !important;
    background: #f1f5f9 !important;
    color: #1e293b !important;
}

body.light-theme #themeBtnSidebar:hover {
    background: #e2e8f0 !important;
}

/* 🔥 MODAIS */
body.light-theme .modal-content {
    background: #ffffff !important;
    color: #1e293b !important;
}

body.light-theme .modal-header {
    border-bottom-color: #e2e8f0 !important;
}

body.light-theme .modal-footer {
    border-top-color: #e2e8f0 !important;
}

/* 🔥 TOAST */
body.light-theme .toast {
    background: #ffffff !important;
    color: #1e293b !important;
    border: 1px solid #e2e8f0 !important;
}

/* 🔥 SCROLLBAR */
body.light-theme #messages-area::-webkit-scrollbar-track {
    background: #f1f5f9 !important;
}

body.light-theme #messages-area::-webkit-scrollbar-thumb {
    background: #cbd5e1 !important;
}

body.light-theme #messages-area::-webkit-scrollbar-thumb:hover {
    background: #94a3b8 !important;
}

/* 🔥 INDICADOR DE GRAVAÇÃO */
body.light-theme #recordingIndicator {
    background: rgba(239, 68, 68, 0.95) !important;
    color: white !important;
}

/* 🔥 SIDEBAR OVERLAY */
body.light-theme .sidebar-overlay {
    background: rgba(0, 0, 0, 0.5) !important;
}


/* 🔥 ANIMAÇÃO AO VIVO */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}

/* 🔥 SCROLLBAR DAS NOTÍCIAS */
#messages-area::-webkit-scrollbar {
    width: 4px;
}

#messages-area::-webkit-scrollbar-track {
    background: #1a1a2e;
}

#messages-area::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 10px;
}

/* 🔥 RESPONSIVIDADE DO PLAYER */
@media (max-width: 480px) {
    .tv-player {
        height: 250px;
    }
}
