@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700;900&family=Montserrat:wght@300;400;700&family=Spectral:ital,wght@0,300;0,400;1,400&display=swap");
:root {
  --gold: #d4af37;
  --dark-bg: #0a0a0a;
  --card-bg: #111;
  --text: #e0e0e0;
  --red: #8b0000;
  --green: #006400;
}
/* --- NUEVA FUENTE PARA LECTURA (Votos, Textos, Chats) --- */
body,
.post-body,
.stat-value,
.btn-gold,
.fame-item,
.next-rank-info {
  font-family: "Montserrat", sans-serif; /* Mucho más legible */
}
/* Mantenemos Cinzel solo para Títulos épicos */
h1,
h2,
h3,
.nickname,
.fame-title,
.popup-title,
.modal-title {
  font-family: "Cinzel", serif;
}

/* --- MENÚ IZQUIERDO FIJO (Sticky) --- */
.left-sidebar {
    width: 260px;       /* Ancho fijo */
    flex: 0 0 260px;    /* No crecer, no encoger */
    position: sticky;
    top: 80px;
}

/* Ajuste para que los votos se distingan bien */
.btn-gold {
  font-weight: 700; /* Negrita para los números */
  letter-spacing: 0.5px;
}
body {
  margin: 0;
  padding: 0;
  background-color: var(--dark-bg);
  color: var(--text);
  font-family: "Spectral", serif;
  padding-top: 70px;
}

/* --- POPUPS Y MODALES --- */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: center;
}
.popup-box {
  background: #111;
  padding: 20px;
  border: 1px solid var(--gold);
  width: 90%;
  max-width: 350px;
  text-align: center;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}
.popup-title {
  font-family: "Cinzel";
  font-size: 1.2rem;
  display: block;
  margin-bottom: 10px;
  color: var(--gold);
}
.popup-msg {
  color: #ccc;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}
.auth-box {
  background: #050505; /* Casi negro absoluto */
  padding: 40px 30px;
  border: 1px solid var(--gold);
  width: 100%;
  max-width: 380px; /* Un poco más estrecho y elegante */
  text-align: center;
  border-radius: 4px; /* Bordes apenas redondeados */
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.15); /* Resplandor dorado sutil */
  position: relative;
  animation: fadeIn 0.5s ease-out;
}
.auth-box h2 {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 25px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
    border-bottom: 1px solid #222;
    padding-bottom: 15px;
}
.login-input {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    background: #111;
    border: 1px solid #333;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    box-sizing: border-box; /* Para que el padding no rompa el ancho */
    transition: all 0.3s ease;
    border-radius: 2px;
}

.login-input:focus {
    border-color: var(--gold);
    outline: none;
    background: #1a1a1a;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

/* --- BARRA SUPERIOR --- */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: rgba(0, 0, 0, 0.95);
  border-bottom: 1px solid var(--gold);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  box-sizing: border-box;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}
.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}
.notif-wrapper {
  position: relative;
  cursor: pointer;
  color: var(--gold);
  font-size: 1.2rem;
}
.notif-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--red);
  color: white;
  font-size: 0.6rem;
  padding: 2px 5px;
  border-radius: 50%;
  display: none;
}
.notif-dropdown {
  position: absolute;
  top: 30px;
  right: 0;
  width: 250px;
  background: #222;
  border: 1px solid var(--gold);
  display: none;
  max-height: 300px;
  overflow-y: auto;
}
.notif-item {
  padding: 10px;
  border-bottom: 1px solid #333;
  font-size: 0.8rem;
}
.notif-item.unread {
  background: #331a1a;
}

/* --- LAYOUT PRINCIPAL --- */
.main-layout {
  display: flex;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}



.feed-area {
    flex: 1;            /* Ocupa el espacio restante */
    min-width: 0;       /* Truco vital para que el texto no rompa el diseño */
}

/* Columna Derecha (Top) */
.right-sidebar {
    width: 280px;       /* Ancho fijo */
    flex: 0 0 280px;    /* No crecer, no encoger */
}
@media (min-width: 992px) {
  .left-sidebar,
  .right-sidebar {
    display: block;
  }
}

/* --- BARRA LATERAL IZQUIERDA --- */
.sidebar-box {
  background: #111;
  border: 1px solid #333;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}

/* --- HALL DE LA FAMA --- */
.hall-fame-box {
  background: #111;
  border: 1px solid var(--gold);
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  position: sticky;
  top: 90px;
}
.fame-title {
  font-family: "Cinzel";
  color: var(--gold);
  border-bottom: 1px solid #333;
  padding-bottom: 10px;
  margin-bottom: 10px;
}
.fame-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.9rem;
  padding: 5px;
  border-radius: 4px;
  transition: 0.2s;
}
.fame-item:hover {
  background: #222;
}
.fame-rank {
  font-weight: bold;
  color: #666;
  width: 20px;
}
.fame-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  object-fit: cover;
}

/* --- FILTROS --- */
/* --- BARRA DE FILTROS (ADAPTABLE - SIN SCROLL) --- */
.filters-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    
    /* CAMBIO CLAVE: Permitir que bajen a otra línea si no caben */
    flex-wrap: wrap; 
    justify-content: center; /* Centrados para que se vea ordenado */
    
    /* Quitamos el scroll feo */
    overflow-x: visible; 
    padding-bottom: 0;
}

.filter-btn {
    /* Hacemos que los botones llenen huecos si es necesario */
    flex: 1 1 auto; 
    min-width: 100px; /* Tamaño mínimo para no deformarse */
    max-width: 200px; /* Tamaño máximo para no verse gigantes */
}

/* --- MAQUILLAJE DE BARRAS DE SCROLL (PARA TODO EL SITIO) --- */
/* Esto cambia las barras grises feas por unas delgadas y oscuras */

/* Ancho de la barra */
::-webkit-scrollbar {
    width: 6px;  /* Vertical */
    height: 6px; /* Horizontal */
}

/* Fondo de la barra (El riel) */
::-webkit-scrollbar-track {
    background: #0a0a0a; 
}

/* La parte que se mueve (El pulgar) */
::-webkit-scrollbar-thumb {
    background: #333; 
    border-radius: 3px;
}

/* Al pasar el mouse por la barra */
::-webkit-scrollbar-thumb:hover {
    background: var(--gold); 
}
.filter-btn.active,
.filter-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: #222;
}

/* --- POSTS --- */
.new-post-area .btn-icon {
    /* Ahora el clip será un botón cuadrado con borde, igual de alto que el de enviar */
    width: 40px;
    height: 40px;
    background: #111;
    border: 1px solid #333;
    color: var(--gold);
    border-radius: 4px; /* Un poco cuadrado */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: 0.3s;
}
.new-post-area .btn-icon:hover {
    border-color: var(--gold);
    background: #1a1a1a;
}

.new-post-area .btn-gold {
    /* Aseguramos la altura para que coincida con el clip */
    height: 40px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border-radius: 4px; /* Un poco cuadrado para ser serio */
}

/* --- BOTONES DE FILTRO (FIX OVALADOS) --- */
.filter-btn {
    /* Aseguramos que no se aplasten */
    flex: 0 0 auto; /* No encoger */
    height: 35px; /* Altura fija */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    border-radius: 20px; /* Bien redondos */
    font-size: 0.85rem;
    white-space: nowrap; /* Texto en una línea */
}
.sidebar-item {
    height: 45px; /* Altura fija para uniformidad */
    display: flex;
    align-items: center;
    padding: 0 15px;
    box-sizing: border-box; /* Vital para que el padding no rompa el ancho */
    gap: 15px;
    width: 100%; /* Ocupar todo el ancho disponible */
}

/* Iconos del sidebar centrados */
.sidebar-item i {
    width: 20px;
    text-align: center;
}
textarea {
  width: 100%;
  background: #000;
  border: 1px solid #333;
  color: white;
  padding: 10px;
  box-sizing: border-box;
  resize: none;
  font-family: "Spectral";
}

.post-card {
  background: var(--card-bg);
  border: 1px solid #333;
  border-radius: 8px;
  margin-bottom: 20px;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}
.post-header {
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.post-author-info {
  display: flex;
  gap: 10px;
  align-items: center;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #333;
}
.admin-border {
  border: 2px solid var(--red);
}
.nickname {
  font-weight: bold;
  color: var(--text);
  font-family: "Cinzel", serif;
  font-size: 0.9rem;
}
.nickname.is-admin {
  color: var(--red);
}
.rank-label {
  font-size: 0.6rem;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #444;
  margin-left: 5px;
  vertical-align: middle;
}
.post-body {
  padding: 0 15px 15px;
  font-size: 1rem;
  line-height: 1.5;
  white-space: pre-wrap;
}
.judgement-box {
  background: #000;
  padding: 10px;
  text-align: center;
  border-top: 1px solid #222;
  border-bottom: 1px solid #222;
}

/* --- BOTONES GENERALES --- */
.btn-gold {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 8px 20px;
  cursor: pointer;
  font-family: "Cinzel";
  transition: 0.3s;
}
.btn-gold:hover {
  background: var(--gold);
  color: black;
}
.btn-icon {
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 1.1rem;
}
.btn-icon:hover {
  color: var(--gold);
}
.action-link {
  margin-left: 10px;
  cursor: pointer;
  color: #666;
  font-size: 0.9rem;
}
.action-link:hover {
  color: white;
}

/* --- BOTONES DE ADMIN (LO QUE FALTABA) --- */
.admin-panel {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #333;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.admin-btn {
  background: #000;
  border: 1px solid #444;
  color: #888;
  padding: 5px 15px;
  font-size: 0.7rem;
  cursor: pointer;
  font-family: "Cinzel", serif;
  transition: 0.3s;
}
/* Efecto hover: Verde para el primero (Aprobar), Rojo para el segundo (Denegar) */
.admin-btn:hover {
  color: white;
  border-color: white;
}
.admin-btn:first-child:hover {
  border-color: var(--green);
  color: var(--green);
  box-shadow: 0 0 5px var(--green);
}
.admin-btn:last-child:hover {
  border-color: var(--red);
  color: var(--red);
  box-shadow: 0 0 5px var(--red);
}

/* --- EFECTOS VISUALES --- */
@keyframes shake {
  0% {
    transform: translate(1px, 1px) rotate(0deg);
  }
  20% {
    transform: translate(-3px, 0px) rotate(1deg);
  }
  40% {
    transform: translate(1px, -1px) rotate(1deg);
  }
  60% {
    transform: translate(-3px, 1px) rotate(0deg);
  }
  80% {
    transform: translate(-1px, -1px) rotate(1deg);
  }
  100% {
    transform: translate(1px, -2px) rotate(-1deg);
  }
}
.shake-effect {
  animation: shake 0.5s;
  border: 1px solid var(--red) !important;
  box-shadow: 0 0 15px rgba(139, 0, 0, 0.5);
}

@keyframes glow {
  0% {
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(212, 175, 55, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
  }
}
.glow-effect {
  animation: glow 1s;
  border: 1px solid var(--gold) !important;
}

/* --- CHAT MODAL --- */
.chat-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 3000;
  display: none;
  justify-content: center;
  align-items: center;
}
.chat-box {
  width: 90%;
  max-width: 500px;
  height: 80vh;
  background: #111;
  border: 1px solid var(--gold);
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
}
.chat-header {
  padding: 15px;
  background: #000;
  border-bottom: 1px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #1a1a1a;
}
.msg-bubble {
  max-width: 80%;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.9rem;
  position: relative;
  word-wrap: break-word;
}
.msg-others {
  align-self: flex-start;
  background: #333;
  color: #ddd;
  border-top-left-radius: 0;
}
.msg-me {
  align-self: flex-end;
  background: var(--gold);
  color: #000;
  font-weight: bold;
  border-top-right-radius: 0;
}
.msg-info {
  font-size: 0.65rem;
  margin-bottom: 3px;
  opacity: 0.7;
}
.chat-input-area {
  padding: 10px;
  background: #000;
  border-top: 1px solid #333;
  display: flex;
  gap: 10px;
}
.chat-input-area input {
  flex: 1;
  padding: 10px;
  border-radius: 4px;
  border: 1px solid #444;
  background: #222;
  color: white;
  outline: none;
}
.badge-icon {
  margin-left: 5px;
  color: var(--gold);
  font-size: 0.8rem;
}

/* --- ESTILOS DE LA HOJA DE SERVICIO (PERFIL) --- */
.profile-stats-box {
  background-color: #000; /* Fondo negro puro */
  border: 1px solid #222;
  border-radius: 8px;
  padding: 15px;
  margin: 15px 0;
  text-align: left;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: #888;
}

.stat-value {
  color: #fff;
  font-weight: bold;
  font-family: "Cinzel", serif;
}

.xp-bar-container {
  background-color: #222;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 5px;
  margin-bottom: 5px;
}

.xp-bar-fill {
  background-color: var(--gold); /* O el color que prefieras */
  height: 100%;
  width: 0%; /* Se llena con JS */
  transition: width 0.5s ease;
}

.next-rank-text {
  text-align: center;
  font-size: 0.7rem;
  color: #555;
  font-style: italic;
  margin-top: 5px;
}

.avatar-large {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  object-fit: cover;
  margin: 0 auto 10px auto;
  display: block;
}

/* Input del nombre centrado y oscuro */
.input-profile {
  background: #000;
  border: 1px solid #333;
  color: white;
  text-align: center;
  padding: 10px;
  width: 100%;
  box-sizing: border-box;
  font-family: "Cinzel", serif;
  margin-top: 5px;
}

.stats-container {
  background-color: #111; /* El fondo oscuro de la caja */
  border: 1px solid #333;
  border-radius: 8px;
  padding: 15px;
  margin: 15px 0;
  text-align: left; /* Alineado a la izquierda como la foto */
}

/* El carril gris de fondo */
.progress-track {
  background-color: #2a2a2a;
  height: 8px;
  border-radius: 4px;
  margin-top: 8px;
  margin-bottom: 5px;
  overflow: hidden; /* Para que la barra no se salga */
  border: 1px solid #333;
}

/* La barra dorada que se mueve */
.progress-fill {
  background: linear-gradient(
    90deg,
    #b8860b,
    var(--gold)
  ); /* Degradado dorado */
  height: 100%;
  width: 0%; /* JS lo cambiará */
  transition: width 0.6s ease-out;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.5); /* Resplandor */
}

.next-rank-info {
  font-size: 0.65rem;
  color: #666;
  text-align: center;
  font-style: italic;
  margin-top: 4px;
}
/* --- ESTADO ACTIVO (FEEDBACK VISUAL) --- */

/* Para los botones redondos del centro */
.filter-btn.active {
  background-color: var(--gold);
  color: #000; /* Texto negro para contraste */
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.4); /* Resplandor */
  transform: scale(1.05); /* Un poquito más grande */
  font-weight: bold;
}

/* Para la lista del menú lateral */
/* 2. ITEMS DEL MENÚ LATERAL */
.sidebar-item {
  padding: 12px 15px; /* Padding fijo */
  cursor: pointer;
  color: #ccc;
  border-bottom: 1px solid #222;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all 0.2s ease-in-out;

  /* TRUCO: Borde transparente siempre presente para evitar saltos */
  border-left: 3px solid transparent;
}

.sidebar-item:last-child {
  border-bottom: none;
}

/* Estado Hover (Al pasar mouse) */
.sidebar-item:hover {
  background-color: #1a1a1a;
  color: white;
}

/* Estado Activo (Clickeado) */
.sidebar-item.active {
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.1), transparent);
  border-left: 3px solid var(--gold); /* Solo cambia el color, no el tamaño */
  color: var(--gold) !important;
}
.sidebar-item.active i {
  color: var(--gold) !important;
}

/* 3. BOTONES DE FILTRO SUPERIOR */
.filter-btn {
  background: #1a1a1a;
  border: 1px solid #333;
  color: #888;
  padding: 8px 20px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.3s;
  font-size: 0.85rem;
  font-family: "Montserrat", sans-serif;

  /* Evitar que cambie de tamaño al ponerse negrita */
  min-width: 100px;
  text-align: center;
}

.filter-btn:hover {
  border-color: #666;
  color: #fff;
}

.filter-btn.active {
  background-color: var(--gold);
  color: #000;
  border-color: var(--gold);
  font-weight: 700;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
  /* Quitamos el transform scale para que no empuje el contenido */
  transform: none;
}
.btn-gold-block {
    width: 100%;
    background: linear-gradient(45deg, #b8860b, var(--gold));
    border: none;
    color: #000;
    font-weight: 800;
    padding: 12px;
    font-family: 'Cinzel', serif;
    cursor: pointer;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-gold-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

/* Enlaces de cambiar entre login/registro */
.toggle-form {
    margin-top: 20px;
    font-size: 0.85rem;
    color: #888;
    cursor: pointer;
    text-decoration: underline;
    font-family: 'Montserrat', sans-serif;
    transition: color 0.3s;
}

.toggle-form:hover {
    color: var(--gold);
}

/* Alertas de contraseña */
.password-hint { font-size: 0.7rem; color: #666; text-align: left; margin-top: -10px; margin-bottom: 10px; display: none; }
.password-hint.show { display: block; }
.password-hint.valid { color: var(--green); }
.password-hint.invalid { color: var(--red); }

/* Centrar el ReCAPTCHA */
.g-recaptcha {
    display: flex;
    justify-content: center;
    margin: 15px 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* --- LISTA DE USUARIOS ACTIVOS (SIDEBAR) --- */
.active-users-box {
    background: #111; 
    border: 1px solid #333; 
    padding: 15px; 
    border-radius: 8px; 
    /* Ocupar el alto restante si quieres, o dejarlo dinámico */
    min-height: 200px; 
    max-height: 400px;
    overflow-y: auto;
}

/* --- LISTA DE USUARIOS ACTIVOS (SIDEBAR) --- */
/* Usaremos la clase .sidebar-box en el HTML, así que borramos .active-users-box antigua */

.active-user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-bottom: 1px solid #222; /* Separador sutil */
    cursor: pointer;
    transition: 0.2s;
}

.active-user-item:last-child { border-bottom: none; }
.active-user-item:hover { background-color: #1a1a1a; }

.user-status-avatar {
    position: relative;
    width: 32px;
    height: 32px;
}

.user-status-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #444;
}

/* --- PUNTOS DE ESTADO (ESTILO LED) --- */
.status-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #111; /* Borde negro para separar del avatar */
    z-index: 2;
}

/* Colores con Resplandor */
.dot-online { background-color: #00ff00; box-shadow: 0 0 8px rgba(0, 255, 0, 0.8); }
.dot-away   { background-color: #ffa500; box-shadow: 0 0 8px rgba(255, 165, 0, 0.8); }
.dot-busy   { background-color: #ff0000; box-shadow: 0 0 8px rgba(255, 0, 0, 0.8); }

/* --- SELECTOR DE ESTADO (TOP BAR - CORREGIDO) --- */
/* --- SELECTOR DE ESTADO (EL BOTÓN) --- */
.status-selector {
    position: relative; /* ¡IMPORTANTE! Esto es el ancla */
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    height: 32px;
    border-radius: 20px;
    border: 1px solid #333;
    background: #000;
    cursor: pointer;
    margin-left: 15px;
    box-sizing: border-box;
    z-index: 1001; /* Un nivel por encima de la barra */
}

.status-selector:hover { border-color: var(--gold); }

/* --- EL MENÚ DESPLEGABLE --- */
.status-dropdown {
    position: absolute; /* Flota respecto al 'relative' de arriba */
    top: 110%; /* Justo debajo del botón con un pequeño espacio */
    left: 0;   /* Alineado a la IZQUIERDA del botón */
    
    background: #111;
    border: 1px solid var(--gold);
    border-radius: 4px;
    width: 140px;
    display: none; /* Oculto por defecto */
    
    box-shadow: 0 5px 15px rgba(0,0,0,0.8);
    z-index: 5000; /* Siempre encima de todo */
    overflow: hidden;
}

/* Opciones del menú */
.status-option {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ccc;
    font-size: 0.8rem;
    transition: 0.2s;
    cursor: pointer;
}

.status-option:hover {
    background: #222;
    color: white;
}



/* El punto dentro del selector */
.current-status-dot {
    width: 10px; 
    height: 10px; 
    border-radius: 50%;
    /* ESTO ES LO QUE LO ARREGLA: */
    position: static !important; 
    display: block;
    margin: 0;
}

/* Estado Offline (Gris) */
.dot-offline { 
    background-color: #444; 
    border-color: #222; 
    box-shadow: none; 
}
/* Colores */
.dot-online  { background-color: #00ff00; box-shadow: 0 0 6px #00ff00; }
.dot-away    { background-color: #ffa500; box-shadow: 0 0 6px #ffa500; }
.dot-busy    { background-color: #ff0000; box-shadow: 0 0 6px #ff0000; }
.dot-offline { background-color: #555555; border-color: #333; box-shadow: none; } /* NUEVO: GRIS */


.status-dropdown {
    position: absolute;
    top: 45px; /* Empuja el menú hacia abajo */
    right: 0;
    background: #111;
    border: 1px solid var(--gold);
    border-radius: 4px;
    width: 140px;
    display: none;
    z-index: 5000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.8);
}

.status-option {
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ccc;
    font-size: 0.8rem;
    transition: 0.2s;
}

.status-option:hover {
    background: #222;
    color: white;
}
/* --- ESTILOS RESPONSIVOS (MÓVIL) --- */
/* Ocultar barra móvil en escritorio */
.mobile-nav { display: none; }

@media (max-width: 768px) {
    
    /* 1. AJUSTE DE ESTRUCTURA */
    .main-layout {
        flex-direction: column; /* Todo en una sola columna */
        padding: 10px;
        margin-bottom: 60px; /* Espacio para la barra de abajo */
    }

    /* Ocultamos las barras laterales por defecto en móvil */
    .left-sidebar, .right-sidebar {
        display: none; 
        width: 100%; /* Si se muestran, que ocupen todo el ancho */
        flex: none;
    }

    .feed-area {
        width: 100%;
        margin: 0;
    }

    /* 2. HEADER SIMPLIFICADO */
    .top-bar { padding: 0 10px; }
    .nickname, #uiRole, #headerOnlineCounter { display: none !important; } /* Ocultar textos largos */
    .status-selector { margin-left: auto; } /* Mover estado a la derecha */
    .logo-text { font-size: 1rem; } /* Ajustar logo si tienes */

    /* 3. BARRA DE NAVEGACIÓN INFERIOR (Estilo App) */
    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0; left: 0; width: 100%;
        background: #000;
        border-top: 1px solid var(--gold);
        height: 60px;
        z-index: 9000;
        justify-content: space-around;
        align-items: center;
        box-shadow: 0 -5px 20px rgba(0,0,0,0.9);
    }

    .mobile-nav-item {
        color: #666;
        text-align: center;
        font-size: 0.7rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        width: 25%;
        padding: 10px 0;
        cursor: pointer;
    }

    .mobile-nav-item i { font-size: 1.2rem; }

    .mobile-nav-item.active {
        color: var(--gold);
    }

    /* 4. AJUSTES DE MODALES Y BOTONES */
    .auth-box, .chat-box { width: 95% !important; max-width: none; }
    .new-post-area textarea { height: 80px; }
    
    /* Ajuste de filtros para que sean scroll horizontal en móvil si son muchos */
    .filters-bar {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 5px;
    }
}