/* Estilos para el Chat en Vivo - Jersey Venezuela Theme */

:root {
  /* 🔵 Azul Rey (Fondo y acentos principales) */
  --color-azul-rey: #083285;
  --color-azul-oscuro: #05225E;
  --color-azul-claro: #2361D9;
  --color-azul-palido: #EBF1FC;

  /* 🔴 Vinotinto (Texto principal y botones) */
  --color-vinotinto: #8C1932;
  --color-vinotinto-claro: #AB2442;
  --color-vinotinto-oscuro: #661022;
  --color-vinotinto-palido: #FCEBEE;

  /* 🟡 Dorado / Mostaza (Bordes, medallas y resaltados) */
  --color-dorado: #E38F27;
  --color-dorado-palido: #FDF5E9;

  /* ⚪ Neutros (Basados en el blanco de la camiseta) */
  --color-blanco: #FFFFFF;
  --color-fondo-app: #F5F6F8;
  --color-texto-oscuro: #0B1120;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--color-azul-rey) 0%, var(--color-azul-oscuro) 100%);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.chat-container {
    width: 100%;
    max-width: 600px;
    height: 90vh;
    max-height: 800px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.chat-header {
    background: linear-gradient(135deg, var(--color-azul-rey) 0%, var(--color-azul-oscuro) 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.chat-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.online-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.status-indicator {
    width: 10px;
    height: 10px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Mensajes */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #e9ecef;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #adb5bd;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #868e96;
}

.welcome-message {
    text-align: center;
    padding: 30px 20px;
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.6;
}

.welcome-message p {
    margin-bottom: 10px;
}

.chat-message {
    padding: 12px 16px;
    border-radius: 12px;
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    animation: slideIn 0.3s ease-out;
}

/* Estilo especial para mensajes del anfitrión */
.chat-message.anfitrion-message {
    background: linear-gradient(135deg, #fff5e6 0%, #ffe8cc 100%);
    border-left: 4px solid #ff9800;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.2);
}

.chat-message.anfitrion-message .message-username {
    color: #ff6b00;
    font-weight: 700;
}

.chat-message.anfitrion-message .message-content {
    color: #5d4037;
    font-weight: 500;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.message-username {
    font-weight: 600;
    color: var(--color-azul-rey);
    font-size: 0.9rem;
}

.message-time {
    font-size: 0.75rem;
    color: #adb5bd;
}

.message-content {
    color: #495057;
    font-size: 0.95rem;
    line-height: 1.5;
    word-wrap: break-word;
    white-space: pre-wrap;
}

/* Input */
.chat-input-container {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e9ecef;
}

.user-info {
    margin-bottom: 10px;
}

.user-info input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

.user-info input:focus {
    outline: none;
    border-color: var(--color-azul-rey);
}

.message-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

#message-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: none;
    transition: border-color 0.3s;
    max-height: 120px;
}

#message-input:focus {
    outline: none;
    border-color: var(--color-azul-rey);
}

#send-button {
    padding: 12px;
    background: linear-gradient(135deg, var(--color-vinotinto) 0%, var(--color-vinotinto-claro) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
}

#send-button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(140, 25, 50, 0.4);
}

#send-button:active {
    transform: scale(0.95);
}

#send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.char-counter {
    text-align: right;
    font-size: 0.75rem;
    color: #adb5bd;
    margin-top: 5px;
}

.char-counter.warning {
    color: #f59e0b;
}

.char-counter.danger {
    color: #ef4444;
}

/* Sistema de notificaciones */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: slideInRight 0.3s ease-out;
    z-index: 1000;
    max-width: 300px;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification.success {
    border-left: 4px solid #4ade80;
}

.notification.error {
    border-left: 4px solid #ef4444;
}

.notification-message {
    font-size: 0.9rem;
    color: #495057;
}

/* Mensajes del sistema */
.chat-message.system-message {
    background-color: #f1f3f5;
    border-left: 4px solid #6c757d;
    box-shadow: none;
}
.chat-message.system-message .message-username {
    color: #495057;
    font-weight: 700;
}
.chat-message.system-message .message-content {
    color: #6c757d;
    font-style: italic;
}

/* Mensajes de alerta */
.chat-message.alerta-message {
    background-color: #fff0f0;
    border-left: 4px solid #fa5252;
    box-shadow: none;
}
.chat-message.alerta-message .message-username {
    color: #c92a2a;
    font-weight: 700;
}
.chat-message.alerta-message .message-content {
    color: #c92a2a;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 0;
    }
    
    .chat-container {
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .chat-header h1 {
        font-size: 1.2rem;
    }
}


