/* ========================================
   FORO RETRO - ESTILO WINDOWS VISTA/XP LUNA
   ======================================== */

/* ==================== Variables Retro ==================== */
:root {
  /* Colores Retro */
  --retro-blue: #2196F3;
  --retro-blue-light: #64B5F6;
  --retro-blue-dark: #1976D2;
  --retro-green: #4CAF50;
  --retro-orange: #FF9800;
  --retro-purple: #9C27B0;
  --retro-text: #2C3E50;
  
  /* Efectos */
  --retro-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  --retro-radius: 12px;
  --retro-transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* -------------------------
   Contenedor principal
   ------------------------- */
.foro-container {
    max-width: 900px;
    margin: 20px auto;
    padding: 0 15px;
    min-height: calc(100vh - 200px);
    position: relative;
    z-index: 2;
}

/* -------------------------
   Header del foro
   ------------------------- */
.foro-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    position: relative;
    z-index: 2;
}

.foro-title {
    font-size: 2.5rem;
    color: #FFFFFF;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 
        0 2px 0 rgba(0, 0, 0, 0.3),
        0 0 20px rgba(255, 255, 255, 0.5);
    
    background: linear-gradient(180deg, #FFFFFF 0%, #E0E0FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.foro-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ========================================
   ESTADÍSTICAS DEL FORO TIPO PANEL VISTA
   ======================================== */
.foro-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px 0 30px;
    padding: 20px;
    
    /* Panel tipo Vista */
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(245, 248, 255, 0.9) 50%,
        rgba(235, 242, 255, 0.95) 100%);
    
    border-radius: var(--retro-radius);
    border: 1px solid rgba(200, 220, 255, 0.8);
    
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    
    position: relative;
    overflow: hidden;
}

/* Brillo superior */
.foro-stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.5) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%);
    border-radius: var(--retro-radius) var(--retro-radius) 0 0;
    pointer-events: none;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    position: relative;
    z-index: 1;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--retro-blue-dark);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.stat-label {
    font-size: 0.85rem;
    color: #5D4037;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* ========================================
   BARRA DE BÚSQUEDA TIPO VISTA
   ======================================== */
.search-container {
    margin-bottom: 20px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    
    /* Input tipo Vista */
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(248, 250, 255, 0.9) 100%);
    
    border: 1px solid rgba(150, 180, 220, 0.6);
    border-radius: 20px;
    color: var(--retro-text);
    font-size: 1rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
    
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.1),
        0 1px 0 rgba(255, 255, 255, 0.8);
    
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.search-input:focus {
    outline: none;
    border-color: var(--retro-blue);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.1),
        0 0 0 3px rgba(33, 150, 243, 0.2);
}

.search-input::placeholder {
    color: rgba(44, 62, 80, 0.5);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--retro-blue);
    pointer-events: none;
}

/* ========================================
   MENSAJE ITEM TIPO VENTANA VISTA
   ======================================== */
.mensaje-item {
    display: flex;
    gap: 12px;
    
    /* Card tipo Vista */
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(245, 248, 255, 0.9) 50%,
        rgba(235, 242, 255, 0.95) 100%);
    
    padding: 15px;
    margin: 10px 0;
    border-radius: var(--retro-radius);
    border-left: 4px solid var(--retro-blue);
    border: 1px solid rgba(200, 220, 255, 0.8);
    border-left: 4px solid var(--retro-blue);
    
    transition: var(--retro-transition);
    position: relative;
    overflow: hidden;
    
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Brillo superior */
.mensaje-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.5) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%);
    border-radius: var(--retro-radius) var(--retro-radius) 0 0;
    pointer-events: none;
    z-index: 0;
}

.mensaje-item:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 0 20px rgba(33, 150, 243, 0.3);
}

/* Avatar */
.mensaje-avatar {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    
    /* Botón circular tipo Vista */
    background: linear-gradient(180deg,
        rgba(100, 181, 246, 0.95) 0%,
        rgba(33, 150, 243, 0.95) 100%);
    
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Contenido del mensaje */
.mensaje-content {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.mensaje-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 10px;
    flex-wrap: wrap;
}

.mensaje-nombre {
    color: var(--retro-blue-dark);
    font-weight: 700;
    font-size: 1em;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.badge-editado {
    font-size: 0.7em;
    color: #5D4037;
    background: linear-gradient(180deg, #FFD54F 0%, #FFC107 100%);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    border: 1px solid rgba(255, 193, 7, 0.6);
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.mensaje-fecha {
    color: #7F8C8D;
    font-size: 0.8em;
    white-space: nowrap;
    margin-left: auto;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.mensaje-texto {
    color: var(--retro-text);
    line-height: 1.6;
    word-wrap: break-word;
    margin-bottom: 10px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* ========================================
   MENCIONES Y HASHTAGS
   ======================================== */
.mencion {
    color: var(--retro-blue-dark);
    font-weight: 700;
    background: linear-gradient(180deg,
        rgba(100, 181, 246, 0.3) 0%,
        rgba(33, 150, 243, 0.2) 100%);
    padding: 2px 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.mencion:hover {
    background: linear-gradient(180deg,
        rgba(100, 181, 246, 0.5) 0%,
        rgba(33, 150, 243, 0.3) 100%);
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.3);
}

.hashtag {
    color: var(--retro-purple);
    font-weight: 700;
    background: linear-gradient(180deg,
        rgba(156, 39, 176, 0.3) 0%,
        rgba(156, 39, 176, 0.2) 100%);
    padding: 2px 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
    border: 1px solid rgba(156, 39, 176, 0.3);
}

.hashtag:hover {
    background: linear-gradient(180deg,
        rgba(156, 39, 176, 0.5) 0%,
        rgba(156, 39, 176, 0.3) 100%);
    box-shadow: 0 2px 6px rgba(156, 39, 176, 0.3);
}

.mensaje-link {
    color: var(--retro-blue);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.mensaje-link:hover {
    color: var(--retro-blue-dark);
}

/* ========================================
   SISTEMA DE REACCIONES TIPO BOTONES VISTA
   ======================================== */
.mensaje-acciones {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.reacciones-container {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
}

.reaccion-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    
    /* Badge tipo gel */
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(240, 245, 255, 0.85) 50%,
        rgba(230, 238, 255, 0.9) 100%);
    
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    border: 1px solid rgba(200, 220, 255, 0.6);
    transition: var(--retro-transition);
    cursor: pointer;
    
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.reaccion-badge:hover {
    background: linear-gradient(180deg,
        rgba(100, 181, 246, 0.9) 0%,
        rgba(64, 169, 255, 0.85) 50%,
        rgba(33, 150, 243, 0.9) 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 
        0 3px 8px rgba(33, 150, 243, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.btn-reaccion,
.btn-responder {
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(240, 245, 255, 0.85) 50%,
        rgba(230, 238, 255, 0.9) 100%);
    
    border: 1px solid rgba(200, 220, 255, 0.6);
    color: var(--retro-text);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--retro-transition);
    white-space: nowrap;
    font-weight: 600;
    
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn-reaccion:hover,
.btn-responder:hover {
    background: linear-gradient(180deg,
        rgba(150, 200, 255, 0.9) 0%,
        rgba(120, 180, 245, 0.85) 50%,
        rgba(100, 170, 240, 0.9) 100%);
    color: white;
    transform: translateY(-2px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 
        0 4px 8px rgba(33, 150, 243, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.reacciones-menu {
    position: absolute;
    display: flex;
    gap: 8px;
    
    /* Panel tipo Vista */
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.98) 0%,
        rgba(245, 248, 255, 0.95) 100%);
    
    padding: 10px;
    border-radius: 25px;
    border: 1px solid rgba(200, 220, 255, 0.8);
    
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    
    z-index: 100;
    margin-top: -50px;
    animation: popIn 0.2s ease;
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.8) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.reacciones-menu button {
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(240, 245, 255, 0.85) 100%);
    border: 1px solid rgba(200, 220, 255, 0.6);
    font-size: 1.5rem;
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
    transition: var(--retro-transition);
    
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.reacciones-menu button:hover {
    background: linear-gradient(180deg,
        rgba(100, 181, 246, 0.9) 0%,
        rgba(64, 169, 255, 0.85) 100%);
    transform: scale(1.2);
    box-shadow: 
        0 4px 12px rgba(33, 150, 243, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* ========================================
   FORMULARIO TIPO PANEL VISTA
   ======================================== */
.formulario-integrado {
    /* Panel tipo Vista */
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(245, 248, 255, 0.9) 50%,
        rgba(235, 242, 255, 0.95) 100%);
    
    border-radius: var(--retro-radius);
    border: 1px solid rgba(200, 220, 255, 0.8);
    padding: 25px;
    margin: 25px 0;
    
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    
    position: relative;
    overflow: hidden;
}

/* Brillo superior */
.formulario-integrado::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.5) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%);
    border-radius: var(--retro-radius) var(--retro-radius) 0 0;
    pointer-events: none;
}

.form-header {
    color: var(--retro-blue-dark);
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.form-header::before {
    content: '💬';
    font-size: 1.3em;
}

.form-container {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.input-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.input-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Inputs tipo Vista */
.foro-input,
.foro-textarea {
    width: 100%;
    padding: 15px;
    
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.98) 0%,
        rgba(248, 250, 255, 0.95) 100%);
    
    border: 1px solid rgba(150, 180, 220, 0.6);
    border-radius: 12px;
    color: var(--retro-text);
    font-size: 1rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
    
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.1),
        0 1px 0 rgba(255, 255, 255, 0.8);
    
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.foro-textarea {
    resize: vertical;
    min-height: 85px;
    line-height: 1.4;
}

.foro-input:focus,
.foro-textarea:focus {
    outline: none;
    border-color: var(--retro-blue);
    background: rgba(255, 255, 255, 1);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.1),
        0 0 0 3px rgba(33, 150, 243, 0.2);
    transform: translateY(-2px);
}

/* Botón principal tipo gel dorado */
.btn-foro {
    background: linear-gradient(180deg, #FFD54F 0%, #FFC107 50%, #FFA000 100%);
    border: 1px solid rgba(255, 193, 7, 0.8);
    color: #5D4037;
    padding: 15px 32px;
    border-radius: 18px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    white-space: nowrap;
    height: fit-content;
    transition: var(--retro-transition);
    min-height: 52px;
    
    box-shadow: 
        0 3px 8px rgba(255, 152, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1);
    
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

/* Brillo superior en botón */
.btn-foro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.5) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%);
    border-radius: 18px 18px 0 0;
    pointer-events: none;
}

.btn-foro:hover {
    background: linear-gradient(180deg, #FFECB3 0%, #FFD54F 50%, #FFC107 100%);
    transform: translateY(-3px);
    box-shadow: 
        0 5px 15px rgba(255, 152, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 0 20px rgba(255, 193, 7, 0.4);
}

.btn-foro:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 
        inset 0 2px 6px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(0, 0, 0, 0.1);
}

/* Contador de caracteres */
.counter {
    position: absolute;
    bottom: -18px;
    right: 8px;
    font-size: 12px;
    color: #7F8C8D;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* ========================================
   NOTIFICACIONES TIPO VENTANA VISTA
   ======================================== */
.new-message-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    
    background: linear-gradient(180deg, #FFD54F 0%, #FFC107 100%);
    border: 1px solid rgba(255, 193, 7, 0.8);
    color: #5D4037;
    padding: 15px 20px;
    border-radius: var(--retro-radius);
    
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.new-message-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.new-message-notification button {
    background: linear-gradient(180deg,
        rgba(100, 181, 246, 0.95) 0%,
        rgba(33, 150, 243, 0.95) 100%);
    color: white;
    border: 1px solid rgba(33, 150, 243, 0.8);
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--retro-transition);
    
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.new-message-notification button:hover {
    background: linear-gradient(180deg,
        rgba(64, 169, 255, 0.95) 0%,
        rgba(25, 118, 210, 0.95) 100%);
    transform: scale(1.05);
}

/* ========================================
   SISTEMA DE ALERTAS
   ======================================== */
.alerta {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    padding: 15px 25px;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.alerta.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.alerta-success {
    background: linear-gradient(180deg, #81C784 0%, #66BB6A 100%);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.alerta-error {
    background: linear-gradient(180deg, #E57373 0%, #F44336 100%);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.alerta-warning {
    background: linear-gradient(180deg, #FFD54F 0%, #FFC107 100%);
    color: #5D4037;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.alerta-info {
    background: linear-gradient(180deg, #64B5F6 0%, #2196F3 100%);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ========================================
   ESTADOS (loading / empty)
   ======================================== */
.loading, .empty-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.empty-state::before {
    content: '💬';
    font-size: 3em;
    display: block;
    margin-bottom: 15px;
    opacity: 0.7;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ========================================
   SCROLLBAR ESTILO WINDOWS 7
   ======================================== */
@media (min-width: 1024px) and (hover: hover) {
  .mensajes-container::-webkit-scrollbar {
    width: 16px;
  }

  .mensajes-container::-webkit-scrollbar-track {
    background: linear-gradient(90deg, 
      rgba(230, 235, 245, 0.9) 0%, 
      rgba(240, 245, 255, 0.9) 100%);
    border: 1px solid rgba(200, 210, 230, 0.8);
    border-radius: 2px;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
  }

  .mensajes-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg,
      rgba(180, 200, 230, 0.95) 0%,
      rgba(150, 180, 220, 0.9) 50%,
      rgba(180, 200, 230, 0.95) 100%);
    border-radius: 8px;
    border: 1px solid rgba(130, 160, 200, 0.8);
    box-shadow: 
      0 2px 6px rgba(0, 0, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.5);
  }

  .mensajes-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg,
      rgba(100, 181, 246, 0.95) 0%,
      rgba(64, 169, 255, 0.9) 50%,
      rgba(100, 181, 246, 0.95) 100%);
    box-shadow: 
      0 2px 8px rgba(33, 150, 243, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.6),
      0 0 12px rgba(33, 150, 243, 0.4);
  }
}

/* ========================================
   CONTROLES DE MÚSICA TIPO MEDIA PLAYER
   ======================================== */
.music-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    
    /* Panel tipo Vista */
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(245, 248, 255, 0.9) 100%);
    
    border-radius: 30px;
    padding: 8px 15px;
    border: 1px solid rgba(200, 220, 255, 0.8);
    
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    
    transition: all 0.3s ease;
}

.music-controls:hover {
    box-shadow: 
        0 6px 24px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.music-toggle {
    background: linear-gradient(180deg,
        rgba(100, 181, 246, 0.9) 0%,
        rgba(33, 150, 243, 0.9) 100%);
    border: 1px solid rgba(33, 150, 243, 0.8);
    color: white;
    cursor: pointer;
    font-size: 18px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--retro-transition);
    
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.music-toggle:hover {
    background: linear-gradient(180deg,
        rgba(64, 169, 255, 0.9) 0%,
        rgba(25, 118, 210, 0.9) 100%);
    transform: scale(1.1);
}

.volume-control {
    width: 80px;
    height: 6px;
    background: rgba(200, 220, 255, 0.5);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    border: 1px solid rgba(150, 180, 220, 0.6);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.volume-slider {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg,
        rgba(100, 181, 246, 0.9) 0%,
        rgba(33, 150, 243, 0.9) 100%);
    border-radius: 3px;
    width: 70%;
    transition: width 0.1s ease;
}

.volume-handle {
    position: absolute;
    top: 50%;
    right: 0;
    width: 14px;
    height: 14px;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(100, 181, 246, 0.9) 100%);
    border: 1px solid rgba(33, 150, 243, 0.8);
    border-radius: 50%;
    transform: translate(50%, -50%);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    cursor: grab;
}

.volume-handle:active {
    cursor: grabbing;
}

.music-info {
    font-size: 12px;
    color: var(--retro-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* ========================================
   AVATAR PERSONALIZADO
   ======================================== */
.avatar-nombre-container {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.avatar-editable {
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}

.avatar-editable:hover .avatar-cambiar {
    opacity: 1;
}

.avatar-iniciales,
.avatar-imagen,
.avatar-emoji {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    
    background: linear-gradient(180deg,
        rgba(100, 181, 246, 0.95) 0%,
        rgba(33, 150, 243, 0.95) 100%);
    
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.avatar-imagen {
    object-fit: cover;
}

.avatar-cambiar {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: linear-gradient(180deg, #FFD54F 0%, #FFC107 100%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    border: 1px solid rgba(255, 193, 7, 0.8);
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.nombre-input {
    flex: 1;
}

/* Modal de Avatar tipo Ventana Vista */
.modal-avatar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.98) 0%,
        rgba(245, 248, 255, 0.95) 100%);
    border: 2px solid rgba(200, 220, 255, 0.8);
    border-radius: var(--retro-radius);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(200, 220, 255, 0.5);
}

.modal-header h3 {
    color: var(--retro-blue-dark);
    font-size: 1.3rem;
    margin: 0;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.modal-close {
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(240, 245, 255, 0.85) 100%);
    border: 1px solid rgba(200, 220, 255, 0.6);
    color: var(--retro-text);
    font-size: 1.5rem;
    cursor: pointer;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    transition: var(--retro-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.modal-close:hover {
    background: linear-gradient(180deg,
        rgba(244, 67, 54, 0.9) 0%,
        rgba(211, 47, 47, 0.85) 100%);
    color: white;
    transform: scale(1.1);
}

.modal-body {
    padding: 20px;
}

.avatar-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.avatar-option {
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(240, 245, 255, 0.85) 100%);
    border: 2px solid rgba(200, 220, 255, 0.6);
    border-radius: var(--retro-radius);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--retro-transition);
    
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.avatar-option:hover {
    background: linear-gradient(180deg,
        rgba(100, 181, 246, 0.9) 0%,
        rgba(64, 169, 255, 0.85) 100%);
    border-color: var(--retro-blue);
    transform: translateY(-3px);
    box-shadow: 
        0 4px 12px rgba(33, 150, 243, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.avatar-option:hover span {
    color: white;
}

.avatar-option-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.avatar-option span {
    color: var(--retro-text);
    font-size: 0.9rem;
    font-weight: 600;
}

.avatar-seccion {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    border: 1px solid rgba(200, 220, 255, 0.5);
}

.btn-subir-foto,
.btn-confirmar {
    background: linear-gradient(180deg, #FFD54F 0%, #FFC107 100%);
    color: #5D4037;
    border: 1px solid rgba(255, 193, 7, 0.8);
    padding: 12px 25px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    width: 100%;
    margin-bottom: 10px;
    transition: var(--retro-transition);
    
    box-shadow: 
        0 3px 8px rgba(255, 152, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn-subir-foto:hover,
.btn-confirmar:hover {
    background: linear-gradient(180deg, #FFECB3 0%, #FFD54F 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 5px 15px rgba(255, 152, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.info-avatar {
    text-align: center;
    font-size: 0.85rem;
    color: #7F8C8D;
    margin-bottom: 15px;
}

.preview-area {
    text-align: center;
    margin-top: 15px;
}

.image-preview {
    max-width: 200px;
    max-height: 200px;
    border-radius: 10px;
    margin-bottom: 15px;
    border: 2px solid rgba(200, 220, 255, 0.8);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.emojis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
}

.emojis-grid span {
    font-size: 2rem;
    cursor: pointer;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.3);
}

.emojis-grid span:hover {
    background: linear-gradient(180deg,
        rgba(100, 181, 246, 0.8) 0%,
        rgba(64, 169, 255, 0.7) 100%);
    transform: scale(1.2);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

/* Indicador de respuesta */
#indicador-respuesta {
    background: linear-gradient(180deg, #FFD54F 0%, #FFC107 100%);
    border: 1px solid rgba(255, 193, 7, 0.8);
    color: #5D4037;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    animation: slideDown 0.3s ease;
    
    box-shadow: 
        0 3px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.indicador-respuesta-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.respuesta-info {
    flex: 1;
}

.respuesta-titulo {
    font-weight: 700;
    margin-bottom: 5px;
    font-size: 14px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.respuesta-mensaje {
    font-style: italic;
    opacity: 0.9;
    font-size: 13px;
    line-height: 1.3;
    background: rgba(0, 0, 0, 0.1);
    padding: 8px;
    border-radius: 5px;
    border-left: 3px solid rgba(0, 0, 0, 0.3);
}

.btn-cancelar-respuesta {
    background: rgba(0, 0, 0, 0.2);
    border: none;
    color: #5D4037;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-cancelar-respuesta:hover {
    background: rgba(0, 0, 0, 0.3);
    transform: scale(1.05);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mensaje-item.seleccionado {
    border-left: 4px solid var(--retro-blue);
    background: linear-gradient(180deg,
        rgba(100, 181, 246, 0.15) 0%,
        rgba(33, 150, 243, 0.1) 100%);
    margin-left: -4px;
}

/* ========================================
   RESPONSIVE MÓVIL
   ======================================== */

@media (max-width: 768px) {
    input,
    textarea,
    select {
        font-size: 16px !important;
    }

    .foro-container {
        margin: 10px auto;
        padding: 0 8px;
        min-height: auto;
    }

    .foro-title {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }

    .foro-subtitle {
        font-size: 0.95rem;
    }

    .foro-stats {
        gap: 20px;
        padding: 12px;
        margin: 15px 0 20px;
        flex-wrap: wrap;
        justify-content: space-around;
    }

    .stat-number {
        font-size: 1.3rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .search-input {
        padding: 10px 35px 10px 12px;
        font-size: 16px;
        border-radius: 20px;
    }

    .mensaje-item {
        gap: 8px;
        padding: 10px;
        margin: 8px 0;
    }

    .avatar {
        width: 40px;
        height: 40px;
        font-size: 0.8rem;
    }

    .mensaje-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .mensaje-nombre {
        font-size: 0.95em;
    }

    .mensaje-fecha {
        font-size: 0.7em;
    }

    .mensaje-texto {
        font-size: 0.95rem;
    }

    .mensaje-acciones {
        gap: 6px;
    }

    .reaccion-badge {
        font-size: 0.8rem;
        padding: 3px 8px;
    }

    .btn-reaccion,
    .btn-responder {
        font-size: 0.75rem;
        padding: 4px 8px;
    }

    .formulario-integrado {
        padding: 12px;
        margin: 15px 0;
    }

    .form-header {
        font-size: 1rem;
        margin-bottom: 12px;
    }

    .form-container {
        flex-direction: column;
        gap: 10px;
    }

    .input-column {
        gap: 10px;
        width: 100%;
    }

    .foro-input,
    .foro-textarea {
        width: 100%;
        padding: 12px;
        font-size: 16px;
    }

    .foro-textarea {
        min-height: 80px;
    }

    .btn-foro {
        width: 100%;
        padding: 14px 16px;
        font-size: 0.95rem;
        min-height: 48px;
    }

    .avatar-iniciales,
    .avatar-imagen,
    .avatar-emoji {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }

    #indicador-respuesta {
        padding: 12px;
    }

    .indicador-respuesta-content {
        flex-direction: column;
        gap: 8px;
    }

    .modal-content {
        width: 95%;
        border-radius: 15px;
    }

    .avatar-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .music-controls {
        bottom: 10px;
        right: 10px;
        padding: 6px 10px;
    }

    .music-toggle {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .volume-control {
        width: 45px;
    }
}

/* ========================================
   FIN DEL ARCHIVO
   ======================================== */