/* 
   R4 FLOW APP - RED DESIGN
   Optimizado, funcional y atractivo
*/

:root {
    --primary: #ff0000; /* Rojo puro solicitado */
    --primary-dark: #cc0000;
    --bg-dark: #0a0a0a;
    --bg-card: #1a1a1a;
    --text-main: #ffffff;
    --text-muted: #cccccc;
    --shadow: rgba(0, 0, 0, 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- HEADER --- */
.main-header {
    background: var(--bg-card);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    height: 40px;
    width: auto;
}

.site-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-main);
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

/* Menú Desplegable */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: var(--bg-card);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 5px;
    overflow: hidden;
}

.dropdown-content a {
    color: var(--text-main);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: var(--primary);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Banderas de Idiomas */
.lang-selector {
    display: flex;
    gap: 10px;
}

.lang-flag {
    width: 25px;
    height: auto;
    cursor: pointer;
    border-radius: 2px;
}

.lang-flag:hover {
    transform: scale(1.2);
}

/* --- AUTH CONTAINERS --- */
.auth-container {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    margin: 60px auto;
    text-align: center;
    box-shadow: 0 10px 30px var(--shadow);
    border: 1px solid #333;
}

.auth-container h2 {
    margin-bottom: 25px;
    color: var(--primary);
}

.auth-container input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #333;
    background: #222;
    color: white;
    border-radius: 5px;
}

.auth-container input:focus {
    border-color: var(--primary);
    outline: none;
}

.auth-container button, button, .btn {
    width: 100%;
    padding: 12px;
    margin-top: 20px;
    border: none;
    border-radius: 5px;
    background: var(--primary);
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.auth-container button:hover, button:hover {
    background: var(--primary-dark);
}

.auth-container a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
}

.auth-container a:hover {
    text-decoration: underline;
}

/* --- FOOTER --- */
.main-footer {
    background: var(--bg-card);
    padding: 20px;
    text-align: center;
    margin-top: auto;
    border-top: 1px solid #333;
}

.footer-content p {
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-icons a img {
    width: 24px;
    height: 24px;
    filter: invert(1); /* Para que los iconos negros se vean blancos en fondo oscuro */
}

.social-icons a:hover img {
    transform: scale(1.2);
    filter: invert(15%) sepia(95%) saturate(6932%) hue-rotate(358deg) brightness(95%) contrast(112%); /* Filtro rojo */
}

/* --- CHAT APP (INDEX) --- */
/* Mantener funcional pero adaptar colores */
.chat-app {
    display: flex;
    flex: 1;
    background: var(--bg-dark);
}

.sidebar {
    width: 300px;
    background: var(--bg-card);
    border-right: 1px solid #333;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.message.sent {
    background: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        gap: 15px;
    }
    .header-right {
        align-items: center;
    }
}


/* Responsive layout */
@media (max-width: 768px) {
    .chat-app {
        flex-direction: column;
        height: 100vh;
    }

    .sidebar {
        width: 100%;
        height: auto;
        max-height: 40vh;
        overflow-y: auto;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }

    .chat-main {
        flex: 1;
        width: 100%;
    }

    .chat-input {
        display: flex;
        gap: 5px;
    }

    .chat-input input {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .sidebar-header h3 {
        font-size: 16px;
    }

    .chat-header h3 {
        font-size: 16px;
    }

    button {
        font-size: 14px;
        padding: 8px;
    }
}

