/**
 * Right Panel CSS - Diseño Elite Mundial
 * Estilos para el panel derecho de la red social
 * 
 * @author MrGreen Development Team
 * @version 3.0.0
 * @since 2025-01-19
 */

/* ===== VARIABLES GLOBALES (SECCIÓN CHAT) ===== */
:root {
    --chat-panel-bg: #ffffff;
    --chat-panel-border: rgba(148, 163, 184, 0.18);
    --chat-panel-shadow: 0 25px 65px rgba(15, 23, 42, 0.18);

    --chat-header-bg: linear-gradient(135deg, #f7f8fa, #e2e4e8);
    --chat-header-border: rgba(15, 23, 42, 0.05);
    --chat-header-title: #0f172a;
    --chat-header-subtitle: #64748b;
    --chat-header-close: #1e293b;

    --chat-messages-bg: #f8fafc;

    --chat-bubble-bg: #6b7280;
    --chat-bubble-color: #ffffff;
    --chat-bubble-shadow: 0 8px 20px rgba(107, 114, 128, 0.25);
    --chat-bubble-border: rgba(0, 0, 0, 0.25);
    --chat-bubble-own-bg: #ffffff;
    --chat-bubble-own-color: #14171c;
    --chat-bubble-own-border: rgba(15, 23, 42, 0.12);

    --chat-composer-bg: #ffffff;
    --chat-composer-border: rgba(148, 163, 184, 0.18);

    --chat-textarea-bg: #ffffff;
    --chat-textarea-border: rgba(148, 163, 184, 0.35);
    --chat-textarea-color: #0f172a;
    --chat-placeholder-color: #94a3b8;

    --chat-focus-border: #cccccc;
    --chat-focus-shadow: rgba(204, 204, 204, 0.3);

    --chat-send-bg: #6b7280;
    --chat-send-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.dark-mode {
    --chat-panel-bg: #242526;
    --chat-panel-border: rgba(58, 59, 60, 0.85);
    --chat-panel-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);

    --chat-header-bg: linear-gradient(135deg, #2b2c30, #1f2023);
    --chat-header-border: rgba(15, 15, 16, 0.55);
    --chat-header-title: #e4e6eb;
    --chat-header-subtitle: #b0b3b8;
    --chat-header-close: rgba(228, 230, 235, 0.8);

    --chat-messages-bg: #1e1f21;

    --chat-bubble-bg: #2f3034;
    --chat-bubble-color: #f3f4f6;
    --chat-bubble-shadow: 0 14px 28px rgba(0, 0, 0, 0.65);
    --chat-bubble-border: rgba(255, 255, 255, 0.05);
    --chat-bubble-own-bg: linear-gradient(135deg, #3d3e44, #4b4c52);
    --chat-bubble-own-color: #f9fafb;
    --chat-bubble-own-border: rgba(0, 0, 0, 0.35);

    --chat-composer-bg: #1f2022;
    --chat-composer-border: rgba(58, 59, 60, 0.85);

    --chat-textarea-bg: #2a2b2d;
    --chat-textarea-border: rgba(75, 76, 78, 0.8);
    --chat-textarea-color: #e4e6eb;
    --chat-placeholder-color: rgba(176, 179, 184, 0.8);

    --chat-focus-border: #cccccc;
    --chat-focus-shadow: rgba(204, 204, 204, 0.25);

    --chat-send-bg: #6b7280;
    --chat-send-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

/* ===== PANEL DERECHO ===== */
.right-panel {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    padding: 24px;
    box-sizing: border-box;
    overflow-y: auto;
    color: #1a1a1a;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== HEADER DEL PANEL ===== */
.right-panel__header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e1e5e9;
}

.right-panel__title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.01em;
}

.right-panel__title i {
    color: #10b981;
    font-size: 16px;
}

/* ===== CONTENIDO DEL PANEL ===== */
.right-panel__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.right-panel__section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e1e5e9;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.right-panel__section:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.right-panel__section-title {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    margin: 0 0 16px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== INFORMACIÓN DEL SISTEMA ===== */
.right-panel__info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.right-panel__info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e1e5e9;
}

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

.right-panel__info-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.right-panel__info-value {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 600;
}

.right-panel__info-value.online {
    color: #10b981;
}

/* ===== FUNCIONALIDADES ===== */
.right-panel__features {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.right-panel__feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-size: 14px;
    color: #1a1a1a;
    transition: color 0.2s ease;
}

.right-panel__feature:hover {
    color: #10b981;
}

.right-panel__feature i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.text-success {
    color: #10b981 !important;
}

/* ===== CHAT STYLES (Para usuarios logueados) ===== */
.chat-section {
    margin-bottom: 24px;
}

.chat-section__title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 16px 0;
}

.chat-section__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.chat-section__subtitle {
    margin: 4px 0 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

.chat-section__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-section__new-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid #d7dce2;
    background: #eceff3;
    color: #6b7280;
    cursor: pointer;
    box-shadow: none;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.chat-section__new-btn:hover {
    background: #e0e5eb;
    color: #4b5563;
    transform: translateY(-1px);
    box-shadow: none;
}

.chat-section__search {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.chat-section__search i {
    position: absolute;
    left: 12px;
    color: #9ca3af;
    font-size: 14px;
}

.chat-section__search input {
    width: 100%;
    padding: 10px 14px 10px 36px;
    border-radius: 999px;
    border: 1px solid #e1e5e9;
    background: #fff;
    font-size: 13px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chat-section__search input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    outline: none;
}

.friends-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.friends-list.is-preloading {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.friends-list.is-ready {
    opacity: 1;
    pointer-events: auto;
}

.friend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #f8f9fa;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    transform: translateZ(0);
}

.friend-item.has-unread {
    border-color: #53fc1b;
    background: #53fc1b;
    box-shadow: 0 0 0 2px rgba(83, 252, 27, 0.25);
}

.friend-item.is-active {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.12);
}

.friend-item.has-unread.is-active {
    border-color: #53fc1b;
    background: #53fc1b;
}

.friend-item.has-unread .friend-name,
.friend-item.has-unread .friend-status-text {
    color: #0f172a;
    font-weight: 700;
}

.friend-item.has-unread .friend-chat-btn {
    background: #1b2330;
    color: #f8fafc;
    border-color: #1b2330;
}

.friend-item.friend-item--placeholder {
    opacity: 0.85;
    background: rgba(83, 252, 27, 0.18);
}

.friend-item.friend-item--placeholder .friend-avatar__img--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #475569;
    color: #e2e8f0;
    font-weight: 600;
    font-size: 16px;
}

.friend-unread-badge {
    position: absolute;
    top: 8px;
    right: 54px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark-mode .friend-unread-badge {
    background: #ef4444 !important;
    color: #ffffff !important;
}

.friend-item:hover {
    background: #f8f9fa;
    border-color: #10b981;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.friend-avatar {
    position: relative;
    width: 40px;
    height: 40px;
}

.friend-avatar__img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.friend-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #ffffff;
}

.friend-status.online {
    background: #10b981;
}

.friend-status.offline {
    background: #6b7280;
}

/* Dark mode adjustments for status dot */
.dark-mode .friend-avatar .friend-status {
    border-color: #11161a;
    box-shadow: 0 0 0 2px rgba(17, 24, 28, 0.85);
}

.dark-mode .friend-avatar .friend-status.online {
    background: #53fc1b !important;
    box-shadow: 0 0 0 2px rgba(83, 252, 27, 0.25);
}

.dark-mode .friend-avatar .friend-status.offline {
    background: #4b5563 !important;
}

.friend-info {
    flex: 1;
}

.friend-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.friend-status-text {
    font-size: 12px;
    color: #6b7280;
}

.friend-chat-btn {
    background: #eceff3;
    color: #6b7280;
    border: 1px solid #d7dce2;
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.friend-chat-btn:hover {
    background: #e0e5eb;
    border-color: #cbd2da;
    color: #4b5563;
    transform: translateY(-1px);
}

.friend-item.has-unread .friend-chat-btn {
    background: #1b2330;
    color: #f8fafc;
    border-color: #1b2330;
}

.friends-list__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    border-radius: 12px;
    border: 1px dashed #d1d5db;
    color: #6b7280;
    background: #f9fafb;
    text-align: center;
}

.friends-list__empty i {
    font-size: 20px;
    color: #3b82f6;
}

.friends-list__empty span {
    color: #3b82f6;
    font-weight: 600;
}

.friends-list__empty--filtered {
    display: none;
}

.chat-section__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    font-size: 12px;
    color: #6b7280;
}

.chat-section__footer i {
    color: #10b981;
    margin-right: 4px;
}

.chat-section__more-btn {
    border: none;
    background: none;
    color: #3b82f6;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease;
}

.chat-section__more-btn:hover {
    color: #1d4ed8;
}

#chat-floating-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    max-width: 360px;
    width: calc(100vw - 36px);
    max-height: 520px;
    z-index: 9999;
    display: none;
    font-family: inherit;
}

#chat-floating-container.is-open {
    display: block;
}

.chat-floating-panel {
    background: var(--chat-panel-bg);
    border-radius: 16px;
    box-shadow: var(--chat-panel-shadow);
    border: 1px solid var(--chat-panel-border);
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 520px;
    overflow: hidden;
}

.chat-floating-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: var(--chat-header-bg);
    border-bottom: 1px solid var(--chat-header-border);
    gap: 12px;
}

.chat-floating-header__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-floating-header__avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #53fc19;
}

.chat-floating-header__info {
    flex: 1;
    min-width: 0;
}

.chat-floating-header__info h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--chat-header-title);
}

.chat-floating-header__info h5 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
    cursor: pointer;
}

.chat-floating-header__info h5 a:hover {
    color: #53fc19;
    text-decoration: underline;
}

.chat-floating-header__info span {
    font-size: 12px;
    color: var(--chat-header-subtitle);
}

.chat-floating-close {
    border: none;
    background: transparent;
    color: var(--chat-header-close);
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.2s ease;
}

.chat-floating-close:hover {
    transform: scale(1.05);
}

.chat-floating-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--chat-messages-bg);
}

.chat-floating-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #94a3b8;
    text-align: center;
    padding: 40px 20px;
}

.chat-floating-placeholder i {
    font-size: 24px;
}

.chat-floating-message {
    display: flex;
    margin-bottom: 12px;
    word-break: break-word;
}

.chat-floating-message.is-own {
    justify-content: flex-end;
}

.chat-floating-message__bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 14px;
    background: var(--chat-bubble-bg);
    color: var(--chat-bubble-color);
    box-shadow: var(--chat-bubble-shadow);
    border: 1px solid var(--chat-bubble-border, transparent);
    position: relative;
}

.chat-floating-message.is-own .chat-floating-message__bubble {
    background: var(--chat-bubble-own-bg);
    color: var(--chat-bubble-own-color);
    border-color: var(--chat-bubble-own-border, transparent);
}

.chat-floating-message__bubble p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

.chat-floating-message__meta {
    font-size: 11px;
    opacity: 0.8;
    display: inline-block;
    margin-top: 6px;
}

.chat-floating-composer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 16px;
    border-top: 1px solid var(--chat-composer-border);
    background: var(--chat-composer-bg);
}

.chat-floating-composer textarea {
    flex: 1;
    resize: none;
    border-radius: 12px;
    border: 1px solid var(--chat-textarea-border);
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    background: var(--chat-textarea-bg);
    color: var(--chat-textarea-color);
}

.chat-floating-composer textarea::placeholder {
    color: var(--chat-placeholder-color);
}

.chat-floating-composer textarea:focus {
    outline: none;
    border-color: var(--chat-focus-border);
    box-shadow: 0 0 0 3px var(--chat-focus-shadow);
}

.chat-floating-send {
    width: 42px;
    height: 42px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    border: none;
    padding: 0;
    flex-shrink: 0;
    background: var(--chat-send-bg);
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: var(--chat-send-shadow);
    transition: transform 0.2s ease;
}

.chat-floating-send:hover {
    transform: translateY(-1px) scale(1.02);
}

.dark-mode .chat-floating-panel {
    background: var(--chat-panel-bg) !important;
    border-color: var(--chat-panel-border) !important;
    box-shadow: var(--chat-panel-shadow) !important;
}

.dark-mode .chat-floating-header {
    background: var(--chat-header-bg) !important;
    border-bottom-color: var(--chat-header-border) !important;
}

.dark-mode .chat-floating-header__info h5 {
    color: var(--chat-header-title) !important;
}

.dark-mode .chat-floating-header__info span {
    color: var(--chat-header-subtitle) !important;
}

.dark-mode .chat-floating-header__avatar-img {
    border-color: #53fc19;
}

.dark-mode .chat-floating-close {
    color: var(--chat-header-close) !important;
}

.dark-mode .chat-floating-messages {
    background: var(--chat-messages-bg) !important;
}

.dark-mode .chat-floating-message__bubble {
    background: var(--chat-bubble-bg) !important;
    color: var(--chat-bubble-color) !important;
    box-shadow: var(--chat-bubble-shadow) !important;
}

.dark-mode .chat-floating-message.is-own .chat-floating-message__bubble {
    background: var(--chat-bubble-own-bg) !important;
    color: var(--chat-bubble-own-color) !important;
}

.dark-mode .chat-floating-composer {
    background: var(--chat-composer-bg) !important;
    border-top-color: var(--chat-composer-border) !important;
}

.dark-mode .chat-floating-composer textarea {
    background: var(--chat-textarea-bg) !important;
    border-color: var(--chat-textarea-border) !important;
    color: var(--chat-textarea-color) !important;
}

.dark-mode .chat-floating-composer textarea::placeholder {
    color: var(--chat-placeholder-color) !important;
}

.dark-mode .chat-floating-composer textarea:focus {
    border-color: var(--chat-focus-border) !important;
    box-shadow: 0 0 0 3px var(--chat-focus-shadow) !important;
}

.dark-mode .chat-floating-send {
    background: var(--chat-send-bg) !important;
    box-shadow: var(--chat-send-shadow) !important;
}

@media (max-width: 768px) {
    #chat-floating-container {
        right: 12px;
        left: 12px;
        width: auto;
        max-width: none;
    }
}
/* ===== PROFILE STYLES (Para invitados) ===== */
.profiles-section {
    margin-bottom: 24px;
}

.profiles-section__subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 16px 0;
}

.profiles-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
    transition: all 0.2s ease;
    cursor: pointer;
}

.profile-card:hover {
    background: #f8f9fa;
    border-color: #10b981;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.profile-card__avatar {
    position: relative;
    width: 40px;
    height: 40px;
}

.profile-card__img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-card__status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #ffffff;
}

.profile-card__status.online {
    background: #10b981;
}

.profile-card__status.offline {
    background: #6b7280;
}

.profile-card__info {
    flex: 1;
}

.profile-card__name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.profile-card__join-date {
    font-size: 12px;
    color: #6b7280;
}

.profile-card__view {
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-card__view:hover {
    background: #2563eb;
    transform: scale(1.05);
}

/* ===== DARK MODE ===== */
.dark-mode .right-panel {
    background: transparent;
    color: #e5e7eb;
}

.dark-mode .right-panel__header {
    border-bottom-color: #374151;
}

.dark-mode .right-panel__title {
    color: #e5e7eb;
}

.dark-mode .right-panel__section {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .right-panel__section-title {
    color: #9ca3af;
}

.dark-mode .right-panel__info-label {
    color: #9ca3af;
}

.dark-mode .right-panel__info-value {
    color: #e5e7eb;
}

.dark-mode .right-panel__feature {
    color: #e5e7eb;
}

.dark-mode .friend-item,
.dark-mode .profile-card {
    background: #2d2d2d;
    border-color: #374151;
}

.dark-mode .friend-item:hover,
.dark-mode .profile-card:hover {
    background: #374151;
}

.dark-mode .friend-name,
.dark-mode .profile-card__name {
    color: #e5e7eb;
}

.dark-mode .friend-status-text,
.dark-mode .profile-card__join-date {
    color: #9ca3af;
}

.dark-mode .chat-section__title {
    color: rgba(241, 245, 249, 0.95);
}

.dark-mode .friend-chat-btn {
    background: #2d2d2d;
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.28);
}

.dark-mode .friend-chat-btn:hover {
    background: #35373a;
    border-color: rgba(148, 163, 184, 0.42);
    color: #e2e8f0;
}

.dark-mode .friend-item.has-unread {
    border-color: #53fc1b;
    background: rgba(83, 252, 27, 0.15);
    box-shadow: 0 0 0 2px rgba(83, 252, 27, 0.3);
}

.dark-mode .friend-item.has-unread.is-active {
    border-color: #53fc1b;
    background: rgba(83, 252, 27, 0.2);
}

.dark-mode .friend-item.has-unread .friend-name,
.dark-mode .friend-item.has-unread .friend-status-text {
    color: #53fc1b;
    font-weight: 700;
}

.dark-mode .friend-item.has-unread .friend-chat-btn {
    background: rgba(83, 252, 27, 0.2);
    color: #53fc1b;
    border-color: rgba(83, 252, 27, 0.4);
}

.dark-mode .friend-item.has-unread .friend-chat-btn:hover {
    background: rgba(83, 252, 27, 0.3);
    border-color: rgba(83, 252, 27, 0.5);
    color: #6efc2e;
}

.dark-mode .friend-status.online {
    background: #53fc1b;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 2px rgba(83, 252, 27, 0.25);
}

.dark-mode .friend-status.offline {
    background: #4b5563;
    border-color: #1a1a1a;
}

/* ===== SCROLLBAR PERSONALIZADA ===== */
.right-panel::-webkit-scrollbar {
    width: 6px;
}

.right-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.right-panel::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.right-panel::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.dark-mode .right-panel::-webkit-scrollbar-track {
    background: #2d2d2d;
}

.dark-mode .right-panel::-webkit-scrollbar-thumb {
    background: #4b5563;
}

.dark-mode .right-panel::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 767px) {
    .right-panel {
        padding: 16px;
    }
    
    .right-panel__section {
        padding: 16px;
    }
    
    .right-panel__title {
        font-size: 16px;
    }
}

/* ===== ANIMACIONES ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.right-panel__section {
    animation: fadeIn 0.3s ease-out;
}

.friend-item,
.profile-card {
    animation: fadeIn 0.2s ease-out;
}

/* ===== SECCIÓN DE USUARIOS RECIENTES - MARKETING SOCIAL ===== */
.recent-users-section {
    margin-bottom: 30px;
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e1e5e9;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.recent-users__header {
    margin-bottom: 20px;
    text-align: center;
}

.recent-users__title {
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    margin: 0 0 15px 0;
    text-align: center;
    letter-spacing: 0.3px;
}

.recent-users__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-bottom: 20px;
    justify-content: center;
    padding: 0;
    max-width: 100%;
}

.recent-user__avatar-only {
    position: relative;
    transition: all 0.2s ease;
    cursor: pointer;
    display: block;
    text-decoration: none;
    color: inherit;
}

.recent-user__avatar-only:hover {
    transform: scale(1.1);
    z-index: 10;
}

/* Estilos específicos para enlaces de perfil */
.profile-link {
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    display: block;
    text-decoration: none;
    color: inherit;
}

.profile-link:hover {
    transform: scale(1.15);
    z-index: 15;
    filter: brightness(1.1);
}

.profile-link:hover .recent-user__img-only {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.profile-link:hover .recent-user__placeholder-only {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
}

/* Tooltip para mostrar nombre del usuario */
.profile-link::after {
    content: attr(title);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 20;
    pointer-events: none;
}

.profile-link:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

/* Indicador de click */
.profile-link:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

.recent-user__avatar {
    position: relative;
    flex-shrink: 0;
}

/* Estilos para diseño minimalista - solo fotos */
.recent-user__img-only {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #4ade80;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.2s ease;
}

.recent-user__placeholder-only {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    border: 1px solid #4ade80;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.2s ease;
}

.recent-user__status-only {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    border: 1px solid #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

/* Estilos originales para compatibilidad */
.recent-user__img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.recent-user__placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.recent-user__status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #27ae60;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.recent-user__info {
    flex: 1;
    min-width: 0;
}

.recent-user__name {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-user__time {
    font-size: 11px;
    color: #7f8c8d;
    font-weight: 400;
}

.recent-users__empty {
    text-align: center;
    padding: 30px 20px;
    color: #7f8c8d;
}

.recent-users__empty i {
    font-size: 32px;
    margin-bottom: 10px;
    color: #bdc3c7;
}

.recent-users__empty p {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

.recent-users__cta {
    text-align: center;
}

.recent-users__join-btn {
    background: transparent;
    color: #4b5563;
    border: 1px solid rgba(75, 85, 99, 0.5);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.recent-users__join-btn:hover {
    color: #1f2937;
    border-color: rgba(31, 41, 55, 0.7);
}

.recent-users__join-btn:active {
    transform: translateY(0);
}

/* --- Dark mode overrides for recent users --- */
.dark-mode .recent-users-section {
    background: #11161a;
    border-color: #1f2933;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.dark-mode .recent-users__title {
    color: #f1f5f9;
}

.dark-mode .recent-users__grid {
    background: transparent;
}

.dark-mode .recent-user__img-only,
.dark-mode .recent-user__placeholder-only {
    border-color: rgba(83, 252, 27, 0.6);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.35);
}

.dark-mode .recent-user__placeholder-only {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: #f8fafc;
}

.dark-mode .recent-user__status-only,
.dark-mode .recent-user__status {
    border-color: #0f172a;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.5);
}

.dark-mode .recent-user__status-only,
.dark-mode .recent-user__status {
    background: #53fc1b;
}

.dark-mode .recent-user__name {
    color: rgba(241, 245, 249, 0.95);
}

.dark-mode .recent-user__time {
    color: #94a3b8;
}

.dark-mode .recent-users__empty {
    color: #94a3b8;
}

.dark-mode .recent-users__empty i {
    color: #475569;
}

.dark-mode .recent-users__join-btn {
    background: transparent;
    color: rgba(226, 232, 240, 0.85);
    border-color: rgba(148, 163, 184, 0.45);
    box-shadow: none;
}

.dark-mode .recent-users__join-btn:hover {
    color: #f8fafc;
    border-color: rgba(226, 232, 240, 0.75);
}

.dark-mode .stats-section {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
    border-color: rgba(148, 163, 184, 0.25);
}

.dark-mode .stats__number {
    color: #f8fafc;
}

.dark-mode .stats__label {
    color: #94a3b8;
}

/* ===== SECCIÓN DE ESTADÍSTICAS ===== */
.stats-section {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.stats__item {
    flex: 1;
    text-align: center;
}

.stats__number {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 4px;
    line-height: 1;
}

.stats__label {
    font-size: 11px;
    color: #7f8c8d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dark-mode .stats-section {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.dark-mode .stats__item {
    color: rgba(226, 232, 240, 0.9);
}

.dark-mode .stats__number {
    color: rgba(248, 250, 252, 0.95);
}

.dark-mode .stats__label {
    color: rgba(148, 163, 184, 0.8);
}

/* ===== RESPONSIVE PARA USUARIOS RECIENTES ===== */
@media (max-width: 1200px) {
    .recent-users__grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 5px;
    }
    
    .recent-user__img-only,
    .recent-user__placeholder-only {
        width: 32px;
        height: 32px;
    }
    
    .recent-user__status-only {
        width: 7px;
        height: 7px;
    }
    
    .stats-section {
        padding: 15px;
        gap: 15px;
    }
    
    .stats__number {
        font-size: 18px;
    }
    
    .stats__label {
        font-size: 10px;
    }
}

@media (max-width: 768px) {
    .recent-users__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
    }
    
    .recent-user__img-only,
    .recent-user__placeholder-only {
        width: 28px;
        height: 28px;
    }
    
    .recent-user__status-only {
        width: 6px;
        height: 6px;
    }
    
    /* Ajustes para enlaces en móviles */
    .profile-link:hover {
        transform: scale(1.05); /* Menor escala en móviles */
    }
    
    .profile-link::after {
        font-size: 11px;
        padding: 4px 8px;
        bottom: -30px;
    }
    
    /* Desactivar hover en touch devices */
    @media (hover: none) {
        .profile-link:hover {
            transform: none;
            filter: none;
        }
        
        .profile-link:hover .recent-user__img-only {
            box-shadow: none;
        }
        
        .profile-link::after {
            display: none;
        }
    }
}

.chat-toast-container {
    position: fixed;
    bottom: 28px;
    right: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1100;
    pointer-events: none;
}

.chat-toast {
    background: rgba(15, 23, 42, 0.92);
    color: #f8fafc;
    padding: 14px 18px;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.35);
    min-width: 240px;
    max-width: 320px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: auto;
}

.chat-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.chat-toast strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.chat-toast span {
    font-size: 13px;
    color: rgba(226, 232, 240, 0.9);
}