/* --- VARIABLES Y RESETEO BASE --- */
:root { 
    --accent: #cccccc; 
    --bg: #0a0a0a; 
    --gap: 16px; 
    --out-margin: 16px; 
}

/* --- AJUSTE FINAL BOTONES Y EMOJIS --- */

/* La fila de botones: 3 columnas iguales */
.post-interactions {
    display: flex !important;
    gap: 10px !important;
    width: 100% !important;
    margin-top: 15px !important;
}

/* El contenedor del Like (ocupa 1/3 del ancho) */
.reactions-container {
    position: relative;
    flex: 1; /* Esto hace que sea igual de ancho que los otros */
    display: flex;
}

/* El botón de LIKE físico */
.reactions-container .interaction-btn {
    width: 100% !important; /* Estira el fondo negro al máximo */
    margin: 0 !important;
}

/* El menú de emojis: Centrado y arriba */
.reactions-menu {
    display: none;
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%); /* Centrado matemático */
    background: #000 !important;
    border: 1px solid var(--accent);
    border-radius: 30px;
    padding: 10px 15px;
    gap: 15px;
    z-index: 9999;
    box-shadow: 0 0 20px rgba(0,0,0,1);
    align-items: center;
}

/* Puente invisible para que el menú no se cierre al subir el ratón */
.reactions-menu::after {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 100%;
    height: 15px;
    background: transparent;
}

/* Mostrar al pasar el ratón */
.reactions-container:hover .reactions-menu {
    display: flex !important;
}

/* Emojis limpios: SIN redondeles, SIN fondo blanco */
.reactions-menu button {
    background: none !important;
    border: none !important;
    font-size: 30px !important;
    cursor: pointer;
    padding: 0 !important;
    margin: 0 !important;
    transition: transform 0.2s;
    box-shadow: none !important;
}
.reactions-menu button:hover { transform: scale(1.3); }

* { scrollbar-color: var(--accent) #050505; scrollbar-width: thin; box-sizing: border-box; }

html, body { margin: 0; padding: 0; width: 100%; height: 100%; }
body { 
    background-color: var(--bg); color: white; display: flex; flex-direction: column; 
    align-items: center; overflow-x: hidden; font-family: 'Segoe UI', Arial, sans-serif; position: relative; 
    transition: background-color 0.4s ease, color 0.4s ease;
}

body::before { 
    content: ""; position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background-image: url('udl-home.png'); background-size: 200px; background-repeat: repeat; 
    opacity: 0.1; pointer-events: none; z-index: -1; 
}

/* --- MODO DÍA (LIGHT MODE) --- */
body.light-mode { --bg: #f4f4f9; color: #111; }
body.light-mode::before { filter: invert(1); opacity: 0.05; }
body.light-mode .top-bar, body.light-mode .profile-dropdown-content, body.light-mode .info-card, body.light-mode .post-card, body.light-mode .post-creator { background: rgba(255, 255, 255, 0.95); border-color: #ccc; color: #111; box-shadow: 0 5px 20px rgba(0,0,0,0.1); }
body.light-mode .header-link, body.light-mode .gray-input-pro { background: #ffffff; border: 1px solid #ccc; color: #111; text-shadow: none; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
body.light-mode .header-logo-text, body.light-mode .profile-name, body.light-mode .post-author-name { color: #111; text-shadow: none; }
body.light-mode .btn-neon-gray { color: #111; border-color: var(--accent); text-shadow: none; box-shadow: none; }
body.light-mode .btn-neon-gray:hover { background: var(--accent); color: #fff; }
body.light-mode .post-textarea { background: #f0f0f0; color: #111; border-color: #ccc; }
body.light-mode .interaction-btn { color: #555; background: #f0f0f0; border-color: #ddd; }
body.light-mode .interaction-btn:hover { background: #ddd; }
body.light-mode .side-col-banner, body.light-mode .b-728, body.light-mode .b-250, body.light-mode .b-square { background: #fff; border-color: #ddd; }
body.light-mode .profile-cover-container { border-color: #ccc; }
body.light-mode .profile-avatar-wrapper { border-color: #fff; background: #fff; }

/* --- HEADER TIPO ISLA --- */
.top-bar { 
    position: relative; width: 100%; max-width: 1400px; height: 75px; 
    margin: 20px auto var(--gap) auto; display: flex; align-items: center; padding: 0px 20px 0px 0px; 
    border-radius: 22px; background: rgba(20, 20, 20, 0.6); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(204, 204, 204, 0.4); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); z-index: 3000; transition: 0.4s;
}
.header-content { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 100%; position: relative; }
.header-left { display: flex; align-items: center; height: 100%; z-index: 2; }
.udl-btn { height: 100%; width: 110px; border: 1px solid rgba(204, 204, 204, 0.6); padding: 2px; border-radius: 22px; background: rgba(10, 10, 10, 0.6); display: flex; align-items: center; justify-content: center; transition: 0.3s; }
.udl-btn:hover { background: rgba(204, 204, 204, 0.2); }
.udl-btn img { width: 100%; height: 100%; object-fit: contain; }
.header-logo-text { position: absolute; left: 50%; transform: translateX(-50%); z-index: 10; font-family: 'Orbitron', sans-serif; font-size: 1.8rem; font-weight: bold; color: var(--accent); text-shadow: 0 0 15px var(--accent); letter-spacing: 2px; text-decoration: none; transition: 0.4s; }
.header-right { display: flex; align-items: center; gap: 15px; height: 100%; z-index: 2; }

/* Menús Desplegables */
.profile-dropdown-wrapper { position: relative; height: 100%; display: flex; align-items: center; }
.profile-drop-btn { margin-left: 0; margin-right: 15px; }
.profile-dropdown-content { visibility: hidden; opacity: 0; transform: translateY(10px); position: absolute; right: 15px; top: 100%; background: rgba(10, 10, 10, 0.95); backdrop-filter: blur(10px); min-width: 180px; box-shadow: 0px 8px 20px 0px rgba(0,0,0,0.8); z-index: 4000; border: 1px solid var(--accent); border-radius: 12px; overflow: hidden; transition: 0.3s; }
.profile-dropdown-content::before { content: ""; position: absolute; top: -15px; left: 0; right: 0; height: 15px; background: transparent; }
.profile-dropdown-wrapper:hover .profile-dropdown-content { visibility: visible; opacity: 1; transform: translateY(0); }
.profile-dropdown-content a { color: white; padding: 15px 20px; text-decoration: none; display: block; font-family: 'Orbitron', sans-serif; font-size: 13px; text-align: left; border-bottom: 1px solid #333; transition: 0.3s; font-weight: bold; }
.profile-dropdown-content a:hover { background-color: var(--accent); color: #000; }

/* Botones Neón */
.btn-neon-gray { background-color: transparent; color: var(--accent); border: 2px solid var(--accent); padding: 8px 16px; border-radius: 8px; font-weight: bold; text-transform: uppercase; letter-spacing: 1px; cursor: pointer; font-family: 'Orbitron', sans-serif; text-shadow: 0 0 5px var(--accent); box-shadow: 0 0 5px var(--accent), inset 0 0 5px var(--accent); transition: 0.3s; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.btn-neon-gray:hover { background-color: var(--accent); color: #111; box-shadow: 0 0 15px var(--accent), inset 0 0 10px rgba(255,255,255,0.3); text-shadow: none; }

/* Selector de Tema */
.theme-floater { position: fixed; bottom: 25px; left: 25px; z-index: 10000; display: flex; flex-direction: row; gap: 10px; align-items: center; }
.theme-colors { display: flex; flex-direction: row; gap: 10px; visibility: hidden; opacity: 0; transform: translateX(-20px); transition: 0.3s; }
.theme-floater:hover .theme-colors { visibility: visible; opacity: 1; transform: translateX(0); }
.theme-btn { width: 45px; height: 45px; border-radius: 50%; cursor: pointer; box-shadow: 0 5px 15px rgba(0,0,0,0.5); border: 2px solid #555; display: flex; justify-content: center; align-items: center; font-size: 20px; background: #111; transition: 0.3s; }
.theme-btn:hover { transform: scale(1.1); border-color: #fff; }
.theme-main { border-color: var(--accent); background: #000; }
.c-gray { background: #cccccc; } .c-purple { background: #b829ff; } .c-blue { background: #00e5ff; } .c-pink { background: #ff007f; }

/* --- MALLA DE DISEÑO GENERAL --- */
.page-layout { display: flex; justify-content: center; align-items: flex-start; width: 100%; max-width: 100%; margin: 0 auto var(--gap) auto; position: relative; z-index: 10; padding: 0 10px; }
.side-col-stack { width: 90px; display: flex; flex-direction: column; gap: var(--gap); margin: 0 var(--out-margin); flex-shrink: 0; }

/* Banners */
.side-col-banner { width: 90px; height: 728px; position: relative; overflow: hidden; background: #000; border: 1px solid #333; display: flex; align-items: center; justify-content: center; border-radius: 15px; flex-shrink: 0; transition: 0.4s; }
.banner-wrapper { width: 100%; margin: 0 auto; display: flex; gap: var(--gap); justify-content: center; position: relative; z-index: 10; }
.b-728, .b-250, .b-square { position: relative; overflow: hidden; background: #000; border: 1px solid #333; display: flex; align-items: center; justify-content: center; border-radius: 15px; transition: 0.4s; flex-shrink: 0;}
.b-728 { width: 728px; height: 90px; }
.b-250 { width: 250px; height: 90px; }
.b-square { width: 320px; height: 320px; }

@media (max-width: 1250px) { .side-col-stack { display: none !important; } }

/* AQUI ESTÁ EL CAMBIO: max-width aumentado a 1400px para el muro completo */
.center-column { display: flex; flex-direction: column; gap: var(--gap); flex-grow: 1; max-width: 1400px; min-width: 0; }

/* =========================================================
   ESTILOS ESPECÍFICOS DEL PERFIL SOCIAL (TIPO FACEBOOK)
   ========================================================= */

/* Héroe del Perfil (Portada y Avatar) */
.profile-hero { width: 100%; display: flex; flex-direction: column; position: relative; margin-bottom: 20px; }
.profile-cover-container { width: 100%; height: 350px; border-radius: 20px; overflow: hidden; position: relative; border: 2px solid var(--accent); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.profile-cover-img { width: 100%; height: 100%; object-fit: cover; }
.cover-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); }

.profile-header-info { display: flex; align-items: flex-end; justify-content: space-between; padding: 0 30px; margin-top: -60px; position: relative; z-index: 10; }
.profile-user-basics { display: flex; align-items: flex-end; gap: 20px; }
.profile-avatar-wrapper { width: 160px; height: 160px; border-radius: 50%; border: 4px solid #0a0a0a; background: #0a0a0a; overflow: hidden; box-shadow: 0 0 20px rgba(0,0,0,0.8); position: relative; }
.profile-avatar-img { width: 100%; height: 100%; object-fit: cover; }

.profile-name-block { padding-bottom: 10px; }
.profile-name { font-family: 'Orbitron', sans-serif; font-size: 2.2rem; font-weight: bold; margin: 0; color: #fff; text-shadow: 0 0 10px var(--accent); }
.profile-status { color: var(--accent); font-family: 'Orbitron', sans-serif; font-size: 0.9rem; font-weight: bold; letter-spacing: 1px; margin-top: 5px; }

.profile-actions { padding-bottom: 20px; display: flex; gap: 15px; }

/* Grid del Feed (Izquierda: Info, Derecha: Muro expandido a lo ancho) */
.profile-grid { display: grid; grid-template-columns: 320px 1fr; gap: var(--gap); align-items: start; }
@media (max-width: 850px) {
    .profile-grid { grid-template-columns: 1fr; }
    .profile-header-info { flex-direction: column; align-items: center; text-align: center; margin-top: -80px; }
    .profile-user-basics { flex-direction: column; align-items: center; gap: 10px; }
    .profile-actions { padding-bottom: 0; margin-top: 20px; }
}

/* Tarjetas de Información (Izquierda) */
.info-card { background: rgba(20, 20, 20, 0.6); backdrop-filter: blur(10px); border: 1px solid rgba(204,204,204,0.3); border-radius: 15px; padding: 25px; margin-bottom: var(--gap); transition: 0.4s; }
.info-card-title { font-family: 'Orbitron', sans-serif; color: var(--accent); font-size: 1.2rem; margin-top: 0; margin-bottom: 20px; text-transform: uppercase; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 15px; font-size: 14px; color: #ccc; }
.info-icon { color: var(--accent); font-size: 16px; }

/* Fotos / Amigos Grid */
.photo-grid-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo-mini { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 8px; border: 1px solid #333; transition: 0.3s; cursor: pointer; }
.photo-mini:hover { border-color: var(--accent); transform: scale(1.05); }

/* --- COLUMNA DEL MURO (Derecha) --- */

/* Crear Publicación */
.post-creator { background: rgba(20, 20, 20, 0.6); backdrop-filter: blur(10px); border: 1px solid rgba(204,204,204,0.3); border-radius: 15px; padding: 20px; margin-bottom: var(--gap); transition: 0.4s; }
.creator-top { display: flex; gap: 15px; align-items: flex-start; }
.creator-avatar { width: 45px; height: 45px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); }
.post-textarea { flex: 1; background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; color: white; padding: 15px; font-family: inherit; font-size: 15px; resize: none; outline: none; transition: 0.3s; min-height: 80px; }
.post-textarea:focus { border-color: var(--accent); }
.creator-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 15px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,0.1); }
.creator-tools { display: flex; gap: 15px; }
.tool-btn { background: transparent; border: none; color: #aaa; cursor: pointer; font-weight: bold; font-size: 14px; display: flex; align-items: center; gap: 5px; transition: 0.3s; }
.tool-btn:hover { color: var(--accent); }

/* Publicaciones (Posts) */
.post-card { background: rgba(20, 20, 20, 0.6); backdrop-filter: blur(10px); border: 1px solid rgba(204,204,204,0.3); border-radius: 15px; padding: 20px; margin-bottom: var(--gap); transition: 0.4s; }
.post-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.post-author-info { display: flex; align-items: center; gap: 15px; }
.post-author-img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); }
.post-author-name { font-family: 'Orbitron', sans-serif; font-size: 16px; font-weight: bold; margin: 0; color: #fff; }
.post-time { font-size: 12px; color: #888; margin: 0; margin-top: 3px; }
.post-options { color: #888; cursor: pointer; font-size: 20px; }
.post-options:hover { color: var(--accent); }

.post-content { font-size: 15px; line-height: 1.5; color: inherit; margin-bottom: 15px; }
.post-media { width: 100%; max-height: 600px; object-fit: cover; border-radius: 12px; margin-bottom: 15px; border: 1px solid rgba(255,255,255,0.1); }

.post-stats { display: flex; justify-content: space-between; font-size: 13px; color: #aaa; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 10px; }
.post-interactions { display: flex; justify-content: space-between; gap: 10px; }
.interaction-btn { flex: 1; background: rgba(0,0,0,0.3); border: 1px solid transparent; color: #ccc; padding: 10px; border-radius: 8px; cursor: pointer; font-weight: bold; font-size: 14px; transition: 0.3s; display: flex; justify-content: center; align-items: center; gap: 8px; }
.interaction-btn:hover { background: rgba(255,255,255,0.1); color: var(--accent); }
.interaction-btn.active { color: var(--accent); border-color: var(--accent); }